1 #ifndef ALIGNMENT_OFFLINEVALIDATION_PLOTALIGNNMENTVALIDATION_H_ 2 #define ALIGNMENT_OFFLINEVALIDATION_PLOTALIGNNMENTVALIDATION_H_ 7 #include "Math/ProbFunc.h" 11 #include "TDirectory.h" 12 #include "TDirectoryFile.h" 22 #include "TLegendEntry.h" 24 #include "TPaveStats.h" 25 #include "TPaveText.h" 34 #include "TTreeReader.h" 72 if (legName.empty()) {
76 int stop =
fileName.find_last_of(
'.');
84 TDirectoryFile*
d =
nullptr;
87 if ((*d).Get(
"TkOffVal")) {
88 tree = (TTree*)(*d).Get(
"TkOffVal");
90 std::cout <<
"no tree named TkOffVal" << std::endl;
93 TDirectoryFile* d2 = (TDirectoryFile*)
d->Get(
"Pixel");
95 phase = (
int)((
bool)d2->Get(
"P1PXBBarrel_1"));
119 bool plotNormHisto =
false,
145 const TString& residType =
"xPrime",
146 TLegend** myLegend =
nullptr,
147 bool printModuleIds =
false,
148 bool validforphase0 =
205 void setHistStyle(TH1&
hist,
const char* titleX,
const char* titleY,
int color);
210 bool isSurfaceDeformation =
false,
211 TString secondline =
"");
233 std::vector<TH1*>
findmodule(TFile*
f,
unsigned int moduleid);
236 #endif // ALIGNMENT_OFFLINEVALIDATION_PLOTALIGNNMENTVALIDATION_H_
std::vector< double > vAlignmentUncertainty
void plotSurfaceShapes(const std::string &options="layers", const std::string &variable="")
std::vector< double > vmeanerror
void scaleXaxis(TH1 *hist, Int_t scale)
void setHistStyle(TH1 &hist, const char *titleX, const char *titleY, int color)
std::vector< double > vPValueMeanEqualIdeal
std::vector< double > vrms
void residual_by_moduleID(unsigned int moduleid)
TkOfflineVariables * vars
constexpr unsigned int subDetId[21]
void legendOptions(TString options)
void plotSS(const std::string &options="layers", const std::string &variable="")
std::vector< double > vPValueRMSEqualIdeal
std::string getSelectionForDMRPlot(int minHits, int subDetId, int direction=0, int layer=0)
std::ofstream summaryfile
void loadFileList(const char *inputFile, std::string fileName="", int lineColor=2, int lineStyle=1)
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)
std::vector< TH1 * > findmodule(TFile *f, unsigned int moduleid)
int maxNumberOfLayers(int subdetector)
void setTitleStyle(TNamed &h, const char *titleX, const char *titleY, int subDetId, bool isSurfaceDeformation=false, TString secondline="")
TF1 * fitGauss(TH1 *hist, int color)
void plotChi2(const char *inputFile)
constexpr std::array< uint8_t, layerIndexSize > layer
void setLegendStyle(TLegend &leg)
static const TString summaryfilename
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)
THStack * addHists(const TString &selection, const TString &residType="xPrime", TLegend **myLegend=nullptr, bool printModuleIds=false, bool validforphase0=false)
TkOfflineVariables(std::string fileName, std::string baseDir, std::string legName="", int color=1, int style=1)
void modifySSHistAndLegend(THStack *hs, TLegend *legend)
void storeHistogramInRootfile(TH1 *hist)
void useFitForDMRplots(bool usefit=false)
void plotDMR(const std::string &plotVar="medianX", Int_t minHits=50, const std::string &options="plain", const std::string &filterName="")
double resampleTestOfEqualMeans(TH1F *h1, TH1F *h2, int numSamples)
~PlotAlignmentValidation()
void setDMRHistStyleAndLegend(TH1F *h, DMRPlotInfo &plotinfo, int direction=0, int layer=0)
std::vector< double > vPValueEqualSplitMeans
Class PlotAlignmentValidation Class used as the last step for Offline Track Validation tool...
std::vector< double > vmean
std::string fileNames[10]
TObject * findObjectFromCanvas(TCanvas *canv, const char *className, Int_t n=1)
std::vector< TkOfflineVariables * > sourceList
void setCanvasStyle(TCanvas &canv)
void setOutputDir(std::string dir)
PlotAlignmentValidation(bool bigtext=false)
int numberOfLayers(int phase, int subdetector)
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
void plotDMRHistogram(DMRPlotInfo &plotinfo, int direction=0, int layer=0, std::string subdet="")
std::vector< double > vdeltamean
double resampleTestOfEqualRMS(TH1F *h1, TH1F *h2, int numSamples)
void setTreeBaseDir(std::string dir="TrackerOfflineValidation")
std::string className(const T &t)