Go to the documentation of this file. 1 #ifndef PLOTALIGNNMENTVALIDATION_H_
2 #define PLOTALIGNNMENTVALIDATION_H_
7 #include "TDirectory.h"
8 #include "TDirectoryFile.h"
55 int stop =
fileName.find_last_of(
'.');
63 TDirectoryFile*
d = 0;
66 if ((*d).Get(
"TkOffVal")) {
67 tree = (TTree*)(*d).Get(
"TkOffVal");
69 std::cout <<
"no tree named TkOffVal" << std::endl;
72 TDirectoryFile* d2 = (TDirectoryFile*)
d->Get(
"Pixel");
74 phase = (
int)((
bool)d2->Get(
"P1PXBBarrel_1"));
98 bool plotNormHisto =
false,
118 const TString& residType =
"xPrime",
119 TLegend** myLegend = 0,
120 bool printModuleIds =
false,
121 bool validforphase0 =
175 void setHistStyle(TH1&
hist,
const char* titleX,
const char* titleY,
int color);
180 bool isSurfaceDeformation =
false,
181 TString secondline =
"");
203 vector<TH1*>
findmodule(TFile*
f,
unsigned int moduleid);
206 #endif // PLOTALIGNNMENTVALIDATION_H_
void residual_by_moduleID(unsigned int moduleid)
int numberOfLayers(int phase, int subdetector)
void plotSurfaceShapes(const std::string &options="layers", const std::string &variable="")
void setHistStyle(TH1 &hist, const char *titleX, const char *titleY, int color)
TObject * findObjectFromCanvas(TCanvas *canv, const char *className, Int_t n=1)
void scaleXaxis(TH1 *hist, Int_t scale)
float twotailedStudentTTestEqualMean(float t, float v)
void plotOutlierModules(const char *outputFileName="OutlierModules.ps", std::string plotVariable="chi2PerDofX", float chi2_cut=10, unsigned int minHits=50)
TkOfflineVariables * vars
int maxNumberOfLayers(int subdetector)
std::vector< double > vPValueRMSEqualIdeal
const static TString summaryfilename
void setLegendStyle(TLegend &leg)
void loadFileList(const char *inputFile, std::string fileName="", int lineColor=2, int lineStyle=1)
void useFitForDMRplots(bool usefit=false)
void plotSubDetResiduals(bool plotNormHisto=false, unsigned int subDetId=7)
std::string getVariableForDMRPlot(const std::string &histoname, const std::string &variable, int nbins, double min, double max)
void legendOptions(TString options)
void plotSS(const std::string &options="layers", const std::string &variable="")
void modifySSHistAndLegend(THStack *hs, TLegend *legend)
std::string getSelectionForDMRPlot(int minHits, int subDetId, int direction=0, int layer=0)
void storeHistogramInRootfile(TH1 *hist)
void plotDMR(const std::string &plotVar="medianX", Int_t minHits=50, const std::string &options="plain")
void setTitleStyle(TNamed &h, const char *titleX, const char *titleY, int subDetId, bool isSurfaceDeformation=false, TString secondline="")
double resampleTestOfEqualMeans(TH1F *h1, TH1F *h2, int numSamples)
void setTreeBaseDir(std::string dir="TrackerOfflineValidationStandalone")
~PlotAlignmentValidation()
void plotChi2(const char *inputFile)
constexpr std::array< uint8_t, layerIndexSize > layer
void setDMRHistStyleAndLegend(TH1F *h, DMRPlotInfo &plotinfo, int direction=0, int layer=0)
std::vector< TkOfflineVariables * > sourceList
std::vector< double > vmean
THStack * addHists(const TString &selection, const TString &residType="xPrime", TLegend **myLegend=0, bool printModuleIds=false, bool validforphase0=false)
PlotAlignmentValidation(bool bigtext=false)
std::string fileNames[10]
void setCanvasStyle(TCanvas &canv)
void plotDMRHistogram(DMRPlotInfo &plotinfo, int direction=0, int layer=0, std::string subdet="")
TkOfflineVariables(std::string fileName, std::string baseDir, std::string legName="", int color=1, int style=1)
std::vector< double > vPValueEqualSplitMeans
constexpr unsigned int subDetId[21]
std::string className(const T &t)
std::vector< double > vAlignmentUncertainty
std::vector< double > vdeltamean
void setOutputDir(std::string dir)
double resampleTestOfEqualRMS(TH1F *h1, TH1F *h2, int numSamples)
TF1 * fitGauss(TH1 *hist, int color)
std::vector< double > vPValueMeanEqualIdeal
vector< TH1 * > findmodule(TFile *f, unsigned int moduleid)
std::vector< double > vmeanerror
std::vector< double > vrms