@@ -234,7 +234,7 @@ enum triggerListName {
234234};
235235} // namespace nuclei
236236
237- struct deuteronInTriggeredEvents {
237+ struct DeuteronInTriggeredEvents {
238238 enum {
239239 kProton = BIT (0 ),
240240 kDeuteron = BIT (1 ),
@@ -261,19 +261,19 @@ struct deuteronInTriggeredEvents {
261261
262262 struct : o2::framework::ConfigurableGroup {
263263 std::string prefix{" cfgTrackCut" };
264- Configurable<LabeledArray<double >> DcaMax{ " DcaMax " , {nuclei::DCAcutDefault[0 ], 5 , 2 , nuclei::names, nuclei::nDCAConfigName}, " Max DCAxy and DCAz for light nuclei" };
265- Configurable<float > EtaMax{ " EtaMax " , 0 .8f , " Max Eta for tracks" };
266- Configurable<int > ITSnClusMin{ " ITSnClsMin " , 5 , " Minimum number of ITS clusters" };
267- Configurable<float > ITSchi2ClusMax{ " ITSchi2ClusMax " , 36 .f , " Max ITS Chi2 per cluster" };
268- Configurable<float > RapidityMax{ " RapidityMax " , 1 .f , " Maximum rapidity for tracks" };
269- Configurable<float > RapidityMin{ " RapidityMin " , -1 .f , " Minimum rapidity for tracks" };
270- Configurable<bool > RapidityToggle{ " RapidityToggle " , false , " If true, use rapidity cuts" };
271- Configurable<float > TPCchi2ClusMax{ " TPCchi2ClusMax " , 4 .f , " Max TPC Chi2 per cluster" };
272- Configurable<int > TPCnCrossedRowsMin{ " TPCnCrossedRowsMin " , 70 , " Minimum number of TPC crossed rows" };
273- Configurable<float > TPCnCrossedRowsOverFindableMin{ " TPCnCrossedRowsOverFindableMin " , 0 .8f , " Minimum ratio of crossed rows over findable clusters" };
274- Configurable<int > TPCnClsMin{ " TPCnClsMin " , 80 , " Minimum number of TPC clusters" };
275- Configurable<float > TPCrigidityMin{ " TPCrigidityMin " , 0 .5f , " Minimum TPC rigidity for tracks" };
276- Configurable<LabeledArray<double >> TPCnSigmaMax{ " TPCnSigmaMax " , {nuclei::nSigmaTPCdefault[0 ], 5 , 2 , nuclei::names, nuclei::nSigmaConfigName}, " TPC nsigma selection for light nuclei" };
264+ Configurable<LabeledArray<double >> dcaMax{ " dcaMax " , {nuclei::DCAcutDefault[0 ], 5 , 2 , nuclei::names, nuclei::nDCAConfigName}, " Max DCAxy and DCAz for light nuclei" };
265+ Configurable<float > etaMax{ " etaMax " , 0 .8f , " Max Eta for tracks" };
266+ Configurable<int > itsNClusMin{ " itsNClusMin " , 5 , " Minimum number of ITS clusters" };
267+ Configurable<float > itsChi2ClusMax{ " itsChi2ClusMax " , 36 .f , " Max ITS Chi2 per cluster" };
268+ Configurable<float > rapidityMax{ " rapidityMax " , 1 .f , " Maximum rapidity for tracks" };
269+ Configurable<float > rapidityMin{ " rapidityMin " , -1 .f , " Minimum rapidity for tracks" };
270+ Configurable<bool > rapidityToggle{ " rapidityToggle " , false , " If true, use rapidity cuts" };
271+ Configurable<float > tpcChi2ClusMax{ " tpcChi2ClusMax " , 4 .f , " Max TPC Chi2 per cluster" };
272+ Configurable<int > tpcNCrossedRowsMin{ " tpcNCrossedRowsMin " , 70 , " Minimum number of TPC crossed rows" };
273+ Configurable<float > tpcNCrossedRowsOverFindableMin{ " tpcNCrossedRowsOverFindableMin " , 0 .8f , " Minimum ratio of crossed rows over findable clusters" };
274+ Configurable<int > tpcNClsMin{ " tpcNClsMin " , 80 , " Minimum number of TPC clusters" };
275+ Configurable<float > tpcRigidityMin{ " tpcRigidityMin " , 0 .5f , " Minimum TPC rigidity for tracks" };
276+ Configurable<LabeledArray<double >> tpcNSigmaMax{ " tpcNSigmaMax " , {nuclei::nSigmaTPCdefault[0 ], 5 , 2 , nuclei::names, nuclei::nSigmaConfigName}, " TPC nsigma selection for light nuclei" };
277277 } cfgTrackCut;
278278
279279 Configurable<float > cfgCutPtMinTree{" cfgCutPtMinTree" , 0 .2f , " Minimum track transverse momentum for tree saving" };
@@ -328,7 +328,7 @@ struct deuteronInTriggeredEvents {
328328
329329 // CCDB options
330330 Configurable<int > cfgMaterialCorrection{" cfgMaterialCorrection" , static_cast <int >(o2::base::Propagator::MatCorrType::USEMatCorrLUT), " Type of material correction" };
331- Configurable<std::string> cfgCCDBurl{" ccdb-url " , " http://alice-ccdb.cern.ch" , " url of the ccdb repository" };
331+ Configurable<std::string> cfgCCDBurl{" cfgCCDBurl " , " http://alice-ccdb.cern.ch" , " url of the ccdb repository" };
332332 Configurable<std::string> cfgZorroCCDBpath{" cfgZorroCCDBpath" , " EventFiltering/Zorro/" , " path to the zorro ccdb objects" };
333333 int mRunNumber = 0 ;
334334 float mBz = 0 .f;
@@ -534,7 +534,7 @@ struct deuteronInTriggeredEvents {
534534 // The first index is set to 0 because it is for TPC
535535 for (int iS{0 }; iS < nuclei::species; ++iS) {
536536 for (unsigned int iMax{0 }; iMax < nuclei::pidName.size (); ++iMax) {
537- nuclei::pidCuts[0 ][iS][iMax] = cfgTrackCut.TPCnSigmaMax ->get (iS, iMax);
537+ nuclei::pidCuts[0 ][iS][iMax] = cfgTrackCut.tpcNSigmaMax ->get (iS, iMax);
538538 }
539539 }
540540
@@ -754,15 +754,18 @@ struct deuteronInTriggeredEvents {
754754 {nuclei::charges[4 ] * cfgMomentumScalingBetheBloch->get (4u , 0u ) / nuclei::masses[4 ], nuclei::charges[4 ] * cfgMomentumScalingBetheBloch->get (4u , 1u ) / nuclei::masses[4 ]}};
755755
756756 int nGloTracks[2 ]{0 , 0 }, nTOFTracks[2 ]{0 , 0 };
757+
758+ constexpr float MinMomentumForDeltaP = 0 .2f ;
759+
757760 for (const auto & track : tracks) { // start loop over tracks
758- if (std::abs (track.eta ()) > cfgTrackCut.EtaMax ||
759- track.tpcInnerParam () < cfgTrackCut.TPCrigidityMin ||
760- track.itsNCls () < cfgTrackCut.ITSnClusMin ||
761- track.tpcNClsFound () < cfgTrackCut.TPCnClsMin ||
762- track.tpcNClsCrossedRows () < cfgTrackCut.TPCnCrossedRowsMin ||
763- track.tpcNClsCrossedRows () < cfgTrackCut.TPCnCrossedRowsOverFindableMin * track.tpcNClsFindable () ||
764- track.tpcChi2NCl () > cfgTrackCut.TPCchi2ClusMax ||
765- track.itsChi2NCl () > cfgTrackCut.ITSchi2ClusMax ) {
761+ if (std::abs (track.eta ()) > cfgTrackCut.etaMax ||
762+ track.tpcInnerParam () < cfgTrackCut.tpcRigidityMin ||
763+ track.itsNCls () < cfgTrackCut.itsNClusMin ||
764+ track.tpcNClsFound () < cfgTrackCut.tpcNClsMin ||
765+ track.tpcNClsCrossedRows () < cfgTrackCut.tpcNCrossedRowsMin ||
766+ track.tpcNClsCrossedRows () < cfgTrackCut.tpcNCrossedRowsOverFindableMin * track.tpcNClsFindable () ||
767+ track.tpcChi2NCl () > cfgTrackCut.tpcChi2ClusMax ||
768+ track.itsChi2NCl () > cfgTrackCut.itsChi2ClusMax ) {
766769 continue ;
767770 }
768771 // temporary fix: tpcInnerParam() returns the momentum in all the software tags before --- CM: what does it mean
@@ -792,7 +795,7 @@ struct deuteronInTriggeredEvents {
792795 nSigmaTPC[iS] = nSigma[0 ][iS];
793796 selectedTPC[iS] = (nSigma[0 ][iS] > nuclei::pidCuts[0 ][iS][0 ] && nSigma[0 ][iS] < nuclei::pidCuts[0 ][iS][1 ]);
794797 goodToAnalyse = goodToAnalyse || selectedTPC[iS];
795- if (selectedTPC[iS] && track.p () > 0.2 ) {
798+ if (selectedTPC[iS] && track.p () > MinMomentumForDeltaP ) {
796799 nuclei::hDeltaP[iC][iS]->Fill (track.p (), 1 - correctedTpcInnerParam / track.p ()); // Important: see of there is a shift between track momentum and tpc innerparam
797800 }
798801 }
@@ -830,7 +833,7 @@ struct deuteronInTriggeredEvents {
830833
831834 for (int iS{0 }; iS < nuclei::species; ++iS) {
832835 bool selectedTOF{false };
833- if (std::abs (dcaInfo[1 ]) > cfgTrackCut.DcaMax ->get (iS, 1 )) {
836+ if (std::abs (dcaInfo[1 ]) > cfgTrackCut.dcaMax ->get (iS, 1 )) {
834837 continue ;
835838 }
836839 ROOT::Math::LorentzVector<ROOT::Math::PtEtaPhiM4D<float >> fvector{mTrackParCov .getPt () * nuclei::charges[iS], mTrackParCov .getEta (), mTrackParCov .getPhi (), nuclei::masses[iS]};
@@ -841,15 +844,15 @@ struct deuteronInTriggeredEvents {
841844 continue ;
842845 } else if (iPID) {
843846 selectedTOF = true ; // / temporarly skipped
844- float charge{1 . f + static_cast < float >(iS == 3 || iS == 4 ) };
847+ float charge{nuclei::charges[iS] };
845848 tofMasses[iS] = correctedTpcInnerParam * charge * std::sqrt (1 .f / (beta * beta) - 1 .f ) - nuclei::masses[iS];
846849 }
847- if (!cfgTrackCut.RapidityToggle || (y > cfgTrackCut.RapidityMin && y < cfgTrackCut.RapidityMax )) {
850+ if (!cfgTrackCut.rapidityToggle || (y > cfgTrackCut.rapidityMin && y < cfgTrackCut.rapidityMax )) {
848851 if (std::abs (nSigmaTPC[iS]) < cfgNsigmaTPCcutDCAhists && (!iPID || std::abs (tofMasses[iS]) < cfgDeltaTOFmassCutDCAhists)) {
849852 nuclei::hDCAxy[iPID][iS][iC]->Fill (fvector.pt (), dcaInfo[0 ]);
850853 nuclei::hDCAz[iPID][iS][iC]->Fill (fvector.pt (), dcaInfo[1 ]);
851854 }
852- if (std::abs (dcaInfo[0 ]) < cfgTrackCut.DcaMax ->get (iS, 0u )) {
855+ if (std::abs (dcaInfo[0 ]) < cfgTrackCut.dcaMax ->get (iS, 0u )) {
853856 if (!iPID) { // / temporary exclusion of the TOF nsigma PID for the He3 and Alpha
854857 nuclei::hNsigma[iPID][iS][iC]->Fill (fvector.pt (), nSigma[iPID][iS]);
855858 nuclei::hNsigmaEta[iPID][iS][iC]->Fill (fvector.eta (), fvector.pt (), nSigma[iPID][iS]);
@@ -919,7 +922,7 @@ struct deuteronInTriggeredEvents {
919922 }
920923 }
921924 }
922- PROCESS_SWITCH (deuteronInTriggeredEvents , processData, " Data analysis" , true );
925+ PROCESS_SWITCH (DeuteronInTriggeredEvents , processData, " Data analysis" , true );
923926
924927 Preslice<TrackCandidates> tracksPerCollisions = aod::track::collisionId;
925928 Preslice<o2::aod::McParticles> perMcCollision = aod::mcparticle::mcCollisionId;
@@ -1002,7 +1005,7 @@ struct deuteronInTriggeredEvents {
10021005 if (!storeIt) {
10031006 continue ;
10041007 }
1005- if (particle.y () < cfgTrackCut.RapidityMin || particle.y () > cfgTrackCut.RapidityMax ) {
1008+ if (particle.y () < cfgTrackCut.rapidityMin || particle.y () > cfgTrackCut.rapidityMax ) {
10061009 continue ;
10071010 }
10081011
@@ -1043,7 +1046,7 @@ struct deuteronInTriggeredEvents {
10431046 if (pdg != nuclei::codes[iS]) {
10441047 continue ;
10451048 }
1046- if (particle.y () < cfgTrackCut.RapidityMin || particle.y () > cfgTrackCut.RapidityMax ) {
1049+ if (particle.y () < cfgTrackCut.rapidityMin || particle.y () > cfgTrackCut.rapidityMax ) {
10471050 continue ;
10481051 }
10491052
@@ -1092,11 +1095,11 @@ struct deuteronInTriggeredEvents {
10921095 index++;
10931096 }
10941097 }
1095- PROCESS_SWITCH (deuteronInTriggeredEvents , processMC, " MC analysis" , false );
1098+ PROCESS_SWITCH (DeuteronInTriggeredEvents , processMC, " MC analysis" , false );
10961099};
10971100
10981101WorkflowSpec defineDataProcessing (ConfigContext const & cfgc)
10991102{
11001103 return WorkflowSpec{
1101- adaptAnalysisTask<deuteronInTriggeredEvents >(cfgc)};
1104+ adaptAnalysisTask<DeuteronInTriggeredEvents >(cfgc)};
11021105}
0 commit comments