@@ -60,19 +60,10 @@ using namespace o2::aod::rctsel;
6060
6161auto static constexpr kMinCharge = 3 .f;
6262
63- AxisSpec ptAxis = {1001 , -0.005 , 10.005 };
64- AxisSpec multAxis = {701 , -0.5 , 700.5 , " N_{trk}" };
65- AxisSpec zAxis = {60 , -30 ., 30 .};
66- AxisSpec deltaZAxis = {61 , -6.1 , 6.1 };
67- AxisSpec dcaxyAxis = {1000 , 0 ., 5 .};
68- AxisSpec dcazAxis = {1000 , 0 ., 5 .};
69- AxisSpec phiAxis = {629 , 0 , TwoPI, " Rad" , " #phi" };
70- AxisSpec etaAxis = {20 , -4 ., -2 .};
71- AxisSpec centAxis{100 , 0 , 100 , " centrality" };
72- AxisSpec chiSqAxis = {100 , 0 ., 1000 .};
73- AxisSpec nclsAxis{10 , 0.5 , 10.5 , " # clusters" };
74-
7563enum TrkSel {
64+ trkSelAll,
65+ trkSelWoAmbiguous,
66+ trkSelNumReassoc,
7667 trkSelNCls,
7768 trkSelChi2Ncl,
7869 trkSelEta,
@@ -102,9 +93,30 @@ struct DndetaMFTPbPb {
10293 Configurable<bool > cfgDoIR{" cfgDoIR" , false , " Flag to retrieve Interaction rate from CCDB" };
10394 Configurable<bool > cfgUseIRCut{" cfgUseIRCut" , false , " Flag to cut on IR rate" };
10495 Configurable<bool > cfgIRCrashOnNull{" cfgIRCrashOnNull" , false , " Flag to avoid CTP RateFetcher crash" };
105- Configurable<std::string> cfgIRSource{" cfgIRSource" , " T0VTX " , " Estimator of the interaction rate (Pb-Pb: ZNC hadronic)" };
96+ Configurable<std::string> cfgIRSource{" cfgIRSource" , " ZNC hadronic " , " Estimator of the interaction rate (Pb-Pb: ZNC hadronic)" };
10697 Configurable<bool > cfgUseTrackSel{" cfgUseTrackSel" , false , " Flag to apply track selection" };
10798
99+ struct : ConfigurableGroup {
100+ ConfigurableAxis interactionRateBins{" interactionRateBins" , {500 , 0 , 50 }, " Binning for the interaction rate (kHz)" };
101+ ConfigurableAxis occupancyBins{" occupancyBins" , {VARIABLE_WIDTH, 0 .0f , 250 .0f , 500 .0f , 750 .0f , 1000 .0f , 1500 .0f , 2000 .0f , 3000 .0f , 4500 .0f , 6000 .0f , 8000 .0f , 10000 .0f , 50000 .0f }, " Occupancy" };
102+ ConfigurableAxis centralityBins{" centralityBins" , {VARIABLE_WIDTH, 0 , 5 , 10 , 20 , 30 , 40 , 50 , 60 , 70 , 80 , 90 , 100 }, " Centrality" };
103+ ConfigurableAxis irBins{" irBins" , {500 , 0 , 50 }, " Interaction rate (kHz)" };
104+ ConfigurableAxis pvBins{" pvBins" , {501 , -0.5 , 500.5 }, " " };
105+ ConfigurableAxis fv0aMultBins{" fv0aMultBins" , {501 , -0.5 , 500.5 }, " " };
106+ ConfigurableAxis ft0aMultBins{" ft0aMultBins" , {501 , -0.5 , 500.5 }, " " };
107+ ConfigurableAxis ft0cMultBins{" ft0cMultBins" , {501 , -0.5 , 500.5 }, " " };
108+ ConfigurableAxis PtBins{" PtBins" , {101 , -0.5 , 10.5 }, " pT binning (GeV/c)" };
109+ ConfigurableAxis MultBins{" MultBins" , {701 , -0.5 , 700.5 }, " Multiplicity binning" };
110+ ConfigurableAxis ZvtxBins{" ZvtxBins" , {60 , -30 ., 30 .}, " Z-vtx binning (cm)" };
111+ ConfigurableAxis DeltaZBins{" DeltaZBins" , {120 , -6 ., 6 .}, " Delta Z-vtx binning (cm)" };
112+ ConfigurableAxis DCAxyBins{" DCAxyBins" , {800 , -1 ., 1 .}, " DCAxy binning (cm)" };
113+ ConfigurableAxis DCAzBins{" DCAzBins" , {800 , -1 ., 1 .}, " DCAz binning (cm)" };
114+ ConfigurableAxis PhiBins{" PhiBins" , {629 , 0 ., TwoPI}, " #varphi binning (rad)" };
115+ ConfigurableAxis EtaBins{" EtaBins" , {20 , -4 ., -2 .}, " #eta binning" };
116+ ConfigurableAxis ChiSqPerNclBins{" ChiSqPerNclBins" , {100 , 0 , 100 }, " #chi^{2} binning" };
117+ ConfigurableAxis NclBins{" NclBins" , {10 , 0.5 , 10.5 }, " number of clusters binning" };
118+ } binOpt;
119+
108120 struct : ConfigurableGroup {
109121 Configurable<bool > requireRCTFlagChecker{" requireRCTFlagChecker" , false , " Check event quality in run condition table" };
110122 Configurable<std::string> cfgEvtRCTFlagCheckerLabel{" cfgEvtRCTFlagCheckerLabel" , " CBT_fw" , " Evt sel: RCT flag checker label" };
@@ -123,20 +135,21 @@ struct DndetaMFTPbPb {
123135 Configurable<bool > useChi2Cut{" useChi2Cut" , false , " use track chi2 cut" };
124136 Configurable<float > maxChi2NCl{" maxChi2NCl" , 1000 .f , " maximum chi2 per MFT clusters" };
125137 Configurable<bool > usePtCut{" usePtCut" , false , " use track pT cut" };
126- Configurable<double > minPt{" minPt" , 0 ., " minimum pT of the MFT tracks" };
138+ Configurable<float > minPt{" minPt" , 0 ., " minimum pT of the MFT tracks" };
127139 Configurable<bool > requireCA{" requireCA" , false , " Use Cellular Automaton track-finding algorithm" };
140+ Configurable<bool > excludeAmbiguous{" excludeAmbiguous" , false , " Exclude Ambiguous tracks" };
128141 Configurable<float > maxDCAxy{" maxDCAxy" , 0 .01f , " Cut on dca XY" };
129142 Configurable<float > maxDCAz{" maxDCAz" , 0 .01f , " Cut on dca Z" };
130143 } trackCuts;
131144
132145 struct : ConfigurableGroup {
133- Configurable<float > maxZvtx{" maxZvtx" , 10 .0f , " maximum cut on z-vtx (cm)" };
134- Configurable<float > minZvtx{" minZvtx" , -10 .0f , " minimum cut on z-vtx (cm)" };
146+ Configurable<float > maxZvtx{" maxZvtx" , 20 .0f , " maximum cut on z-vtx (cm)" };
147+ Configurable<float > minZvtx{" minZvtx" , -20 .0f , " minimum cut on z-vtx (cm)" };
135148 Configurable<bool > useZDiffCut{" useZDiffCut" , false , " use Zvtx reco-mc diff. cut" };
136149 Configurable<float > maxZvtxDiff{" maxZvtxDiff" , 1 .0f , " max allowed Z vtx difference for reconstruced collisions (cm)" };
137150 Configurable<bool > requireIsGoodZvtxFT0VsPV{" requireIsGoodZvtxFT0VsPV" , true , " require events with PV position along z consistent (within 1 cm) between PV reconstructed using tracks and PV using FT0 A-C time difference" };
138151 Configurable<bool > requireRejectSameBunchPileup{" requireRejectSameBunchPileup" , true , " reject collisions in case of pileup with another collision in the same foundBC" };
139- Configurable<bool > requireNoCollInTimeRangeStrict{" requireNoCollInTimeRangeStrict" , false , " requireNoCollInTimeRangeStrict" };
152+ Configurable<bool > requireNoCollInTimeRangeStrict{" requireNoCollInTimeRangeStrict" , true , " requireNoCollInTimeRangeStrict" };
140153 Configurable<bool > requireNoCollInRofStrict{" requireNoCollInRofStrict" , false , " requireNoCollInRofStrict" };
141154 Configurable<bool > requireNoCollInRofStandard{" requireNoCollInRofStandard" , false , " requireNoCollInRofStandard" };
142155 Configurable<bool > requireNoHighMultCollInPrevRof{" requireNoHighMultCollInPrevRof" , false , " requireNoHighMultCollInPrevRof" };
@@ -149,23 +162,14 @@ struct DndetaMFTPbPb {
149162 Configurable<float > maxIR{" maxIR" , -1 , " maximum IR (kHz) collisions" };
150163 } eventCuts;
151164
152- ConfigurableAxis occupancyBins{" occupancyBins" , {VARIABLE_WIDTH, 0 .0f , 250 .0f , 500 .0f , 750 .0f , 1000 .0f , 1500 .0f , 2000 .0f , 3000 .0f , 4500 .0f , 6000 .0f , 8000 .0f , 10000 .0f , 50000 .0f }, " Occupancy" };
153- ConfigurableAxis centralityBins{" centralityBins" , {VARIABLE_WIDTH, 0 , 5 , 10 , 20 , 30 , 40 , 50 , 60 , 70 , 80 , 90 , 100 }, " Centrality" };
154- ConfigurableAxis irBins{" irBins" , {500 , 0 , 50 }, " Interaction rate (kHz)" };
155- ConfigurableAxis pvBins{" pvBins" , {501 , -0.5 , 500.5 }, " " };
156- ConfigurableAxis fv0aMultBins{" fv0aMultBins" , {501 , -0.5 , 500.5 }, " " };
157- ConfigurableAxis ft0aMultBins{" ft0aMultBins" , {501 , -0.5 , 500.5 }, " " };
158- ConfigurableAxis ft0cMultBins{" ft0cMultBins" , {501 , -0.5 , 500.5 }, " " };
159-
160165 Service<o2::framework::O2DatabasePDG> pdg;
161-
162166 Service<ccdb::BasicCCDBManager> ccdb;
163167 Configurable<int64_t > ccdbNoLaterThan{" ccdbNoLaterThan" , std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now ().time_since_epoch ()).count (), " latest acceptable timestamp of creation for the object" };
164168 Configurable<std::string> ccdbUrl{" ccdbUrl" , " http://alice-ccdb.cern.ch" , " url of the ccdb repository" };
165169
166170 int mRunNumber {-1 };
167171 uint64_t mSOR {0 };
168- double mMinSeconds {-1 .};
172+ float mMinSeconds {-1 .};
169173 std::unordered_map<int , TH2*> gHadronicRate ;
170174 ctpRateFetcher rateFetcher;
171175 TH2* gCurrentHadronicRate ;
@@ -174,12 +178,23 @@ struct DndetaMFTPbPb {
174178 // / @brief init function, definition of histograms
175179 void init (InitContext&)
176180 {
177- AxisSpec pvAxis = {pvBins, " PV" , " PVAxis" };
178- AxisSpec multFV0aAxis = {fv0aMultBins, " fv0a" , " FV0AMultAxis" };
179- AxisSpec multFT0aAxis = {ft0aMultBins, " ft0a" , " FT0AMultAxis" };
180- AxisSpec multFT0cAxis = {ft0cMultBins, " ft0c" , " FT0CMultAxis" };
181- AxisSpec centralityAxis = {centralityBins, " Centrality" , " centralityAxis" };
182- AxisSpec occupancyAxis = {occupancyBins, " Occupancy" , " occupancyAxis" };
181+ const AxisSpec pvAxis = {binOpt.pvBins , " PV" , " PV axis" };
182+ const AxisSpec multFV0aAxis = {binOpt.fv0aMultBins , " fv0a" , " FV0AMult axis" };
183+ const AxisSpec multFT0aAxis = {binOpt.ft0aMultBins , " ft0a" , " FT0AMult axis" };
184+ const AxisSpec multFT0cAxis = {binOpt.ft0cMultBins , " ft0c" , " FT0CMult axis" };
185+ const AxisSpec centralityAxis = {binOpt.centralityBins , " Centrality" , " centrality axis" };
186+ const AxisSpec occupancyAxis = {binOpt.occupancyBins , " Occupancy" , " occupancy axis" };
187+ const AxisSpec irAxis = {binOpt.interactionRateBins , " Interaction Rate" , " IR axis" };
188+ const AxisSpec ptAxis = {binOpt.PtBins , " Pt axis (GeV/c)" };
189+ const AxisSpec multAxis = {binOpt.MultBins , " N_{trk} axis" };
190+ const AxisSpec zAxis = {binOpt.ZvtxBins , " Z-vtx axis" };
191+ const AxisSpec deltaZAxis = {binOpt.DeltaZBins , " Delta Z-vtx axis" };
192+ const AxisSpec dcaxyAxis = {binOpt.DCAxyBins , " DCA-xy axis" };
193+ const AxisSpec dcazAxis = {binOpt.DCAzBins , " DCA-z axis" };
194+ const AxisSpec phiAxis = {binOpt.PhiBins , " #phi axis" };
195+ const AxisSpec etaAxis = {binOpt.EtaBins , " #eta axis" };
196+ const AxisSpec chiSqAxis = {binOpt.ChiSqPerNclBins , " Chi2 axis" };
197+ const AxisSpec nclsAxis = {binOpt.NclBins , " Number of clusters axis" };
183198
184199 rctChecker.init (rctCuts.cfgEvtRCTFlagCheckerLabel , rctCuts.cfgEvtRCTFlagCheckerZDCCheck , rctCuts.cfgEvtRCTFlagCheckerLimitAcceptAsBad );
185200
@@ -261,7 +276,10 @@ struct DndetaMFTPbPb {
261276 hev->GetXaxis ()->SetBinLabel (13 , " Above max occup." );
262277 hev->GetXaxis ()->SetBinLabel (14 , " RCT Flag Checker" );
263278
264- registry.add (" Tracks/hTrkSel" , " Number of tracks; Cut; #Tracks Passed Cut" , {HistType::kTH1D , {{nTrkSel, 0 , nTrkSel}}});
279+ registry.add (" Tracks/hTrkSel" , " Number of tracks; Cut; #Tracks Passed Cut" , {HistType::kTH1F , {{nTrkSel, -0.5 , +nTrkSel - 0.5 }}});
280+ registry.get <TH1>(HIST (" Tracks/hTrkSel" ))->GetXaxis ()->SetBinLabel (trkSelAll + 1 , " All" );
281+ registry.get <TH1>(HIST (" Tracks/hTrkSel" ))->GetXaxis ()->SetBinLabel (trkSelWoAmbiguous + 1 , " Ambiguity cut" );
282+ registry.get <TH1>(HIST (" Tracks/hTrkSel" ))->GetXaxis ()->SetBinLabel (trkSelNumReassoc + 1 , " Reassociated" );
265283 registry.get <TH1>(HIST (" Tracks/hTrkSel" ))->GetXaxis ()->SetBinLabel (trkSelNCls + 1 , " Ncl cut" );
266284 registry.get <TH1>(HIST (" Tracks/hTrkSel" ))->GetXaxis ()->SetBinLabel (trkSelChi2Ncl + 1 , " #chi^{2}/Ncl cut" );
267285 registry.get <TH1>(HIST (" Tracks/hTrkSel" ))->GetXaxis ()->SetBinLabel (trkSelEta + 1 , " #eta cut" );
@@ -285,6 +303,8 @@ struct DndetaMFTPbPb {
285303 x->SetBinLabel (1 , " All" );
286304 x->SetBinLabel (2 , " Selected" );
287305
306+ registry.add (" Events/hInteractionRate" , " ; occupancy; IR (kHz)" , kTH2F , {occupancyAxis, irAxis});
307+
288308 registry.add ({" Events/NtrkZvtx" ,
289309 " ; N_{trk}; Z_{vtx} (cm); occupancy" ,
290310 {HistType::kTHnSparseF , {multAxis, zAxis, occupancyAxis}}});
@@ -375,9 +395,11 @@ struct DndetaMFTPbPb {
375395 hstat->GetAxis (0 )->SetBinLabel (1 , " All" );
376396 hstat->GetAxis (0 )->SetBinLabel (2 , " Selected" );
377397
398+ registry.add (" Events/Centrality/hInteractionRate" , " ; centrality; occupancy; IR (kHz)" , kTHnSparseF , {centralityAxis, occupancyAxis, irAxis});
399+
378400 qaregistry.add ({" Events/Centrality/hCent" ,
379401 " ; centrality; occupancy" ,
380- {HistType::kTH2F , {centAxis , occupancyAxis}},
402+ {HistType::kTH2F , {centralityAxis , occupancyAxis}},
381403 true });
382404 qaregistry.add (
383405 {" Events/Centrality/hZvtxCent" ,
@@ -775,7 +797,6 @@ struct DndetaMFTPbPb {
775797 using CollGenCent = CollsGenCentFT0C::iterator;
776798 using MFTTracksLabeled = soa::Join<aod::MFTTracks, aod::McMFTTrackLabels>;
777799 using MftTracksWColls = soa::Join<aod::MFTTracks, aod::MFTTrkCompColls>;
778-
779800 using CollsCorr = soa::Join<aod::Collisions, aod::EvSels, aod::Mults, aod::PVMults, aod::CentFT0Cs, aod::CentFV0As, aod::CentFT0CVariant1s, aod::CentFT0Ms, aod::CentNGlobals, aod::CentMFTs>;
780801
781802 // / Filtered tables
@@ -888,7 +909,15 @@ struct DndetaMFTPbPb {
888909 auto nATrk = 0 ;
889910 if (besttracks.size () > 0 ) {
890911 for (auto const & atrack : besttracks) {
912+ registry.fill (HIST (" Tracks/hTrkSel" ), trkSelAll);
913+ if (trackCuts.excludeAmbiguous && atrack.ambDegree () > 1 ) {
914+ continue ;
915+ }
916+ registry.fill (HIST (" Tracks/hTrkSel" ), trkSelWoAmbiguous);
891917 auto itrack = atrack.template mfttrack_as <T>();
918+ if (itrack.collisionId () != atrack.bestCollisionId ()) {
919+ registry.fill (HIST (" Tracks/hTrkSel" ), trkSelNumReassoc);
920+ }
892921 if (!isTrackSelected (itrack)) {
893922 continue ;
894923 }
@@ -985,8 +1014,8 @@ struct DndetaMFTPbPb {
9851014 if (gHadronicRate .find (mRunNumber ) == gHadronicRate .end ()) {
9861015 auto runDuration = ccdb->getRunDuration (mRunNumber );
9871016 mSOR = runDuration.first ;
988- mMinSeconds = std::floor (mSOR * 1 .e -3 ); // / round tsSOR to the highest integer lower than tsSOR
989- double maxSec = std::ceil (runDuration.second * 1 .e -3 ); // / round tsEOR to the lowest integer higher than tsEOR
1017+ mMinSeconds = std::floor (mSOR * 1 .e -3 ); // / round tsSOR to the highest integer lower than tsSOR
1018+ float maxSec = std::ceil (runDuration.second * 1 .e -3 ); // / round tsEOR to the lowest integer higher than tsEOR
9901019 const AxisSpec axisSeconds{static_cast <int >((maxSec - mMinSeconds ) / 20 .f ), 0 , maxSec - mMinSeconds , " Seconds since SOR" };
9911020 int hadronicRateBins = static_cast <int >(eventCuts.maxIR - eventCuts.minIR );
9921021 gHadronicRate [mRunNumber ] = registry.add <TH2>(Form (" HadronicRate/%i" , mRunNumber ), " ;Time since SOR (s);Hadronic rate (kHz)" , kTH2D , {axisSeconds, {hadronicRateBins, eventCuts.minIR , eventCuts.maxIR }}).get ();
@@ -1195,8 +1224,13 @@ struct DndetaMFTPbPb {
11951224
11961225 if (cfgDoIR) {
11971226 initHadronicRate (bc);
1198- double ir = rateFetcher.fetch (ccdb.service , bc.timestamp (), bc.runNumber (), cfgIRSource, cfgIRCrashOnNull) * 1 .e -3 ;
1199- double seconds = bc.timestamp () * 1 .e -3 - mMinSeconds ;
1227+ float ir = !cfgIRSource.value .empty () ? rateFetcher.fetch (ccdb.service , bc.timestamp (), bc.runNumber (), cfgIRSource, cfgIRCrashOnNull) * 1 .e -3 : -1 ;
1228+ if constexpr (has_reco_cent<C>) {
1229+ registry.fill (HIST (" Events/Centrality/hInteractionRate" ), c, occ, ir);
1230+ } else {
1231+ registry.fill (HIST (" Events/hInteractionRate" ), occ, ir);
1232+ }
1233+ float seconds = bc.timestamp () * 1 .e -3 - mMinSeconds ;
12001234 if (cfgUseIRCut && (ir < eventCuts.minIR || ir > eventCuts.maxIR )) { // cut on hadronic rate
12011235 return ;
12021236 }
@@ -1206,8 +1240,6 @@ struct DndetaMFTPbPb {
12061240 auto z = collision.posZ ();
12071241 if constexpr (has_reco_cent<C>) {
12081242 registry.fill (HIST (" Events/Centrality/Selection" ), 2 ., c, occ);
1209- qaregistry.fill (HIST (" Events/Centrality/hZvtxCent" ), z, c, occ);
1210- qaregistry.fill (HIST (" Events/Centrality/hCent" ), c, occ);
12111243 } else {
12121244 registry.fill (HIST (" Events/Selection" ), 2 ., occ);
12131245 }
@@ -1237,14 +1269,19 @@ struct DndetaMFTPbPb {
12371269 registry.fill (HIST (" Events/Selection" ), 1 ., occ);
12381270 }
12391271
1240- if (!isGoodEvent<false >(collision)) {
1272+ if (!isGoodEvent<true >(collision)) {
12411273 return ;
12421274 }
12431275
12441276 if (cfgDoIR) {
12451277 initHadronicRate (bc);
1246- double ir = rateFetcher.fetch (ccdb.service , bc.timestamp (), bc.runNumber (), cfgIRSource, cfgIRCrashOnNull) * 1 .e -3 ;
1247- double seconds = bc.timestamp () * 1 .e -3 - mMinSeconds ;
1278+ float ir = !cfgIRSource.value .empty () ? rateFetcher.fetch (ccdb.service , bc.timestamp (), bc.runNumber (), cfgIRSource, cfgIRCrashOnNull) * 1 .e -3 : -1 ;
1279+ if constexpr (has_reco_cent<C>) {
1280+ registry.fill (HIST (" Events/Centrality/hInteractionRate" ), c, occ, ir);
1281+ } else {
1282+ registry.fill (HIST (" Events/hInteractionRate" ), occ, ir);
1283+ }
1284+ float seconds = bc.timestamp () * 1 .e -3 - mMinSeconds ;
12481285 if (cfgUseIRCut && (ir < eventCuts.minIR || ir > eventCuts.maxIR )) { // cut on hadronic rate
12491286 return ;
12501287 }
@@ -1254,6 +1291,8 @@ struct DndetaMFTPbPb {
12541291 auto z = collision.posZ ();
12551292 if constexpr (has_reco_cent<C>) {
12561293 registry.fill (HIST (" Events/Centrality/Selection" ), 2 ., c, occ);
1294+ qaregistry.fill (HIST (" Events/Centrality/hZvtxCent" ), z, c, occ);
1295+ qaregistry.fill (HIST (" Events/Centrality/hCent" ), c, occ);
12571296 } else {
12581297 registry.fill (HIST (" Events/Selection" ), 2 ., occ);
12591298 }
@@ -1960,6 +1999,9 @@ struct DndetaMFTPbPb {
19601999 }
19612000
19622001 for (auto const & track : besttracks) {
2002+ if (trackCuts.excludeAmbiguous && track.ambDegree () > 1 ) {
2003+ continue ;
2004+ }
19632005 auto itrack = track.mfttrack_as <FiltMcMftTracks>();
19642006 if (!isTrackSelected (itrack)) {
19652007 continue ;
@@ -2256,6 +2298,9 @@ struct DndetaMFTPbPb {
22562298
22572299 auto nBestTrks = 0 ;
22582300 for (auto const & atrack : besttracks) {
2301+ if (trackCuts.excludeAmbiguous && atrack.ambDegree () > 1 ) {
2302+ continue ;
2303+ }
22592304 auto itrack = atrack.template mfttrack_as <FiltMftTracks>();
22602305 if (itrack.eta () < trackCuts.minEta || itrack.eta () > trackCuts.maxEta ) {
22612306 continue ;
0 commit comments