CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes
PFTauElecRejectionBenchmark Class Reference

#include <PFTauElecRejectionBenchmark.h>

Public Types

typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 

Public Member Functions

 PFTauElecRejectionBenchmark ()
 
void process (edm::Handle< edm::HepMCProduct > mcevt, edm::Handle< reco::PFTauCollection > pfTaus, edm::Handle< reco::PFTauDiscriminator > pfTauIsoDiscr, edm::Handle< reco::PFTauDiscriminator > pfTauElecDiscr)
 
void setup (std::string Filename, std::string benchmarkLabel, double maxDeltaR, double minRecoPt, double maxRecoAbsEta, double minMCPt, double maxMCAbsEta, std::string sGenMatchObjectLabel, bool applyEcalCrackCut, DQMStore *db_store)
 
void write ()
 
virtual ~PFTauElecRejectionBenchmark ()
 

Protected Attributes

DQMStoredb_
 

Private Member Functions

bool isInEcalCrack (double eta) const
 

Private Attributes

std::vector< TLorentzVector > _GenObjects
 
bool applyEcalCrackCut_
 
std::string benchmarkLabel_
 
TFile * file_
 
TH1F * hElecMVA
 
TH1F * hElecPreID
 
TH1F * hEmfrac
 
TH1F * hEmfrac_barrel
 
TH1F * hEmfrac_endcap
 
TH1F * hEmfrac_preid0
 
TH1F * hEmfrac_preid1
 
TH2F * hEmfracvsEoP
 
TH2F * hEmfracvsEoP_preid0
 
TH2F * hEmfracvsEoP_preid1
 
TH1F * hEoverP
 
TH1F * hEoverP_barrel
 
TH1F * hEoverP_endcap
 
TH1F * hEoverP_preid0
 
TH1F * hEoverP_preid1
 
TH2F * hHoPvsEoP
 
TH2F * hHoPvsEoP_preid0
 
TH2F * hHoPvsEoP_preid1
 
TH1F * hHoverP
 
TH1F * hHoverP_barrel
 
TH1F * hHoverP_endcap
 
TH1F * hHoverP_preid0
 
TH1F * hHoverP_preid1
 
TH1F * hleadGsfTk_eta
 
TH1F * hleadGsfTk_phi
 
TH1F * hleadGsfTk_pt
 
TH1F * hleadTk_eta
 
TH1F * hleadTk_phi
 
TH1F * hleadTk_pt
 
TH1F * hpfcand_deltaEta
 
TH1F * hpfcand_deltaEta_weightE
 
TH1F * hpfcand_deltaPhiOverQ
 
TH1F * hpfcand_deltaPhiOverQ_weightE
 
TH1F * hTauElecDiscriminant
 
double maxDeltaR_
 
double maxMCAbsEta_
 
double maxRecoAbsEta_
 
double minMCPt_
 
double minRecoPt_
 
std::string outputFile_
 
std::string sGenMatchObjectLabel_
 

Detailed Description

Definition at line 27 of file PFTauElecRejectionBenchmark.h.

Member Typedef Documentation

◆ DQMStore

Definition at line 29 of file PFTauElecRejectionBenchmark.h.

◆ MonitorElement

Definition at line 30 of file PFTauElecRejectionBenchmark.h.

Constructor & Destructor Documentation

◆ PFTauElecRejectionBenchmark()

PFTauElecRejectionBenchmark::PFTauElecRejectionBenchmark ( )

Definition at line 22 of file PFTauElecRejectionBenchmark.cc.

◆ ~PFTauElecRejectionBenchmark()

PFTauElecRejectionBenchmark::~PFTauElecRejectionBenchmark ( )
virtual

Definition at line 24 of file PFTauElecRejectionBenchmark.cc.

References file_.

24  {
25  if (file_)
26  file_->Close();
27 }

Member Function Documentation

◆ isInEcalCrack()

bool PFTauElecRejectionBenchmark::isInEcalCrack ( double  eta) const
private

Definition at line 342 of file PFTauElecRejectionBenchmark.cc.

References PVValHelper::eta.

Referenced by process().

342  {
343  return (eta < 0.018 || (eta > 0.423 && eta < 0.461) || (eta > 0.770 && eta < 0.806) || (eta > 1.127 && eta < 1.163) ||
344  (eta > 1.460 && eta < 1.558));
345 }

◆ process()

void PFTauElecRejectionBenchmark::process ( edm::Handle< edm::HepMCProduct mcevt,
edm::Handle< reco::PFTauCollection pfTaus,
edm::Handle< reco::PFTauDiscriminator pfTauIsoDiscr,
edm::Handle< reco::PFTauDiscriminator pfTauElecDiscr 
)

