30 #ifndef __StRefMultCorr_h__
31 #define __StRefMultCorr_h__
61 StRefMultCorr(
const TString name=
"refmult",
const TString subname=
"Def",
const TString libname=
"Def");
71 void initEvent(
const UShort_t RefMult,
const Double_t z,
const Double_t zdcCoincidenceRate=0.0) ;
74 Bool_t
isPileUpEvent(Double_t refmult, Double_t ntofmatch, Double_t vz=0.)
const {
84 const Double_t zdcCoincidenceRate,
const UInt_t flag = 2)
const;
106 void init(
const Int_t RunId);
109 void setVzForWeight(
const Int_t nbin,
const Double_t min,
const Double_t max) ;
110 void readScaleForWeight(
const Char_t* input) ;
113 Int_t
getBeginRun(
const Double_t energy,
const Int_t year);
115 Int_t
getEndRun(
const Double_t energy,
const Int_t year);
118 void print(
const Option_t* option=
"")
const ;
121 void setVerbose(
const Bool_t& verbose) { mVerbose = verbose; }
127 const TString mSubName;
129 const TString mLibName;
136 Bool_t isIndexOk()
const;
138 Bool_t isZvertexOk()
const;
140 Bool_t isRefMultOk()
const;
142 Bool_t isCentralityOk(
const Int_t icent)
const;
144 Int_t setParameterIndex(
const Int_t RunId);
152 Double_t getScaleForWeight()
const ;
171 Double_t mZdcCoincidenceRate ;
172 Double_t mRefMult_corr;
174 std::vector<Int_t> mYear ;
175 std::vector<Int_t> mStart_runId ;
176 std::vector<Int_t> mStop_runId ;
177 std::vector<Double_t> mStart_zvertex ;
178 std::vector<Double_t> mStop_zvertex ;
179 std::vector<Double_t> mNormalize_stop ;
180 std::vector<Int_t> mCentrality_bins[mNCentrality+1] ;
181 std::vector<Double_t> mPar_z_vertex[mNPar_z_vertex] ;
182 std::vector<Double_t> mPar_weight[mNPar_weight] ;
183 std::vector<Double_t> mPar_luminosity[mNPar_luminosity] ;
184 Int_t mParameterIndex;
186 std::multimap<std::pair<Double_t, Int_t>, Int_t> mBeginRun ;
187 std::multimap<std::pair<Double_t, Int_t>, Int_t> mEndRun ;
188 std::vector<Int_t> mBadRun ;
191 Int_t mnVzBinForWeight ;
192 std::vector<Double_t> mVzEdgeForWeight ;
193 std::vector<Double_t> mgRefMultTriggerCorrDiffVzScaleRatio ;
209 const Int_t getRefX()
const;
211 const Int_t getNumberOfDatasets()
const;
212 void readHeaderFile();
213 void readBadRunsFromHeaderFile();
214 Int_t getVzWindowForVzDepCentDef()
const;
216 Int_t getCentralityBin9VzDep()
const;
217 Int_t getCentralityBin16VzDep()
const;
218 std::vector<std::string> StringSplit(
const std::string str,
const char sep )
const;
221 void readScaleForWeight(
const Int_t nRefmultBin,
const Double_t *weight);
225 Double_t calcPileUpRefMult(Double_t ntofmatch, Double_t x0, Double_t x1,
226 Double_t x2, Double_t x3, Double_t x4)
const;
228 Bool_t isInPileUpRefMultLimits(Double_t refMult, Double_t low, Double_t hi)
const
229 {
return ( low < refMult && refMult < hi); }
Double_t luminosityCorrection(Double_t zdcCoincidenceRate) const
Luminosity correction factor.
Int_t getCentralityBin9() const
Get 9 centrality bins (10% increment except for 0-5 and 5-10)
Double_t getShapeWeight_SubVz2Center() const
Shape reweighting of refmult: ratio of refMult in each Vz bin to that in the center (|Vz|<10cm) ...
Int_t getCentralityBin16() const
Get 16 centrality bins (5% increment, 0-5, 5-10, ..., 75-80)
Int_t getBeginRun(const Double_t energy, const Int_t year)
Return the first runId from energy and year.
Double_t sampleRefMult(Int_t refMult) const
Sample refMult -> convert integer to double.
Double_t getRefMultCorr() const
Get corrected multiplicity, correction as a function of primary z-vertex.
void print(const Option_t *option="") const
Print all parameters.
Double_t getWeight() const
Total weighting factor: incorporates shape and trigger efficiency weights.
Bool_t isPileUpEvent(Double_t refmult, Double_t ntofmatch, Double_t vz=0.) const
Check if pile-up event.
Double_t triggerWeight() const
Trigger efficiency: fit of the Glauber/Data.
Bool_t passnTofMatchRefmultCut(Double_t refmult, Double_t ntofmatch, Double_t vz=0.) const
Check if NOT pile-up event.
Double_t vzCorrection(Double_t z) const
Vz correction factor.
Bool_t isBadRun(const Int_t RunId)
Check if run is bad.
Int_t getEndRun(const Double_t energy, const Int_t year)
Return the last runId from energy and year.
StRefMultCorr(const TString name="refmult", const TString subname="Def", const TString libname="Def")
virtual ~StRefMultCorr()
Destructor.
void setVerbose(const Bool_t &verbose)
Print debug information.
void init(const Int_t RunId)
Initialization of centrality bins etc.