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");
103 int maxNumberOfLayers(
int subdetector);
105 THStack* addHists(
const TString&
selection,
const TString &residType =
"xPrime", TLegend **myLegend = 0,
bool printModuleIds =
false,
bool validforphase0 =
false);
107 float twotailedStudentTTestEqualMean(
float t,
float v);
129 TList* getTreeList();
143 bool openedsummaryfile =
false;
145 std::vector<double> vmean, vdeltamean,
vrms, vmeanerror, vPValueEqualSplitMeans, vPValueMeanEqualIdeal, vPValueRMSEqualIdeal, vAlignmentUncertainty;
146 double resampleTestOfEqualMeans(TH1F* h1, TH1F* h2,
int numSamples);
147 double resampleTestOfEqualRMS(TH1F* h1, TH1F* h2,
int numSamples);
155 void setHistStyle( TH1&
hist,
const char* titleX,
const char* titleY,
int color);
156 void setTitleStyle( TNamed&
h,
const char* titleX,
const char* titleY,
int subDetId,
bool isSurfaceDeformation=
false, TString secondline=
"");
161 TObject* findObjectFromCanvas(TCanvas* canv,
const char*
className, Int_t
n=1);
174 void setDMRHistStyleAndLegend(TH1F*
h,
DMRPlotInfo& plotinfo,
int direction = 0,
int layer = 0);
175 void plotDMRHistogram(
DMRPlotInfo& plotinfo,
int direction = 0,
int layer = 0);
176 void modifySSHistAndLegend(THStack* hs, TLegend*
legend);
177 void openSummaryFile();
180 #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)