Definition at line 205 of file PFTauElecRejectionBenchmark.cc.

References _GenObjects, funct::abs(), applyEcalCrackCut_, spr::deltaEta, SiPixelRawToDigiRegional_cfi::deltaPhi, ZGammaplusJetsMonitor_cff::DeltaPhi, reco::PFCandidate::ecalEnergy(), edm::HepMCProduct::GetEvent(), hElecMVA, hEmfrac, hEmfrac_barrel, hEmfrac_endcap, hEmfrac_preid0, hEmfrac_preid1, hEmfracvsEoP, hEmfracvsEoP_preid0, hEmfracvsEoP_preid1, hEoverP, hEoverP_barrel, hEoverP_endcap, hEoverP_preid0, hEoverP_preid1, hHoPvsEoP, hHoPvsEoP_preid0, hHoPvsEoP_preid1, hHoverP, hHoverP_barrel, hHoverP_endcap, hHoverP_preid0, hHoverP_preid1, hleadTk_eta, hleadTk_phi, hleadTk_pt, hpfcand_deltaEta, hpfcand_deltaEta_weightE, hpfcand_deltaPhiOverQ, hpfcand_deltaPhiOverQ_weightE, hTauElecDiscriminant, mps_fire::i, createfilelist::int, isInEcalCrack(), edm::Ptr< T >::isNonnull(), edm::Ref< C, T, F >::isNonnull(), maxDeltaR_, maxMCAbsEta_, maxRecoAbsEta_, minMCPt_, minRecoPt_, AlCaHLTBitMon_ParallelJobs::p, reco::LeafCandidate::pdgId(), reco::PFCandidate::positionAtECALEntrance(), reco::LeafCandidate::px(), reco::LeafCandidate::py(), reco::LeafCandidate::pz(), sGenMatchObjectLabel_, metsig::tau, reco::PFCandidate::trackRef(), and z.

