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 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 (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 () 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 bool &statistics_, const bool &plotLog_, const bool &plotNormalized_, const std::string &plotFirst_, const std::string &folder, const unsigned int &mc, DQMStore::IBooker &ibook)
 
 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)
 
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.

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 }

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.

◆ 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.

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 }

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.

◆ ~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

◆ 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

◆ 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.

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 }

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

◆ 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.

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 }

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

◆ 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.

235  {
236  if (!hasTrack || !quality_)
237  return;
238 
239  switch (qual) {
242  break;
245  break;
248  break;
249  default:
251  break;
252  }
253 }

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

◆ 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.

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 }

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

◆ settitle()

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

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().

GenHFHadronMatcher_cff.flavour
flavour
Definition: GenHFHadronMatcher_cff.py:8
runGCPTkAlMap.title
string title
Definition: runGCPTkAlMap.py:94
mps_fire.i
i
Definition: mps_fire.py:428
reco::TrackBase::tight
Definition: TrackBase.h:153
reco::TrackBase::loose
Definition: TrackBase.h:152
TrackIPHistograms::theQual_tight
MonitorElement * theQual_tight
Definition: TrackIPHistograms.h:72
CaloTowersParam_cfi.mc
mc
Definition: CaloTowersParam_cfi.py:8
printsummarytable.folder
folder
Definition: printsummarytable.py:7
FlavourHistograms::theArrayDimension
int * theArrayDimension
Definition: FlavourHistorgrams.h:117
quality
const uint32_t *__restrict__ Quality * quality
Definition: CAHitNtupletGeneratorKernelsImpl.h:109
FlavourHistograms::theMaxDimension
int theMaxDimension
Definition: FlavourHistorgrams.h:118
trigObjTnPSource_cfi.var
var
Definition: trigObjTnPSource_cfi.py:21
TrackIPHistograms::fillVariable
void fillVariable(const reco::TrackBase::TrackQuality &qual, const T &var, const bool &hasTrack) const
Definition: TrackIPHistograms.h:233
FlavourHistograms::fill
void fill(const int &flavour, const T &variable) const
Definition: FlavourHistorgrams.h:352
FlavourHistograms
Definition: FlavourHistorgrams.h:26
w
const double w
Definition: UKUtility.cc:23
TrackIPHistograms::theQual_loose
MonitorElement * theQual_loose
Definition: TrackIPHistograms.h:71
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
FlavourHistograms::maxDimension
int maxDimension() const
Definition: FlavourHistorgrams.h:87
FlavourHistograms::settitle
void settitle(const char *title)
Definition: FlavourHistorgrams.h:389
FlavourHistograms::indexToPlot
int indexToPlot() const
Definition: FlavourHistorgrams.h:88
TrackIPHistograms::quality_
bool quality_
Definition: TrackIPHistograms.h:68
TrackIPHistograms::theQual_highpur
MonitorElement * theQual_highpur
Definition: TrackIPHistograms.h:73
taus_updatedMVAIds_cff.variable
variable
Definition: taus_updatedMVAIds_cff.py:33
T
long double T
Definition: Basic3DVectorLD.h:48
TrackIPHistograms::theQual_undefined
MonitorElement * theQual_undefined
Definition: TrackIPHistograms.h:70
dqm::implementation::IGetter::get
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:651
FlavourHistograms::arrayDimension
int * arrayDimension() const
Definition: FlavourHistorgrams.h:86
HistoProviderDQM
Definition: HistoProviderDQM.h:8
dqm::impl::MonitorElement::enableSumw2
virtual void enableSumw2()
Definition: MonitorElement.cc:872
FlavourHistograms::theIndexToPlot
int theIndexToPlot
Definition: FlavourHistorgrams.h:119
dqm::impl::MonitorElement::setAxisTitle
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:800
reco::TrackBase::highPurity
Definition: TrackBase.h:154