CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions
TrackIPHistograms< T > Class Template Reference

#include <TrackIPHistograms.h>

Inheritance diagram for TrackIPHistograms< T >:
FlavourHistograms< T >

Public Types

typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 
- Public Types inherited from FlavourHistograms< T >
typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 

Public Member Functions

void fill (const int &flavour, const reco::TrackBase::TrackQuality &quality, const T &variable, const bool &hasTrack) const
 
void fill (const int &flavour, const reco::TrackBase::TrackQuality &quality, const T &variable, const bool &hasTrack, const T &w) const
 
void fill (const int &flavour, const reco::TrackBase::TrackQuality &quality, const T *variable, const bool &hasTrack) const
 
void fill (const int &flavour, const reco::TrackBase::TrackQuality &quality, const T *variable, const bool &hasTrack, const T &w) const
 
void settitle (const char *title)
 
 TrackIPHistograms (const std::string &baseNameTitle_, const std::string &baseNameDescription_, const int &nBins_, const double &lowerBound_, const double &upperBound_, const std::string &plotFirst_, const std::string &folder, const unsigned int &mc, const bool &quality, DQMStore::IGetter &iget)
 
 TrackIPHistograms (const std::string &baseNameTitle_, const std::string &baseNameDescription_, const int &nBins_, const double &lowerBound_, const double &upperBound_, const bool &statistics, const bool &plotLog_, const bool &plotNormalized_, const std::string &plotFirst_, const std::string &folder, const unsigned int &mc, const bool &quality, DQMStore::IBooker &ibook)
 
 ~TrackIPHistograms () override
 
- Public Member Functions inherited from FlavourHistograms< T >
int * arrayDimension () const
 
std::string baseNameDescription () const
 
std::string baseNameTitle () const
 
void divide (const FlavourHistograms< T > &bHD)
 
void epsPlot (const std::string &name)
 
void fill (const int &flavour, const T &variable) const
 
void fill (const int &flavour, const T &variable, const T &w) const
 
void fill (const int &flavour, const T *variable) const
 
 FlavourHistograms (const std::string &baseNameTitle_, const std::string &baseNameDescription_, const int &nBins_, const double &lowerBound_, const double &upperBound_, const std::string &plotFirst_, const std::string &folder, const unsigned int &mc, DQMStore::IGetter &iget)
 
 FlavourHistograms (const std::string &baseNameTitle_, const std::string &baseNameDescription_, const int &nBins_, const double &lowerBound_, const double &upperBound_, const bool &statistics_, const bool &plotLog_, const bool &plotNormalized_, const std::string &plotFirst_, const std::string &folder, const unsigned int &mc, DQMStore::IBooker &ibook)
 
std::vector< TH1F * > getHistoVector () const
 
TH1F * histo_all () const
 
TH1F * histo_b () const
 
TH1F * histo_c () const
 
TH1F * histo_d () const
 
TH1F * histo_dus () const
 
TH1F * histo_dusg () const
 
TH1F * histo_g () const
 
TH1F * histo_ni () const
 
TH1F * histo_pu () const
 
TH1F * histo_s () const
 
TH1F * histo_u () const
 
int indexToPlot () const
 
double lowerBound () const
 
int maxDimension () const
 
int nBins () const
 
void plot (TPad *theCanvas=nullptr)
 
std::string plotFirst () const
 
bool plotLog () const
 
bool plotNormalized () const
 
void setEfficiencyFlag ()
 
void SetMaximum (const double &max)
 
void SetMinimum (const double &min)
 
void settitle (const char *title)
 
bool statistics () const
 
double upperBound () const
 
virtual ~FlavourHistograms ()
 

Protected Member Functions

void fillVariable (const reco::TrackBase::TrackQuality &qual, const T &var, const bool &hasTrack) const
 
void fillVariable (const reco::TrackBase::TrackQuality &qual, const T &var, const bool &hasTrack, const T &w) const
 
- Protected Member Functions inherited from FlavourHistograms< T >
double ClopperPearsonUnc (double num, double den)
 
void ComputeEfficiency (TH1F *num, TH1F *den, int bin)
 
void fillVariable (const int &flavour, const T &var, const T &w) const
 

Protected Attributes

bool quality_
 
MonitorElementtheQual_highpur
 
MonitorElementtheQual_loose
 
MonitorElementtheQual_tight
 
MonitorElementtheQual_undefined
 