208  {
209  // Find Gen Objects to be matched with
210  HepMC::GenEvent* generated_event = new HepMC::GenEvent(*(mcevt->GetEvent()));
211  _GenObjects.clear();
212 
213  TLorentzVector taunet;
214  HepMC::GenEvent::particle_iterator p;
215  for (p = generated_event->particles_begin(); p != generated_event->particles_end(); p++) {
216  if (std::abs((*p)->pdg_id()) == 15 && (*p)->status() == 2) {
217  bool lept_decay = false;
218  TLorentzVector tau((*p)->momentum().px(), (*p)->momentum().py(), (*p)->momentum().pz(), (*p)->momentum().e());
219  HepMC::GenVertex::particle_iterator z = (*p)->end_vertex()->particles_begin(HepMC::descendants);
220  for (; z != (*p)->end_vertex()->particles_end(HepMC::descendants); z++) {
221  if (std::abs((*z)->pdg_id()) == 11 || std::abs((*z)->pdg_id()) == 13)
222  lept_decay = true;
223  if (std::abs((*z)->pdg_id()) == 16)
224  taunet.SetPxPyPzE((*z)->momentum().px(), (*z)->momentum().py(), (*z)->momentum().pz(), (*z)->momentum().e());
225  }
226  if (lept_decay == false) {
227  TLorentzVector jetMom = tau - taunet;
228  if (sGenMatchObjectLabel_ == "tau")
229  _GenObjects.push_back(jetMom);
230  }
231  } else if (std::abs((*p)->pdg_id()) == 11 && (*p)->status() == 1) {
232  TLorentzVector elec((*p)->momentum().px(), (*p)->momentum().py(), (*p)->momentum().pz(), (*p)->momentum().e());
233  if (sGenMatchObjectLabel_ == "e")
234  _GenObjects.push_back(elec);
235  }
236  }
237 
239 
240  // Loop over all PFTaus
241  math::XYZPointF myleadTkEcalPos;
242  for (PFTauCollection::size_type iPFTau = 0; iPFTau < pfTaus->size(); iPFTau++) {
243  PFTauRef thePFTau(pfTaus, iPFTau);
244  if ((*pfTauIsoDiscr)[thePFTau] == 1) {
245  if ((*thePFTau).et() > minRecoPt_ && std::abs((*thePFTau).eta()) < maxRecoAbsEta_) {
246  // Check if track goes to Ecal crack
247  reco::TrackRef myleadTk;
248  const reco::PFCandidatePtr& pflch = thePFTau->leadPFChargedHadrCand();
249  if (pflch.isNonnull()) {
250  myleadTk = pflch->trackRef();
251  myleadTkEcalPos = pflch->positionAtECALEntrance();
252 
253  if (myleadTk.isNonnull()) {
254  if (applyEcalCrackCut_ && isInEcalCrack(std::abs((double)myleadTkEcalPos.eta()))) {
255  continue; // do nothing
256  } else {
257  // Match with gen object
258  for (unsigned int i = 0; i < _GenObjects.size(); i++) {
259  if (_GenObjects[i].Et() >= minMCPt_ && std::abs(_GenObjects[i].Eta()) < maxMCAbsEta_) {
260  TLorentzVector pftau((*thePFTau).px(), (*thePFTau).py(), (*thePFTau).pz(), (*thePFTau).energy());
261  double GenDeltaR = pftau.DeltaR(_GenObjects[i]);
262  if (GenDeltaR < maxDeltaR_) {
263  hleadTk_pt->Fill((float)myleadTk->pt());
264  hleadTk_eta->Fill((float)myleadTk->eta());
265  hleadTk_phi->Fill((float)myleadTk->phi());
266 
267  hEoverP->Fill((*thePFTau).ecalStripSumEOverPLead());
268  hHoverP->Fill((*thePFTau).hcal3x3OverPLead());
269  hEmfrac->Fill((*thePFTau).emFraction());
270 
271  if (std::abs(myleadTk->eta()) < 1.5) {
272  hEoverP_barrel->Fill((*thePFTau).ecalStripSumEOverPLead());
273  hHoverP_barrel->Fill((*thePFTau).hcal3x3OverPLead());
274  hEmfrac_barrel->Fill((*thePFTau).emFraction());
275  } else if (std::abs(myleadTk->eta()) > 1.5 && std::abs(myleadTk->eta()) < 2.5) {
276  hEoverP_endcap->Fill((*thePFTau).ecalStripSumEOverPLead());
277  hHoverP_endcap->Fill((*thePFTau).hcal3x3OverPLead());
278  hEmfrac_endcap->Fill((*thePFTau).emFraction());
279  }
280 
281  // if -999 fill in -1 bin!
282  if ((*thePFTau).electronPreIDOutput() < -1)
283  hElecMVA->Fill(-1);
284  else
285  hElecMVA->Fill((*thePFTau).electronPreIDOutput());
286 
287  hTauElecDiscriminant->Fill((*pfTauElecDiscr)[thePFTau]);
288 
289  hHoPvsEoP->Fill((*thePFTau).ecalStripSumEOverPLead(), (*thePFTau).hcal3x3OverPLead());
290  hEmfracvsEoP->Fill((*thePFTau).emFraction(), (*thePFTau).hcal3x3OverPLead());
291 
292  if ((*thePFTau).electronPreIDDecision() == 1) {
293  hEoverP_preid1->Fill((*thePFTau).ecalStripSumEOverPLead());
294  hHoverP_preid1->Fill((*thePFTau).hcal3x3OverPLead());
295  hEmfrac_preid1->Fill((*thePFTau).emFraction());
296  hHoPvsEoP_preid1->Fill((*thePFTau).ecalStripSumEOverPLead(), (*thePFTau).hcal3x3OverPLead());
297  hEmfracvsEoP_preid1->Fill((*thePFTau).emFraction(), (*thePFTau).hcal3x3OverPLead());
298  } else {
299  hEoverP_preid0->Fill((*thePFTau).ecalStripSumEOverPLead());
300  hHoverP_preid0->Fill((*thePFTau).hcal3x3OverPLead());
301  hEmfrac_preid0->Fill((*thePFTau).emFraction());
302  hHoPvsEoP_preid0->Fill((*thePFTau).ecalStripSumEOverPLead(), (*thePFTau).hcal3x3OverPLead());
303  hEmfracvsEoP_preid0->Fill((*thePFTau).emFraction(), (*thePFTau).hcal3x3OverPLead());
304  }
305  }
306  }
307 
308  // Loop over all PFCands for cluster plots
309  std::vector<CandidatePtr> myPFCands = (*thePFTau).pfTauTagInfoRef()->PFCands();
310  for (int i = 0; i < (int)myPFCands.size(); i++) {
311  const reco::PFCandidate* pfCand = dynamic_cast<const reco::PFCandidate*>(myPFCands[i].get());
312  if (pfCand == nullptr)
313  continue;
314 
315  math::XYZPointF candPos;
316  if (std::abs(pfCand->pdgId()) == 211 ||
317  std::abs(pfCand->pdgId()) == 11) // if charged hadron or electron
318  candPos = pfCand->positionAtECALEntrance();
319  else
320  candPos = math::XYZPointF(pfCand->px(), pfCand->py(), pfCand->pz());
321 
322  //double deltaR = ROOT::Math::VectorUtil::DeltaR(myleadTkEcalPos,candPos);
323  double deltaPhi = ROOT::Math::VectorUtil::DeltaPhi(myleadTkEcalPos, candPos);
324  double deltaEta = std::abs(myleadTkEcalPos.eta() - myPFCands[i]->eta());
325  double deltaPhiOverQ = deltaPhi / (double)myleadTk->charge();
326 
327  hpfcand_deltaEta->Fill(deltaEta);
328  hpfcand_deltaEta_weightE->Fill(deltaEta * pfCand->ecalEnergy());
329  hpfcand_deltaPhiOverQ->Fill(deltaPhiOverQ);
330  hpfcand_deltaPhiOverQ_weightE->Fill(deltaPhiOverQ * pfCand->ecalEnergy());
331  }
332  }
333  }
334  }
335  }
336  }
337  }
338  }
339 }
double pz() const final
z coordinate of momentum vector
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:238
const math::XYZPointF & positionAtECALEntrance() const
Definition: PFCandidate.h:388
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< float > > XYZPointF
point in space with cartesian internal representation
Definition: Point3D.h:10
uint16_t size_type
static const double deltaEta
Definition: CaloConstants.h:8
int pdgId() const final
PDG identifier.
std::vector< TLorentzVector > _GenObjects
double px() const final
x coordinate of momentum vector
bool isNonnull() const
Checks for non-null.
Definition: Ptr.h:146
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double py() const final
y coordinate of momentum vector
double ecalEnergy() const
return corrected Ecal energy
Definition: PFCandidate.h:221
const HepMC::GenEvent * GetEvent() const
Definition: HepMCProduct.h:37
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:41
reco::TrackRef trackRef() const
Definition: PFCandidate.cc:437

