DAS  3.0
Das Analysis System
helper.h
Go to the documentation of this file.
1 #ifndef __HELPER__
2 #define __HELPER__
3 
8 
9 // rec jet
10 #include "DataFormats/PatCandidates/interface/Jet.h"
11 
12 // gen jet
13 #include "DataFormats/JetMatching/interface/JetFlavourInfo.h"
14 #include "DataFormats/JetMatching/interface/JetFlavourInfoMatching.h"
15 
16 // muons
17 #include "DataFormats/PatCandidates/interface/Muon.h"
18 
19 // photons
20 #include "DataFormats/PatCandidates/interface/Photon.h"
21 
22 #include "SimDataFormats/GeneratorProducts/interface/LHERunInfoProduct.h"
23 
24 #include "Parameters.h"
25 
26 #include "tinyxml2.h"
27 #include <regex>
28 
29 namespace DAS {
30 
31 struct Helper {
32 
34 
35  Helper (DAS::Parameters& parameters);
36 
37  DAS::GenJet GetGenJet (const reco::JetFlavourInfoMatching &ijet);
38  DAS::GenJet GetGenJet (const reco::Jet &ijet);
39  DAS::RecJet GetRecJet (const pat::Jet &ijet);
40 
41  bool JetID (const pat::Jet &jet);
42 
43  DAS::GenMuon GetGenMu (const reco::Candidate &mu);
44  DAS::RecMuon GetRecMu (const pat::Muon &mu);
45 
46  DAS::GenPhoton GetGenPhoton(const reco::GenParticle &photon, bool zAncestor);
47  DAS::RecPhoton GetRecPhoton(const pat::Photon &photon);
48 
49  std::vector<std::string> CollectWeightIds(const tinyxml2::XMLDocument& doc,
50  const std::string& scaleChoice,
51  const std::string& pdfGroupName) const;
52  std::string BufferWeightGroupXML(const LHERunInfoProduct &runInfo) const;
53  std::vector<std::string> GetScaleVariations(const tinyxml2::XMLDocument& doc,
54  const std::string& scaleChoice) const;
55  int CountPDFWeights(const tinyxml2::XMLDocument& doc,
56  const std::string& pdfGroupName) const;
57 };
58 
59 } // end of DAS namespace
60 
61 #endif
DAS
Definition: applyBTagSF.cc:31
DAS::Helper::GetGenJet
DAS::GenJet GetGenJet(const reco::JetFlavourInfoMatching &ijet)
Helper to get DAS::GenJet from MiniAOD with flavour.
Definition: helper.cc:30
DAS::Helper::GetGenMu
DAS::GenMuon GetGenMu(const reco::Candidate &mu)
Helper to get DAS::GenMuon from MiniAOD.
Definition: helper.cc:152
DAS::Helper::p
DAS::Parameters & p
Definition: helper.h:33
DAS::Helper::GetRecJet
DAS::RecJet GetRecJet(const pat::Jet &ijet)
Helper to get DAS::RecJet from MiniAOD.
Definition: helper.cc:52
DAS::Helper::Helper
Helper(DAS::Parameters &parameters)
Definition: helper.cc:14
Event.h
DAS::RecJet
Definition: Jet.h:37
DAS::Helper::GetScaleVariations
std::vector< std::string > GetScaleVariations(const tinyxml2::XMLDocument &doc, const std::string &scaleChoice) const
Extracts only the envelope scale variations (skipping nominal, off‐diagonals and placeholder scales) ...
Definition: helper.cc:381
Jet.h
DAS::RecMuon
class RecMuon
Definition: Lepton.h:25
Parameters.h
DAS::GenPhoton
class GenPhoton
Definition: Photon.h:13
DAS::Helper::GetRecPhoton
DAS::RecPhoton GetRecPhoton(const pat::Photon &photon)
Helper to get DAS::RecLep from MiniAOD.
Definition: helper.cc:201
DAS::GenMuon
class GenMuon
Definition: Lepton.h:9
DAS::GenJet
class GenJet
Definition: Jet.h:9
DAS::Parameters
Definition: Parameters.h:53
DAS::Helper::GetGenPhoton
DAS::GenPhoton GetGenPhoton(const reco::GenParticle &photon, bool zAncestor)
Helper to get DAS::GenPhoton from MiniAOD.
Definition: helper.cc:187
DAS::Helper::GetRecMu
DAS::RecMuon GetRecMu(const pat::Muon &mu)
Helper to get DAS::RecMuon from MiniAOD.
Definition: helper.cc:166
DAS::Helper::BufferWeightGroupXML
std::string BufferWeightGroupXML(const LHERunInfoProduct &runInfo) const
Extracts the XML fragment starting at <weightgroup> from LHE headers.
Definition: helper.cc:339
DAS::Helper::CountPDFWeights
int CountPDFWeights(const tinyxml2::XMLDocument &doc, const std::string &pdfGroupName) const
Counts the number of weights in the specified PDF group.
Definition: helper.cc:465
Photon.h
DAS::Helper::CollectWeightIds
std::vector< std::string > CollectWeightIds(const tinyxml2::XMLDocument &doc, const std::string &scaleChoice, const std::string &pdfGroupName) const
Extracts HT/2 variation and PDF variation IDs from an XML document, skipping any off‐diagonal static ...
Definition: helper.cc:269
DAS::Helper
Definition: helper.h:31
Lepton.h
DAS::RecPhoton
class RecPhoton
Definition: Photon.h:27
DAS::Helper::JetID
bool JetID(const pat::Jet &jet)
Testing tight ID lepton veto definition for jets (official from JetMET)
Definition: helper.cc:99