CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
PlotAlignmentValidation Class Reference

#include <PlotAlignmentValidation.h>

Classes

struct  DMRPlotInfo
 

Public Member Functions

THStack * addHists (const TString &selection, const TString &residType="xPrime", TLegend **myLegend=0, bool printModuleIds=false, bool validforphase0=false)
 
void legendOptions (TString options)
 
void loadFileList (const char *inputFile, std::string fileName="", int lineColor=2, int lineStyle=1)
 
int maxNumberOfLayers (int subdetector)
 
int numberOfLayers (int phase, int subdetector)
 
 PlotAlignmentValidation (bool bigtext=false)
 
 PlotAlignmentValidation (const char *inputFile, std::string fileName="", int lineColor=1, int lineStyle=1, bool bigtext=false)
 
void plotChi2 (const char *inputFile)
 
void plotDMR (const std::string &plotVar="medianX", Int_t minHits=50, const std::string &options="plain")
 
void plotHitMaps ()
 
void plotOutlierModules (const char *outputFileName="OutlierModules.ps", std::string plotVariable="chi2PerDofX", float chi2_cut=10, unsigned int minHits=50)
 
void plotSubDetResiduals (bool plotNormHisto=false, unsigned int subDetId=7)
 
void plotSurfaceShapes (const std::string &options="layers", const std::string &variable="")
 
void residual_by_moduleID (unsigned int moduleid)
 
void setOutputDir (std::string dir)
 
void setTreeBaseDir (std::string dir="TrackerOfflineValidationStandalone")
 
float twotailedStudentTTestEqualMean (float t, float v)
 
void useFitForDMRplots (bool usefit=false)
 
 ~PlotAlignmentValidation ()
 

Private Member Functions

vector< TH1 * > findmodule (TFile *f, unsigned int moduleid)
 
TObject * findObjectFromCanvas (TCanvas *canv, const char *className, Int_t n=1)
 
TF1 * fitGauss (TH1 *hist, int color)
 
std::string getSelectionForDMRPlot (int minHits, int subDetId, int direction=0, int layer=0)
 
TList * getTreeList ()
 
std::string getVariableForDMRPlot (const std::string &histoname, const std::string &variable, int nbins, double min, double max)
 
void modifySSHistAndLegend (THStack *hs, TLegend *legend)
 
void openSummaryFile ()
 
void plotDMRHistogram (DMRPlotInfo &plotinfo, int direction=0, int layer=0, std::string subdet="")
 
void plotSS (const std::string &options="layers", const std::string &variable="")
 
double resampleTestOfEqualMeans (TH1F *h1, TH1F *h2, int numSamples)
 
double resampleTestOfEqualRMS (TH1F *h1, TH1F *h2, int numSamples)
 
void scaleXaxis (TH1 *hist, Int_t scale)
 
void setCanvasStyle (TCanvas &canv)
 
void setDMRHistStyleAndLegend (TH1F *h, DMRPlotInfo &plotinfo, int direction=0, int layer=0)
 
void setHistStyle (TH1 &hist, const char *titleX, const char *titleY, int color)
 
void setLegendStyle (TLegend &leg)
 
void setNiceStyle ()
 
void setTitleStyle (TNamed &h, const char *titleX, const char *titleY, int subDetId, bool isSurfaceDeformation=false, TString secondline="")
 
void storeHistogramInRootfile (TH1 *hist)
 

Private Attributes

bool bigtext_
 
int fileCounter
 
std::string fileNames [10]
 
bool moreThanOneSource
 
bool openedsummaryfile = false
 
std::string outputDir
 
TString outputFile
 
TFile * rootsummaryfile
 
bool showMean_
 
bool showMeanError_
 
bool showModules_
 
bool showRMS_
 
bool showRMSError_
 
bool showUnderOverFlow_
 
TList * sourcelist
 
std::vector< TkOfflineVariables * > sourceList
 
ofstream summaryfile
 
std::string treeBaseDir
 
bool twolines_
 
bool useFit_
 
std::vector< double > vAlignmentUncertainty
 
std::vector< double > vdeltamean
 
std::vector< double > vmean
 
std::vector< double > vmeanerror
 
std::vector< double > vPValueEqualSplitMeans
 
std::vector< double > vPValueMeanEqualIdeal
 
std::vector< double > vPValueRMSEqualIdeal
 
std::vector< double > vrms
 

Static Private Attributes

const static TString summaryfilename
 

Detailed Description

Definition at line 83 of file PlotAlignmentValidation.h.

Constructor & Destructor Documentation

◆ PlotAlignmentValidation() [1/2]

PlotAlignmentValidation::PlotAlignmentValidation ( bool  bigtext = false)

◆ PlotAlignmentValidation() [2/2]

PlotAlignmentValidation::PlotAlignmentValidation ( const char *  inputFile,
std::string  fileName = "",
int  lineColor = 1,
int  lineStyle = 1,
bool  bigtext = false 
)

◆ ~PlotAlignmentValidation()

PlotAlignmentValidation::~PlotAlignmentValidation ( )

Member Function Documentation