◆ setup()

void PFTauElecRejectionBenchmark::setup ( std::string  Filename,
std::string  benchmarkLabel,
double  maxDeltaR,
double  minRecoPt,
double  maxRecoAbsEta,
double  minMCPt,
double  maxMCAbsEta,
std::string  sGenMatchObjectLabel,
bool  applyEcalCrackCut,
DQMStore db_store 
)

Definition at line 44 of file PFTauElecRejectionBenchmark.cc.

References applyEcalCrackCut_, benchmarkLabel_, BOOK1D, BOOK2D, gather_cfg::cout, db_, file_, ewkMuLumiMonitorDQM_cfi::maxDeltaR, maxDeltaR_, pfTauBenchmarkElecRejection_cfi::maxMCAbsEta, maxMCAbsEta_, pfTauBenchmarkElecRejection_cfi::maxRecoAbsEta, maxRecoAbsEta_, pfTauBenchmarkElecRejection_cfi::minMCPt, minMCPt_, pfTauBenchmarkElecRejection_cfi::minRecoPt, minRecoPt_, outputFile_, castor_dqm_sourceclient_file_cfg::path, SETAXES, dqm::implementation::DQMStore::setCurrentFolder(), and sGenMatchObjectLabel_.

53  {
55  benchmarkLabel_ = benchmarkLabel;
56  outputFile_ = Filename;
59  minMCPt_ = minMCPt;
61  sGenMatchObjectLabel_ = sGenMatchObjectLabel;
62  applyEcalCrackCut_ = applyEcalCrackCut;
63 
64  file_ = nullptr;
65  db_ = db_store;
66 
67  // print parameters
68  cout << "PFTauElecRejectionBenchmark Setup parameters ==============================================" << endl;
69  cout << "Filename to write histograms " << Filename << endl;
70  cout << "Benchmark label name " << benchmarkLabel_ << endl;
71  cout << "maxDeltaRMax " << maxDeltaR << endl;
72  cout << "minRecoPt " << minRecoPt_ << endl;
73  cout << "maxRecoAbsEta " << maxRecoAbsEta_ << endl;
74  cout << "minMCPt " << minMCPt_ << endl;
75  cout << "maxMCAbsEta " << maxMCAbsEta_ << endl;
76  cout << "applyEcalCrackCut " << applyEcalCrackCut_ << endl;
77  cout << "sGenMatchObjectLabel " << sGenMatchObjectLabel_ << endl;
78 
79  // Book histogram
80 
81  // Establish DQM Store
82  string path = "PFTask/Benchmarks/" + benchmarkLabel_ + "/";
83  path += "Gen";
84  if (db_) {
86  } else {
87  file_ = new TFile(outputFile_.c_str(), "recreate");
88  cout << "Info: DQM is not available to provide data storage service. Using TFile to save histograms. " << endl;
89  }
90 
91  // E/p
92  BOOK1D(EoverP, "E/p", 100, 0., 4.);
93  SETAXES(EoverP, "E/p", "Entries");
94 
95  BOOK1D(EoverP_barrel, "E/p barrel", 100, 0., 4.);
96  SETAXES(EoverP_barrel, "E/p barrel", "Entries");
97 
98  BOOK1D(EoverP_endcap, "E/p endcap", 100, 0., 4.);
99  SETAXES(EoverP_endcap, "E/p endcap", "Entries");
100 
101  BOOK1D(EoverP_preid0, "E/p (preid=0)", 100, 0., 4.);
102  SETAXES(EoverP_preid0, "E/p", "Entries");
103 
104  BOOK1D(EoverP_preid1, "E/p (preid=1)", 100, 0., 4.);
105  SETAXES(EoverP_preid1, "E/p", "Entries");
106 
107  // H/p
108  BOOK1D(HoverP, "H/p", 100, 0., 2.);
109  SETAXES(HoverP, "H/p", "Entries");
110 
111  BOOK1D(HoverP_barrel, "H/p barrel", 100, 0., 2.);
112  SETAXES(HoverP_barrel, "H/p barrel", "Entries");
113 
114  BOOK1D(HoverP_endcap, "H/p endcap", 100, 0., 2.);
115  SETAXES(HoverP_endcap, "H/p endcap", "Entries");
116 
117  BOOK1D(HoverP_preid0, "H/p (preid=0)", 100, 0., 2.);
118  SETAXES(HoverP_preid0, "H/p", "Entries");
119 
120  BOOK1D(HoverP_preid1, "H/p (preid=1)", 100, 0., 2.);
121  SETAXES(HoverP_preid1, "H/p", "Entries");
122 
123  // emfrac
124  BOOK1D(Emfrac, "EM fraction", 100, 0., 1.01);
125  SETAXES(Emfrac, "em fraction", "Entries");
126 
127  BOOK1D(Emfrac_barrel, "EM fraction barrel", 100, 0., 1.01);
128  SETAXES(Emfrac_barrel, "em fraction barrel", "Entries");
129 
130  BOOK1D(Emfrac_endcap, "EM fraction endcap", 100, 0., 1.01);
131  SETAXES(Emfrac_endcap, "em fraction endcap", "Entries");
132 
133  BOOK1D(Emfrac_preid0, "EM fraction (preid=0)", 100, 0., 1.01);
134  SETAXES(Emfrac_preid0, "em fraction", "Entries");
135 
136  BOOK1D(Emfrac_preid1, "EM fraction (preid=1)", 100, 0., 1.01);
137  SETAXES(Emfrac_preid1, "em fraction", "Entries");
138 
139  // PreID
140  BOOK1D(ElecPreID, "PFElectron PreID decision", 6, 0., 1.01);
141  SETAXES(ElecPreID, "PFElectron PreID decision", "Entries");
142 
143  // MVA
144  BOOK1D(ElecMVA, "PFElectron MVA", 100, -1.01, 1.01);
145  SETAXES(ElecMVA, "PFElectron MVA", "Entries");
146 
147  // Discriminant
148  BOOK1D(TauElecDiscriminant, "PFTau-Electron Discriminant", 6, 0., 1.01);
149  SETAXES(TauElecDiscriminant, "PFTau-Electron Discriminant", "Entries");
150 
151  // PFCand clusters
152  BOOK1D(pfcand_deltaEta, "PFCand cluster dEta", 100, 0., 0.8);
153  SETAXES(pfcand_deltaEta, "PFCand cluster #Delta(#eta)", "Entries");
154 
155  BOOK1D(pfcand_deltaEta_weightE, "PFCand cluster dEta, energy weighted", 100, 0., 0.8);
156  SETAXES(pfcand_deltaEta_weightE, "PFCand cluster #Delta(#eta)", "Entries");
157 
158  BOOK1D(pfcand_deltaPhiOverQ, "PFCand cluster dPhi/q", 100, -0.8, 0.8);
159  SETAXES(pfcand_deltaPhiOverQ, "PFCand cluster #Delta(#phi)/q", "Entries");
160 
161  BOOK1D(pfcand_deltaPhiOverQ_weightE, "PFCand cluster dEta/q, energy weighted", 100, -0.8, 0.8);
162  SETAXES(pfcand_deltaPhiOverQ_weightE, "PFCand cluster #Delta(#phi)/q", "Entries");
163 
164  // Leading KF track
165  BOOK1D(leadTk_pt, "leading KF track pt", 100, 0., 80.);
166  SETAXES(leadTk_pt, "leading KF track p_{T} (GeV)", "Entries");
167 
168  BOOK1D(leadTk_eta, "leading KF track eta", 100, -4., 4.);
169  SETAXES(leadTk_eta, "leading KF track #eta", "Entries");
170 
171  BOOK1D(leadTk_phi, "leading KF track phi", 100, -3.2, 3.2);
172  SETAXES(leadTk_phi, "leading KF track #phi", "Entries");
173 
174  // Leading Gsf track
175  BOOK1D(leadGsfTk_pt, "leading Gsf track pt", 100, 0., 80.);
176  SETAXES(leadGsfTk_pt, "leading Gsf track p_{T} (GeV)", "Entries");
177 
178  BOOK1D(leadGsfTk_eta, "leading Gsf track eta", 100, -4., 4.);
179  SETAXES(leadGsfTk_eta, "leading Gsf track #eta", "Entries");
180 
181  BOOK1D(leadGsfTk_phi, "leading Gsf track phi", 100, -3.2, 3.2);
182  SETAXES(leadGsfTk_phi, "leading Gsf track #phi", "Entries");
183 
184  // H/p vs E/p
185  BOOK2D(HoPvsEoP, "H/p vs. E/p", 100, 0., 2., 100, 0., 2.);
186  SETAXES(HoPvsEoP, "E/p", "H/p");
187 
188  BOOK2D(HoPvsEoP_preid0, "H/p vs. E/p (preid=0)", 100, 0., 2., 100, 0., 2.);
189  SETAXES(HoPvsEoP_preid0, "E/p", "H/p");
190 
191  BOOK2D(HoPvsEoP_preid1, "H/p vs. E/p (preid=0)", 100, 0., 2., 100, 0., 2.);
192  SETAXES(HoPvsEoP_preid1, "E/p", "H/p");
193 
194  // em fraction vs E/p
195  BOOK2D(EmfracvsEoP, "emfrac vs. E/p", 100, 0., 2., 100, 0., 1.01);
196  SETAXES(EmfracvsEoP, "E/p", "em fraction");
197 
198  BOOK2D(EmfracvsEoP_preid0, "emfrac vs. E/p (preid=0)", 100, 0., 2., 100, 0., 1.01);
199  SETAXES(EmfracvsEoP_preid0, "E/p", "em fraction");
200 
201  BOOK2D(EmfracvsEoP_preid1, "emfrac vs. E/p (preid=0)", 100, 0., 2., 100, 0., 1.01);
202  SETAXES(EmfracvsEoP_preid1, "E/p", "em fraction");
203 }
void setCurrentFolder(std::string const &fullpath) override
Definition: DQMStore.h:647
#define BOOK1D(name, title, nbinsx, lowx, highx)
#define BOOK2D(name, title, nbinsx, lowx, highx, nbinsy, lowy, highy)
#define SETAXES(name, xtitle, ytitle)