- Protected Attributes inherited from FlavourHistograms< T >
int * theArrayDimension
 
std::string theBaseNameDescription
 
std::string theBaseNameTitle
 
TCanvas * theCanvas
 
MonitorElementtheHisto_all
 
MonitorElementtheHisto_b
 
MonitorElementtheHisto_c
 
MonitorElementtheHisto_d
 
MonitorElementtheHisto_dus
 
MonitorElementtheHisto_dusg
 
MonitorElementtheHisto_g
 
MonitorElementtheHisto_ni
 
MonitorElementtheHisto_pu
 
MonitorElementtheHisto_s
 
MonitorElementtheHisto_u
 
int theIndexToPlot
 
double theLowerBound
 
double theMax
 
int theMaxDimension
 
double theMin
 
int theNBins
 
std::string thePlotFirst
 
bool thePlotLog
 
bool thePlotNormalized
 
bool theStatistics
 
double theUpperBound
 

Private Member Functions

 TrackIPHistograms ()
 

Detailed Description

template<class T>
class TrackIPHistograms< T >

Definition at line 10 of file TrackIPHistograms.h.

Member Typedef Documentation

◆ DQMStore

template<class T >
typedef dqm::legacy::DQMStore TrackIPHistograms< T >::DQMStore

Definition at line 12 of file TrackIPHistograms.h.

◆ MonitorElement

Definition at line 13 of file TrackIPHistograms.h.

Constructor & Destructor Documentation

◆ TrackIPHistograms() [1/3]

template<class T >
TrackIPHistograms< T >::TrackIPHistograms ( const std::string &  baseNameTitle_,
const std::string &  baseNameDescription_,
const int &  nBins_,
const double &  lowerBound_,
const double &  upperBound_,
const std::string &  plotFirst_,
const std::string &  folder,
const unsigned int &  mc,
const bool &  quality,
DQMStore::IGetter iget 
)

Definition at line 126 of file TrackIPHistograms.h.

References printsummarytable::folder, dqm::implementation::IGetter::get(), TrackIPHistograms< T >::quality_, TrackIPHistograms< T >::theQual_highpur, TrackIPHistograms< T >::theQual_loose, TrackIPHistograms< T >::theQual_tight, and TrackIPHistograms< T >::theQual_undefined.

137  baseNameTitle_, baseNameDescription_, nBins_, lowerBound_, upperBound_, plotFirst_, folder, mc, iget),
138  quality_(quality) {
139  if (quality_) {
140  theQual_undefined = iget.get("Btag/" + folder + "/" + baseNameTitle_ + "QualUnDef");
141  theQual_loose = iget.get("Btag/" + folder + "/" + baseNameTitle_ + "QualLoose");
142  theQual_tight = iget.get("Btag/" + folder + "/" + baseNameTitle_ + "QualTight");
143  theQual_highpur = iget.get("Btag/" + folder + "/" + baseNameTitle_ + "QualHighPur");
144  }
145 }
MonitorElement * theQual_tight
string quality
MonitorElement * theQual_loose
MonitorElement * theQual_highpur
MonitorElement * theQual_undefined
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:697

◆ TrackIPHistograms() [2/3]

template<class T >
TrackIPHistograms< T >::TrackIPHistograms ( const std::string &  baseNameTitle_,
const std::string &  baseNameDescription_,
const int &  nBins_,
const double &  lowerBound_,
const double &  upperBound_,
const bool &  statistics,
const bool &  plotLog_,
const bool &  plotNormalized_,
const std::string &  plotFirst_,
const std::string &  folder,
const unsigned int &  mc,
const bool &  quality,
DQMStore::IBooker ibook 
)

Definition at line 80 of file TrackIPHistograms.h.

References HistoProviderDQM::book1D(), dqm::impl::MonitorElement::enableSumw2(), printsummarytable::folder, TrackIPHistograms< T >::quality_, TrackIPHistograms< T >::theQual_highpur, TrackIPHistograms< T >::theQual_loose, TrackIPHistograms< T >::theQual_tight, and TrackIPHistograms< T >::theQual_undefined.

