◆ analyze()
void analyze |
( |
const Event & |
event | ) |
|
|
inline |
Get FastJet final states genJets and recoJets, apply selections, fill ntuples with jet observables and weights.
127 const auto&
weights =
event.weights();
129 for (
size_t i=0; i <
weights.size() ; ++i) {
135 const FastJets& fj = apply<FastJets>(event,
"Jets");
137 const Jets& RivetJets = fj.jets(Cuts::abseta <
AbsEtaMax_V);
139 for (
const Jet& j : RivetJets) {
141 genJet.
p4.SetPt(j.pT());
142 genJet.
p4.SetEta(j.eta());
143 genJet.
p4.SetPhi(j.phi());
144 genJet.
p4.SetM(j.mass());
153 const SmearedJets& ApplySmearedJets = apply<SmearedJets>(event,
"RecoJetDeclaration");
155 const auto& SmearedJetsPostCuts = ApplySmearedJets.jets(Cuts::pT >
pTJetMin_V*GeV && Cuts::abseta <
AbsEtaMax_V);
157 for (
const auto& j : SmearedJetsPostCuts) {
159 recJet.
p4.SetPt(j.pT());
160 recJet.
p4.SetEta(j.eta());
161 recJet.
p4.SetPhi(j.phi());
162 recJet.
p4.SetM(j.mass());
◆ finalize()
◆ init()
Read .json configuration values, set up ttree and branches, declare fastjet finalstates.
Get key-value pairs
50 const char*
fname = getenv(
"DAS_RIVET_OUTPUT");
51 assert(
fname !=
nullptr);
52 cout <<
"output filename: " <<
fname << endl;
54 tree =
new TTree(
"events",
"events");
56 const char* cfgname = getenv(
"DAS_RIVET_CONFIG");
57 assert(cfgname !=
nullptr);
59 fs::path p_cfg = cfgname;
61 pt::read_json(p_cfg.string(),
config);
67 cout <<
"\nradius: " <<
radius << endl;
74 auto &AbsEtaMin_K =
selection.get_child(
"AbsEtaMin");
77 auto &AbsEtaMax_K =
selection.get_child(
"AbsEtaMax");
80 auto &pTJetMin_K =
selection.get_child(
"pTJetMin");
83 auto &pTJetMax_K =
selection.get_child(
"pTJetMax");
89 const FinalState finalstate;
94 genJets =
new vector<DAS::GenJet>;
111 declare(FastJets(finalstate, FastJets::ANTIKT,
radius),
"Jets");
113 declare(SmearedJets(FastJets(finalstate, FastJets::ANTIKT,
radius), JET_SMEAR_CMS_RUN2),
"RecoJetDeclaration");
◆ RIVET_DEFAULT_ANALYSIS_CTOR()
◆ AbsEtaMax_V
◆ AbsEtaMin_V
◆ config
◆ detector_bool
◆ event_
◆ file
output file, tree, json config, and parameters
output file for ntuple
◆ genJets
◆ pTJetMax_V
◆ pTJetMin_V
◆ recJets_vec
◆ tree
The documentation for this class was generated from the following file:
- /builds/cms-analysis/general/DasAnalysisSystem/Core/Installer/Core/Ntupliser/src/RivetNtupliser.cc