DAS  3.0
Das Analysis System
Parameters.h
Go to the documentation of this file.
1 #ifndef parameters_h
2 #define parameters_h
3 
4 // std
5 #include <vector>
6 #include <string>
7 #include <set>
8 #include <filesystem>
9 
10 // CMSSW framework
11 #include "FWCore/ParameterSet/interface/ParameterSet.h"
12 #include "FWCore/Framework/interface/ConsumesCollector.h"
13 
14 // particles
15 #include "DataFormats/HepMCCandidate/interface/GenParticle.h"
16 
17 // reco
18 #include "DataFormats/JetReco/interface/GenJetCollection.h"
19 #include "DataFormats/JetReco/interface/JetCollection.h"
20 #include "DataFormats/MuonReco/interface/Muon.h"
21 #include "DataFormats/VertexReco/interface/Vertex.h"
22 
23 // PAT
24 #include "DataFormats/PatCandidates/interface/Jet.h"
25 #include "DataFormats/PatCandidates/interface/Muon.h"
26 #include "DataFormats/PatCandidates/interface/Photon.h"
27 #include "DataFormats/PatCandidates/interface/MET.h"
28 
29 // trigger
30 #include "DataFormats/PatCandidates/interface/PackedTriggerPrescales.h"
31 #include "DataFormats/PatCandidates/interface/TriggerObjectStandAlone.h"
32 #include "HLTrigger/HLTcore/interface/HLTConfigProvider.h"
33 
34 // flavour
35 #include "SimDataFormats/GeneratorProducts/interface/GenEventInfoProduct.h"
36 #include "DataFormats/JetMatching/interface/JetFlavourInfo.h"
37 #include "DataFormats/JetMatching/interface/JetFlavourInfoMatching.h"
38 #include "DataFormats/Candidate/interface/VertexCompositePtrCandidateFwd.h"
39 
40 // pile up
41 #include "SimDataFormats/PileupSummaryInfo/interface/PileupSummaryInfo.h"
42 
43 // model
44 #include "SimDataFormats/GeneratorProducts/interface/LHEEventProduct.h"
45 #include "SimDataFormats/GeneratorProducts/interface/LHERunInfoProduct.h"
46 
47 // boost
48 #include <boost/property_tree/ptree.hpp>
49 #include <boost/optional.hpp>
50 
51 namespace DAS {
52 
53 struct Parameters {
54 
55  // event information
56  const bool isMC;
57  const int year;
58  const bool sandbox;
59  static boost::property_tree::ptree ReadJSON (std::filesystem::path, bool = false);
60  boost::property_tree::ptree config;
61  const boost::property_tree::ptree& options;
62  edm::EDGetTokenT<GenEventInfoProduct> genEvtInfoToken;
63  edm::EDGetTokenT<reco::GenParticleCollection> genParticlesToken;
64 
65  // jets
66  edm::EDGetTokenT<reco::GenJetCollection> genjetsToken;
67  edm::EDGetTokenT<pat::JetCollection> recjetsToken;
68  const bool jets, PUjetID, flavour;
69  edm::EDGetTokenT<reco::JetFlavourInfoMatchingCollection> jetFlavourInfosToken;
70  edm::EDGetTokenT<std::vector<reco::VertexCompositePtrCandidate>> secVertexInfoToken;
71 
72  // muons
73  const bool muons;
74  edm::EDGetTokenT<edm::View<reco::Candidate>> genLeptonsToken;
75  edm::EDGetTokenT<pat::MuonCollection> recmuonsToken;
76 
77  // photons
78  const bool photons;
79  edm::EDGetTokenT<pat::PhotonCollection> recphotonsToken;
80 
81  // MET & trigger
82  const bool triggers;
83  edm::EDGetTokenT<pat::METCollection> metToken;
84  edm::EDGetTokenT<edm::TriggerResults> metResultsToken, triggerResultsToken;
85  edm::EDGetTokenT<reco::VertexCollection> recVtxsToken;
86  edm::EDGetTokenT<pat::PackedTriggerPrescales> triggerPrescalesToken, triggerPrescalesl1minToken, triggerPrescalesl1maxToken;
87  std::vector<std::string> triggerNames_, metNames_;
88  edm::EDGetTokenT<pat::TriggerObjectStandAloneCollection> triggerObjectsToken;
89  std::set<std::string> HLTjet_triggerNames;
90 
91  // pile-up
92  edm::EDGetTokenT<double> rhoToken;
93  edm::EDGetTokenT<std::vector<PileupSummaryInfo> > pileupInfoToken;
94 
95 #ifdef PS_WEIGHTS
96  // model
97  edm::EDGetTokenT<LHEEventProduct> lheToken;
98 #endif
99 
100  // constructor
101  Parameters (edm::ParameterSet const& cfg, edm::ConsumesCollector && iC);
102 
103  std::set<std::string> getHLTjet_triggerNames (const std::vector<std::string>&);
104 };
105 
106 } // end of DAS namespace
107 
108 #endif
DAS::Parameters::secVertexInfoToken
edm::EDGetTokenT< std::vector< reco::VertexCompositePtrCandidate > > secVertexInfoToken
Definition: Parameters.h:70
DAS::Parameters::pileupInfoToken
edm::EDGetTokenT< std::vector< PileupSummaryInfo > > pileupInfoToken
Definition: Parameters.h:93
DAS::Parameters::recjetsToken
edm::EDGetTokenT< pat::JetCollection > recjetsToken
Definition: Parameters.h:67
DAS
Definition: applyBTagSF.cc:31
DAS::Parameters::triggerPrescalesl1maxToken
edm::EDGetTokenT< pat::PackedTriggerPrescales > triggerPrescalesl1maxToken
Definition: Parameters.h:86
DAS::Parameters::metToken
edm::EDGetTokenT< pat::METCollection > metToken
Definition: Parameters.h:83
DAS::Parameters::genLeptonsToken
edm::EDGetTokenT< edm::View< reco::Candidate > > genLeptonsToken
Definition: Parameters.h:74
DAS::Parameters::triggerPrescalesToken
edm::EDGetTokenT< pat::PackedTriggerPrescales > triggerPrescalesToken
Definition: Parameters.h:86
DAS::Parameters::metNames_
std::vector< std::string > metNames_
Definition: Parameters.h:87
DAS::Parameters::sandbox
const bool sandbox
flag for CRAB sandbox
Definition: Parameters.h:58
DAS::Parameters::genjetsToken
edm::EDGetTokenT< reco::GenJetCollection > genjetsToken
Definition: Parameters.h:66
DAS::Parameters::recphotonsToken
edm::EDGetTokenT< pat::PhotonCollection > recphotonsToken
Definition: Parameters.h:79
DAS::Parameters::ReadJSON
static boost::property_tree::ptree ReadJSON(std::filesystem::path, bool=false)
Definition: Parameters.cc:28
DAS::Parameters::options
const boost::property_tree::ptree & options
booleans to steer branch filling
Definition: Parameters.h:61
DAS::Parameters::genParticlesToken
edm::EDGetTokenT< reco::GenParticleCollection > genParticlesToken
Definition: Parameters.h:63
DAS::Parameters::Parameters
Parameters(edm::ParameterSet const &cfg, edm::ConsumesCollector &&iC)
DAS::Parameters::year
const int year
20xx
Definition: Parameters.h:57
DAS::Parameters::muons
const bool muons
Definition: Parameters.h:73
DAS::Parameters::recmuonsToken
edm::EDGetTokenT< pat::MuonCollection > recmuonsToken
Definition: Parameters.h:75
DAS::Parameters::rhoToken
edm::EDGetTokenT< double > rhoToken
Definition: Parameters.h:92
DAS::Parameters::config
boost::property_tree::ptree config
input JSON config
Definition: Parameters.h:60
DAS::Parameters
Definition: Parameters.h:53
DAS::Parameters::triggerPrescalesl1minToken
edm::EDGetTokenT< pat::PackedTriggerPrescales > triggerPrescalesl1minToken
Definition: Parameters.h:86
DAS::Parameters::triggerResultsToken
edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken
Definition: Parameters.h:84
DAS::Parameters::triggers
const bool triggers
Definition: Parameters.h:82
DAS::Parameters::triggerNames_
std::vector< std::string > triggerNames_
Definition: Parameters.h:87
DAS::Parameters::HLTjet_triggerNames
std::set< std::string > HLTjet_triggerNames
Definition: Parameters.h:89
DAS::Parameters::recVtxsToken
edm::EDGetTokenT< reco::VertexCollection > recVtxsToken
Definition: Parameters.h:85
DAS::Parameters::flavour
const bool flavour
Definition: Parameters.h:68
DAS::Parameters::metResultsToken
edm::EDGetTokenT< edm::TriggerResults > metResultsToken
Definition: Parameters.h:84
DAS::Parameters::PUjetID
const bool PUjetID
Definition: Parameters.h:68
DAS::Parameters::photons
const bool photons
Definition: Parameters.h:78
DAS::Parameters::genEvtInfoToken
edm::EDGetTokenT< GenEventInfoProduct > genEvtInfoToken
Definition: Parameters.h:62
DAS::Parameters::jetFlavourInfosToken
edm::EDGetTokenT< reco::JetFlavourInfoMatchingCollection > jetFlavourInfosToken
Definition: Parameters.h:69
DAS::Parameters::triggerObjectsToken
edm::EDGetTokenT< pat::TriggerObjectStandAloneCollection > triggerObjectsToken
Definition: Parameters.h:88
DAS::Parameters::isMC
const bool isMC
flag
Definition: Parameters.h:56
DAS::Parameters::jets
const bool jets
Definition: Parameters.h:68
DAS::Parameters::getHLTjet_triggerNames
std::set< std::string > getHLTjet_triggerNames(const std::vector< std::string > &)
Definition: Parameters.cc:19