Skip to content

Commit c55919d

Browse files
akhatunakhatun
andauthored
[PWGUD] Task update for potential memory leak (#11407)
Co-authored-by: akhatun <anisa@Anisas-MacBook-Pro.local>
1 parent f9a8c9c commit c55919d

File tree

1 file changed

+19
-13
lines changed

1 file changed

+19
-13
lines changed

PWGUD/AQC/udQC.cxx

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
/// \author Paul Buehler, paul.buehler@oeaw.ac.at
1515
/// \since 04.05.2023
1616

17+
#include <vector>
1718
#include "Framework/runDataProcessing.h"
1819
#include "Framework/AnalysisTask.h"
1920
#include "Framework/AnalysisDataModel.h"
@@ -191,8 +192,13 @@ struct UDQC {
191192
aod::Zdcs& zdcs, aod::Calos& calos,
192193
aod::V0s const& v0s, aod::Cascades const& cascades)
193194
{
194-
LOGF(debug, "<UDQC. Collision %d", collision.globalIndex());
195-
LOGF(debug, "<UDQC> Start %i", abcrs.size());
195+
// LOGF(debug, "<UDQC. Collision %d", collision.globalIndex());
196+
// LOGF(debug, "<UDQC> Start %i", abcrs.size());
197+
198+
if (!tracks.size())
199+
return;
200+
if (collision.numContrib() < 1)
201+
return;
196202

197203
bool isDGcandidate = true;
198204
registry.get<TH1>(HIST("collisions/Stat"))->Fill(0., isDGcandidate * 1.);
@@ -248,15 +254,15 @@ struct UDQC {
248254

249255
if (track.tpcSignal() > maxdEdxTPC) {
250256
maxdEdxTPC = track.tpcSignal();
251-
LOGF(debug, "<UDQC> New maxdEdx TPC %f", maxdEdxTPC);
257+
// LOGF(debug, "<UDQC> New maxdEdx TPC %f", maxdEdxTPC);
252258
}
253259

254260
// TOF hit?
255261
if (track.hasTOF()) {
256262
registry.get<TH2>(HIST("tracks/dEdxTOF"))->Fill(track.p() / track.sign(), track.beta());
257263
if (track.tofSignal() > maxdEdxTOF) {
258264
maxdEdxTOF = track.tofSignal();
259-
LOGF(debug, "<UDQC> New maxdEdx TOF %f", maxdEdxTOF);
265+
// LOGF(debug, "<UDQC> New maxdEdx TOF %f", maxdEdxTOF);
260266
}
261267

262268
// No vertex track with TOF hit?
@@ -281,7 +287,7 @@ struct UDQC {
281287
if (collision.numContrib() > 0) {
282288
rgtrwTOF /= collision.numContrib();
283289
}
284-
LOGF(debug, "<UDQC> PV tracks with TOF: %f [1]", rgtrwTOF);
290+
// LOGF(debug, "<UDQC> PV tracks with TOF: %f [1]", rgtrwTOF);
285291
registry.get<TH2>(HIST("collisions/tResvsrTOFTracks"))->Fill(collision.collisionTimeRes(), rgtrwTOF);
286292
registry.get<TH2>(HIST("collisions/tResvsTOFTrkNoPV"))->Fill(collision.collisionTimeRes(), norgtrwTOF);
287293

@@ -429,7 +435,7 @@ struct UDQC {
429435
}
430436
// define Lorentz vector to create invariant mass
431437
lvtmp.SetPtEtaPhiM(track.pt(), track.eta(), track.phi(), mass2Use);
432-
LOGF(debug, "mass %f track pt %f/%f eta %f/%f", mass2Use, track.pt(), lvtmp.Perp(), track.eta(), lvtmp.Eta());
438+
// LOGF(debug, "mass %f track pt %f/%f eta %f/%f", mass2Use, track.pt(), lvtmp.Perp(), track.eta(), lvtmp.Eta());
433439
if (track.pt() <= diffCuts.minPt() || track.pt() >= diffCuts.maxPt()) {
434440
goodpts = false;
435441
}
@@ -521,7 +527,7 @@ struct UDQC {
521527
registry.get<TH2>(HIST("DG/etaminus"))->Fill(track.eta(), track.phi());
522528
}
523529

524-
LOGF(debug, "dEdx TPC %f TOF %i %f", track.tpcSignal(), track.hasTOF(), track.hasTOF() ? track.tofSignal() : 0.);
530+
// LOGF(debug, "dEdx TPC %f TOF %i %f", track.tpcSignal(), track.hasTOF(), track.hasTOF() ? track.tofSignal() : 0.);
525531
if (collision.numContrib() == 2) {
526532
registry.get<TH2>(HIST("DG/dEdxTPC"))->Fill(track.tpcInnerParam() / track.sign(), track.tpcSignal());
527533
registry.get<TH1>(HIST("DG/trkDCAxy"))->Fill(track.dcaXY());
@@ -562,7 +568,7 @@ struct UDQC {
562568
void processCleanFIT1(CC const& collision, BCs const& bct0s,
563569
aod::FT0s const& /*ft0s*/, aod::FV0As const& /*fv0as*/, aod::FDDs const& /*fdds*/)
564570
{
565-
LOGF(debug, "<CleanFit. Collision %d", collision.globalIndex());
571+
// LOGF(debug, "<CleanFit. Collision %d", collision.globalIndex());
566572

567573
// test influence of BCrange width using a series of NDtcoll
568574
float ampFV0A, ampFT0A, ampFT0C, ampFDDA, ampFDDC;
@@ -618,7 +624,7 @@ struct UDQC {
618624
void processCleanFIT2(CC const& collision, BCs const& bct0s,
619625
aod::FT0s const& /*ft0s*/, aod::FV0As const& /*fv0as*/, aod::FDDs const& /*fdds*/)
620626
{
621-
LOGF(debug, "<CleanFit. Collision %d", collision.globalIndex());
627+
// LOGF(debug, "<CleanFit. Collision %d", collision.globalIndex());
622628
uint64_t bcnum = 0;
623629
if (collision.has_foundBC()) {
624630
auto collbc = collision.foundBC_as<BCs>();
@@ -677,7 +683,7 @@ struct UDQC {
677683
// ...............................................................................................................
678684
void processFV0(aod::FV0As const& fv0s, BCs const&)
679685
{
680-
LOGF(info, "<FV0Signals> %d", fv0s.size());
686+
// LOGF(info, "<FV0Signals> %d", fv0s.size());
681687
if (fv0s.size() <= 0) {
682688
return;
683689
}
@@ -695,7 +701,7 @@ struct UDQC {
695701
// ...............................................................................................................
696702
void processFT0(aod::FT0s const& ft0s, aod::FT0sCorrected const& ft0scorr, BCs const&)
697703
{
698-
LOGF(debug, "<processFT0> %d", ft0s.size());
704+
// LOGF(debug, "<processFT0> %d", ft0s.size());
699705
for (auto const& collision : ft0scorr) {
700706

701707
if (collision.t0ACorrectedValid()) {
@@ -729,7 +735,7 @@ struct UDQC {
729735
// ...............................................................................................................
730736
void processFDD(aod::FDDs const& fdds, BCs const&)
731737
{
732-
LOGF(debug, "<FDDSignals> %d", fdds.size());
738+
// LOGF(debug, "<FDDSignals> %d", fdds.size());
733739

734740
for (auto fdd : fdds) {
735741

@@ -751,7 +757,7 @@ struct UDQC {
751757
// ...............................................................................................................
752758
void processZDC(aod::Zdc const& zdc)
753759
{
754-
LOGF(debug, "<ZDCSignals> %d", zdc.size());
760+
// LOGF(debug, "<ZDCSignals> %d", zdc.size());
755761

756762
// Zdc energies
757763
registry.get<TH2>(HIST("ZdcEnergies"))->Fill(0., zdc.energyZEM1());

0 commit comments

Comments
 (0)