◆ write()

void PFTauElecRejectionBenchmark::write ( )

Definition at line 29 of file PFTauElecRejectionBenchmark.cc.

References gather_cfg::cout, db_, file_, outputFile_, and dqm::implementation::DQMStore::save().

29  {
30  // Store the DAQ Histograms
31  if (!outputFile_.empty()) {
32  if (db_)
34  // use bare Root if no DQM (FWLite applications)
35  else if (file_) {
36  file_->Write(outputFile_.c_str());
37  cout << "Benchmark output written to file " << outputFile_.c_str() << endl;
38  file_->Close();
39  }
40  } else
41  cout << "No output file specified (" << outputFile_ << "). Results will not be saved!" << endl;
42 }
DQM_DEPRECATED void save(std::string const &filename, std::string const &path="")
Definition: DQMStore.cc:824

Member Data Documentation

◆ _GenObjects

std::vector<TLorentzVector> PFTauElecRejectionBenchmark::_GenObjects
private

Definition at line 112 of file PFTauElecRejectionBenchmark.h.

Referenced by process().

◆ applyEcalCrackCut_

bool PFTauElecRejectionBenchmark::applyEcalCrackCut_
private

Definition at line 63 of file PFTauElecRejectionBenchmark.h.

Referenced by process(), and setup().

