1 #ifndef DQMOffline_RecoB_TrackIPHistograms_h
2 #define DQMOffline_RecoB_TrackIPHistograms_h
15 const int& nBins_,
const double& lowerBound_,
const double& upperBound_,
20 const int& nBins_,
const double& lowerBound_,
const double& upperBound_,
21 const bool&
statistics,
const bool& plotLog_,
const bool& plotNormalized_,
53 const int& nBins_,
const double& lowerBound_,
const double& upperBound_,
54 const bool& statistics_,
const bool& plotLog_,
const bool& plotNormalized_,
57 FlavourHistograms<
T>(baseNameTitle_, baseNameDescription_, nBins_, lowerBound_, upperBound_, statistics_, plotLog_, plotNormalized_,
58 plotFirst_, folder, mc, ibook), quality_(quality)
62 theQual_undefined = prov.
book1D( baseNameTitle_ +
"QualUnDef" , baseNameDescription_ +
" Undefined Quality", nBins_, lowerBound_, upperBound_);
63 theQual_loose = prov.
book1D( baseNameTitle_ +
"QualLoose" , baseNameDescription_ +
" Loose Quality", nBins_, lowerBound_, upperBound_);
64 theQual_tight = prov.
book1D( baseNameTitle_ +
"QualTight" , baseNameDescription_ +
" Tight Quality", nBins_, lowerBound_, upperBound_);
65 theQual_highpur = prov.
book1D( baseNameTitle_ +
"QualHighPur" , baseNameDescription_ +
" High Purity Quality", nBins_, lowerBound_, upperBound_);
77 const int& nBins_,
const double& lowerBound_,
const double& upperBound_,
80 FlavourHistograms<
T>(baseNameTitle_, baseNameDescription_, nBins_, lowerBound_, upperBound_,
81 plotFirst_, folder, mc, iget), quality_(quality)
85 theQual_loose = iget.
get(
"Btag/" + folder +
"/" + baseNameTitle_ +
"QualLoose");
86 theQual_tight = iget.
get(
"Btag/" + folder +
"/" + baseNameTitle_ +
"QualTight");
96 fillVariable(quality, variable, hasTrack);
104 fillVariable(quality, variable, hasTrack, w);
115 if( theArrayDimension == 0 && quality_) {
116 fillVariable( quality, *variable);
118 int iMax = (*theArrayDimension > theMaxDimension) ? theMaxDimension : *theArrayDimension ;
119 for(
int i = 0;
i != iMax; ++
i) {
120 if( quality_ && (( theIndexToPlot < 0) || (
i == theIndexToPlot)) ) {
121 fillVariable ( flavour , *(variable +
i), hasTrack);
125 if(theIndexToPlot >= iMax && quality_) {
126 const T& theZero =
static_cast<T> (0.0);
127 fillVariable ( quality, theZero, hasTrack);
140 if( theArrayDimension == 0 && quality_) {
141 fillVariable( quality, *variable,w);
143 int iMax = (*theArrayDimension > theMaxDimension) ? theMaxDimension : *theArrayDimension ;
144 for(
int i = 0;
i != iMax; ++
i) {
145 if( quality_ && (( theIndexToPlot < 0) || (
i == theIndexToPlot)) ) {
146 fillVariable ( flavour , *(variable +
i), hasTrack,w);
150 if(theIndexToPlot >= iMax && quality_) {
151 const T& theZero =
static_cast<T> (0.0);
152 fillVariable ( quality, theZero, hasTrack,w);
161 theQual_undefined->setAxisTitle(title);
162 theQual_loose->setAxisTitle(title);
163 theQual_tight->setAxisTitle(title);
164 theQual_highpur->setAxisTitle(title);
170 if(!hasTrack || !quality_)
return;
174 theQual_loose->Fill(var);
177 theQual_tight->Fill(var);
180 theQual_highpur->Fill(var);
183 theQual_undefined->Fill(var);
191 if(!hasTrack || !quality_)
return;
195 theQual_loose->Fill(var,w);
198 theQual_tight->Fill(var,w);
201 theQual_highpur->Fill(var,w);
204 theQual_undefined->Fill(var,w);
MonitorElement * theQual_tight
TrackQuality
track quality
MonitorElement * get(const std::string &path)
void fill(const int &flavour, const T &variable) const
virtual MonitorElement * book1D(const std::string &name, const std::string &title, const int &nchX, const double &lowX, const double &highX)
void fill(const int &flavour, const reco::TrackBase::TrackQuality &quality, const T &variable, const bool &hasTrack) const
MonitorElement * theQual_loose
void settitle(const char *title)
int * arrayDimension() const
MonitorElement * theQual_highpur
TH1F * getTH1F(void) const
MonitorElement * theQual_undefined
virtual ~TrackIPHistograms()
void settitle(const char *title)
int flavour(const Candidate &part)
void fillVariable(const reco::TrackBase::TrackQuality &qual, const T &var, const bool &hasTrack) const