◆ addHists()

THStack* PlotAlignmentValidation::addHists ( const TString &  selection,
const TString &  residType = "xPrime",
TLegend **  myLegend = 0,
bool  printModuleIds = false,
bool  validforphase0 = false 
)

◆ findmodule()

vector<TH1*> PlotAlignmentValidation::findmodule ( TFile *  f,
unsigned int  moduleid 
)
private

◆ findObjectFromCanvas()

TObject* PlotAlignmentValidation::findObjectFromCanvas ( TCanvas *  canv,
const char *  className,
Int_t  n = 1 
)
private

◆ fitGauss()

TF1* PlotAlignmentValidation::fitGauss ( TH1 *  hist,
int  color 
)
private

◆ getSelectionForDMRPlot()

std::string PlotAlignmentValidation::getSelectionForDMRPlot ( int  minHits,
int  subDetId,
int  direction = 0,
int  layer = 0 
)
private

◆ getTreeList()

TList* PlotAlignmentValidation::getTreeList ( )
private

◆ getVariableForDMRPlot()

std::string PlotAlignmentValidation::getVariableForDMRPlot ( const std::string &  histoname,
const std::string &  variable,
int  nbins,
double  min,
double  max 
)
private

◆ legendOptions()

void PlotAlignmentValidation::legendOptions ( TString  options)

◆ loadFileList()

void PlotAlignmentValidation::loadFileList ( const char *  inputFile,
std::string  fileName = "",
int  lineColor = 2,
int  lineStyle = 1 
)

◆ maxNumberOfLayers()

int PlotAlignmentValidation::maxNumberOfLayers ( int  subdetector)

◆ modifySSHistAndLegend()

void PlotAlignmentValidation::modifySSHistAndLegend ( THStack *  hs,
TLegend *  legend 
)
private

◆ numberOfLayers()

int PlotAlignmentValidation::numberOfLayers ( int  phase,
int  subdetector 
)

◆ openSummaryFile()

void PlotAlignmentValidation::openSummaryFile ( )
private

◆ plotChi2()

void PlotAlignmentValidation::plotChi2 ( const char *  inputFile)

◆ plotDMR()

void PlotAlignmentValidation::plotDMR ( const std::string &  plotVar = "medianX",
Int_t  minHits = 50,
const std::string &  options = "plain" 
)

◆ plotDMRHistogram()

void PlotAlignmentValidation::plotDMRHistogram ( DMRPlotInfo plotinfo,
int  direction = 0,
int  layer = 0,
std::string  subdet = "" 
)
private

◆ plotHitMaps()

void PlotAlignmentValidation::plotHitMaps ( )

◆ plotOutlierModules()

void PlotAlignmentValidation::plotOutlierModules ( const char *  outputFileName = "OutlierModules.ps",
std::string  plotVariable = "chi2PerDofX",
float  chi2_cut = 10,
unsigned int  minHits = 50 
)

◆ plotSS()

void PlotAlignmentValidation::plotSS ( const std::string &  options = "layers",
const std::string &  variable = "" 
)
private

◆ plotSubDetResiduals()

void PlotAlignmentValidation::plotSubDetResiduals ( bool  plotNormHisto = false,
unsigned int  subDetId = 7 
)

◆ plotSurfaceShapes()

void PlotAlignmentValidation::plotSurfaceShapes ( const std::string &  options = "layers",
const std::string &  variable = "" 
)

◆ resampleTestOfEqualMeans()

double PlotAlignmentValidation::resampleTestOfEqualMeans ( TH1F *  h1,
TH1F *  h2,
int  numSamples 
)
private

◆ resampleTestOfEqualRMS()

double PlotAlignmentValidation::resampleTestOfEqualRMS ( TH1F *  h1,
TH1F *  h2,
int  numSamples 
)
private

◆ residual_by_moduleID()

void PlotAlignmentValidation::residual_by_moduleID ( unsigned int  moduleid)

◆ scaleXaxis()

void PlotAlignmentValidation::scaleXaxis ( TH1 *  hist,
Int_t  scale 
)
private

◆ setCanvasStyle()

void PlotAlignmentValidation::setCanvasStyle ( TCanvas &  canv)
private

◆ setDMRHistStyleAndLegend()

void PlotAlignmentValidation::setDMRHistStyleAndLegend ( TH1F *  h,
DMRPlotInfo plotinfo,
int  direction = 0,
int  layer = 0 
)
private

◆ setHistStyle()

void PlotAlignmentValidation::setHistStyle ( TH1 &  hist,
const char *  titleX,
const char *  titleY,
int  color 
)
private

◆ setLegendStyle()

void PlotAlignmentValidation::setLegendStyle ( TLegend &  leg)
private

◆ setNiceStyle()

void PlotAlignmentValidation::setNiceStyle ( )
private

◆ setOutputDir()

void PlotAlignmentValidation::setOutputDir ( std::string  dir)

◆ setTitleStyle()

void PlotAlignmentValidation::setTitleStyle ( TNamed &  h,
const char *  titleX,
const char *  titleY,
int  subDetId,
bool  isSurfaceDeformation = false,
TString  secondline = "" 
)
private