◆ benchmarkLabel_

std::string PFTauElecRejectionBenchmark::benchmarkLabel_
private

Definition at line 56 of file PFTauElecRejectionBenchmark.h.

Referenced by setup().

◆ db_

DQMStore* PFTauElecRejectionBenchmark::db_
protected

Definition at line 115 of file PFTauElecRejectionBenchmark.h.

Referenced by setup(), and write().

◆ file_

TFile* PFTauElecRejectionBenchmark::file_
private

Definition at line 54 of file PFTauElecRejectionBenchmark.h.

Referenced by setup(), write(), and ~PFTauElecRejectionBenchmark().

◆ hElecMVA

TH1F* PFTauElecRejectionBenchmark::hElecMVA
private

Definition at line 87 of file PFTauElecRejectionBenchmark.h.

Referenced by process().

◆ hElecPreID

TH1F* PFTauElecRejectionBenchmark::hElecPreID
private

Definition at line 86 of file PFTauElecRejectionBenchmark.h.

◆ hEmfrac

TH1F* PFTauElecRejectionBenchmark::hEmfrac
private

Definition at line 68 of file PFTauElecRejectionBenchmark.h.

Referenced by process().

◆ hEmfrac_barrel

TH1F* PFTauElecRejectionBenchmark::hEmfrac_barrel
private

