3434#include < Framework/OutputObjHeader.h>
3535#include < Framework/runDataProcessing.h>
3636
37- #include " TRandom.h"
3837#include < TLorentzVector.h>
3938#include < TMath.h>
4039#include < TMathBase.h>
@@ -102,16 +101,17 @@ struct kstarInOO {
102101 Configurable<int > cDebugLevel{" cDebugLevel" , 0 , " Resolution of Debug" };
103102
104103 // Mixing
105- ConfigurableAxis cfg_bins_MixVtx{ " cfg_bins_MixVtx " , {VARIABLE_WIDTH, - 10 . 0f , - 8 . f , - 6 . f , - 4 . f , - 2 . f , 0 . f , 2 . f , 4 . f , 6 . f , 8 . f , 10 . f }, " Mixing bins - z-vertex " };
106- ConfigurableAxis cfg_bins_MixMult{ " cfg_bins_MixMult " , {VARIABLE_WIDTH, 0 .0f , 1 . 0f , 5 . 0f , 10 . 0f , 20 . 0f , 30 . 0f , 40 . 0f , 50 . 0f , 60 . 0f , 70 . 0f , 80 . 0f }, " Mixing bins - z-vertex" };
107- Configurable<int > cfg_Mix_NMixedEvents{" cfg_Mix_NMixedEvents" , 5 , " Number of mixed events per event" };
104+ ConfigurableAxis cfg_bins_MixMult{ " cfg_bins_Cent " , {VARIABLE_WIDTH, 0.0 , 1.0 , 5.0 , 10.0 , 20.0 , 30.0 , 40.0 , 50.0 , 60.0 , 70.0 , 80.0 , 90.0 , 100.0 , 110.0 }, " Binning of the centrality axis " };
105+ ConfigurableAxis cfg_bins_MixVtx{ " cfg_bins_MixVtx " , {VARIABLE_WIDTH, - 10 .0f , - 5 . f , 0 . f , 5 . f , 10 . f }, " Mixing bins - z-vertex" };
106+ Configurable<int > cfg_Mix_NMixedEvents{" cfg_Mix_NMixedEvents" , 10 , " Number of mixed events per event" };
108107
109108 // Pair
110109 Configurable<int > cfg_MinvNBins{" cfg_MinvNBins" , 300 , " Number of bins for Minv axis" };
111110 Configurable<float > cfg_MinvMin{" cfg_MinvMin" , 0.60 , " Minimum Minv value" };
112111 Configurable<float > cfg_MinvMax{" cfg_MinvMax" , 1.20 , " Maximum Minv value" };
113112
114113 // Histogram
114+ Configurable<bool > cfg_Event_CutQA{" cfg_Event_CutsQA" , false , " Enable Event QA Hists" };
115115 Configurable<bool > cfg_Track_CutQA{" cfg_Track_CutQA" , false , " Enable Track QA Hists" };
116116
117117 // std::vector<int> eventSelectionBits;
@@ -125,6 +125,11 @@ struct kstarInOO {
125125 const AxisSpec PIDAxis = {120 , -6 , 6 };
126126 const AxisSpec MinvAxis = {cfg_MinvNBins, cfg_MinvMin, cfg_MinvMax};
127127
128+ if (cfg_Event_CutQA) {
129+ OOhistos.add (" hPosZ_BC" , " PosZ_Bc" , kTH1F , {{100 , 0.0 , 15.0 }});
130+ OOhistos.add (" hPosZ_AC" , " PosZ_AC" , kTH1F , {{100 , 0.0 , 15.0 }});
131+ }
132+
128133 if (cfg_Track_CutQA) {
129134 OOhistos.add (" h_rawpT" , " h_rawpT" , kTH1F , {{1000 , 0.0 , 10.0 }});
130135 OOhistos.add (" h_rawpT_Kaon" , " h_rawpT_Kaon" , kTH1F , {{1000 , 0.0 , 10.0 }});
@@ -165,8 +170,8 @@ struct kstarInOO {
165170 // For Mixed Event
166171 using BinningType = ColumnBinningPolicy<aod::collision::PosZ, aod::cent::CentFT0C>;
167172
168- Partition<TrackCandidates_MC> Kaon_MC = (!cfg_Track_TPCPID || ( nabs(aod::pidtpc::tpcNSigmaKa) <= cfg_Track_TPCPID_nSig)) ;
169- Partition<TrackCandidates_MC> Pion_MC = (!cfg_Track_TPCPID || ( nabs(aod::pidtpc::tpcNSigmaPi) <= cfg_Track_TPCPID_nSig)) ;
173+ Partition<TrackCandidates_MC> Kaon_MC = nabs(aod::pidtpc::tpcNSigmaKa) <= cfg_Track_TPCPID_nSig;
174+ Partition<TrackCandidates_MC> Pion_MC = nabs(aod::pidtpc::tpcNSigmaPi) <= cfg_Track_TPCPID_nSig;
170175
171176 double massKa = o2::constants::physics::MassKPlus;
172177 double massPi = o2::constants::physics::MassPiMinus;
@@ -181,17 +186,16 @@ struct kstarInOO {
181186 {
182187 if (!event.sel8 ())
183188 return false ;
184-
189+ if (std::abs (event.posZ ()) > cfg_Event_VtxCut)
190+ return false ;
185191 if (!event.selection_bit (aod::evsel::kIsGoodZvtxFT0vsPV ))
186192 return false ;
187193 if (!event.selection_bit (aod::evsel::kNoSameBunchPileup ))
188194 return false ;
189-
190195 if (!event.selection_bit (aod::evsel::kNoTimeFrameBorder ))
191196 return false ;
192197 if (!event.selection_bit (aod::evsel::kNoITSROFrameBorder ))
193198 return false ;
194-
195199 if (!event.selection_bit (aod::evsel::kNoCollInTimeRangeStandard ))
196200 return false ;
197201
@@ -335,9 +339,11 @@ struct kstarInOO {
335339 if (!trackPIDKaon (trk1) || !trackPIDPion (trk2))
336340 return {-1.0 , -1.0 };
337341
338- if (trk1.globalIndex () == trk2.globalIndex ())
339- return {- 1.0 , - 1.0 }; // For Kstar, we need to run (0,1), (1,0) pairs as well. but same id pairs are not neede.
342+ if (trk1.globalIndex () == trk2.globalIndex ()) {
343+ // std::cout<<"This happens"<<std::endl;
340344
345+ return {-1.0 , -1.0 }; // For Kstar, we need to run (0,1), (1,0) pairs as well. but same id pairs are not neede.
346+ }
341347 lDecayDaughter1.SetXYZM (trk1.px (), trk1.py (), trk1.pz (), massKa);
342348 lDecayDaughter2.SetXYZM (trk2.px (), trk2.py (), trk2.pz (), massPi);
343349 lResonance = lDecayDaughter1 + lDecayDaughter2;
@@ -371,9 +377,6 @@ struct kstarInOO {
371377 if (!goodEv)
372378 return ;
373379
374- if (std::fabs (collision.posZ ()) > cfg_Event_VtxCut)
375- return ;
376-
377380 bool INELgt0 = false ;
378381 for (const auto & track : tracks) {
379382 if (std::fabs (track.eta ()) < cfg_Track_MaxEta) {
@@ -385,7 +388,6 @@ struct kstarInOO {
385388 return ;
386389
387390 OOhistos.fill (HIST (" nEvents_MC" ), 1.5 );
388-
389391 TrackSlicing_MC (collision, tracks, collision, tracks, false );
390392
391393 } // processSameEvents_MC
@@ -410,7 +412,6 @@ struct kstarInOO {
410412 std::cout << " Processed Mixed Events: " << nEvents_MC_Mix << std::endl;
411413 }
412414 }
413-
414415 auto goodEv1 = eventSelection (collision1);
415416 auto goodEv2 = eventSelection (collision2);
416417 OOhistos.fill (HIST (" nEvents_MC_Mix" ), 0.5 );
0 commit comments