@@ -90,6 +90,8 @@ struct phispectrapbpbqa {
9090 Configurable<std::string> ConfPathTOF{" ConfPathTOF" , " Users/s/skundu/My/Object/PIDcallib/TOF" , " Weight path TOF" };
9191
9292 // events
93+ Configurable<bool > applyStrictEvSel{" applyStrictEvSel" , true , " Apply strict event selection" };
94+ Configurable<bool > applyMCsel8{" applyMCsel8" , false , " Apply sel8 in MC" };
9395 Configurable<int > cfgNoMixedEvents{" cfgNoMixedEvents" , 10 , " Number of event mixing" };
9496 ConfigurableAxis axisVertex{" axisVertex" , {20 , -10 , 10 }, " vertex axis for bin" };
9597 // ConfigurableAxis axisMultiplicityClass{"axisMultiplicityClass", {8, 0, 80}, "multiplicity percentile for bin"};
@@ -104,10 +106,12 @@ struct phispectrapbpbqa {
104106
105107 Configurable<int > cfgITScluster{" cfgITScluster" , 4 , " Number of ITS cluster" };
106108 Configurable<int > cfgTPCcluster{" cfgTPCcluster" , 80 , " Number of TPC cluster" };
109+ Configurable<int > cfgTPCPIDcluster{" cfgTPCPIDcluster" , 80 , " Number of TPC PID cluster" };
107110 Configurable<int > cfgTPCcrossedRows{" cfgTPCcrossedRows" , 90 , " Number of TPC crossed Rows" };
108111
109112 Configurable<bool > cfgUpdatePID{" cfgUpdatePID" , false , " Update PID callibration" };
110113 Configurable<bool > applyPID{" applyPID" , true , " Apply PID" };
114+ Configurable<bool > applyPIDCluster{" applyPIDCluster" , true , " Apply PID cluster" };
111115 Configurable<bool > isDeepAngle{" isDeepAngle" , false , " Deep Angle cut" };
112116 Configurable<double > cfgDeepAngle{" cfgDeepAngle" , 0.04 , " Deep Angle cut value" };
113117 Configurable<bool > timeFrameMC{" timeFrameMC" , false , " time frame cut in MC" };
@@ -130,7 +134,7 @@ struct phispectrapbpbqa {
130134 Filter collisionFilter = nabs(aod::collision::posZ) < cfgCutVertex;
131135 Filter centralityFilter = nabs(aod::cent::centFT0C) < cfgCutCentrality;
132136 Filter acceptanceFilter = (nabs(aod::track::eta) < cfgCutEta && nabs(aod::track::pt) > cfgCutPT);
133- // Filter PIDcutFilter = nabs(aod::pidtpc::tpcNSigmaKa) < nsigmaCutTPC;
137+ Filter PIDcutFilter = nabs(aod::pidtpc::tpcNSigmaKa) < nsigmaCutTPC;
134138 // Filter DCAcutFilter = (nabs(aod::track::dcaXY) < cfgCutDCAxy) && (nabs(aod::track::dcaZ) < cfgCutDCAz);
135139
136140 using EventCandidates = soa::Filtered<soa::Join<aod::Collisions, aod::EvSels, aod::TPCMults, aod::CentFT0Cs, aod::Mults>>;
@@ -180,7 +184,7 @@ struct phispectrapbpbqa {
180184 histos.add (" hOccupancy" , " hOccupancy" , kTH2F , {axisOccupancy, cnfgaxis.configThnAxisCentrality });
181185 histos.add (" hMC" , " hMC" , kTH1F , {{20 , 0 .0f , 20 .0f }});
182186 histos.add (" h1PhiRecsplit" , " h1PhiRecsplit" , kTH1F , {{100 , 0 .0f , 10 .0f }});
183-
187+ histos. add ( " hData " , " hData " , kTH1F , {{ 20 , 0 . 0f , 20 . 0f }});
184188 ccdb->setURL (cfgCcdbParam.cfgURL );
185189 ccdbApi.init (" http://alice-ccdb.cern.ch" );
186190 ccdb->setCaching (true );
@@ -215,6 +219,9 @@ struct phispectrapbpbqa {
215219 if (!(candidate.isGlobalTrack () && candidate.isPVContributor () && candidate.itsNCls () > cfgITScluster && candidate.tpcNClsFound () > cfgTPCcluster && candidate.tpcNClsCrossedRows () > cfgTPCcrossedRows)) {
216220 return false ;
217221 }
222+ if (applyPIDCluster && candidate.tpcNClsPID () < cfgTPCPIDcluster) {
223+ return false ;
224+ }
218225 return true ;
219226 }
220227
@@ -330,24 +337,34 @@ struct phispectrapbpbqa {
330337 int lastRunNumber = -999 ;
331338 void processSameEvent (EventCandidates::iterator const & collision, TrackCandidates const &, aod::BCsWithTimestamps const &)
332339 {
333- if (!collision.sel8 () || !collision.selection_bit (aod::evsel::kNoTimeFrameBorder ) || !collision.selection_bit (aod::evsel::kNoITSROFrameBorder ) || !collision.selection_bit (aod::evsel::kNoSameBunchPileup ) || !collision.selection_bit (aod::evsel::kIsGoodZvtxFT0vsPV ) || !collision.selection_bit (o2::aod::evsel::kNoCollInTimeRangeStandard ) || !collision.selection_bit (o2::aod::evsel::kIsGoodITSLayersAll )) {
340+ histos.fill (HIST (" hData" ), 1 );
341+ if (!collision.sel8 () || !collision.selection_bit (aod::evsel::kNoTimeFrameBorder ) || !collision.selection_bit (aod::evsel::kNoITSROFrameBorder ) || !collision.selection_bit (aod::evsel::kNoSameBunchPileup ) || !collision.selection_bit (aod::evsel::kIsGoodZvtxFT0vsPV ) || !collision.selection_bit (o2::aod::evsel::kNoCollInTimeRangeStandard )) {
334342 return ;
335343 }
344+ histos.fill (HIST (" hData" ), 2 );
336345 if (rctCut.requireRCTFlagChecker ) {
337346 if (!rctChecker (collision)) {
338347 return ;
339348 }
340349 }
350+ histos.fill (HIST (" hData" ), 3 );
351+ if (applyStrictEvSel && (!collision.selection_bit (o2::aod::evsel::kIsGoodITSLayersAll ) || !collision.selection_bit (o2::aod::evsel::kNoCollInTimeRangeNarrow ))) {
352+ return ;
353+ }
354+ histos.fill (HIST (" hData" ), 4 );
341355 auto centrality = collision.centFT0C ();
342356 int occupancy = collision.trackOccupancyInTimeRange ();
343357 histos.fill (HIST (" hCentrality" ), centrality);
344358 histos.fill (HIST (" hVtxZ" ), collision.posZ ());
345- auto bc = collision.template bc_as <aod::BCsWithTimestamps>();
359+
360+ /* auto bc = collision.template bc_as<aod::BCsWithTimestamps>();
346361 currentRunNumber = collision.bc_as<aod::BCsWithTimestamps>().runNumber();
347362 if (currentRunNumber != lastRunNumber) {
348363 bz = getMagneticField(bc.timestamp());
349364 }
350365 lastRunNumber = currentRunNumber;
366+ */
367+
351368 auto posThisColl = posTracks->sliceByCached (aod::track::collisionId, collision.globalIndex (), cache);
352369 auto negThisColl = negTracks->sliceByCached (aod::track::collisionId, collision.globalIndex (), cache);
353370
@@ -488,17 +505,23 @@ struct phispectrapbpbqa {
488505 BinningTypeVertexContributor binningOnPositions{{axisVertex, cnfgaxis.configThnAxisCentrality , axisOccupancy}, true };
489506 SameKindPair<EventCandidates, TrackCandidates, BinningTypeVertexContributor> pair{binningOnPositions, cfgNoMixedEvents, -1 , collisions, tracksTuple, &cache};
490507 for (auto & [collision1, tracks1, collision2, tracks2] : pair) {
491- if (!collision1.sel8 () || !collision1.selection_bit (aod::evsel::kNoTimeFrameBorder ) || !collision1.selection_bit (aod::evsel::kNoITSROFrameBorder ) || !collision1.selection_bit (aod::evsel::kNoSameBunchPileup ) || !collision1.selection_bit (aod::evsel::kIsGoodZvtxFT0vsPV ) || !collision1.selection_bit (o2::aod::evsel::kNoCollInTimeRangeStandard ) || !collision1. selection_bit (o2::aod::evsel:: kIsGoodITSLayersAll ) ) {
508+ if (!collision1.sel8 () || !collision1.selection_bit (aod::evsel::kNoTimeFrameBorder ) || !collision1.selection_bit (aod::evsel::kNoITSROFrameBorder ) || !collision1.selection_bit (aod::evsel::kNoSameBunchPileup ) || !collision1.selection_bit (aod::evsel::kIsGoodZvtxFT0vsPV ) || !collision1.selection_bit (o2::aod::evsel::kNoCollInTimeRangeStandard )) {
492509 continue ;
493510 }
494- if (!collision2.sel8 () || !collision2.selection_bit (aod::evsel::kNoTimeFrameBorder ) || !collision2.selection_bit (aod::evsel::kNoITSROFrameBorder ) || !collision2.selection_bit (aod::evsel::kNoSameBunchPileup ) || !collision2.selection_bit (aod::evsel::kIsGoodZvtxFT0vsPV ) || !collision2.selection_bit (o2::aod::evsel::kNoCollInTimeRangeStandard ) || !collision2. selection_bit (o2::aod::evsel:: kIsGoodITSLayersAll ) ) {
511+ if (!collision2.sel8 () || !collision2.selection_bit (aod::evsel::kNoTimeFrameBorder ) || !collision2.selection_bit (aod::evsel::kNoITSROFrameBorder ) || !collision2.selection_bit (aod::evsel::kNoSameBunchPileup ) || !collision2.selection_bit (aod::evsel::kIsGoodZvtxFT0vsPV ) || !collision2.selection_bit (o2::aod::evsel::kNoCollInTimeRangeStandard )) {
495512 continue ;
496513 }
497514 if (rctCut.requireRCTFlagChecker ) {
498515 if (!rctChecker (collision1) || !rctChecker (collision2)) {
499516 continue ;
500517 }
501518 }
519+ if (applyStrictEvSel && (!collision1.selection_bit (o2::aod::evsel::kIsGoodITSLayersAll ) || !collision1.selection_bit (o2::aod::evsel::kNoCollInTimeRangeNarrow ))) {
520+ return ;
521+ }
522+ if (applyStrictEvSel && (!collision2.selection_bit (o2::aod::evsel::kIsGoodITSLayersAll ) || !collision2.selection_bit (o2::aod::evsel::kNoCollInTimeRangeNarrow ))) {
523+ return ;
524+ }
502525 int occupancy = collision1.trackOccupancyInTimeRange ();
503526 auto centrality = collision1.centFT0C ();
504527 for (auto & [track1, track2] : o2::soa::combinations (o2::soa::CombinationsFullIndexPolicy (tracks1, tracks2))) {
@@ -584,11 +607,15 @@ struct phispectrapbpbqa {
584607 return ;
585608 }
586609 for (auto & RecCollision : RecCollisions) {
587- if (!RecCollision.sel8 ()) {
610+ if (applyMCsel8 && !RecCollision.sel8 ()) {
611+ histos.fill (HIST (" hMC" ), 3 );
612+ continue ;
613+ }
614+ if (!applyMCsel8 && !RecCollision.selection_bit (aod::evsel::kIsTriggerTVX )) {
588615 histos.fill (HIST (" hMC" ), 3 );
589616 continue ;
590617 }
591- if (!RecCollision.selection_bit (aod::evsel::kNoSameBunchPileup ) || !RecCollision.selection_bit (aod::evsel::kIsGoodZvtxFT0vsPV ) || !RecCollision.selection_bit (o2::aod::evsel::kNoCollInTimeRangeStandard ) || !RecCollision. selection_bit (o2::aod::evsel:: kIsGoodITSLayersAll ) ) {
618+ if (!RecCollision.selection_bit (aod::evsel::kNoSameBunchPileup ) || !RecCollision.selection_bit (aod::evsel::kIsGoodZvtxFT0vsPV ) || !RecCollision.selection_bit (o2::aod::evsel::kNoCollInTimeRangeStandard )) {
592619 histos.fill (HIST (" hMC" ), 4 );
593620 continue ;
594621 }
@@ -601,7 +628,7 @@ struct phispectrapbpbqa {
601628 histos.fill (HIST (" hMC" ), 7 );
602629 continue ;
603630 }
604- if (readOutFrameMC && RecCollision.selection_bit (aod::evsel::kNoITSROFrameBorder )) {
631+ if (readOutFrameMC && ! RecCollision.selection_bit (aod::evsel::kNoITSROFrameBorder )) {
605632 histos.fill (HIST (" hMC" ), 8 );
606633 continue ;
607634 }
@@ -612,6 +639,10 @@ struct phispectrapbpbqa {
612639 }
613640 }
614641 histos.fill (HIST (" hMC" ), 10 );
642+ if (applyStrictEvSel && (!RecCollision.selection_bit (o2::aod::evsel::kIsGoodITSLayersAll ) || !RecCollision.selection_bit (o2::aod::evsel::kNoCollInTimeRangeNarrow ))) {
643+ return ;
644+ }
645+ histos.fill (HIST (" hMC" ), 11 );
615646 auto centrality = RecCollision.centFT0C ();
616647 int occupancy = RecCollision.trackOccupancyInTimeRange ();
617648 histos.fill (HIST (" hOccupancy" ), occupancy, centrality);
0 commit comments