◆ setTreeBaseDir()

void PlotAlignmentValidation::setTreeBaseDir ( std::string  dir = "TrackerOfflineValidationStandalone")

◆ storeHistogramInRootfile()

void PlotAlignmentValidation::storeHistogramInRootfile ( TH1 *  hist)
private

◆ twotailedStudentTTestEqualMean()

float PlotAlignmentValidation::twotailedStudentTTestEqualMean ( float  t,
float  v 
)

◆ useFitForDMRplots()

void PlotAlignmentValidation::useFitForDMRplots ( bool  usefit = false)

Member Data Documentation

◆ bigtext_

bool PlotAlignmentValidation::bigtext_
private

Definition at line 157 of file PlotAlignmentValidation.h.

◆ fileCounter

int PlotAlignmentValidation::fileCounter
private

Definition at line 194 of file PlotAlignmentValidation.h.

◆ fileNames

std::string PlotAlignmentValidation::fileNames[10]
private

Definition at line 193 of file PlotAlignmentValidation.h.

◆ moreThanOneSource

bool PlotAlignmentValidation::moreThanOneSource
private

Definition at line 192 of file PlotAlignmentValidation.h.

◆ openedsummaryfile

bool PlotAlignmentValidation::openedsummaryfile = false
private

Definition at line 160 of file PlotAlignmentValidation.h.

◆ outputDir

std::string PlotAlignmentValidation::outputDir
private

Definition at line 189 of file PlotAlignmentValidation.h.

◆ outputFile

TString PlotAlignmentValidation::outputFile
private

◆ rootsummaryfile

TFile* PlotAlignmentValidation::rootsummaryfile
private

Definition at line 161 of file PlotAlignmentValidation.h.

◆ showMean_

bool PlotAlignmentValidation::showMean_
private

Definition at line 150 of file PlotAlignmentValidation.h.

◆ showMeanError_

bool PlotAlignmentValidation::showMeanError_
private

Definition at line 152 of file PlotAlignmentValidation.h.

◆ showModules_

bool PlotAlignmentValidation::showModules_
private

Definition at line 154 of file PlotAlignmentValidation.h.

◆ showRMS_

bool PlotAlignmentValidation::showRMS_
private

Definition at line 151 of file PlotAlignmentValidation.h.

◆ showRMSError_

bool PlotAlignmentValidation::showRMSError_
private

Definition at line 153 of file PlotAlignmentValidation.h.

◆ showUnderOverFlow_

bool PlotAlignmentValidation::showUnderOverFlow_
private

Definition at line 155 of file PlotAlignmentValidation.h.

◆ sourcelist

TList* PlotAlignmentValidation::sourcelist
private

Definition at line 190 of file PlotAlignmentValidation.h.

◆ sourceList

std::vector<TkOfflineVariables*> PlotAlignmentValidation::sourceList
private

Definition at line 191 of file PlotAlignmentValidation.h.

◆ summaryfile

ofstream PlotAlignmentValidation::summaryfile
private

Definition at line 159 of file PlotAlignmentValidation.h.

◆ summaryfilename

const static TString PlotAlignmentValidation::summaryfilename
staticprivate

Definition at line 158 of file PlotAlignmentValidation.h.

◆ treeBaseDir

std::string PlotAlignmentValidation::treeBaseDir
private

Definition at line 147 of file PlotAlignmentValidation.h.

◆ twolines_

bool PlotAlignmentValidation::twolines_
private

Definition at line 156 of file PlotAlignmentValidation.h.

◆ useFit_

bool PlotAlignmentValidation::useFit_
private

Definition at line 149 of file PlotAlignmentValidation.h.

◆ vAlignmentUncertainty

std::vector<double> PlotAlignmentValidation::vAlignmentUncertainty
private

Definition at line 163 of file PlotAlignmentValidation.h.

◆ vdeltamean

std::vector<double> PlotAlignmentValidation::vdeltamean
private

Definition at line 163 of file PlotAlignmentValidation.h.

◆ vmean

std::vector<double> PlotAlignmentValidation::vmean
private

Definition at line 163 of file PlotAlignmentValidation.h.

◆ vmeanerror

std::vector<double> PlotAlignmentValidation::vmeanerror
private

Definition at line 163 of file PlotAlignmentValidation.h.

◆ vPValueEqualSplitMeans

std::vector<double> PlotAlignmentValidation::vPValueEqualSplitMeans
private

Definition at line 163 of file PlotAlignmentValidation.h.

◆ vPValueMeanEqualIdeal

std::vector<double> PlotAlignmentValidation::vPValueMeanEqualIdeal
private

Definition at line 163 of file PlotAlignmentValidation.h.

◆ vPValueRMSEqualIdeal

std::vector<double> PlotAlignmentValidation::vPValueRMSEqualIdeal
private

Definition at line 163 of file PlotAlignmentValidation.h.

◆ vrms

std::vector<double> PlotAlignmentValidation::vrms
private

Definition at line 163 of file PlotAlignmentValidation.h.