Definition at line 72 of file PFTauElecRejectionBenchmark.h.

Referenced by process().

◆ hEmfrac_endcap

TH1F* PFTauElecRejectionBenchmark::hEmfrac_endcap
private

Definition at line 76 of file PFTauElecRejectionBenchmark.h.

Referenced by process().

◆ hEmfrac_preid0

TH1F* PFTauElecRejectionBenchmark::hEmfrac_preid0
private

Definition at line 80 of file PFTauElecRejectionBenchmark.h.

Referenced by process().

◆ hEmfrac_preid1

TH1F* PFTauElecRejectionBenchmark::hEmfrac_preid1
private

Definition at line 84 of file PFTauElecRejectionBenchmark.h.

Referenced by process().

◆ hEmfracvsEoP

TH2F* PFTauElecRejectionBenchmark::hEmfracvsEoP
private

Definition at line 94 of file PFTauElecRejectionBenchmark.h.

Referenced by process().

◆ hEmfracvsEoP_preid0

TH2F* PFTauElecRejectionBenchmark::hEmfracvsEoP_preid0
private

Definition at line 95 of file PFTauElecRejectionBenchmark.h.

Referenced by process().

◆ hEmfracvsEoP_preid1

TH2F* PFTauElecRejectionBenchmark::hEmfracvsEoP_preid1
private

Definition at line 96 of file PFTauElecRejectionBenchmark.h.

Referenced by process().

◆ hEoverP

TH1F* PFTauElecRejectionBenchmark::hEoverP
private

Definition at line 66 of file PFTauElecRejectionBenchmark.h.

Referenced by process().

◆ hEoverP_barrel

TH1F* PFTauElecRejectionBenchmark::hEoverP_barrel
private

Definition at line 70 of file PFTauElecRejectionBenchmark.h.

Referenced by process().

◆ hEoverP_endcap

TH1F* PFTauElecRejectionBenchmark::hEoverP_endcap
private

Definition at line 74 of file PFTauElecRejectionBenchmark.h.

Referenced by process().

◆ hEoverP_preid0

TH1F* PFTauElecRejectionBenchmark::hEoverP_preid0
private

Definition at line 78 of file PFTauElecRejectionBenchmark.h.

Referenced by process().

◆ hEoverP_preid1

TH1F* PFTauElecRejectionBenchmark::hEoverP_preid1
private

Definition at line 82 of file PFTauElecRejectionBenchmark.h.

Referenced by process().

◆ hHoPvsEoP

TH2F* PFTauElecRejectionBenchmark::hHoPvsEoP
private

Definition at line 90 of file PFTauElecRejectionBenchmark.h.

Referenced by process().

◆ hHoPvsEoP_preid0

TH2F* PFTauElecRejectionBenchmark::hHoPvsEoP_preid0
private

Definition at line 91 of file PFTauElecRejectionBenchmark.h.

Referenced by process().

◆ hHoPvsEoP_preid1

TH2F* PFTauElecRejectionBenchmark::hHoPvsEoP_preid1
private

Definition at line 92 of file PFTauElecRejectionBenchmark.h.

Referenced by process().

◆ hHoverP

TH1F* PFTauElecRejectionBenchmark::hHoverP
private

Definition at line 67 of file PFTauElecRejectionBenchmark.h.

Referenced by process().

◆ hHoverP_barrel

TH1F* PFTauElecRejectionBenchmark::hHoverP_barrel
private

