@@ -56,13 +56,15 @@ DECLARE_SOA_COLUMN(Pzp, pzp, float);
5656DECLARE_SOA_COLUMN (Ptp, ptp, float );
5757DECLARE_SOA_COLUMN (Etap, etap, float );
5858DECLARE_SOA_COLUMN (Phip, phip, float );
59+ DECLARE_SOA_COLUMN (TrackTypep, tracktypep, int );
5960DECLARE_SOA_COLUMN (EnergyN, energyN, float );
6061DECLARE_SOA_COLUMN (Pxn, pxn, float );
6162DECLARE_SOA_COLUMN (Pyn, pyn, float );
6263DECLARE_SOA_COLUMN (Pzn, pzn, float );
6364DECLARE_SOA_COLUMN (Ptn, ptn, float );
6465DECLARE_SOA_COLUMN (Etan, etan, float );
6566DECLARE_SOA_COLUMN (Phin, phin, float );
67+ DECLARE_SOA_COLUMN (TrackTypen, tracktypen, int );
6668// zn
6769DECLARE_SOA_COLUMN (Tzna, tzna, float );
6870DECLARE_SOA_COLUMN (Ezna, ezna, float );
@@ -77,8 +79,8 @@ DECLARE_SOA_TABLE(DiMu, "AOD", "DIMU",
7779 dimu::RunNumber,
7880 dimu::M, dimu::Energy, dimu::Px, dimu::Py, dimu::Pz, dimu::Pt, dimu::Rap, dimu::Phi,
7981 dimu::PhiAv, dimu::PhiCh,
80- dimu::EnergyP, dimu::Pxp, dimu::Pyp, dimu::Pzp, dimu::Ptp, dimu::Etap, dimu::Phip,
81- dimu::EnergyN, dimu::Pxn, dimu::Pyn, dimu::Pzn, dimu::Ptn, dimu::Etan, dimu::Phin,
82+ dimu::EnergyP, dimu::Pxp, dimu::Pyp, dimu::Pzp, dimu::Ptp, dimu::Etap, dimu::Phip, dimu::TrackTypep,
83+ dimu::EnergyN, dimu::Pxn, dimu::Pyn, dimu::Pzn, dimu::Ptn, dimu::Etan, dimu::Phin, dimu::TrackTypen,
8284 dimu::Tzna, dimu::Ezna, dimu::Tznc, dimu::Eznc, dimu::Nclass);
8385} // namespace o2::aod
8486
@@ -125,9 +127,11 @@ DECLARE_SOA_COLUMN(PhiCh, phiCh, float);
125127DECLARE_SOA_COLUMN (Ptp, ptp, float );
126128DECLARE_SOA_COLUMN (Etap, etap, float );
127129DECLARE_SOA_COLUMN (Phip, phip, float );
130+ DECLARE_SOA_COLUMN (TrackTypep, tracktypep, int );
128131DECLARE_SOA_COLUMN (Ptn, ptn, float );
129132DECLARE_SOA_COLUMN (Etan, etan, float );
130133DECLARE_SOA_COLUMN (Phin, phin, float );
134+ DECLARE_SOA_COLUMN (TrackTypen, tracktypen, int );
131135// gen info dimuon
132136DECLARE_SOA_COLUMN (GenPt, genPt, float );
133137DECLARE_SOA_COLUMN (GenRap, genRap, float );
@@ -147,8 +151,8 @@ DECLARE_SOA_TABLE(RecoDimu, "AOD", "RECODIMU",
147151 recodimu::RunNumber,
148152 recodimu::M, recodimu::Pt, recodimu::Rap, recodimu::Phi,
149153 recodimu::PhiAv, recodimu::PhiCh,
150- recodimu::Ptp, recodimu::Etap, recodimu::Phip,
151- recodimu::Ptn, recodimu::Etan, recodimu::Phin,
154+ recodimu::Ptp, recodimu::Etap, recodimu::Phip, recodimu::TrackTypep,
155+ recodimu::Ptn, recodimu::Etan, recodimu::Phin, recodimu::TrackTypen,
152156 recodimu::GenPt, recodimu::GenRap, recodimu::GenPhi,
153157 recodimu::GenPtp, recodimu::GenEtap, recodimu::GenPhip,
154158 recodimu::GenPtn, recodimu::GenEtan, recodimu::GenPhin);
@@ -164,8 +168,8 @@ const float kRAbsMid = 26.5;
164168const float kRAbsMax = 89.5 ;
165169const float kPDca1 = 200 .;
166170const float kPDca2 = 200 .;
167- const float kEtaMin = -4.0 ;
168- const float kEtaMax = -2.5 ;
171+ float kEtaMin = -4.0 ;
172+ float kEtaMax = -2.5 ;
169173const float kPtMin = 0 .;
170174
171175struct FwdMuonsUPC {
@@ -227,6 +231,10 @@ struct FwdMuonsUPC {
227231 Configurable<int > nBinsZDCen{" nBinsZDCen" , 200 , " N bins in ZN energy" };
228232 Configurable<float > lowEnZN{" lowEnZN" , -50 ., " lower limit in ZN energy histo" };
229233 Configurable<float > highEnZN{" highEnZN" , 250 ., " upper limit in ZN energy histo" };
234+ // my track type
235+ // 0 = MCH-MID-MFT
236+ // 1 = MCH-MID
237+ Configurable<int > myTrackType{" myTrackType" ,3 ," My track type" };
230238
231239 void init (InitContext&)
232240 {
@@ -459,7 +467,7 @@ struct FwdMuonsUPC {
459467 float eta = p.Eta ();
460468 float pt = p.Pt ();
461469 float pDcaMax = rAbs < kRAbsMid ? kPDca1 : kPDca2 ;
462-
470+ LOGF (info, " eta min = %f " , kEtaMin );
463471 if (eta < kEtaMin || eta > kEtaMax )
464472 return false ;
465473 if (pt < kPtMin )
@@ -521,12 +529,6 @@ struct FwdMuonsUPC {
521529 return ;
522530 }
523531
524- // track selection
525- if (!isMuonSelected (*tr1))
526- return ;
527- if (!isMuonSelected (*tr2))
528- return ;
529-
530532 // MCH-MID match selection
531533 int nMIDs = 0 ;
532534 if (tr1.chi2MatchMCHMID () > 0 )
@@ -536,6 +538,27 @@ struct FwdMuonsUPC {
536538 if (nMIDs != 2 )
537539 return ;
538540
541+ // MFT-MID match selection (if MFT is requested by the trackType)
542+ if (myTrackType==0 ){
543+ // if MFT is requested check that the tracks is inside the MFT acceptance
544+ kEtaMin = -3.6 ;
545+ kEtaMax = -2.5 ;
546+
547+ int nMFT = 0 ;
548+ if (tr1.chi2MatchMCHMFT () > 0 && tr1.chi2MatchMCHMFT () < 30 )
549+ nMFT++;
550+ if (tr2.chi2MatchMCHMFT () > 0 && tr2.chi2MatchMCHMFT () < 30 )
551+ nMFT++;
552+ if (nMFT != 2 )
553+ return ;
554+ }
555+
556+ // track selection
557+ if (!isMuonSelected (*tr1))
558+ return ;
559+ if (!isMuonSelected (*tr2))
560+ return ;
561+
539562 // form Lorentz vectors
540563 TLorentzVector p1, p2;
541564 auto mMu = particleMass (13 );
@@ -641,15 +664,15 @@ struct FwdMuonsUPC {
641664 dimuSel (cand.runNumber (),
642665 p.M (), p.E (), p.Px (), p.Py (), p.Pz (), p.Pt (), p.Rapidity (), p.Phi (),
643666 phiAverage, phiCharge,
644- p1.E (), p1.Px (), p1.Py (), p1.Pz (), p1.Pt (), p1.PseudoRapidity (), p1.Phi (),
645- p2.E (), p2.Px (), p2.Py (), p2.Pz (), p2.Pt (), p2.PseudoRapidity (), p2.Phi (),
667+ p1.E (), p1.Px (), p1.Py (), p1.Pz (), p1.Pt (), p1.PseudoRapidity (), p1.Phi (), ( int )myTrackType,
668+ p2.E (), p2.Px (), p2.Py (), p2.Pz (), p2.Pt (), p2.PseudoRapidity (), p2.Phi (), ( int )myTrackType,
646669 zdc.timeA , zdc.enA , zdc.timeC , zdc.enC , znClass);
647670 } else {
648671 dimuSel (cand.runNumber (),
649672 p.M (), p.E (), p.Px (), p.Py (), p.Pz (), p.Pt (), p.Rapidity (), p.Phi (),
650673 phiAverage, phiCharge,
651- p2.E (), p2.Px (), p2.Py (), p2.Pz (), p2.Pt (), p2.PseudoRapidity (), p2.Phi (),
652- p1.E (), p1.Px (), p1.Py (), p1.Pz (), p1.Pt (), p1.PseudoRapidity (), p1.Phi (),
674+ p2.E (), p2.Px (), p2.Py (), p2.Pz (), p2.Pt (), p2.PseudoRapidity (), p2.Phi (), ( int )myTrackType,
675+ p1.E (), p1.Px (), p1.Py (), p1.Pz (), p1.Pt (), p1.PseudoRapidity (), p1.Phi (), ( int )myTrackType,
653676 zdc.timeA , zdc.enA , zdc.timeC , zdc.enC , znClass);
654677 }
655678 }
@@ -749,12 +772,6 @@ struct FwdMuonsUPC {
749772 return ;
750773 }
751774
752- // track selection
753- if (!isMuonSelected (*tr1))
754- return ;
755- if (!isMuonSelected (*tr2))
756- return ;
757-
758775 // MCH-MID match selection
759776 int nMIDs = 0 ;
760777 if (tr1.chi2MatchMCHMID () > 0 )
@@ -764,6 +781,27 @@ struct FwdMuonsUPC {
764781 if (nMIDs != 2 )
765782 return ;
766783
784+ // MFT-MID match selection (if MFT is requested by the trackType)
785+ if (myTrackType==0 ){
786+ // if MFT is requested check that the tracks is inside the MFT acceptance
787+ kEtaMin = -3.6 ;
788+ kEtaMax = -2.5 ;
789+
790+ int nMFT = 0 ;
791+ if (tr1.chi2MatchMCHMFT () > 0 && tr1.chi2MatchMCHMFT () < 30 )
792+ nMFT++;
793+ if (tr2.chi2MatchMCHMFT () > 0 && tr2.chi2MatchMCHMFT () < 30 )
794+ nMFT++;
795+ if (nMFT != 2 )
796+ return ;
797+ }
798+
799+ // track selection
800+ if (!isMuonSelected (*tr1))
801+ return ;
802+ if (!isMuonSelected (*tr2))
803+ return ;
804+
767805 // form Lorentz vectors
768806 TLorentzVector p1, p2;
769807 auto mMu = particleMass (13 );
@@ -859,8 +897,8 @@ struct FwdMuonsUPC {
859897 dimuReco (cand.runNumber (),
860898 p.M (), p.Pt (), p.Rapidity (), p.Phi (),
861899 phiAverage, phiCharge,
862- p1.Pt (), p1.PseudoRapidity (), p1.Phi (),
863- p2.Pt (), p2.PseudoRapidity (), p2.Phi (),
900+ p1.Pt (), p1.PseudoRapidity (), p1.Phi (), ( int )myTrackType,
901+ p2.Pt (), p2.PseudoRapidity (), p2.Phi (), ( int )myTrackType,
864902 // gen info
865903 pMc.Pt (), pMc.Rapidity (), pMc.Phi (),
866904 p1Mc.Pt (), p1Mc.PseudoRapidity (), p1Mc.Phi (),
@@ -869,8 +907,8 @@ struct FwdMuonsUPC {
869907 dimuReco (cand.runNumber (),
870908 p.M (), p.Pt (), p.Rapidity (), p.Phi (),
871909 phiAverage, phiCharge,
872- p2.Pt (), p2.PseudoRapidity (), p2.Phi (),
873- p1.Pt (), p1.PseudoRapidity (), p1.Phi (),
910+ p2.Pt (), p2.PseudoRapidity (), p2.Phi (), ( int )myTrackType,
911+ p1.Pt (), p1.PseudoRapidity (), p1.Phi (), ( int )myTrackType,
874912 // gen info
875913 pMc.Pt (), pMc.Rapidity (), pMc.Phi (),
876914 p2Mc.Pt (), p2Mc.PseudoRapidity (), p2Mc.Phi (),
0 commit comments