Skip to content

Commit b7421a7

Browse files
committed
adding stat histos for lumi computation
1 parent 9478910 commit b7421a7

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

PWGUD/TableProducer/twoTracksEventTableProducer.cxx

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ struct TwoTracksEventTableProducer {
116116
Configurable<bool> preselBothAreTOFtracks{"preselBothAreTOFtracks", false, {"Both tracks are required to hit TOF."}};
117117
Configurable<bool> preselUseMinMomentumOnBothTracks{"preselUseMinMomentumOnBothTracks", false, {"Both tracks are required to fill requirement on minimum momentum."}};
118118
Configurable<float> preselMinTrackMomentum{"preselMinTrackMomentum", 0.1, {"Requirement on minimum momentum of the track."}};
119-
Configurable<float> preselSystemPtCut{"preselSystemPtCut", 0.0, {"By default, cut on maximum system pT."}};
119+
Configurable<float> preselSystemPtCut{"preselSystemPtCut", 2.0, {"By default, cut on maximum system pT."}};
120120
Configurable<bool> preselUseOppositeSystemPtCut{"preselUseOppositeSystemPtCut", false, {"Negates the system pT cut (cut on minimum system pT)."}};
121121
Configurable<float> preselMinInvariantMass{"preselMinInvariantMass", 2.0, {"Requirement on minimum system invariant mass."}};
122122
Configurable<float> preselMaxInvariantMass{"preselMaxInvariantMass", 5.0, {"Requirement on maximum system invariant mass."}};
@@ -137,8 +137,10 @@ struct TwoTracksEventTableProducer {
137137

138138
mySetITShitsRule(cutGlobalTrack.cutITShitsRule);
139139

140-
histos.add("Reco/hSelections", "Effect of selections;;Number of events (-)", HistType::kTH1D, {{50, 0.5, 50.5}});
141-
histos.add("Truth/hTroubles", "Counter of unwanted issues;;Number of troubles (-)", HistType::kTH1D, {{15, 0.5, 15.5}});
140+
histos.add("Reco/hSelections", "Effect of selections;;Number of events (-)", HistType::kTH1D, {{50, 0.5, 50.5}});
141+
histos.add("Reco/hNanalyzedPerRun", "N analyzed events per run;Run number (-);Number of analyzed events (-)", HistType::kTH1D, {{1, 0., 1.}});
142+
histos.add("Reco/hNselectedPerRun", "N selected events per run;Run number (-);Number of selected events (-)", HistType::kTH1D, {{1, 0., 1.}});
143+
histos.add("Truth/hTroubles", "Counter of unwanted issues;;Number of troubles (-)", HistType::kTH1D, {{15, 0.5, 15.5}});
142144

143145
} // end init
144146

@@ -358,6 +360,9 @@ struct TwoTracksEventTableProducer {
358360
void processDataSG(FullSGUDCollision const& collision,
359361
FullUDTracks const& tracks)
360362
{
363+
int run = collision.runNumber();
364+
const char* srun = Form("%d", run);
365+
histos.get<TH1>(HIST("Reco/hNanalyzedPerRun"))->Fill(srun, 1);
361366

362367
nSelection = 0;
363368
histos.get<TH1>(HIST("Reco/hSelections"))->Fill(nSelection);
@@ -490,6 +495,8 @@ struct TwoTracksEventTableProducer {
490495
float tofEP[2] = {trk1.tofExpMom(), trk2.tofExpMom()};
491496
float infoZDC[4] = {collision.energyCommonZNA(), collision.energyCommonZNC(), collision.timeZNA(), collision.timeZNC()};
492497

498+
histos.get<TH1>(HIST("Reco/hNselectedPerRun"))->Fill(srun, 1);
499+
493500
twoTracks(collision.runNumber(), collision.globalBC(), countTracksPerCollision, collision.numContrib(), countGoodNonPVtracks, collision.posX(), collision.posY(), collision.posZ(),
494501
collision.flags(), collision.occupancyInTime(), collision.hadronicRate(), collision.trs(), collision.trofs(), collision.hmpr(),
495502
collision.tfb(), collision.itsROFb(), collision.sbp(), collision.zVtxFT0vPV(), collision.vtxITSTPC(),
@@ -500,7 +507,7 @@ struct TwoTracksEventTableProducer {
500507
tpcSignal, tpcEl, tpcMu, tpcPi, tpcKa, tpcPr, tpcIP,
501508
tofSignal, tofEl, tofMu, tofPi, tofKa, tofPr, tofEP);
502509
}
503-
PROCESS_SWITCH(TwoTracksEventTableProducer, processDataSG, "Iterate UD tables with measured data created by SG-Candidate-Producer.", false);
510+
PROCESS_SWITCH(TwoTracksEventTableProducer, processDataSG, "Iterate UD tables with measured data created by SG-Candidate-Producer.", true);
504511

505512
PresliceUnsorted<aod::UDMcParticles> partPerMcCollision = aod::udmcparticle::udMcCollisionId;
506513
PresliceUnsorted<FullMCSGUDCollisions> colPerMcCollision = aod::udcollision::udMcCollisionId;

0 commit comments

Comments
 (0)