Definition at line 71 of file PFTauElecRejectionBenchmark.h.

Referenced by process().

◆ hHoverP_endcap

TH1F* PFTauElecRejectionBenchmark::hHoverP_endcap
private

Definition at line 75 of file PFTauElecRejectionBenchmark.h.

Referenced by process().

◆ hHoverP_preid0

TH1F* PFTauElecRejectionBenchmark::hHoverP_preid0
private

Definition at line 79 of file PFTauElecRejectionBenchmark.h.

Referenced by process().

◆ hHoverP_preid1

TH1F* PFTauElecRejectionBenchmark::hHoverP_preid1
private

Definition at line 83 of file PFTauElecRejectionBenchmark.h.

Referenced by process().

◆ hleadGsfTk_eta

TH1F* PFTauElecRejectionBenchmark::hleadGsfTk_eta
private

Definition at line 109 of file PFTauElecRejectionBenchmark.h.

◆ hleadGsfTk_phi

TH1F* PFTauElecRejectionBenchmark::hleadGsfTk_phi
private

Definition at line 110 of file PFTauElecRejectionBenchmark.h.

◆ hleadGsfTk_pt

TH1F* PFTauElecRejectionBenchmark::hleadGsfTk_pt
private

Definition at line 108 of file PFTauElecRejectionBenchmark.h.

◆ hleadTk_eta

TH1F* PFTauElecRejectionBenchmark::hleadTk_eta
private

Definition at line 104 of file PFTauElecRejectionBenchmark.h.

Referenced by process().

◆ hleadTk_phi

TH1F* PFTauElecRejectionBenchmark::hleadTk_phi
private

Definition at line 105 of file PFTauElecRejectionBenchmark.h.

Referenced by process().

◆ hleadTk_pt

TH1F* PFTauElecRejectionBenchmark::hleadTk_pt
private

Definition at line 103 of file PFTauElecRejectionBenchmark.h.

Referenced by process().

◆ hpfcand_deltaEta

TH1F* PFTauElecRejectionBenchmark::hpfcand_deltaEta
private

Definition at line 98 of file PFTauElecRejectionBenchmark.h.

Referenced by process().

◆ hpfcand_deltaEta_weightE

TH1F* PFTauElecRejectionBenchmark::hpfcand_deltaEta_weightE
private

Definition at line 99 of file PFTauElecRejectionBenchmark.h.

Referenced by process().

◆ hpfcand_deltaPhiOverQ

TH1F* PFTauElecRejectionBenchmark::hpfcand_deltaPhiOverQ
private

Definition at line 100 of file PFTauElecRejectionBenchmark.h.

Referenced by process().

◆ hpfcand_deltaPhiOverQ_weightE

TH1F* PFTauElecRejectionBenchmark::hpfcand_deltaPhiOverQ_weightE
private

Definition at line 101 of file PFTauElecRejectionBenchmark.h.

Referenced by process().

◆ hTauElecDiscriminant

TH1F* PFTauElecRejectionBenchmark::hTauElecDiscriminant
private

Definition at line 88 of file PFTauElecRejectionBenchmark.h.

Referenced by process().

◆ maxDeltaR_

double PFTauElecRejectionBenchmark::maxDeltaR_
private

Definition at line 57 of file PFTauElecRejectionBenchmark.h.

Referenced by process(), and setup().

◆ maxMCAbsEta_

double PFTauElecRejectionBenchmark::maxMCAbsEta_
private

Definition at line 59 of file PFTauElecRejectionBenchmark.h.

Referenced by process(), and setup().

◆ maxRecoAbsEta_

double PFTauElecRejectionBenchmark::maxRecoAbsEta_
private

Definition at line 61 of file PFTauElecRejectionBenchmark.h.

Referenced by process(), and setup().

◆ minMCPt_

double PFTauElecRejectionBenchmark::minMCPt_
private

Definition at line 58 of file PFTauElecRejectionBenchmark.h.

Referenced by process(), and setup().

◆ minRecoPt_

double PFTauElecRejectionBenchmark::minRecoPt_
private

Definition at line 60 of file PFTauElecRejectionBenchmark.h.

Referenced by process(), and setup().

◆ outputFile_

std::string PFTauElecRejectionBenchmark::outputFile_
private

Definition at line 55 of file PFTauElecRejectionBenchmark.h.

Referenced by setup(), and write().

◆ sGenMatchObjectLabel_

std::string PFTauElecRejectionBenchmark::sGenMatchObjectLabel_
private

Definition at line 62 of file PFTauElecRejectionBenchmark.h.

Referenced by process(), and setup().