DESY Hbb Analysis Framework
|
#include <Analysis.h>
Public Member Functions | |
void | addBtagEfficiencies (const std::string &) |
template<class Object > | |
std::shared_ptr< Collection< Object > > | addCollection (const std::string &unique_name) |
template<class Object > | |
std::shared_ptr< Collection< Object > > | addCollection (const Collection< Object > &collection) |
template<class Object > | |
std::shared_ptr< Collection< Object > > | addCollection (const std::vector< Object > &objects, const std::string &unique_name) |
template<class Object > | |
std::shared_ptr< PhysicsObjectTree< Object > > | addTree (const std::string &unique_name, const std::string &path) |
Analysis (const std::string &inputFilelist, const std::string &evtinfo="MssmHbb/Events/EventInfo") | |
std::shared_ptr< BTagCalibrationReader > | btagCalibration (const std::string &tagger, const std::string &filename, const std::string &wp, const std::string &sysType="central", const std::vector< std::string > &otherSysTypes={"up","down"}) |
std::shared_ptr< BTagCalibrationReader > | btagCalibration () |
void | btagEfficienciesAlgo (const std::string &) |
void | btagEfficienciesFlavour (const std::string &) |
float | btagEfficiency (const analysis::tools::Jet &, const int &rank=0) |
template<class Object > | |
std::shared_ptr< Collection< Object > > | collection (const std::string &unique_name) |
double | crossSection () |
double | crossSection (const std::string &title) |
int | crossSections (const std::string &path) |
template<class Object > | |
void | defaultCollection (const std::string &unique_name) |
template<class Object > | |
std::string | defaultCollection () |
void | event (const int &event, const bool &addCollections=true) |
int | event () |
FilterResults | eventFilter (const std::string &path) |
std::string | fileFullName () |
std::string | fileName () |
FilterResults | generatorFilter (const std::string &path) |
double | genScale () |
double | genWeight () |
float | instantLumi () |
bool | isMC () |
std::shared_ptr< JetResolutionInfo > | jetResolutionInfo (const std::string &, const std::string &) |
void | listCrossSections () |
void | listGeneratorFilter () |
double | luminosity () |
double | luminosity (const std::string &title) |
float | lumiPileup () |
int | lumiSection () |
template<class Object1 , class Object2 > | |
void | match (const std::string &collection, const std::string &match_collection, const float &deltaR=0.5) |
template<class Object1 , class Object2 > | |
void | match (const std::string &collection, const std::vector< std::string > &match_collections, const float &deltaR=0.5) |
std::shared_ptr< MuonIdWeight > | muonIDWeights (const std::string &) |
int | nPileup () |
float | nTruePileup () |
int | numberEvents () |
pdf () | |
std::shared_ptr< PileupWeight > | pileupWeights (const std::string &) |
int | processJsonFile (const std::string &fileName="goodJson.txt") |
double | rho () |
fixedGridRhoAll More... | |
int | run () |
float | scaleLuminosity (const float &lumi) |
int | seed (const std::string &) |
seed for random number generator read from a txt file given as a parameter More... | |
bool | selectJson () |
int | size () |
void | tag (const std::string &) |
std::string | tag () |
template<class Object > | |
std::shared_ptr< PhysicsObjectTree< Object > > | tree (const std::string &unique_name) |
int | triggerPrescale (const std::string &trig) |
std::map< std::string, int > | triggerPrescale (const std::vector< std::string > &trigs) |
bool | triggerResult (const std::string &trig) |
bool | triggerResults (const std::string &path) |
~Analysis () | |
Protected Member Functions | |
void | treeInit_ (const std::string &unique_name, const std::string &path) |
Protected Attributes | |
std::shared_ptr< BTagCalibration > | btagcalib_ |
std::shared_ptr< BTagCalibrationReader > | btagcalibread_ |
std::string | btageff_algo_ |
std::string | btageff_flavour_ |
std::map< std::string, std::any > | c_any_ |
std::string | defaultGenParticle_ |
int | event_ |
FilterResults | evtfilter_ |
TFile * | fileBtagEff_ |
TFileCollection * | fileCollection_ |
TCollection * | fileList_ |
FilterResults | genfilter_ |
double | genScale_ |
double | genWeight_ |
std::map< int, std::vector< std::string > > | goodLumi_ |
std::map< std::string, TH2F * > | h2_btageff_ |
std::string | inputFilelist_ |
float | inst_lumi_ |
bool | is_mc_ |
std::shared_ptr< JetResolutionInfo > | jerinfo_ |
std::map< int, std::vector< int > > | json_ |
int | lumi_ |
float | lumi_pu_ |
std::shared_ptr< MuonIdWeight > | muonIDweights_ |
float | mylumi_ |
int | n_pu_ |
float | n_true_pu_ |
int | nevents_ |
pdf_ | |
std::shared_ptr< PileupWeight > | puweights_ |
double | rho_ |
int | run_ |
std::map< std::string, std::any > | t_any_ |
TChain * | t_event_ |
TChain * | t_evtfilter_ |
TChain * | t_genfilter_ |
TChain * | t_triggerResults_ |
std::map< std::string, std::string > | t_type_ |
TChain * | t_xsection_ |
std::string | tag_ |
std::map< std::string, TChain * > | tree_ |
std::map< std::string, bool > | triggerResults_ |
std::map< std::string, int > | triggerResultsPS_ |
std::map< std::string, double > | xsections_ |
Definition at line 60 of file Analysis.h.
Analysis::Analysis | ( | const std::string & | inputFilelist, |
const std::string & | evtinfo = "MssmHbb/Events/EventInfo" |
||
) |
Definition at line 25 of file Analysis.cc.
References btageff_algo_, btageff_flavour_, event_, fileCollection_, fileList_, genScale_, genWeight_, analysis::tools::PDF::id, inputFilelist_, inst_lumi_, is_mc_, lumi_, lumi_pu_, mylumi_, n_pu_, n_true_pu_, nevents_, pdf_, rho_, run_, t_event_, and analysis::tools::PDF::x.
Analysis::~Analysis | ( | ) |
Definition at line 83 of file Analysis.cc.
void Analysis::addBtagEfficiencies | ( | const std::string & | filename | ) |
Definition at line 416 of file Analysis.cc.
References btageff_algo_, btageff_flavour_, fileBtagEff_, and h2_btageff_.
Referenced by main().
std::shared_ptr< Collection< Object > > Analysis::addCollection | ( | const std::string & | unique_name | ) |
Definition at line 297 of file Analysis.h.
std::shared_ptr< Collection< Object > > Analysis::addCollection | ( | const Collection< Object > & | collection | ) |
Definition at line 315 of file Analysis.h.
References analysis::tools::Collection< Object >::name().
std::shared_ptr< Collection< Object > > Analysis::addCollection | ( | const std::vector< Object > & | objects, |
const std::string & | unique_name | ||
) |
Definition at line 326 of file Analysis.h.
std::shared_ptr< PhysicsObjectTree< Object > > Analysis::addTree | ( | const std::string & | unique_name, |
const std::string & | path | ||
) |
Definition at line 273 of file Analysis.h.
References nano_94X_2017_rereco31Mar18-v1::name, and naf_mult_submit::type.
Referenced by main().
std::shared_ptr< BTagCalibrationReader > Analysis::btagCalibration | ( | const std::string & | tagger, |
const std::string & | filename, | ||
const std::string & | wp, | ||
const std::string & | sysType = "central" , |
||
const std::vector< std::string > & | otherSysTypes = {"up", "down"} |
||
) |
Definition at line 511 of file Analysis.cc.
References btagcalib_, btagcalibread_, BTagEntry::FLAV_B, BTagEntry::FLAV_C, BTagEntry::FLAV_UDSG, BTagEntry::OP_LOOSE, BTagEntry::OP_MEDIUM, BTagEntry::OP_RESHAPING, and BTagEntry::OP_TIGHT.
Referenced by main().
std::shared_ptr< BTagCalibrationReader > Analysis::btagCalibration | ( | ) |
Definition at line 548 of file Analysis.cc.
References btagcalibread_.
|
inline |
|
inline |
float Analysis::btagEfficiency | ( | const analysis::tools::Jet & | jet, |
const int & | rank = 0 |
||
) |
Definition at line 441 of file Analysis.cc.
References btageff_flavour_, analysis::tools::Candidate::eta(), analysis::tools::Jet::extendedFlavour(), analysis::tools::Jet::flavour(), h2_btageff_, and analysis::tools::Candidate::pt().
Referenced by main().
std::shared_ptr< Collection< Object > > Analysis::collection | ( | const std::string & | unique_name | ) |
Definition at line 336 of file Analysis.h.
Referenced by main().
double Analysis::crossSection | ( | ) |
double Analysis::crossSection | ( | const std::string & | title | ) |
Definition at line 245 of file Analysis.cc.
References t_xsection_, and xsections_.
int Analysis::crossSections | ( | const std::string & | path | ) |
Definition at line 219 of file Analysis.cc.
References fileList_, t_xsection_, and xsections_.
void Analysis::defaultCollection | ( | const std::string & | unique_name | ) |
Definition at line 358 of file Analysis.h.
std::string Analysis::defaultCollection | ( | ) |
Definition at line 363 of file Analysis.h.
void Analysis::event | ( | const int & | event, |
const bool & | addCollections = true |
||
) |
Definition at line 94 of file Analysis.cc.
References genScale_, genWeight_, analysis::tools::PDF::id, n_pu_, n_true_pu_, nano_94X_2017_rereco31Mar18-v1::name, pdf_, t_any_, t_event_, t_type_, tree(), naf_mult_submit::type, and analysis::tools::PDF::x.
Referenced by main().
|
inline |
FilterResults Analysis::eventFilter | ( | const std::string & | path | ) |
Definition at line 348 of file Analysis.cc.
References analysis::tools::FilterResults::efficiency, evtfilter_, fileList_, analysis::tools::FilterResults::filtered, t_evtfilter_, and analysis::tools::FilterResults::total.
Referenced by main().
|
inline |
std::string Analysis::fileName | ( | ) |
Definition at line 553 of file Analysis.cc.
References fileFullName().
Referenced by main().
FilterResults Analysis::generatorFilter | ( | const std::string & | path | ) |
Definition at line 296 of file Analysis.cc.
References analysis::tools::FilterResults::efficiency, fileList_, analysis::tools::FilterResults::filtered, genfilter_, t_genfilter_, and analysis::tools::FilterResults::total.
|
inline |
Definition at line 390 of file Analysis.h.
|
inline |
Definition at line 389 of file Analysis.h.
|
inline |
Definition at line 387 of file Analysis.h.
|
inline |
Definition at line 381 of file Analysis.h.
std::shared_ptr< JetResolutionInfo > Analysis::jetResolutionInfo | ( | const std::string & | f_jer, |
const std::string & | f_jersf | ||
) |
Definition at line 489 of file Analysis.cc.
References jerinfo_.
Referenced by main().
void Analysis::listCrossSections | ( | ) |
Definition at line 273 of file Analysis.cc.
References t_xsection_, and xsections_.
void Analysis::listGeneratorFilter | ( | ) |
Definition at line 324 of file Analysis.cc.
References analysis::tools::FilterResults::efficiency, analysis::tools::FilterResults::filtered, genfilter_, t_genfilter_, and analysis::tools::FilterResults::total.
double Analysis::luminosity | ( | ) |
Definition at line 251 of file Analysis.cc.
References crossSection(), and nevents_.
Referenced by scaleLuminosity().
double Analysis::luminosity | ( | const std::string & | title | ) |
|
inline |
Definition at line 386 of file Analysis.h.
|
inline |
void Analysis::match | ( | const std::string & | collection, |
const std::string & | match_collection, | ||
const float & | deltaR = 0.5 |
||
) |
Definition at line 343 of file Analysis.h.
Referenced by main().
void Analysis::match | ( | const std::string & | collection, |
const std::vector< std::string > & | match_collections, | ||
const float & | deltaR = 0.5 |
||
) |
Definition at line 352 of file Analysis.h.
std::shared_ptr< MuonIdWeight > Analysis::muonIDWeights | ( | const std::string & | f_muID | ) |
Definition at line 504 of file Analysis.cc.
References muonIDweights_.
|
inline |
|
inline |
Definition at line 384 of file Analysis.h.
|
inline |
Definition at line 376 of file Analysis.h.
|
inline |
Definition at line 391 of file Analysis.h.
std::shared_ptr< PileupWeight > Analysis::pileupWeights | ( | const std::string & | f_pu | ) |
Definition at line 497 of file Analysis.cc.
References puweights_.
int Analysis::processJsonFile | ( | const std::string & | fileName = "goodJson.txt" | ) |
|
inline |
|
inline |
Definition at line 379 of file Analysis.h.
References run_.
Referenced by main(), and processJsonFile().
float Analysis::scaleLuminosity | ( | const float & | lumi | ) |
int Analysis::seed | ( | const std::string & | name | ) |
seed for random number generator read from a txt file given as a parameter
Definition at line 561 of file Analysis.cc.
References f.
bool Analysis::selectJson | ( | ) |
|
inline |
|
inline |
Definition at line 371 of file Analysis.h.
|
inline |
Definition at line 373 of file Analysis.h.
std::shared_ptr< PhysicsObjectTree< Object > > Analysis::tree | ( | const std::string & | unique_name | ) |
|
protected |
int Analysis::triggerPrescale | ( | const std::string & | trig | ) |
Definition at line 197 of file Analysis.cc.
References triggerResultsPS_.
Referenced by main(), and triggerPrescale().
std::map< std::string, int > Analysis::triggerPrescale | ( | const std::vector< std::string > & | trigs | ) |
Definition at line 203 of file Analysis.cc.
References triggerPrescale().
bool Analysis::triggerResult | ( | const std::string & | trig | ) |
Definition at line 190 of file Analysis.cc.
References t_triggerResults_, and triggerResults_.
Referenced by main().
bool Analysis::triggerResults | ( | const std::string & | path | ) |
Definition at line 162 of file Analysis.cc.
References fileList_, t_event_, t_triggerResults_, triggerResults_, and triggerResultsPS_.
Referenced by main().
|
protected |
Definition at line 191 of file Analysis.h.
Referenced by btagCalibration().
|
protected |
Definition at line 192 of file Analysis.h.
Referenced by btagCalibration().
|
protected |
Definition at line 189 of file Analysis.h.
Referenced by addBtagEfficiencies(), and Analysis().
|
protected |
Definition at line 188 of file Analysis.h.
Referenced by addBtagEfficiencies(), Analysis(), and btagEfficiency().
|
protected |
Definition at line 249 of file Analysis.h.
|
protected |
Definition at line 211 of file Analysis.h.
|
protected |
Definition at line 213 of file Analysis.h.
Referenced by Analysis().
|
protected |
Definition at line 208 of file Analysis.h.
Referenced by eventFilter().
|
protected |
Definition at line 186 of file Analysis.h.
Referenced by addBtagEfficiencies().
|
protected |
Definition at line 178 of file Analysis.h.
Referenced by Analysis().
|
protected |
Definition at line 179 of file Analysis.h.
Referenced by Analysis(), crossSections(), eventFilter(), generatorFilter(), treeInit_(), and triggerResults().
|
protected |
Definition at line 207 of file Analysis.h.
Referenced by generatorFilter(), and listGeneratorFilter().
|
protected |
Definition at line 225 of file Analysis.h.
Referenced by Analysis(), and event().
|
protected |
Definition at line 224 of file Analysis.h.
Referenced by Analysis(), and event().
|
protected |
Definition at line 206 of file Analysis.h.
|
protected |
Definition at line 187 of file Analysis.h.
Referenced by addBtagEfficiencies(), and btagEfficiency().
|
protected |
Definition at line 180 of file Analysis.h.
Referenced by Analysis().
|
protected |
Definition at line 222 of file Analysis.h.
Referenced by Analysis().
|
protected |
Definition at line 216 of file Analysis.h.
Referenced by Analysis().
|
protected |
Definition at line 194 of file Analysis.h.
Referenced by jetResolutionInfo().
|
protected |
Definition at line 255 of file Analysis.h.
Referenced by processJsonFile(), and selectJson().
|
protected |
Definition at line 215 of file Analysis.h.
Referenced by Analysis(), and selectJson().
|
protected |
Definition at line 221 of file Analysis.h.
Referenced by Analysis().
|
protected |
Definition at line 200 of file Analysis.h.
Referenced by muonIDWeights().
|
protected |
Definition at line 252 of file Analysis.h.
Referenced by Analysis(), and scaleLuminosity().
|
protected |
Definition at line 218 of file Analysis.h.
Referenced by Analysis(), and event().
|
protected |
Definition at line 219 of file Analysis.h.
Referenced by Analysis(), and event().
|
protected |
Definition at line 230 of file Analysis.h.
Referenced by Analysis(), and luminosity().
|
protected |
Definition at line 226 of file Analysis.h.
Referenced by Analysis(), and event().
|
protected |
Definition at line 197 of file Analysis.h.
Referenced by pileupWeights().
|
protected |
Definition at line 228 of file Analysis.h.
Referenced by Analysis().
|
protected |
Definition at line 214 of file Analysis.h.
Referenced by Analysis(), and selectJson().
|
protected |
Definition at line 245 of file Analysis.h.
Referenced by event().
|
protected |
Definition at line 237 of file Analysis.h.
Referenced by Analysis(), event(), treeInit_(), and triggerResults().
|
protected |
Definition at line 236 of file Analysis.h.
Referenced by eventFilter().
|
protected |
Definition at line 235 of file Analysis.h.
Referenced by generatorFilter(), and listGeneratorFilter().
|
protected |
Definition at line 238 of file Analysis.h.
Referenced by triggerResult(), and triggerResults().
|
protected |
Definition at line 246 of file Analysis.h.
Referenced by event().
|
protected |
Definition at line 234 of file Analysis.h.
Referenced by crossSection(), crossSections(), listCrossSections(), and luminosity().
|
protected |
Definition at line 183 of file Analysis.h.
|
protected |
Definition at line 242 of file Analysis.h.
Referenced by treeInit_().
|
protected |
Definition at line 204 of file Analysis.h.
Referenced by triggerResult(), and triggerResults().
|
protected |
Definition at line 205 of file Analysis.h.
Referenced by triggerPrescale(), and triggerResults().
|
protected |
Definition at line 203 of file Analysis.h.
Referenced by crossSection(), crossSections(), and listCrossSections().