@@ -52,12 +52,19 @@ using namespace o2::framework;
5252using namespace o2 ::framework::expressions;
5353using namespace o2 ::analysis::femtoDream;
5454
55+ inline o2::framework::expressions::Node coshEta (o2::framework::expressions::Node&& eta) {
56+ return (nexp (std::move (eta)) + nexp (0 .0f - std::move (eta))) * 0 .5f ;
57+ }
58+
5559struct HfTaskCharmHadronsFemtoDream {
5660
5761 enum TrackCharge {
5862 PositiveCharge = 1 ,
5963 NegativeCharge = -1
6064 };
65+
66+ constexpr static int OriginRecPrompt = 1 ;
67+ constexpr static int OriginRecFD = 2 ;
6168
6269 Produces<o2::aod::FDHfCharm> rowFemtoResultCharm;
6370 Produces<o2::aod::FDHfTrk> rowFemtoResultTrk;
@@ -145,16 +152,16 @@ struct HfTaskCharmHadronsFemtoDream {
145152
146153 Preslice<aod::FDParticles> perCol = aod::femtodreamparticle::fdCollisionId;
147154
148- // / Partition for particle 1
149- Partition<FilteredFDParticles> partitionTrk1 = (aod::femtodreamparticle::partType == uint8_t (aod::femtodreamparticle::ParticleType::kTrack )) && (ncheckbit(aod::femtodreamparticle::cut, cutBitTrack1)) && ifnode(aod::femtodreamparticle::pt * (nexp( aod::femtodreamparticle::eta) + nexp(- 1 .f * aod::femtodreamparticle::eta)) / 2 .f <= pidThresTrack1, ncheckbit(aod::femtodreamparticle::pidcut, tpcBitTrack1), ncheckbit(aod::femtodreamparticle::pidcut, tpcTofBitTrack1));
155+ // / Partition for particle 1
156+ Partition<FilteredFDParticles> partitionTrk1 = (aod::femtodreamparticle::partType == uint8_t (aod::femtodreamparticle::ParticleType::kTrack )) && (ncheckbit(aod::femtodreamparticle::cut, cutBitTrack1)) && ifnode(aod::femtodreamparticle::pt * coshEta ( aod::femtodreamparticle::eta) <= pidThresTrack1, ncheckbit(aod::femtodreamparticle::pidcut, tpcBitTrack1), ncheckbit(aod::femtodreamparticle::pidcut, tpcTofBitTrack1));
150157
151158 Partition<FilteredFDMcParts> partitionMcTrk1 = (aod::femtodreamparticle::partType == uint8_t (aod::femtodreamparticle::ParticleType::kTrack )) &&
152159 (ncheckbit(aod::femtodreamparticle::cut, cutBitTrack1)) &&
153- ifnode (aod::femtodreamparticle::pt * (nexp( aod::femtodreamparticle::eta) + nexp(- 1 .f * aod::femtodreamparticle::eta)) / 2.f <= pidThresTrack1, ncheckbit(aod::femtodreamparticle::pidcut, tpcBitTrack1), ncheckbit(aod::femtodreamparticle::pidcut, tpcTofBitTrack1));
160+ ifnode (aod::femtodreamparticle::pt * coshEta ( aod::femtodreamparticle::eta) <= pidThresTrack1, ncheckbit(aod::femtodreamparticle::pidcut, tpcBitTrack1), ncheckbit(aod::femtodreamparticle::pidcut, tpcTofBitTrack1));
154161
155162 // / Partition for particle 2
156163 Partition<FilteredCharmCands> partitionCharmHadron = aod::fdhf::bdtBkg < charmHadBkgBDTmax && aod::fdhf::bdtFD < charmHadFdBDTmax && aod::fdhf::bdtFD > charmHadFdBDTmin&& aod::fdhf::bdtPrompt<charmHadPromptBDTmax && aod::fdhf::bdtPrompt> charmHadPromptBDTmin;
157- Partition<FilteredCharmMcCands> partitionMcCharmHadron = aod::fdhf::originMcRec == 1 || aod::fdhf::originMcRec == 2 ;
164+ Partition<FilteredCharmMcCands> partitionMcCharmHadron = aod::fdhf::originMcRec == OriginRecPrompt || aod::fdhf::originMcRec == OriginRecFD ;
158165
159166 // / Axis configurables
160167 ConfigurableAxis dummy{" dummy" , {1 , 0 , 1 }, " dummy axis" };
@@ -171,7 +178,7 @@ struct HfTaskCharmHadronsFemtoDream {
171178 ConfigurableAxis binMulPercentile{" binMulPercentile" , {10 , 0 .0f , 100 .0f }, " multiplicity percentile Binning" };
172179 ConfigurableAxis binpTTrack{" binpTTrack" , {50 , 0.5 , 10.05 }, " pT binning of the pT vs. TempFitVar plot (Track)" };
173180 ConfigurableAxis binEta{" binEta" , {{200 , -1.5 , 1.5 }}, " eta binning" };
174- ConfigurableAxis binPhi{" binPhi" , {{200 , 0 , TMath::TwoPi () }}, " phi binning" };
181+ ConfigurableAxis binPhi{" binPhi" , {{200 , 0 , 2 . f * 3 .14159274101257324e+ 00f }}, " phi binning" };
175182 ConfigurableAxis binkT{" binkT" , {150 , 0 ., 9 .}, " binning kT" };
176183 ConfigurableAxis binkstar{" binkstar" , {1500 , 0 ., 6 .}, " binning kstar" };
177184 ConfigurableAxis binNSigmaTPC{" binNSigmaTPC" , {1600 , -8 , 8 }, " Binning of Nsigma TPC plot" };
@@ -300,10 +307,11 @@ struct HfTaskCharmHadronsFemtoDream {
300307 if (!pairCleaner.isCleanPair (p1, p2, parts)) {
301308 continue ;
302309 }
303-
310+
311+ constexpr int CUT_BIT_CHARGE_POSITIVE = 2 ;
304312 // proton track charge
305313 float chargeTrack = 0 .;
306- if ((p1.cut () & 2 ) == 2 ) {
314+ if ((p1.cut () & CUT_BIT_CHARGE_POSITIVE ) == CUT_BIT_CHARGE_POSITIVE ) {
307315 chargeTrack = PositiveCharge;
308316 } else {
309317 chargeTrack = NegativeCharge;
0 commit comments