93  : FlavourHistograms<T>(baseNameTitle_,
94  baseNameDescription_,
95  nBins_,
96  lowerBound_,
97  upperBound_,
98  statistics_,
99  plotLog_,
100  plotNormalized_,
101  plotFirst_,
102  folder,
103  mc,
104  ibook),
105  quality_(quality) {
106  if (quality_) {
107  HistoProviderDQM prov("Btag", folder, ibook);
108  theQual_undefined = prov.book1D(
109  baseNameTitle_ + "QualUnDef", baseNameDescription_ + " Undefined Quality", nBins_, lowerBound_, upperBound_);
110  theQual_loose = prov.book1D(
111  baseNameTitle_ + "QualLoose", baseNameDescription_ + " Loose Quality", nBins_, lowerBound_, upperBound_);
112  theQual_tight = prov.book1D(
113  baseNameTitle_ + "QualTight", baseNameDescription_ + " Tight Quality", nBins_, lowerBound_, upperBound_);
114  theQual_highpur = prov.book1D(
115  baseNameTitle_ + "QualHighPur", baseNameDescription_ + " High Purity Quality", nBins_, lowerBound_, upperBound_);
116 
117  if (statistics_) {
122  }
123  }
124 }
MonitorElement * theQual_tight
string quality
MonitorElement * theQual_loose
MonitorElement * theQual_highpur
MonitorElement * theQual_undefined

◆ ~TrackIPHistograms()

template<class T >
TrackIPHistograms< T >::~TrackIPHistograms ( )
inlineoverride

Definition at line 40 of file TrackIPHistograms.h.

40 {};

◆ TrackIPHistograms() [3/3]

template<class T >
TrackIPHistograms< T >::TrackIPHistograms ( )
inlineprivate

Definition at line 76 of file TrackIPHistograms.h.

76 {}

Member Function Documentation

◆ fill() [1/4]

template<class T >
void TrackIPHistograms< T >::fill ( const int &  flavour,
const reco::TrackBase::TrackQuality quality,
const T variable,
const bool &  hasTrack 
) const

Definition at line 148 of file TrackIPHistograms.h.

References FlavourHistograms< T >::fill(), quality, and taus_updatedMVAIds_cff::variable.

151  {
153  if (quality_)
154  fillVariable(quality, variable, hasTrack);
155 }
void fillVariable(const reco::TrackBase::TrackQuality &qual, const T &var, const bool &hasTrack) const
void fill(const int &flavour, const T &variable) const
string quality

◆ fill() [2/4]

template<class T >
void TrackIPHistograms< T >::fill ( const int &  flavour,
const reco::TrackBase::TrackQuality quality,
const T variable,
const bool &  hasTrack,
const T w 
) const

Definition at line 158 of file TrackIPHistograms.h.

References FlavourHistograms< T >::fill(), quality, taus_updatedMVAIds_cff::variable, and w().

162  {
164  if (quality_)
165  fillVariable(quality, variable, hasTrack, w);
166 }
T w() const
void fillVariable(const reco::TrackBase::TrackQuality &qual, const T &var, const bool &hasTrack) const
void fill(const int &flavour, const T &variable) const
string quality

◆ fill() [3/4]

template<class T >
void TrackIPHistograms< T >::fill ( const int &  flavour,
const reco::TrackBase::TrackQuality quality,
const T variable,
const bool &  hasTrack 
) const

Definition at line 169 of file TrackIPHistograms.h.

References FlavourHistograms< T >::arrayDimension(), FlavourHistograms< T >::fill(), mps_fire::i, FlavourHistograms< T >::indexToPlot(), FlavourHistograms< T >::maxDimension(), quality, and taus_updatedMVAIds_cff::variable.

172  {
176 
178  if (theArrayDimension == nullptr && quality_) {
180  } else {
182  for (int i = 0; i != iMax; ++i) {
183  if (quality_ && ((theIndexToPlot < 0) || (i == theIndexToPlot))) {
184  fillVariable(flavour, *(variable + i), hasTrack);
185  }
186  }
187 
188  if (theIndexToPlot >= iMax && quality_) {
189  const T& theZero = static_cast<T>(0.0);
190  fillVariable(quality, theZero, hasTrack);
191  }
192  }
193 }
void fillVariable(const reco::TrackBase::TrackQuality &qual, const T &var, const bool &hasTrack) const
void fill(const int &flavour, const T &variable) const
string quality
int maxDimension() const
int * arrayDimension() const
long double T

◆ fill() [4/4]

template<class T >
void TrackIPHistograms< T >::fill ( const int &  flavour,
const reco::TrackBase::TrackQuality quality,
const T variable,
const bool &  hasTrack,
const T w 
) const

Definition at line 196 of file TrackIPHistograms.h.

