@@ -187,8 +187,8 @@ struct LnnCandidate {
187187 float genPhiPi () const { return std::atan2 (gMomPi [1 ], gMomPi [0 ]); }
188188 float genEtaPi () const { return std::asinh (gMomPi [2 ] / genPtPi ()); }
189189
190- int posTrackID;
191- int negTrackID;
190+ int posTrackID{- 1 } ;
191+ int negTrackID{- 1 } ;
192192 float dcaV0dau = -10 ;
193193 float cosPA = -10 ;
194194 float nSigma3H = -10 ;
@@ -201,13 +201,13 @@ struct LnnCandidate {
201201 float dcaPvtoPi = -10 .f;
202202 float beta = -10 .f;
203203 float tpcChi3H = -10 .f;
204- std::array<float , 3 > mom3H;
205- std::array<float , 3 > momPi;
206- std::array<float , 3 > decVtx;
207- std::array<float , 3 > gMom ;
208- std::array<float , 3 > gMom3H ;
209- std::array<float , 3 > gMomPi ;
210- std::array<float , 3 > gDecVtx ;
204+ std::array<float , 3 > mom3H{} ;
205+ std::array<float , 3 > momPi{} ;
206+ std::array<float , 3 > decVtx{} ;
207+ std::array<float , 3 > gMom {} ;
208+ std::array<float , 3 > gMom3H {} ;
209+ std::array<float , 3 > gMomPi {} ;
210+ std::array<float , 3 > gDecVtx {} ;
211211 uint16_t tpcSignal3H = 0u ;
212212 uint16_t tpcSignalPi = 0u ;
213213 uint8_t nTPCClusters3H = 0u ;
@@ -225,7 +225,7 @@ struct LnnCandidate {
225225 uint8_t flags = 0u ; // flags for dughter particles
226226};
227227
228- struct lnnRecoTask {
228+ struct LnnRecoTask {
229229
230230 Produces<aod::DataLnnCands> outputDataTable;
231231 Produces<aod::MCLnnCands> outputMCTable;
@@ -325,9 +325,9 @@ struct lnnRecoTask {
325325
326326 HistogramRegistry qaRegistry{" QA" , {}, OutputObjHandlingPolicy::AnalysisObject};
327327
328- int mRunNumber ;
329- float d_bz ;
330- std::array<float , 6 > mBBparams3H ;
328+ int mRunNumber {- 1 } ;
329+ float dBz{ 0 . f } ;
330+ std::array<float , 6 > mBBparams3H {} ;
331331
332332 static constexpr float KallEvents = 0 .;
333333 static constexpr float KevAfterSel8 = 1 .;
@@ -494,7 +494,7 @@ struct lnnRecoTask {
494494 if (mRunNumber == bc.runNumber ()) {
495495 return ;
496496 }
497- auto run3grp_timestamp = bc.timestamp ();
497+ auto run3grptimestamp = bc.timestamp ();
498498
499499 static const double kBzAutoThreshold = -990 .;
500500
@@ -505,26 +505,26 @@ struct lnnRecoTask {
505505 if (dBzInput < kBzAutoThreshold ) {
506506 // Fetch magnetic field from ccdb for current collision
507507 d_bz = grpo->getNominalL3Field ();
508- LOG (info) << " Retrieved GRP for timestamp " << run3grp_timestamp << " with magnetic field of " << d_bz << " kZG" ;
508+ LOG (info) << " Retrieved GRP for timestamp " << run3grptimestamp << " with magnetic field of " << d_bz << " kZG" ;
509509 } else {
510510 d_bz = dBzInput;
511511 }
512512 } else {
513- grpmag = ccdb->getForTimeStamp <o2::parameters::GRPMagField>(grpmagPath, run3grp_timestamp );
513+ grpmag = ccdb->getForTimeStamp <o2::parameters::GRPMagField>(grpmagPath, run3grptimestamp );
514514 if (!grpmag) {
515515 LOG (fatal) << " Got nullptr from CCDB for path " << grpmagPath << " of object GRPMagField and " << grpPath << " of object GRPObject for timestamp " << run3grp_timestamp;
516516 }
517517 o2::base::Propagator::initFieldFromGRP (grpmag);
518518 if (dBzInput < kBzAutoThreshold ) {
519519 // Fetch magnetic field from ccdb for current collision
520520 d_bz = std::lround (5 .f * grpmag->getL3Current () / 30000 .f );
521- LOG (info) << " Retrieved GRP for timestamp " << run3grp_timestamp << " with magnetic field of " << d_bz << " kZG" ;
521+ LOG (info) << " Retrieved GRP for timestamp " << run3grptimestamp << " with magnetic field of " << d_bz << " kZG" ;
522522 } else {
523523 d_bz = dBzInput;
524524 }
525525 }
526526 if (!pidPath.value .empty ()) {
527- auto h3pid = ccdb->getForTimeStamp <std::array<float , 6 >>(pidPath.value + " _3H" , run3grp_timestamp );
527+ auto h3pid = ccdb->getForTimeStamp <std::array<float , 6 >>(pidPath.value + " _3H" , run3grptimestamp );
528528 std::copy (h3pid->begin (), h3pid->end (), mBBparams3H .begin ());
529529 } else {
530530 int kNBetheBlochParams = 5 ;
@@ -595,8 +595,8 @@ struct lnnRecoTask {
595595 }
596596 auto & h3track = lnnCand.isMatter ? posTrack : negTrack;
597597 auto & pitrack = lnnCand.isMatter ? negTrack : posTrack;
598- auto & h3Rigidity = lnnCand.isMatter ? posRigidity : negRigidity;
599- auto & piRigidity = lnnCand.isMatter ? negRigidity : posRigidity;
598+ auto & float h3Rigidity = lnnCand.isMatter ? posRigidity : negRigidity;
599+ auto & float piRigidity = lnnCand.isMatter ? negRigidity : posRigidity;
600600
601601 if (doTrackQA) {
602602 // fill QA track histogram studies to check track signal before selections
@@ -709,10 +709,10 @@ struct lnnRecoTask {
709709 continue ;
710710 }
711711 // Definition of lnn mass
712- float mLNN_HypHI = 3.00 ; // , but 2993.7 MeV/c**2
712+ float mLnnHypHi = 3.00 ; // , but 2993.7 MeV/c**2
713713 float massLNNL = std::sqrt (h3lE * h3lE - lnnMom[0 ] * lnnMom[0 ] - lnnMom[1 ] * lnnMom[1 ] - lnnMom[2 ] * lnnMom[2 ]);
714714 bool isLNNMass = false ;
715- if (massLNNL > mLNN_HypHI - masswidth && massLNNL < mLNN_HypHI + masswidth) {
715+ if (massLNNL > mLnnHypHi - masswidth && massLNNL < mLnnHypHi + masswidth) {
716716 isLNNMass = true ;
717717 }
718718 if (!isLNNMass) {
@@ -924,10 +924,10 @@ struct lnnRecoTask {
924924 hCentFV0A->Fill (collision.centFV0A ());
925925
926926 const uint64_t collIdx = collision.globalIndex ();
927- auto v0Table_thisCollision = V0s.sliceBy (perCollision, collIdx);
928- v0Table_thisCollision .bindExternalIndices (&tracks);
927+ auto v0TablethisCollision = V0s.sliceBy (perCollision, collIdx);
928+ v0TablethisCollision .bindExternalIndices (&tracks);
929929
930- fillCandidateData (collision, v0Table_thisCollision );
930+ fillCandidateData (collision, v0TablethisCollision );
931931
932932 for (const auto & lnnCand : lnnCandidates) {
933933 outputDataTable (collision.centFT0A (), collision.centFT0C (), collision.centFT0M (),
@@ -944,7 +944,7 @@ struct lnnRecoTask {
944944 }
945945 }
946946 }
947- PROCESS_SWITCH (lnnRecoTask , processData, " Data analysis" , true );
947+ PROCESS_SWITCH (LnnRecoTask , processData, " Data analysis" , true );
948948
949949 // MC process
950950 void processMC (CollisionsFullMC const & collisions, aod::McCollisions const & mcCollisions, aod::V0s const & V0s, aod::BCsWithTimestamps const &, TracksFull const & tracks, TracksFullMC const & tracksMC, aod::McTrackLabels const & trackLabelsMC, aod::McParticles const & particlesMC)
@@ -996,10 +996,10 @@ struct lnnRecoTask {
996996 }
997997
998998 const uint64_t collIdx = collision.globalIndex ();
999- auto v0Table_thisCollision = V0s.sliceBy (perCollision, collIdx);
1000- v0Table_thisCollision .bindExternalIndices (&tracks);
999+ auto v0TablethisCollision = V0s.sliceBy (perCollision, collIdx);
1000+ v0TablethisCollision .bindExternalIndices (&tracks);
10011001
1002- fillCandidateData (collision, v0Table_thisCollision );
1002+ fillCandidateData (collision, v0TablethisCollision );
10031003 fillMCinfo (trackLabelsMC, particlesMC);
10041004
10051005 // Fill MC gen. particles producing to the current MC collision
@@ -1146,7 +1146,7 @@ struct lnnRecoTask {
11461146 lnnCand.gDecVtx [0 ], lnnCand.gDecVtx [1 ], lnnCand.gDecVtx [2 ], lnnCand.isReco , lnnCand.isSignal , lnnCand.recoMcColl , lnnCand.survEvSelection );
11471147 }
11481148 }
1149- PROCESS_SWITCH (lnnRecoTask , processMC, " MC analysis" , false );
1149+ PROCESS_SWITCH (LnnRecoTask , processMC, " MC analysis" , false );
11501150
11511151 template <typename CollType>
11521152 bool passEvtSel (const CollType& collision)
@@ -1268,12 +1268,12 @@ struct lnnRecoTask {
12681268 }
12691269 }
12701270 }
1271- PROCESS_SWITCH (lnnRecoTask , processSigEvtLossMC, " Signal and event loss analysis" , false );
1271+ PROCESS_SWITCH (LnnRecoTask , processSigEvtLossMC, " Signal and event loss analysis" , false );
12721272};
12731273
12741274WorkflowSpec
12751275 defineDataProcessing (ConfigContext const & cfgc)
12761276{
12771277 return WorkflowSpec{
1278- adaptAnalysisTask<lnnRecoTask >(cfgc)};
1278+ adaptAnalysisTask<LnnRecoTask >(cfgc)};
12791279}
0 commit comments