1 #ifndef PLOTALIGNNMENTVALIDATION_H_
2 #define PLOTALIGNNMENTVALIDATION_H_
16 #include "TDirectory.h"
19 #include "TDirectoryFile.h"
50 if (fileName.find(
'/') ) start =fileName.find_last_of(
'/')+1;
51 int stop = fileName.find_last_of(
'.');
52 legendName = fileName.substr(start,stop-start);
58 file = TFile::Open( fileName.c_str() );
59 TDirectoryFile *
d = 0;
60 if (
file->Get( baseDir.c_str() ) ) {
61 d = (TDirectoryFile*)
file->Get( baseDir.c_str() );
62 if ((*d).Get(
"TkOffVal")) {
63 tree = (TTree*)(*d).Get(
"TkOffVal");
65 std::cout<<
"no tree named TkOffVal"<<std::endl;
68 std::cout<<
"no directory named "<<baseDir.c_str()<<std::endl;
91 THStack*
addHists(
const TString&
selection,
const TString &residType =
"xPrime", TLegend **myLegend = 0,
bool printModuleIds =
false);
133 void setTitleStyle( TNamed&
h,
const char* titleX,
const char* titleY,
int subDetId,
bool isSurfaceDeformation=
false, TString secondline=
"");
156 #endif // PLOTALIGNNMENTVALIDATION_H_
void plotSurfaceShapes(const std::string &options="layers", const std::string &variable="")
void scaleXaxis(TH1 *hist, Int_t scale)
tuple start
Check for commandline option errors.
void setHistStyle(TH1 &hist, const char *titleX, const char *titleY, int color)
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
TObject * findObjectFromCanvas(TCanvas *canv, const char *className, Int_t n=1)
TkOfflineVariables * vars
void legendOptions(TString options)
void plotSS(const std::string &options="layers", const std::string &variable="")
std::string getSelectionForDMRPlot(int minHits, int subDetId, int direction=0, int layer=0)
THStack * addHists(const TString &selection, const TString &residType="xPrime", TLegend **myLegend=0, bool printModuleIds=false)
void loadFileList(const char *inputFile, std::string fileName="", int lineColor=2, int lineStyle=1)
void plotOutlierModules(const char *outputFileName="OutlierModules.ps", std::string plotVariable="chi2PerDofX", float chi2_cut=10, unsigned int minHits=50)
void plotDMRHistogram(DMRPlotInfo &plotinfo, int direction=0, int layer=0)
void setTitleStyle(TNamed &h, const char *titleX, const char *titleY, int subDetId, bool isSurfaceDeformation=false, TString secondline="")
void setTreeBaseDir(std::string dir="TrackerOfflineValidationStandalone")
void plotChi2(const char *inputFile)
PlotAlignmentValidation()
void setLegendStyle(TLegend &leg)
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)
TkOfflineVariables(std::string fileName, std::string baseDir, std::string legName="", int color=1, int style=1)
void modifySSHistAndLegend(THStack *hs, TLegend *legend)
void plotDMR(const std::string &plotVar="medianX", Int_t minHits=50, const std::string &options="plain")
unsigned int subDetId[18]
void useFitForDMRplots(bool usefit=false)
~PlotAlignmentValidation()
void setDMRHistStyleAndLegend(TH1F *h, DMRPlotInfo &plotinfo, int direction=0, int layer=0)
std::string fileNames[10]
std::vector< TkOfflineVariables * > sourceList
void setCanvasStyle(TCanvas &canv)
void setOutputDir(std::string dir)
TF1 * fitGauss(TH1 *hist, int color)
std::string className(const T &t)