1 #ifndef PLOTALIGNNMENTVALIDATION_H_ 2 #define PLOTALIGNNMENTVALIDATION_H_ 7 #include "TDirectory.h" 8 #include "TDirectoryFile.h" 53 if (fileName.find(
'/'))
54 start = fileName.find_last_of(
'/') + 1;
55 int stop = fileName.find_last_of(
'.');
56 legendName = fileName.substr(start, stop - start);
62 file = TFile::Open(fileName.c_str());
63 TDirectoryFile*
d = 0;
64 if (
file->Get(baseDir.c_str())) {
65 d = (TDirectoryFile*)
file->Get(baseDir.c_str());
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"));
76 std::cout <<
"no directory named " << baseDir.c_str() << std::endl;
91 void useFitForDMRplots(
bool usefit =
false);
92 void legendOptions(TString
options);
93 void plotOutlierModules(
const char*
outputFileName =
"OutlierModules.ps",
97 void plotSubDetResiduals(
98 bool plotNormHisto =
false,
107 void plotChi2(
const char* inputFile);
111 void setTreeBaseDir(
std::string dir =
"TrackerOfflineValidationStandalone");
112 void residual_by_moduleID(
unsigned int moduleid);
114 int maxNumberOfLayers(
int subdetector);
118 const TString& residType =
"xPrime",
119 TLegend** myLegend = 0,
120 bool printModuleIds =
false,
121 bool validforphase0 =
124 float twotailedStudentTTestEqualMean(
float t,
float v);
146 TList* getTreeList();
160 bool openedsummaryfile =
false;
163 std::vector<double> vmean, vdeltamean,
vrms, vmeanerror, vPValueEqualSplitMeans, vPValueMeanEqualIdeal,
164 vPValueRMSEqualIdeal, vAlignmentUncertainty;
165 double resampleTestOfEqualMeans(TH1F* h1, TH1F* h2,
int numSamples);
166 double resampleTestOfEqualRMS(TH1F* h1, TH1F* h2,
int numSamples);
168 void storeHistogramInRootfile(TH1*
hist);
169 TF1* fitGauss(TH1*
hist,
int color);
175 void setHistStyle(TH1&
hist,
const char* titleX,
const char* titleY,
int color);
176 void setTitleStyle(TNamed&
h,
180 bool isSurfaceDeformation =
false,
181 TString secondline =
"");
186 TObject* findObjectFromCanvas(TCanvas* canv,
const char*
className, Int_t
n = 1);
199 void setDMRHistStyleAndLegend(TH1F*
h,
DMRPlotInfo& plotinfo,
int direction = 0,
int layer = 0);
201 void modifySSHistAndLegend(THStack* hs, TLegend*
legend);
202 void openSummaryFile();
203 vector<TH1*> findmodule(TFile*
f,
unsigned int moduleid);
206 #endif // PLOTALIGNNMENTVALIDATION_H_
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
std::vector< double > vrms
TkOfflineVariables * vars
static const TString summaryfilename
unsigned int subDetId[21]
void setCanvasStyle(TCanvas *c, const bool logScale)
TkOfflineVariables(std::string fileName, std::string baseDir, std::string legName="", int color=1, int style=1)
void setLegendStyle(TLegend *l, const unsigned int nColumns)
const map< TString, int > numberOfLayers(TString Year="2018")
std::vector< TkOfflineVariables * > sourceList
std::string className(const T &t)