2929#include " CCDB/BasicCCDBManager.h"
3030#include " CCDB/CcdbApi.h"
3131#include " CommonConstants/MathConstants.h"
32+ #include " MathUtils/BetheBlochAleph.h"
3233#include " Framework/ASoAHelpers.h"
3334#include " Framework/AnalysisDataModel.h"
3435#include " Framework/AnalysisTask.h"
3536#include " Framework/HistogramRegistry.h"
3637#include " Framework/runDataProcessing.h"
37- #include " MathUtils/BetheBlochAleph.h"
3838#include < Framework/Configurable.h>
3939
4040#include < Math/GenVector/Boost.h>
@@ -61,9 +61,6 @@ struct filterdoublephi {
6161
6262 // events
6363 Configurable<float > cfgCutVertex{" cfgCutVertex" , 10 .0f , " Accepted z-vertex range" };
64- Configurable<bool > isApplySel8{" isApplySel8" , true , " Apply sel8 event selection" };
65- Configurable<bool > isApplyTimeFrame{" isApplyTimeFrame" , false , " Apply Time Frame border selection" };
66- Configurable<bool > isApplyITSROF{" isApplyITSROF" , false , " Apply ITS ROF border selection" };
6764 // Configurable<float> cfgCutCentralityMax{"cfgCutCentralityMax", 0.0f, "Accepted maximum Centrality"};
6865 // Configurable<float> cfgCutCentralityMin{"cfgCutCentralityMin", 100.0f, "Accepted minimum Centrality"};
6966 // track
@@ -106,7 +103,7 @@ struct filterdoublephi {
106103 Partition<TrackCandidates> negTracks = aod::track::signed1Pt < cfgCutCharge;
107104
108105 // Histogram
109- OutputObj<TH1D> hProcessedEvents{TH1D (" hProcessedEvents" , " ;; Number of events" , 4 , 0 .0f , 4 .0f )};
106+ OutputObj<TH1D> hProcessedEvents{TH1D (" hProcessedEvents" , " ;; Number of events" , 3 , 0 .0f , 3 .0f )};
110107 HistogramRegistry qaRegistry{" QAHistos" , {
111108 {" hInvMassPhi" , " hInvMassPhi" , {HistType::kTH2F , {{40 , 1 .0f , 1 .04f }, {100 , 0 .0f , 10 .0f }}}},
112109 {" hInvMassDoublePhi" , " hInvMassDoublePhi" , {HistType::kTH2F , {{1000 , 2 .0f , 3 .0f }, {100 , 0 .0f , 10 .0f }}}},
@@ -120,9 +117,8 @@ struct filterdoublephi {
120117 void init (o2::framework::InitContext&)
121118 {
122119 hProcessedEvents->GetXaxis ()->SetBinLabel (1 , " All events" );
123- hProcessedEvents->GetXaxis ()->SetBinLabel (2 , " Event selection" );
124- hProcessedEvents->GetXaxis ()->SetBinLabel (3 , " Events with double Phi without sel." );
125- hProcessedEvents->GetXaxis ()->SetBinLabel (4 , aod::filtering::TriggerEventDoublePhi::columnLabel ());
120+ hProcessedEvents->GetXaxis ()->SetBinLabel (2 , " Events with double Phi without sel." );
121+ hProcessedEvents->GetXaxis ()->SetBinLabel (3 , aod::filtering::TriggerEventDoublePhi::columnLabel ());
126122 }
127123
128124 template <typename T>
@@ -195,100 +191,75 @@ struct filterdoublephi {
195191 int Npostrack = 0 ;
196192 int Nnegtrack = 0 ;
197193 hProcessedEvents->Fill (0.5 );
198-
199- if (collision.posZ () > cfgCutVertex) {
200- return ;
201- }
202-
203- if (isApplySel8) {
204- if (!collision.sel8 ()) {
205- return ;
206- }
207- } else {
208- if (!collision.selection_bit (aod::evsel::kIsTriggerTVX )) {
209- return ;
210- }
211- }
212-
213- // Independent conditions
214- if (!isApplySel8 && isApplyTimeFrame && !collision.selection_bit (aod::evsel::kNoTimeFrameBorder )) {
215- return ;
216- }
217-
218- if (!isApplySel8 && isApplyITSROF && !collision.selection_bit (aod::evsel::kNoITSROFrameBorder )) {
219- return ;
220- }
221-
222- hProcessedEvents->Fill (1.5 );
223-
224- auto posThisColl = posTracks->sliceByCached (aod::track::collisionId, collision.globalIndex (), cache);
225- auto negThisColl = negTracks->sliceByCached (aod::track::collisionId, collision.globalIndex (), cache);
226- for (auto track1 : posThisColl) {
227- // track selection
228- if (!selectionTrack (track1)) {
229- continue ;
230- }
231- // PID check
232- if (isPtdepPID1 && !selectionPID2 (track1)) {
233- continue ;
234- }
235- if (!isPtdepPID1 && !selectionPID (track1)) {
236- continue ;
237- }
238- if (track1.pt () > 0.4 && track1.pt () < 1.0 && !(itsResponse.nSigmaITS <o2::track::PID::Kaon>(track1) > -2.0 && itsResponse.nSigmaITS <o2::track::PID::Kaon>(track1) < 3.0 )) {
239- continue ;
240- }
241- Npostrack = Npostrack + 1 ;
242- qaRegistry.fill (HIST (" hNsigmaPtkaonTPC" ), track1.tpcNSigmaKa (), track1.pt ());
243- if (track1.hasTOF ()) {
244- qaRegistry.fill (HIST (" hNsigmaPtkaonTOF" ), track1.tofNSigmaKa (), track1.pt ());
245- }
246- auto track1ID = track1.globalIndex ();
247- for (auto track2 : negThisColl) {
194+ if (collision.sel8 ()) {
195+ auto posThisColl = posTracks->sliceByCached (aod::track::collisionId, collision.globalIndex (), cache);
196+ auto negThisColl = negTracks->sliceByCached (aod::track::collisionId, collision.globalIndex (), cache);
197+ for (auto track1 : posThisColl) {
248198 // track selection
249- if (!selectionTrack (track2 )) {
199+ if (!selectionTrack (track1 )) {
250200 continue ;
251201 }
252202 // PID check
253- if (isPtdepPID2 && !selectionPID2 (track2 )) {
203+ if (isPtdepPID1 && !selectionPID2 (track1 )) {
254204 continue ;
255205 }
256- if (!isPtdepPID2 && !selectionPID (track2 )) {
206+ if (!isPtdepPID1 && !selectionPID (track1 )) {
257207 continue ;
258208 }
259- if (track2 .pt () > 0.4 && track2 .pt () < 1.0 && !(itsResponse.nSigmaITS <o2::track::PID::Kaon>(track2 ) > -2.0 && itsResponse.nSigmaITS <o2::track::PID::Kaon>(track2 ) < 3.0 )) {
209+ if (track1 .pt () > 0.4 && track1 .pt () < 1.0 && !(itsResponse.nSigmaITS <o2::track::PID::Kaon>(track1 ) > -2.0 && itsResponse.nSigmaITS <o2::track::PID::Kaon>(track1 ) < 3.0 )) {
260210 continue ;
261211 }
262- if (Npostrack == 1 ) {
263- Nnegtrack = Nnegtrack + 1 ;
212+ Npostrack = Npostrack + 1 ;
213+ qaRegistry.fill (HIST (" hNsigmaPtkaonTPC" ), track1.tpcNSigmaKa (), track1.pt ());
214+ if (track1.hasTOF ()) {
215+ qaRegistry.fill (HIST (" hNsigmaPtkaonTOF" ), track1.tofNSigmaKa (), track1.pt ());
264216 }
265- auto track2ID = track2.globalIndex ();
266- if (track2ID == track1ID) {
267- continue ;
268- }
269- if (!selectionPair (track1, track2)) {
270- continue ;
271- }
272- KaonPlus = ROOT::Math::PxPyPzMVector (track1.px (), track1.py (), track1.pz (), massKa);
273- KaonMinus = ROOT::Math::PxPyPzMVector (track2.px (), track2.py (), track2.pz (), massKa);
274- PhiMesonMother = KaonPlus + KaonMinus;
275- if (PhiMesonMother.M () > minPhiMass && PhiMesonMother.M () < maxPhiMass) {
276- numberPhi = numberPhi + 1 ;
277- ROOT::Math::PtEtaPhiMVector temp1 (track1.pt (), track1.eta (), track1.phi (), massKa);
278- ROOT::Math::PtEtaPhiMVector temp2 (track2.pt (), track2.eta (), track2.phi (), massKa);
279- ROOT::Math::PtEtaPhiMVector temp3 (PhiMesonMother.pt (), PhiMesonMother.eta (), PhiMesonMother.phi (), PhiMesonMother.M ());
280- phiresonanced1.push_back (temp1);
281- phiresonanced2.push_back (temp2);
282- phiresonance.push_back (temp3);
283- Phid1Index.push_back (track1.globalIndex ());
284- Phid2Index.push_back (track2.globalIndex ());
285- qaRegistry.fill (HIST (" hInvMassPhi" ), PhiMesonMother.M (), PhiMesonMother.Pt ());
217+ auto track1ID = track1.globalIndex ();
218+ for (auto track2 : negThisColl) {
219+ // track selection
220+ if (!selectionTrack (track2)) {
221+ continue ;
222+ }
223+ // PID check
224+ if (isPtdepPID2 && !selectionPID2 (track2)) {
225+ continue ;
226+ }
227+ if (!isPtdepPID2 && !selectionPID (track2)) {
228+ continue ;
229+ }
230+ if (track2.pt () > 0.4 && track2.pt () < 1.0 && !(itsResponse.nSigmaITS <o2::track::PID::Kaon>(track2) > -2.0 && itsResponse.nSigmaITS <o2::track::PID::Kaon>(track2) < 3.0 )) {
231+ continue ;
232+ }
233+ if (Npostrack == 1 ) {
234+ Nnegtrack = Nnegtrack + 1 ;
235+ }
236+ auto track2ID = track2.globalIndex ();
237+ if (track2ID == track1ID) {
238+ continue ;
239+ }
240+ if (!selectionPair (track1, track2)) {
241+ continue ;
242+ }
243+ KaonPlus = ROOT::Math::PxPyPzMVector (track1.px (), track1.py (), track1.pz (), massKa);
244+ KaonMinus = ROOT::Math::PxPyPzMVector (track2.px (), track2.py (), track2.pz (), massKa);
245+ PhiMesonMother = KaonPlus + KaonMinus;
246+ if (PhiMesonMother.M () > minPhiMass && PhiMesonMother.M () < maxPhiMass) {
247+ numberPhi = numberPhi + 1 ;
248+ ROOT::Math::PtEtaPhiMVector temp1 (track1.pt (), track1.eta (), track1.phi (), massKa);
249+ ROOT::Math::PtEtaPhiMVector temp2 (track2.pt (), track2.eta (), track2.phi (), massKa);
250+ ROOT::Math::PtEtaPhiMVector temp3 (PhiMesonMother.pt (), PhiMesonMother.eta (), PhiMesonMother.phi (), PhiMesonMother.M ());
251+ phiresonanced1.push_back (temp1);
252+ phiresonanced2.push_back (temp2);
253+ phiresonance.push_back (temp3);
254+ Phid1Index.push_back (track1.globalIndex ());
255+ Phid2Index.push_back (track2.globalIndex ());
256+ qaRegistry.fill (HIST (" hInvMassPhi" ), PhiMesonMother.M (), PhiMesonMother.Pt ());
257+ }
286258 }
287259 }
288- }
289- // select collision
260+ } // select collision
290261 if (numberPhi > 1 && Npostrack > 1 && Nnegtrack > 1 && (phiresonance.size () == phiresonanced1.size ()) && (phiresonance.size () == phiresonanced2.size ())) {
291- hProcessedEvents->Fill (2 .5 );
262+ hProcessedEvents->Fill (1 .5 );
292263 for (auto if1 = phiresonance.begin (); if1 != phiresonance.end (); ++if1) {
293264 auto i5 = std::distance (phiresonance.begin (), if1);
294265 PhiVectorDummy = phiresonance.at (i5);
@@ -304,7 +275,7 @@ struct filterdoublephi {
304275 }
305276 }
306277 if (keepEventDoublePhi) {
307- hProcessedEvents->Fill (3 .5 );
278+ hProcessedEvents->Fill (2 .5 );
308279 }
309280 tags (keepEventDoublePhi);
310281 } // process
0 commit comments