1 #ifndef PLOTALIGNNMENTVALIDATION_H_ 2 #define PLOTALIGNNMENTVALIDATION_H_ 7 #include "TDirectory.h" 8 #include "TDirectoryFile.h" 53 if (fileName.find(
'/') ) start =fileName.find_last_of(
'/')+1;
54 int stop = fileName.find_last_of(
'.');
55 legendName = fileName.substr(start,stop-start);
61 file = TFile::Open( fileName.c_str() );
62 TDirectoryFile *
d = 0;
63 if (
file->Get( baseDir.c_str() ) ) {
64 d = (TDirectoryFile*)
file->Get( baseDir.c_str() );
65 if ((*d).Get(
"TkOffVal")) {
66 tree = (TTree*)(*d).Get(
"TkOffVal");
68 std::cout<<
"no tree named TkOffVal"<<std::endl;
71 TDirectoryFile *d2 = (TDirectoryFile*)d->Get(
"Pixel");
73 phase = (
int)((
bool)d2->Get(
"P1PXBBarrel_1"));
75 std::cout<<
"no directory named "<<baseDir.c_str()<<std::endl;
91 void useFitForDMRplots(
bool usefit =
false);
92 void legendOptions(TString
options);
94 void plotSubDetResiduals(
bool plotNormHisto=
false,
unsigned int subDetId=7);
97 void plotChi2(
const char *inputFile);
101 void setTreeBaseDir(
std::string dir =
"TrackerOfflineValidationStandalone");
102 void residual_by_moduleID(
unsigned int moduleid);
104 int maxNumberOfLayers(
int subdetector);
106 THStack* addHists(
const TString&
selection,
const TString &residType =
"xPrime", TLegend **myLegend = 0,
bool printModuleIds =
false,
bool validforphase0 =
false);
108 float twotailedStudentTTestEqualMean(
float t,
float v);
130 TList* getTreeList();
144 bool openedsummaryfile =
false;
146 std::vector<double> vmean, vdeltamean,
vrms, vmeanerror, vPValueEqualSplitMeans, vPValueMeanEqualIdeal, vPValueRMSEqualIdeal, vAlignmentUncertainty;
147 double resampleTestOfEqualMeans(TH1F* h1, TH1F* h2,
int numSamples);
148 double resampleTestOfEqualRMS(TH1F* h1, TH1F* h2,
int numSamples);
156 void setHistStyle( TH1&
hist,
const char* titleX,
const char* titleY,
int color);
157 void setTitleStyle( TNamed&
h,
const char* titleX,
const char* titleY,
int subDetId,
bool isSurfaceDeformation=
false, TString secondline=
"");
162 TObject* findObjectFromCanvas(TCanvas* canv,
const char*
className, Int_t
n=1);
175 void setDMRHistStyleAndLegend(TH1F*
h,
DMRPlotInfo& plotinfo,
int direction = 0,
int layer = 0);
176 void plotDMRHistogram(
DMRPlotInfo& plotinfo,
int direction = 0,
int layer = 0);
177 void modifySSHistAndLegend(THStack* hs, TLegend*
legend);
178 void openSummaryFile();
179 vector <TH1*> findmodule (TFile*
f,
unsigned int moduleid);
183 #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)
std::vector< TkOfflineVariables * > sourceList
std::string className(const T &t)