References FlavourHistograms< T >::arrayDimension(), FlavourHistograms< T >::fill(), mps_fire::i, FlavourHistograms< T >::indexToPlot(), FlavourHistograms< T >::maxDimension(), quality, taus_updatedMVAIds_cff::variable, and w().

200  {
204 
206  if (theArrayDimension == nullptr && quality_) {
208  } else {
210  for (int i = 0; i != iMax; ++i) {
211  if (quality_ && ((theIndexToPlot < 0) || (i == theIndexToPlot))) {
212  fillVariable(flavour, *(variable + i), hasTrack, w);
213  }
214  }
215 
216  if (theIndexToPlot >= iMax && quality_) {
217  const T& theZero = static_cast<T>(0.0);
218  fillVariable(quality, theZero, hasTrack, w);
219  }
220  }
221 }
T w() const
void fillVariable(const reco::TrackBase::TrackQuality &qual, const T &var, const bool &hasTrack) const
void fill(const int &flavour, const T &variable) const
string quality
int maxDimension() const
int * arrayDimension() const
long double T

◆ fillVariable() [1/2]

template<class T >
void TrackIPHistograms< T >::fillVariable ( const reco::TrackBase::TrackQuality qual,
const T var,
const bool &  hasTrack 
) const
protected

Definition at line 233 of file TrackIPHistograms.h.

References reco::TrackBase::highPurity, reco::TrackBase::loose, reco::TrackBase::tight, and trigObjTnPSource_cfi::var.

235  {
236  if (!hasTrack || !quality_)
237  return;
238 
239  switch (qual) {
242  break;
245  break;
248  break;
249  default:
251  break;
252  }
253 }
MonitorElement * theQual_tight
void Fill(long long x)
MonitorElement * theQual_loose
MonitorElement * theQual_highpur
MonitorElement * theQual_undefined

◆ fillVariable() [2/2]

template<class T >
void TrackIPHistograms< T >::fillVariable ( const reco::TrackBase::TrackQuality qual,
const T var,
const bool &  hasTrack,
const T w 
) const
protected

Definition at line 256 of file TrackIPHistograms.h.

References reco::TrackBase::highPurity, reco::TrackBase::loose, reco::TrackBase::tight, trigObjTnPSource_cfi::var, and w().

259  {
260  if (!hasTrack || !quality_)
261  return;
262 
263  switch (qual) {
265  theQual_loose->Fill(var, w);
266  break;
268  theQual_tight->Fill(var, w);
269  break;
272  break;
273  default:
275  break;
276  }
277 }
MonitorElement * theQual_tight
T w() const
void Fill(long long x)
MonitorElement * theQual_loose
MonitorElement * theQual_highpur
MonitorElement * theQual_undefined

◆ settitle()

template<class T >
void TrackIPHistograms< T >::settitle ( const char *  title)

Definition at line 224 of file TrackIPHistograms.h.

References FlavourHistograms< T >::settitle(), and runGCPTkAlMap::title.

224  {
230 }
MonitorElement * theQual_tight
MonitorElement * theQual_loose
void settitle(const char *title)
MonitorElement * theQual_highpur
MonitorElement * theQual_undefined
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)

Member Data Documentation

◆ quality_

template<class T >
bool TrackIPHistograms< T >::quality_
protected

Definition at line 68 of file TrackIPHistograms.h.

Referenced by TrackIPHistograms< T >::TrackIPHistograms().

◆ theQual_highpur

template<class T >
MonitorElement* TrackIPHistograms< T >::theQual_highpur
protected

Definition at line 73 of file TrackIPHistograms.h.

Referenced by TrackIPHistograms< T >::TrackIPHistograms().

◆ theQual_loose

template<class T >
MonitorElement* TrackIPHistograms< T >::theQual_loose
protected

Definition at line 71 of file TrackIPHistograms.h.

Referenced by TrackIPHistograms< T >::TrackIPHistograms().

◆ theQual_tight

template<class T >
MonitorElement* TrackIPHistograms< T >::theQual_tight
protected

Definition at line 72 of file TrackIPHistograms.h.

Referenced by TrackIPHistograms< T >::TrackIPHistograms().

◆ theQual_undefined

template<class T >
MonitorElement* TrackIPHistograms< T >::theQual_undefined
protected

Definition at line 70 of file TrackIPHistograms.h.

Referenced by TrackIPHistograms< T >::TrackIPHistograms().