CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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

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

Definition at line 12 of file TrackIPHistograms.h.

Definition at line 13 of file TrackIPHistograms.h.

Constructor & Destructor Documentation

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 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
uint32_t const *__restrict__ Quality * quality
MonitorElement * theQual_loose
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:673
MonitorElement * theQual_highpur
MonitorElement * theQual_undefined
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(), 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
uint32_t const *__restrict__ Quality * quality
MonitorElement * theQual_loose
MonitorElement * theQual_highpur
MonitorElement * theQual_undefined
template<class T >
TrackIPHistograms< T >::~TrackIPHistograms ( )
inlineoverride

Definition at line 40 of file TrackIPHistograms.h.

40 {};
template<class T >
TrackIPHistograms< T >::TrackIPHistograms ( )
inlineprivate

Definition at line 76 of file TrackIPHistograms.h.

76 {}

Member Function Documentation

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

151  {
153  if (quality_)
154  fillVariable(quality, variable, hasTrack);
155 }
uint32_t const *__restrict__ Quality * quality
void fill(const int &flavour, const T &variable) const
void fillVariable(const reco::TrackBase::TrackQuality &qual, const T &var, const bool &hasTrack) const
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().

162  {
164  if (quality_)
165  fillVariable(quality, variable, hasTrack, w);
166 }
const double w
Definition: UKUtility.cc:23
uint32_t const *__restrict__ Quality * quality
void fill(const int &flavour, const T &variable) const
void fillVariable(const reco::TrackBase::TrackQuality &qual, const T &var, const bool &hasTrack) const
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(), and FlavourHistograms< T >::maxDimension().

172  {
176 
178  if (theArrayDimension == nullptr && quality_) {
179  fillVariable(quality, *variable);
180  } else {
181  int iMax = (*theArrayDimension > theMaxDimension) ? theMaxDimension : *theArrayDimension;
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 }
uint32_t const *__restrict__ Quality * quality
int maxDimension() const
void fill(const int &flavour, const T &variable) const
int * arrayDimension() const
int indexToPlot() const
long double T
void fillVariable(const reco::TrackBase::TrackQuality &qual, const T &var, const bool &hasTrack) const
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(), and FlavourHistograms< T >::maxDimension().

200  {
204 
206  if (theArrayDimension == nullptr && quality_) {
207  fillVariable(quality, *variable, w);
208  } else {
209  int iMax = (*theArrayDimension > theMaxDimension) ? theMaxDimension : *theArrayDimension;
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 }
const double w
Definition: UKUtility.cc:23
uint32_t const *__restrict__ Quality * quality
int maxDimension() const
void fill(const int &flavour, const T &variable) const
int * arrayDimension() const
int indexToPlot() const
long double T
void fillVariable(const reco::TrackBase::TrackQuality &qual, const T &var, const bool &hasTrack) const
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, and reco::TrackBase::tight.

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
list var
if using global norm cols_to_minmax = [&#39;t_delta&#39;, &#39;t_hmaxNearP&#39;,&#39;t_emaxNearP&#39;, &#39;t_hAnnular&#39;, &#39;t_eAnnular&#39;,&#39;t_pt&#39;,&#39;t_nVtx&#39;,&#39;t_ieta&#39;,&#39;t_eHcal10&#39;, &#39;t_eHcal30&#39;,&#39;t_rhoh&#39;,&#39;t_eHcal&#39;] df[cols_to_minmax] = df[cols_to_minmax].apply(lambda x: (x - x.min()) / (x.max() - x.min()) if (x.max() - x.min() &gt; 0) else 1.0/200.0)
MonitorElement * theQual_highpur
MonitorElement * theQual_undefined
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, and reco::TrackBase::tight.

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
const double w
Definition: UKUtility.cc:23
void Fill(long long x)
MonitorElement * theQual_loose
list var
if using global norm cols_to_minmax = [&#39;t_delta&#39;, &#39;t_hmaxNearP&#39;,&#39;t_emaxNearP&#39;, &#39;t_hAnnular&#39;, &#39;t_eAnnular&#39;,&#39;t_pt&#39;,&#39;t_nVtx&#39;,&#39;t_ieta&#39;,&#39;t_eHcal10&#39;, &#39;t_eHcal30&#39;,&#39;t_rhoh&#39;,&#39;t_eHcal&#39;] df[cols_to_minmax] = df[cols_to_minmax].apply(lambda x: (x - x.min()) / (x.max() - x.min()) if (x.max() - x.min() &gt; 0) else 1.0/200.0)
MonitorElement * theQual_highpur
MonitorElement * theQual_undefined
template<class T >
void TrackIPHistograms< T >::settitle ( const char *  title)

Definition at line 224 of file TrackIPHistograms.h.

References FlavourHistograms< T >::settitle().

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

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

Definition at line 68 of file TrackIPHistograms.h.

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

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

Definition at line 73 of file TrackIPHistograms.h.

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

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

Definition at line 71 of file TrackIPHistograms.h.

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

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

Definition at line 72 of file TrackIPHistograms.h.

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

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

Definition at line 70 of file TrackIPHistograms.h.

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