1 #ifndef DQMOffline_RecoB_TrackIPHistograms_h
2 #define DQMOffline_RecoB_TrackIPHistograms_h
18 const double& lowerBound_,
19 const double& upperBound_,
22 const unsigned int& mc,
29 const double& lowerBound_,
30 const double& upperBound_,
33 const bool& plotNormalized_,
36 const unsigned int& mc,
45 const bool& hasTrack)
const;
55 const bool& hasTrack)
const;
83 const double& lowerBound_,
84 const double& upperBound_,
85 const bool& statistics_,
87 const bool& plotNormalized_,
90 const unsigned int& mc,
109 baseNameTitle_ +
"QualUnDef", baseNameDescription_ +
" Undefined Quality", nBins_, lowerBound_, upperBound_);
111 baseNameTitle_ +
"QualLoose", baseNameDescription_ +
" Loose Quality", nBins_, lowerBound_, upperBound_);
113 baseNameTitle_ +
"QualTight", baseNameDescription_ +
" Tight Quality", nBins_, lowerBound_, upperBound_);
115 baseNameTitle_ +
"QualHighPur", baseNameDescription_ +
" High Purity Quality", nBins_, lowerBound_, upperBound_);
129 const double& lowerBound_,
130 const double& upperBound_,
133 const unsigned int& mc,
137 baseNameTitle_, baseNameDescription_, nBins_, lowerBound_, upperBound_, plotFirst_, folder, mc, iget),
141 theQual_loose = iget.
get(
"Btag/" + folder +
"/" + baseNameTitle_ +
"QualLoose");
142 theQual_tight = iget.
get(
"Btag/" + folder +
"/" + baseNameTitle_ +
"QualTight");
151 const bool& hasTrack)
const {
154 fillVariable(quality, variable, hasTrack);
161 const bool& hasTrack,
165 fillVariable(quality, variable, hasTrack, w);
172 const bool& hasTrack)
const {
178 if (theArrayDimension ==
nullptr && quality_) {
179 fillVariable(quality, *variable);
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);
188 if (theIndexToPlot >= iMax && quality_) {
189 const T& theZero =
static_cast<T>(0.0);
190 fillVariable(quality, theZero, hasTrack);
199 const bool& hasTrack,
206 if (theArrayDimension ==
nullptr && quality_) {
207 fillVariable(quality, *variable, w);
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);
216 if (theIndexToPlot >= iMax && quality_) {
217 const T& theZero =
static_cast<T>(0.0);
218 fillVariable(quality, theZero, hasTrack, w);
226 theQual_undefined->setAxisTitle(title);
227 theQual_loose->setAxisTitle(title);
228 theQual_tight->setAxisTitle(title);
229 theQual_highpur->setAxisTitle(title);
235 const bool& hasTrack)
const {
236 if (!hasTrack || !quality_)
241 theQual_loose->Fill(var);
244 theQual_tight->Fill(var);
247 theQual_highpur->Fill(var);
250 theQual_undefined->Fill(var);
258 const bool& hasTrack,
260 if (!hasTrack || !quality_)
265 theQual_loose->Fill(var, w);
268 theQual_tight->Fill(var, w);
271 theQual_highpur->Fill(var, w);
274 theQual_undefined->Fill(var, w);
MonitorElement * theQual_tight
TrackQuality
track quality
uint32_t const *__restrict__ Quality * quality
~TrackIPHistograms() override
void fill(const int &flavour, const T &variable) const
void fill(const int &flavour, const reco::TrackBase::TrackQuality &quality, const T &variable, const bool &hasTrack) const
MonitorElement * theQual_loose
list var
if using global norm cols_to_minmax = ['t_delta', 't_hmaxNearP','t_emaxNearP', 't_hAnnular', 't_eAnnular','t_pt','t_nVtx','t_ieta','t_eHcal10', 't_eHcal30','t_rhoh','t_eHcal'] df[cols_to_minmax] = df[cols_to_minmax].apply(lambda x: (x - x.min()) / (x.max() - x.min()) if (x.max() - x.min() > 0) else 1.0/200.0)
virtual MonitorElement * get(std::string const &fullpath) const
void settitle(const char *title)
int * arrayDimension() const
MonitorElement * theQual_highpur
MonitorElement * theQual_undefined
virtual MonitorElement * book1D(const std::string &name, const std::string &title, const int &nchX, const double &lowX, const double &highX)
dqm::legacy::DQMStore DQMStore
virtual void enableSumw2()
dqm::legacy::MonitorElement MonitorElement
void settitle(const char *title)
void fillVariable(const reco::TrackBase::TrackQuality &qual, const T &var, const bool &hasTrack) const