1 #ifndef Alignment_APEEstimation_TrackerSectorStruct_h
2 #define Alignment_APEEstimation_TrackerSectorStruct_h
95 std::map<std::string,std::vector<TH1*> >
m_sigmaX;
130 norResXMax_(999.), sigmaXHitMax_(999.), sigmaXMax_(999.),
131 name(
"default"), Name(0),
132 ResX(0), NorResX(0), XHit(0), XTrk(0),
133 SigmaX2(0), ProbX(0),
134 WidthVsPhiSensX(0), WidthVsWidthProjected(0), WidthDiffVsMaxStrip(0), WidthDiffVsSigmaXHit(0),
135 PhiSensXVsBarycentreX(0),
136 PWidthVsPhiSensX(0), PWidthVsWidthProjected(0), PWidthDiffVsMaxStrip(0), PWidthDiffVsSigmaXHit(0),
137 PPhiSensXVsBarycentreX(0),
138 ResY(0), NorResY(0), YHit(0), YTrk(0),
139 SigmaY2(0), ProbY(0),
140 PhiSensYVsBarycentreY(0),
141 PPhiSensYVsBarycentreY(0),
144 MeanX(0), RmsX(0), FitMeanX1(0), ResidualWidthX1(0), CorrectionX1(0),
145 FitMeanX2(0), ResidualWidthX2(0), CorrectionX2(0),
147 MeanY(0), RmsY(0), FitMeanY1(0), ResidualWidthY1(0), CorrectionY1(0),
148 FitMeanY2(0), ResidualWidthY2(0), CorrectionY2(0),
169 return bookCorrHists(
"X", varName, varTitle, labelX, unitX, nBinX1D, nBinX2D, minBinX, maxBinX, options);
173 return bookCorrHists(
"Y", varName, varTitle, labelX, unitX, nBinX1D, nBinX2D, minBinX, maxBinX, options);
191 if(!(o.find(
"n") != std::string::npos || o.find(
"p") != std::string::npos || o.find(
"h") != std::string::npos ||
192 o.find(
"t") != std::string::npos || o.find(
"r") != std::string::npos))
return correlationHists;
197 if(!directory)
return correlationHists;
200 correlationHists.
Variable = directory->
make<TH1F>(
"h_"+varName+
suffix,varTitle+
" "+labelX+
";"+labelX+
" "+unitX+
";# hits",nBinX1D,minBinX,maxBinX);
202 if(options.find(
"n") != std::string::npos)
203 correlationHists.
NorResXVsVar = directory->
make<TH2F>(
"h2_norRes"+xY+
"Vs"+varName,
"r_{"+xy+
"}/#sigma_{r,"+xy+
"} vs. "+labelX+
";"+labelX+
" "+unitX+
";("+xy+
"_{trk}-"+xy+
"_{hit})/#sigma_{r,"+xy+
"}",nBinX2D,minBinX,maxBinX,25,-norResXMax,norResXMax);
204 if(options.find(
"p") != std::string::npos)
205 correlationHists.
ProbXVsVar = directory->
make<TH2F>(
"h2_prob"+xY+
"Vs"+varName,
"prob_{"+xy+
"} vs. "+labelX+
";"+labelX+
" "+unitX+
";prob_{"+xy+
"}",nBinX2D,minBinX,maxBinX,60,-0.1,1.1);
206 if(options.find(
"h") != std::string::npos)
207 correlationHists.
SigmaXHitVsVar = directory->
make<TH2F>(
"h2_sigma"+xY+
"HitVs"+varName,
"#sigma_{hit,"+xy+
"} vs. "+labelX+
";"+labelX+
" "+unitX+
";#sigma_{hit,"+xy+
"} [#mum]",nBinX2D,minBinX,maxBinX,50,0*10000.,sigmaXHitMax*10000.);
208 if(options.find(
"t") != std::string::npos)
209 correlationHists.
SigmaXTrkVsVar = directory->
make<TH2F>(
"h2_sigma"+xY+
"TrkVs"+varName,
"#sigma_{trk,"+xy+
"} vs. "+labelX+
";"+labelX+
" "+unitX+
";#sigma_{trk,"+xy+
"} [#mum]",nBinX2D,minBinX,maxBinX,50,0*10000.,sigmaXMax*10000.);
210 if(options.find(
"r") != std::string::npos)
211 correlationHists.
SigmaXVsVar = directory->
make<TH2F>(
"h2_sigma"+xY+
"Vs"+varName,
"#sigma_{r,"+xy+
"} vs. "+labelX+
";"+labelX+
" "+unitX+
";#sigma_{r,"+xy+
"} [#mum]",nBinX2D,minBinX,maxBinX,50,0*10000.,sigmaXMax*10000.);
213 if(options.find(
"n") != std::string::npos)
214 correlationHists.
PNorResXVsVar = directory->
make<TProfile>(
"p_norRes"+xY+
"Vs"+varName,
"r_{"+xy+
"}/#sigma_{r,"+xy+
"} vs. "+labelX+
";"+labelX+
" "+unitX+
";("+xy+
"_{trk}-"+xy+
"_{hit})/#sigma_{r,"+xy+
"}",nBinX2D,minBinX,maxBinX,
"s");
215 if(options.find(
"p") != std::string::npos)
216 correlationHists.
PProbXVsVar = directory->
make<TProfile>(
"p_prob"+xY+
"Vs"+varName,
"prob_{"+xy+
"} vs. "+labelX+
";"+labelX+
" "+unitX+
";prob_{"+xy+
"}",nBinX2D,minBinX,maxBinX,
"s");
217 if(options.find(
"h") != std::string::npos)
218 correlationHists.
PSigmaXHitVsVar = directory->
make<TProfile>(
"p_sigma"+xY+
"HitVs"+varName,
"#sigma_{hit,"+xy+
"} vs. "+labelX+
";"+labelX+
" "+unitX+
";#sigma_{hit,"+xy+
"} [#mum]",nBinX2D,minBinX,maxBinX);
219 if(options.find(
"t") != std::string::npos)
220 correlationHists.
PSigmaXTrkVsVar = directory->
make<TProfile>(
"p_sigma"+xY+
"TrkVs"+varName,
"#sigma_{trk,"+xy+
"} vs. "+labelX+
";"+labelX+
" "+unitX+
";#sigma_{trk,"+xy+
"} [#mum]",nBinX2D,minBinX,maxBinX);
221 if(options.find(
"r") != std::string::npos)
222 correlationHists.
PSigmaXVsVar = directory->
make<TProfile>(
"p_sigma"+xY+
"Vs"+varName,
"#sigma_{r,"+xy+
"} vs. "+labelX+
";"+labelX+
" "+unitX+
";#sigma_{r,"+xy+
"} [#mum]",nBinX2D,minBinX,maxBinX);
224 return correlationHists;
231 return bookCorrHists(
"X", varName, labelX, unitX, nBinX, minBinX, maxBinX, options);
235 return bookCorrHists(
"Y", varName, labelX, unitX, nBinX, minBinX, maxBinX, options);
250 if(!(o.find(
"n") != std::string::npos || o.find(
"p") != std::string::npos || o.find(
"h") != std::string::npos ||
251 o.find(
"t") != std::string::npos || o.find(
"r") != std::string::npos))
return correlationHists;
256 if(!directory)
return correlationHists;
259 if(options.find(
"n") != std::string::npos)
260 correlationHists.
NorResXVsVar = directory->
make<TH2F>(
"h2_norRes"+xY+
"Vs"+varName,
"r_{"+xy+
"}/#sigma_{r,"+xy+
"} vs. "+labelX+
";"+labelX+
" "+unitX+
";("+xy+
"_{trk}-"+xy+
"_{hit})/#sigma_{r,"+xy+
"}",nBinX,minBinX,maxBinX,25,-norResXMax,norResXMax);
261 if(options.find(
"p") != std::string::npos)
262 correlationHists.
ProbXVsVar = directory->
make<TH2F>(
"h2_prob"+xY+
"Vs"+varName,
"prob_{"+xy+
"} vs. "+labelX+
";"+labelX+
" "+unitX+
";prob_{"+xy+
"}",nBinX,minBinX,maxBinX,60,-0.1,1.1);
263 if(options.find(
"h") != std::string::npos)
264 correlationHists.
SigmaXHitVsVar = directory->
make<TH2F>(
"h2_sigma"+xY+
"HitVs"+varName,
"#sigma_{hit,"+xy+
"} vs. "+labelX+
";"+labelX+
" "+unitX+
";#sigma_{hit,"+xy+
"} [#mum]",nBinX,minBinX,maxBinX,50,0*10000.,sigmaXHitMax*10000.);
265 if(options.find(
"t") != std::string::npos)
266 correlationHists.
SigmaXTrkVsVar = directory->
make<TH2F>(
"h2_sigma"+xY+
"TrkVs"+varName,
"#sigma_{trk,"+xy+
"} vs. "+labelX+
";"+labelX+
" "+unitX+
";#sigma_{trk,"+xy+
"} [#mum]",nBinX,minBinX,maxBinX,50,0*10000.,sigmaXMax*10000.);
267 if(options.find(
"r") != std::string::npos)
268 correlationHists.
SigmaXVsVar = directory->
make<TH2F>(
"h2_sigma"+xY+
"Vs"+varName,
"#sigma_{r,"+xy+
"} vs. "+labelX+
";"+labelX+
" "+unitX+
";#sigma_{r,"+xy+
"} [#mum]",nBinX,minBinX,maxBinX,50,0*10000.,sigmaXMax*10000.);
270 if(options.find(
"n") != std::string::npos)
271 correlationHists.
PNorResXVsVar = directory->
make<TProfile>(
"p_norRes"+xY+
"Vs"+varName,
"r_{"+xy+
"}/#sigma_{r,"+xy+
"} vs. "+labelX+
";"+labelX+
" "+unitX+
";("+xy+
"_{trk}-"+xy+
"_{hit})/#sigma_{r,"+xy+
"}",nBinX,minBinX,maxBinX,
"s");
272 if(options.find(
"p") != std::string::npos)
273 correlationHists.
PProbXVsVar = directory->
make<TProfile>(
"p_prob"+xY+
"Vs"+varName,
"prob_{"+xy+
"} vs. "+labelX+
";"+labelX+
" "+unitX+
";prob_{"+xy+
"}",nBinX,minBinX,maxBinX,
"s");
274 if(options.find(
"h") != std::string::npos)
275 correlationHists.
PSigmaXHitVsVar = directory->
make<TProfile>(
"p_sigma"+xY+
"HitVs"+varName,
"#sigma_{hit,"+xy+
"} vs. "+labelX+
";"+labelX+
" "+unitX+
";#sigma_{hit,"+xy+
"} [#mum]",nBinX,minBinX,maxBinX);
276 if(options.find(
"t") != std::string::npos)
277 correlationHists.
PSigmaXTrkVsVar = directory->
make<TProfile>(
"p_sigma"+xY+
"TrkVs"+varName,
"#sigma_{trk,"+xy+
"} vs. "+labelX+
";"+labelX+
" "+unitX+
";#sigma_{trk,"+xy+
"} [#mum]",nBinX,minBinX,maxBinX);
278 if(options.find(
"r") != std::string::npos)
279 correlationHists.
PSigmaXVsVar = directory->
make<TProfile>(
"p_sigma"+xY+
"Vs"+varName,
"#sigma_{r,"+xy+
"} vs. "+labelX+
";"+labelX+
" "+unitX+
";#sigma_{r,"+xy+
"} [#mum]",nBinX,minBinX,maxBinX);
281 return correlationHists;
293 return fillCorrHists(
"Y", hitParameterStruct, variable);
303 norRes = hitParameterStruct.
norResX;
304 prob = hitParameterStruct.
probX;
305 errHit = hitParameterStruct.
errXHit;
306 errTrk = hitParameterStruct.
errXTrk;
307 err = hitParameterStruct.
errX;
310 norRes = hitParameterStruct.
norResY;
311 prob = hitParameterStruct.
probY;
312 errHit = hitParameterStruct.
errYHit;
313 errTrk = hitParameterStruct.
errYTrk;
314 err = hitParameterStruct.
errY;
317 if(Variable){Variable->Fill(variable);}
320 NorResXVsVar->Fill(variable,norRes);
321 PNorResXVsVar->Fill(variable,norRes);
324 ProbXVsVar->Fill(variable,prob);
325 PProbXVsVar->Fill(variable,prob);
328 SigmaXHitVsVar->Fill(variable,errHit*10000.);
329 PSigmaXHitVsVar->Fill(variable,errHit*10000.);
332 SigmaXTrkVsVar->Fill(variable,errTrk*10000.);
333 PSigmaXTrkVsVar->Fill(variable,errTrk*10000.);
336 SigmaXVsVar->Fill(variable,err*10000.);
337 PSigmaXVsVar->Fill(variable,err*10000.);
TFileDirectory * directory_
void fillCorrHistsY(const TrackStruct::HitParameterStruct &hitParameterStruct, double variable)
std::map< std::string, std::vector< TH1 * > > m_sigmaY
TH2 * WidthDiffVsMaxStrip
std::map< std::string, std::vector< TH1 * > > m_sigmaX
TH2 * WidthDiffVsSigmaXHit
void fillCorrHists(const TString, const TrackStruct::HitParameterStruct &hitParameterStruct, double variable)
TProfile * PSigmaXTrkVsVar
CorrelationHists bookCorrHistsX(TString, TString, TString, TString, int, int, double, double, std::string="nphtr")
TProfile * PPhiSensYVsBarycentreY
TProfile * PWidthDiffVsMaxStrip
TProfile * PPhiSensXVsBarycentreX
T * make(const Args &...args) const
make new ROOT object
TProfile * PWidthVsWidthProjected
CorrelationHists bookCorrHistsY(TString, TString, TString, TString, int, int, double, double, std::string="nphtr")
void setCorrHistParams(TFileDirectory *, double, double, double)
CorrelationHists bookCorrHists(TString, TString, TString, TString, TString, int, int, double, double, std::string="nphtr")
TH2 * PhiSensXVsBarycentreX
std::map< std::string, CorrelationHists > m_correlationHistsX
std::map< unsigned int, std::map< std::string, TH1 * > > m_binnedHists
TProfile * PSigmaXHitVsVar
bool isPixel(HitType hitType)
volatile std::atomic< bool > shutdown_flag false
std::map< std::string, CorrelationHists > m_correlationHistsY
TH2 * WidthVsWidthProjected
void fillCorrHistsX(const TrackStruct::HitParameterStruct &hitParameterStruct, double variable)
TProfile * PWidthDiffVsSigmaXHit
TH2 * PhiSensYVsBarycentreY
TProfile * PWidthVsPhiSensX
std::vector< unsigned int > v_rawId