@@ -74,6 +74,12 @@ enum BeforeAfter {
7474 kAfter // /< filling after track selection
7575};
7676
77+ /* the configuration of the nsigma axis */
78+ float minNSigma = -4 .05f ;
79+ float maxNSigma = 4 .05f ;
80+ float widthNSigmaBin = 0 .1f ;
81+ int noOfNSigmaBins = static_cast <int >((maxNSigma - minNSigma) / widthNSigmaBin);
82+
7783/* the PID selector object to help with the configuration and the id of the selected particles */
7884o2::analysis::dptdptfilter::PIDSpeciesSelection pidselector;
7985
@@ -487,17 +493,17 @@ struct PidDataCollectingEngine {
487493 fhTPCTOFSigmaVsP[ix][isp] = ADDHISTOGRAM (TH3, DIRECTORYSTRING (" %s/%s/%s" , dirname, " PID" , whenname[ix].c_str ()),
488494 HNAMESTRING (" toftpcNSigmasVsP%c_%s" , whenprefix[ix], mainspnames[isp].c_str ()),
489495 HTITLESTRING (" n#sigma to the %s line %s" , mainsptitles[isp].c_str (), whentitle[ix].c_str ()),
490- kTH3F , {pidPAxis, {120 , - 6.0 , 6.0 , FORMATSTRING (" n#sigma_{TPC}^{%s}" , mainsptitles[isp].c_str ())}, {120 , -6.0 , 6.0 , FORMATSTRING (" n#sigma_{TOF}^{%s}" , mainsptitles[isp].c_str ())}});
496+ kTH3F , {pidPAxis, {noOfNSigmaBins, minNSigma, maxNSigma , FORMATSTRING (" n#sigma_{TPC}^{%s}" , mainsptitles[isp].c_str ())}, {120 , -6.0 , 6.0 , FORMATSTRING (" n#sigma_{TOF}^{%s}" , mainsptitles[isp].c_str ())}});
491497 }
492498 for (uint isp = 0 ; isp < nallmainsp; ++isp) {
493499 fhTPCnSigmasVsP[ix][isp] = ADDHISTOGRAM (TH2, DIRECTORYSTRING (" %s/%s/%s" , dirname, " PID" , whenname[ix].c_str ()),
494500 HNAMESTRING (" tpcNSigmasVsP%c_%s" , whenprefix[ix], allmainspnames[isp].c_str ()),
495501 HTITLESTRING (" TPC n#sigma to the %s line %s" , allmainsptitles[isp].c_str (), whentitle[ix].c_str ()),
496- kTH2F , {pidPAxis, {120 , - 6.0 , 6.0 , FORMATSTRING (" n#sigma_{TPC}^{%s}" , allmainsptitles[isp].c_str ())}});
502+ kTH2F , {pidPAxis, {noOfNSigmaBins, minNSigma, maxNSigma , FORMATSTRING (" n#sigma_{TPC}^{%s}" , allmainsptitles[isp].c_str ())}});
497503 fhTOFnSigmasVsP[ix][isp] = ADDHISTOGRAM (TH2, DIRECTORYSTRING (" %s/%s/%s" , dirname, " PID" , whenname[ix].c_str ()),
498504 HNAMESTRING (" tofNSigmasVsP%c_%s" , whenprefix[ix], allmainspnames[isp].c_str ()),
499505 HTITLESTRING (" TOF n#sigma to the %s line %s" , allmainsptitles[isp].c_str (), whentitle[ix].c_str ()),
500- kTH2F , {pidPAxis, {120 , - 6.0 , 6.0 , FORMATSTRING (" n#sigma_{TOF}^{%s}" , allmainsptitles[isp].c_str ())}});
506+ kTH2F , {pidPAxis, {noOfNSigmaBins, minNSigma, maxNSigma , FORMATSTRING (" n#sigma_{TOF}^{%s}" , allmainsptitles[isp].c_str ())}});
501507 }
502508 }
503509 }
@@ -625,11 +631,11 @@ struct PidExtraDataCollectingEngine {
625631 fhIdTPCnSigmasVsP[isp][imainsp] = ADDHISTOGRAM (TH2, DIRECTORYSTRING (" %s/%s/%s" , dirname, " PID" , " Selected" ),
626632 HNAMESTRING (" tpcNSigmasVsPSelected_%s_to%s" , tnames[isp].c_str (), allmainspnames[imainsp].c_str ()),
627633 HTITLESTRING (" TPC n#sigma for selected %s to the %s line" , tnames[isp].c_str (), allmainsptitles[imainsp].c_str ()),
628- kTH2F , {pidPAxis, {120 , - 6.0 , 6.0 , FORMATSTRING (" n#sigma_{TPC}^{%s}" , mainsptitles[isp].c_str ())}});
634+ kTH2F , {pidPAxis, {noOfNSigmaBins, minNSigma, maxNSigma , FORMATSTRING (" n#sigma_{TPC}^{%s}" , mainsptitles[isp].c_str ())}});
629635 fhIdTOFnSigmasVsP[isp][imainsp] = ADDHISTOGRAM (TH2, DIRECTORYSTRING (" %s/%s/%s" , dirname, " PID" , " Selected" ),
630636 HNAMESTRING (" tofNSigmasVsPSelected_%s_to%s" , tnames[isp].c_str (), allmainspnames[imainsp].c_str ()),
631637 HTITLESTRING (" TOF n#sigma for selected %s to the %s line" , tnames[isp].c_str (), allmainsptitles[imainsp].c_str ()),
632- kTH2F , {pidPAxis, {120 , - 6.0 , 6.0 , FORMATSTRING (" n#sigma_{TOF}^{%s}" , mainsptitles[isp].c_str ())}});
638+ kTH2F , {pidPAxis, {noOfNSigmaBins, minNSigma, maxNSigma , FORMATSTRING (" n#sigma_{TOF}^{%s}" , mainsptitles[isp].c_str ())}});
633639 }
634640 }
635641 }
@@ -732,6 +738,9 @@ struct DptDptEfficiencyAndQc {
732738
733739 Configurable<bool > useCentrality{" useCentrality" , false , " Perform the task using centrality/multiplicity classes. Default value: false" };
734740 Configurable<bool > useTPCInnerWallMomentum{" useTPCInnerWallMomentum" , false , " Use the TPC inner wall momentum. Default: false" };
741+ Configurable<float > cfgMinNSigma{" cfgMinNSigma" , -4 .05f , " nsigma axes lowest value. Default: -4.05" };
742+ Configurable<float > cfgMaxNSigma{" cfgMaxNSigma" , 4 .05f , " nsigma axes highest value. Default: 4.05" };
743+ Configurable<float > cfgWidthNSigmaBin{" cfgWidthNSigmaBin" , 0.1 , " nsigma axes bin width. Deafault: 0.1" };
735744
736745 void init (o2::framework::InitContext& initContext)
737746 {
@@ -822,6 +831,12 @@ struct DptDptEfficiencyAndQc {
822831 fCentMultMin [0 ] = 0 .0f ;
823832 fCentMultMax [0 ] = 100 .0f ;
824833 }
834+ /* configure nsigma axes */
835+ minNSigma = cfgMinNSigma.value ;
836+ maxNSigma = cfgMaxNSigma.value ;
837+ widthNSigmaBin = cfgWidthNSigmaBin.value ;
838+ noOfNSigmaBins = static_cast <int >((maxNSigma - minNSigma) / widthNSigmaBin);
839+
825840 bool doBasicAnalysis = doprocessDetectorLevelNotStored || doprocessReconstructedNotStored;
826841 bool doPidAnalysis = doprocessDetectorLevelNotStoredPID || doprocessReconstructedNotStoredPID;
827842 bool doPidExtraAnalysis = doprocessDetectorLevelNotStoredPIDExtra || doprocessReconstructedNotStoredPIDExtra;
0 commit comments