@@ -88,11 +88,10 @@ struct SingleTrackQCMC {
8888 // Configurable<int> cfgNtracksPV08Max{"cfgNtracksPV08Max", static_cast<int>(1e+9), "max. multNTracksPV"};
8989 Configurable<bool > cfgFillQA{" cfgFillQA" , false , " flag to fill QA histograms" };
9090 Configurable<bool > cfgApplyWeightTTCA{" cfgApplyWeightTTCA" , false , " flag to apply weighting by 1/N" };
91- Configurable<uint> cfgDCAType{" cfgDCAType" , 0 , " type of DCA for output. 0:3D, 1:XY, 2:Z, else:3D" };
9291 Configurable<bool > cfgRequireTrueAssociation{" cfgRequireTrueAssociation" , false , " flag to require true mc collision association" };
9392
9493 ConfigurableAxis ConfPtlBins{" ConfPtlBins" , {VARIABLE_WIDTH, 0.00 , 0.05 , 0.10 , 0.15 , 0.20 , 0.30 , 0.40 , 0.50 , 0.60 , 0.70 , 0.80 , 0.90 , 1.00 , 1.10 , 1.20 , 1.30 , 1.40 , 1.50 , 1.60 , 1.70 , 1.80 , 1.90 , 2.00 , 2.50 , 3.00 , 3.50 , 4.00 , 4.50 , 5.00 , 6.00 , 7.00 , 8.00 , 9.00 , 10.00 }, " pTl bins for output histograms" };
95- ConfigurableAxis ConfDCABins{" ConfDCABins" , {VARIABLE_WIDTH, 0.0 , 0.1 , 0.2 , 0.3 , 0.4 , 0.5 , 0.6 , 0.7 , 0.8 , 0.9 , 1.0 , 1.1 , 1.2 , 1.3 , 1.4 , 1.5 , 1.6 , 1.7 , 1.8 , 1.9 , 2.0 , 2.5 , 3.0 , 3.5 , 4.0 , 4.5 , 5.0 , 6.0 , 7.0 , 8.0 , 9.0 , 10.0 }, " DCA bins for output histograms" };
94+ ConfigurableAxis ConfDCABins{" ConfDCABins" , {VARIABLE_WIDTH, - 10.0 , - 9.0 , - 8.0 , - 7.0 , - 6.0 , - 5.0 , - 4.5 , - 4.0 , - 3.5 , - 3.0 , - 2.5 , - 2.0 , - 1.9 , - 1.8 , - 1.7 , - 1.6 , - 1.5 , - 1.4 , - 1.3 , - 1.2 , - 1.1 , - 1.0 , - 0.9 , - 0.8 , - 0.7 , - 0.6 , - 0.5 , - 0.4 , - 0.3 , - 0.2 , - 0.1 , 0.0 , 0.1 , 0.2 , 0.3 , 0.4 , 0.5 , 0.6 , 0.7 , 0.8 , 0.9 , 1.0 , 1.1 , 1.2 , 1.3 , 1.4 , 1.5 , 1.6 , 1.7 , 1.8 , 1.9 , 2.0 , 2.5 , 3.0 , 3.5 , 4.0 , 4.5 , 5.0 , 6.0 , 7.0 , 8.0 , 9.0 , 10.0 }, " DCA bins for output histograms" };
9695
9796 EMEventCut fEMEventCut ;
9897 struct : ConfigurableGroup {
@@ -247,13 +246,13 @@ struct SingleTrackQCMC {
247246 const AxisSpec axis_eta{20 , -1.0 , +1.0 , " #eta_{e}" };
248247 const AxisSpec axis_phi{36 , 0.0 , 2 * M_PI, " #varphi_{e} (rad.)" };
249248 const AxisSpec axis_charge_gen{3 , -1.5 , +1.5 , " true charge" };
250- std::string dca_axis_title = " DCA_{e}^{3D} (#sigma)" ;
251- if (cfgDCAType == 1 ) {
252- dca_axis_title = " DCA_{e}^{XY } (#sigma)" ;
253- } else if (cfgDCAType == 2 ) {
254- dca_axis_title = " DCA_{e}^{Z} (#sigma) " ;
255- }
256- const AxisSpec axis_dca {ConfDCABins, dca_axis_title };
249+ std::string dca3D_axis_title = " DCA_{e}^{3D} (#sigma)" ;
250+ std::string dcaXY_axis_title = " DCA_{e}^{XY} (#sigma) " ;
251+ std::string dcaZ_axis_title = " DCA_{e}^{Z } (#sigma)" ;
252+
253+ const AxisSpec axis_dca3D{ConfDCABins, dca3D_axis_title} ;
254+ const AxisSpec axis_dcaXY{ConfDCABins, dcaXY_axis_title};
255+ const AxisSpec axis_dcaZ {ConfDCABins, dcaZ_axis_title };
257256
258257 // generated info
259258 fRegistry .add (" Generated/lf/hs" , " gen. single electron" , kTHnSparseD , {axis_pt, axis_eta, axis_phi, axis_charge_gen}, true );
@@ -267,7 +266,7 @@ struct SingleTrackQCMC {
267266 fRegistry .addClone (" Generated/lf/" , " Generated/b2c2l/" );
268267
269268 // track info
270- fRegistry .add (" Track/lf/positive/hs" , " rec. single electron" , kTHnSparseD , {axis_pt, axis_eta, axis_phi, axis_dca , axis_charge_gen}, true );
269+ fRegistry .add (" Track/lf/positive/hs" , " rec. single electron" , kTHnSparseD , {axis_pt, axis_eta, axis_phi, axis_dca3D, axis_dcaXY, axis_dcaZ , axis_charge_gen}, true );
271270 if (cfgFillQA) {
272271 fRegistry .add (" Track/lf/positive/hQoverPt" , " q/pT;q/p_{T} (GeV/c)^{-1}" , kTH1F , {{400 , -20 , 20 }}, false );
273272 fRegistry .add (" Track/lf/positive/hDCAxyz" , " DCA xy vs. z;DCA_{xy} (cm);DCA_{z} (cm)" , kTH2F , {{200 , -1 .0f , 1 .0f }, {700 , -3 .5f , 3 .5f }}, false );
@@ -570,12 +569,9 @@ struct SingleTrackQCMC {
570569 void fillElectronInfo (TTrack const & track)
571570 {
572571 auto mctrack = track.template emmcparticle_as <TMCParticles>();
573- float dca = dca3DinSigma (track);
574- if (cfgDCAType == 1 ) {
575- dca = dcaXYinSigma (track);
576- } else if (cfgDCAType == 2 ) {
577- dca = dcaZinSigma (track);
578- }
572+ float dca3D = dca3DinSigma (track);
573+ float dcaXY = dcaXYinSigma (track);
574+ float dcaZ = dcaZinSigma (track);
579575
580576 float weight = 1 .f ;
581577 if (cfgApplyWeightTTCA) {
@@ -584,11 +580,11 @@ struct SingleTrackQCMC {
584580 // LOGF(info, "map_weight[%d] = %f", track.globalIndex(), weight);
585581
586582 if (track.sign () > 0 ) {
587- fRegistry .fill (HIST (" Track/" ) + HIST (lepton_source_types[lepton_source_id]) + HIST (" positive/hs" ), track.pt (), track.eta (), track.phi (), dca , -mctrack.pdgCode () / pdg_lepton, weight);
583+ fRegistry .fill (HIST (" Track/" ) + HIST (lepton_source_types[lepton_source_id]) + HIST (" positive/hs" ), track.pt (), track.eta (), track.phi (), dca3D, dcaXY, dcaZ , -mctrack.pdgCode () / pdg_lepton, weight);
588584 if (cfgFillQA) {
589585 fRegistry .fill (HIST (" Track/" ) + HIST (lepton_source_types[lepton_source_id]) + HIST (" positive/hQoverPt" ), track.sign () / track.pt ());
590586 fRegistry .fill (HIST (" Track/" ) + HIST (lepton_source_types[lepton_source_id]) + HIST (" positive/hDCAxyz" ), track.dcaXY (), track.dcaZ ());
591- fRegistry .fill (HIST (" Track/" ) + HIST (lepton_source_types[lepton_source_id]) + HIST (" positive/hDCAxyzSigma" ), track. dcaXY () / std::sqrt (track. cYY ()), track. dcaZ () / std::sqrt (track. cZZ ()) );
587+ fRegistry .fill (HIST (" Track/" ) + HIST (lepton_source_types[lepton_source_id]) + HIST (" positive/hDCAxyzSigma" ), dcaXY, dcaZ);
592588 fRegistry .fill (HIST (" Track/" ) + HIST (lepton_source_types[lepton_source_id]) + HIST (" positive/hDCAxyRes_Pt" ), track.pt (), std::sqrt (track.cYY ()) * 1e+4 ); // convert cm to um
593589 fRegistry .fill (HIST (" Track/" ) + HIST (lepton_source_types[lepton_source_id]) + HIST (" positive/hDCAzRes_Pt" ), track.pt (), std::sqrt (track.cZZ ()) * 1e+4 ); // convert cm to um
594590 fRegistry .fill (HIST (" Track/" ) + HIST (lepton_source_types[lepton_source_id]) + HIST (" positive/hDCA3dRes_Pt" ), track.pt (), sigmaDca3D (track) * 1e+4 ); // convert cm to um
@@ -629,11 +625,11 @@ struct SingleTrackQCMC {
629625 fRegistry .fill (HIST (" Track/PID/positive/hITSNsigmaPr" ), track.p (), track.itsNSigmaPr ());
630626 }
631627 } else {
632- fRegistry .fill (HIST (" Track/" ) + HIST (lepton_source_types[lepton_source_id]) + HIST (" negative/hs" ), track.pt (), track.eta (), track.phi (), dca , -mctrack.pdgCode () / pdg_lepton, weight);
628+ fRegistry .fill (HIST (" Track/" ) + HIST (lepton_source_types[lepton_source_id]) + HIST (" negative/hs" ), track.pt (), track.eta (), track.phi (), dca3D, dcaXY, dcaZ , -mctrack.pdgCode () / pdg_lepton, weight);
633629 if (cfgFillQA) {
634630 fRegistry .fill (HIST (" Track/" ) + HIST (lepton_source_types[lepton_source_id]) + HIST (" negative/hQoverPt" ), track.sign () / track.pt ());
635631 fRegistry .fill (HIST (" Track/" ) + HIST (lepton_source_types[lepton_source_id]) + HIST (" negative/hDCAxyz" ), track.dcaXY (), track.dcaZ ());
636- fRegistry .fill (HIST (" Track/" ) + HIST (lepton_source_types[lepton_source_id]) + HIST (" negative/hDCAxyzSigma" ), track. dcaXY () / std::sqrt (track. cYY ()), track. dcaZ () / std::sqrt (track. cZZ ()) );
632+ fRegistry .fill (HIST (" Track/" ) + HIST (lepton_source_types[lepton_source_id]) + HIST (" negative/hDCAxyzSigma" ), dcaXY, dcaZ);
637633 fRegistry .fill (HIST (" Track/" ) + HIST (lepton_source_types[lepton_source_id]) + HIST (" negative/hDCAxyRes_Pt" ), track.pt (), std::sqrt (track.cYY ()) * 1e+4 ); // convert cm to um
638634 fRegistry .fill (HIST (" Track/" ) + HIST (lepton_source_types[lepton_source_id]) + HIST (" negative/hDCAzRes_Pt" ), track.pt (), std::sqrt (track.cZZ ()) * 1e+4 ); // convert cm to um
639635 fRegistry .fill (HIST (" Track/" ) + HIST (lepton_source_types[lepton_source_id]) + HIST (" negative/hDCA3dRes_Pt" ), track.pt (), sigmaDca3D (track) * 1e+4 ); // convert cm to um
0 commit comments