#include <anautil.h>
Public Member Functions | |
void | addCut (TString n, std::function< bool()> pass, std::function< float()> weight) |
void | addCutSyst (TString syst, std::vector< TString > pattern, std::vector< TString > vetopattern=std::vector< TString >()) |
void | addCutToLastActiveCut (TString n, std::function< bool()> pass, std::function< float()> weight) |
void | addCutToSkipCutflowList (TString n) |
void | addToCutTreeMap (TString n) |
void | addWgtSyst (TString syst, std::function< float()>) |
void | book2DHistogram (TString, std::pair< std::pair< TString, TString >, std::tuple< unsigned, float, float, unsigned, float, float, std::function< float()>, std::function< float()>>>, TString="") |
void | book2DVecHistogram (TString, std::pair< std::pair< TString, TString >, std::tuple< unsigned, float, float, unsigned, float, float, std::function< std::vector< float >()>, std::function< std::vector< float >()>, std::function< std::vector< float >()>>>, TString="") |
void | book2DVecHistogram (TString, std::pair< std::pair< TString, TString >, std::tuple< std::vector< float >, unsigned, float, float, std::function< std::vector< float >()>, std::function< std::vector< float >()>, std::function< std::vector< float >()>>>, TString="") |
void | bookCutflowHistograms () |
void | bookCutflowHistograms_v1 () |
void | bookCutflowHistograms_v2 () |
void | bookCutflows () |
void | bookCutflowsForRegions (std::vector< TString > regions) |
void | bookCutflowTree () |
void | bookEventLists () |
void | bookHistogram (TString, std::pair< TString, std::tuple< unsigned, float, float, std::function< float()>>>, TString="") |
void | bookHistogram (TString, std::pair< TString, std::tuple< std::vector< float >, std::function< float()>>>, TString="") |
void | bookHistograms (Histograms &histograms) |
void | bookHistograms (Histograms &histograms, std::vector< TString > cutlist) |
void | bookHistogramsForCut (Histograms &histograms, TString) |
void | bookHistogramsForCutAndAbove (Histograms &histograms, TString) |
void | bookHistogramsForCutAndBelow (Histograms &histograms, TString) |
void | bookHistogramsForEndCuts (Histograms &histograms) |
void | bookVecHistogram (TString, std::pair< TString, std::tuple< unsigned, float, float, std::function< std::vector< float >()>, std::function< std::vector< float >()>>>, TString="") |
void | bookVecHistogram (TString, std::pair< TString, std::tuple< std::vector< float >, std::function< std::vector< float >()>, std::function< std::vector< float >()>>>, TString="") |
void | copyAndEditCuts (TString, std::map< TString, TString >) |
void | createWgtSystBranches () |
Cutflow () | |
Cutflow (TFile *o) | |
void | fill () |
void | fillCutflow (std::vector< TString > &cutlist, TH1D *h, TH1D *hraw, float wgtsyst=1) |
void | fillCutflow_v2 (std::vector< CutTree *> &cutlist, TH1D *h, TH1D *hraw, float wgtsyst=1) |
void | fillCutflows (TString syst="", bool iswgtsyst=true) |
void | fillCutflows_v1 (TString syst="", bool iswgtsyst=true) |
void | fillCutflows_v2 (TString syst="", bool iswgtsyst=true) |
void | fillHistograms (TString syst="", bool iswgtsyst=true) |
void | filterCuts (std::vector< TString > ns) |
CutTree & | getCut (TString n) |
void | printCuts () |
void | printSetFunctionError (TString msg) |
void | removeCut (TString n) |
void | saveCutflows () |
void | saveHistograms () |
void | saveOutput () |
void | saveTTreeX () |
void | setCut (TString cutname, std::function< bool()> pass, std::function< float()> weight) |
void | setCutLists (std::vector< TString > regions) |
void | setCutSyst (TString cutname, TString syst, std::function< bool()> pass, std::function< float()> weight) |
void | setEventID (int, int, unsigned long long) |
void | setHistsAxesExtendable () |
void | setLastActiveCut (TString n) |
void | setSaveTTreeX (bool=true) |
void | setSkipSystematicHistograms (bool=true) |
void | setTFile (TFile *o) |
void | setVariable (TString varname, float) |
void | setWgtSyst (TString syst, float weight) |
~Cutflow () | |
Public Attributes | |
std::map< std::tuple< std::string, std::string, std::string, std::string >, TH2F * > | booked_2dhistograms |
std::vector< std::tuple< std::string, std::string, std::string, std::string > > | booked_2dhistograms_nominal_keys |
std::map< std::tuple< std::string, std::string, std::string >, TH1D * > | booked_histograms |
std::vector< std::tuple< std::string, std::string, std::string > > | booked_histograms_nominal_keys |
bool | cutflow_booked |
std::map< TString, TH1D * > | cutflow_histograms |
std::vector< std::tuple< TH1D *, std::vector< int * >, std::vector< float * >, std::function< float()> > > | cutflow_histograms_v2 |
std::vector< TString > | cutflow_nofill_cut_list |
std::map< TString, std::vector< TString > > | cutlists |
std::vector< TString > | cutsysts |
CutTree | cuttree |
std::map< TString, std::vector< CutTree * > > | cuttreelists |
std::map< std::string, CutTree * > | cuttreemap |
bool | dosavettreex |
bool | doskipsysthist |
bool | iseventlistbooked |
CutTree * | last_active_cut |
TFile * | ofile |
std::map< TString, TH1D * > | rawcutflow_histograms |
std::vector< std::tuple< TH1D *, std::vector< int * > > > | rawcutflow_histograms_v2 |
int | seterrorcount |
std::vector< TString > | systs |
std::map< TString, std::function< float()> > | systs_funcs |
TTree * | t |
TTreeX * | tx |
RooUtil::Cutflow::Cutflow | ( | ) |
RooUtil::Cutflow::Cutflow | ( | TFile * | o | ) |
RooUtil::Cutflow::~Cutflow | ( | ) |
Definition at line 37 of file anautil.cc.
References isotrackApplyRegressor::k, and findQualityFiles::v.
void RooUtil::Cutflow::addCut | ( | TString | n, |
std::function< bool()> | pass, | ||
std::function< float()> | weight | ||
) |
Definition at line 73 of file anautil.cc.
References DMR_cfg::cut, and create_idmaps::n.
void RooUtil::Cutflow::addCutSyst | ( | TString | syst, |
std::vector< TString > | pattern, | ||
std::vector< TString > | vetopattern = std::vector<TString>() |
||
) |
void RooUtil::Cutflow::addCutToLastActiveCut | ( | TString | n, |
std::function< bool()> | pass, | ||
std::function< float()> | weight | ||
) |
Definition at line 81 of file anautil.cc.
References DMR_cfg::cut, and create_idmaps::n.
void RooUtil::Cutflow::addCutToSkipCutflowList | ( | TString | n | ) |
Definition at line 159 of file anautil.cc.
References spr::find(), and create_idmaps::n.
void RooUtil::Cutflow::addToCutTreeMap | ( | TString | n | ) |
Definition at line 51 of file anautil.cc.
References RooUtil::error(), and create_idmaps::n.
void RooUtil::Cutflow::addWgtSyst | ( | TString | syst, |
std::function< float()> | weight | ||
) |
Definition at line 419 of file anautil.cc.
References mps_merge::weight.
void RooUtil::Cutflow::book2DHistogram | ( | TString | cut, |
std::pair< std::pair< TString, TString >, std::tuple< unsigned, float, float, unsigned, float, float, std::function< float()>, std::function< float()>>> | key, | ||
TString | syst = "" |
||
) |
Definition at line 786 of file anautil.cc.
References DMR_cfg::cut, submitPVResolutionJobs::key, WZElectronSkims53X_cff::max, and SiStripPI::min.
void RooUtil::Cutflow::book2DVecHistogram | ( | TString | cut, |
std::pair< std::pair< TString, TString >, std::tuple< unsigned, float, float, unsigned, float, float, std::function< std::vector< float >()>, std::function< std::vector< float >()>, std::function< std::vector< float >()>>> | key, | ||
TString | syst = "" |
||
) |
Definition at line 822 of file anautil.cc.
References DMR_cfg::cut, submitPVResolutionJobs::key, WZElectronSkims53X_cff::max, and SiStripPI::min.
void RooUtil::Cutflow::book2DVecHistogram | ( | TString | cut, |
std::pair< std::pair< TString, TString >, std::tuple< std::vector< float >, unsigned, float, float, std::function< std::vector< float >()>, std::function< std::vector< float >()>, std::function< std::vector< float >()>>> | key, | ||
TString | syst = "" |
||
) |
Definition at line 865 of file anautil.cc.
References DMR_cfg::cut, mps_fire::i, and submitPVResolutionJobs::key.
void RooUtil::Cutflow::bookCutflowHistograms | ( | ) |
Definition at line 181 of file anautil.cc.
References RooUtil::error().
void RooUtil::Cutflow::bookCutflowHistograms_v1 | ( | ) |
Definition at line 259 of file anautil.cc.
References RooUtil::CutflowUtil::createCutflowHistograms(), mps_check::msg, and RooUtil::print().
void RooUtil::Cutflow::bookCutflowHistograms_v2 | ( | ) |
Definition at line 190 of file anautil.cc.
References hgcalPlots::ct, h, mps_fire::i, THist, UNITY(), and hltDeepSecondaryVertexTagInfosPFPuppi_cfi::weights.
void RooUtil::Cutflow::bookCutflows | ( | ) |
Definition at line 300 of file anautil.cc.
void RooUtil::Cutflow::bookCutflowsForRegions | ( | std::vector< TString > | regions | ) |
Definition at line 293 of file anautil.cc.
void RooUtil::Cutflow::bookCutflowTree | ( | ) |
Definition at line 165 of file anautil.cc.
References RooUtil::CutflowUtil::createCutflowBranches(), and submitPVValidationJobs::t.
void RooUtil::Cutflow::bookEventLists | ( | ) |
Definition at line 459 of file anautil.cc.
References RooUtil::error().
void RooUtil::Cutflow::bookHistogram | ( | TString | cut, |
std::pair< TString, std::tuple< unsigned, float, float, std::function< float()>>> | key, | ||
TString | syst = "" |
||
) |
Definition at line 683 of file anautil.cc.
References DMR_cfg::cut, submitPVResolutionJobs::key, WZElectronSkims53X_cff::max, SiStripPI::min, and THist.
void RooUtil::Cutflow::bookHistogram | ( | TString | cut, |
std::pair< TString, std::tuple< std::vector< float >, std::function< float()>>> | key, | ||
TString | syst = "" |
||
) |
Definition at line 734 of file anautil.cc.
References DMR_cfg::cut, mps_fire::i, submitPVResolutionJobs::key, and THist.
void RooUtil::Cutflow::bookHistograms | ( | Histograms & | histograms | ) |
Definition at line 666 of file anautil.cc.
References bookHistograms(), SimL1EmulatorRepack_CalouGT_cff::cutlist, and nano_mu_digi_cff::region.
Referenced by main().
void RooUtil::Cutflow::bookHistograms | ( | Histograms & | histograms, |
std::vector< TString > | cutlist | ||
) |
Definition at line 675 of file anautil.cc.
References DMR_cfg::cut, and SimL1EmulatorRepack_CalouGT_cff::cutlist.
void RooUtil::Cutflow::bookHistogramsForCut | ( | Histograms & | histograms, |
TString | cut | ||
) |
Definition at line 998 of file anautil.cc.
References DMR_cfg::cut, and submitPVResolutionJobs::key.
void RooUtil::Cutflow::bookHistogramsForCutAndAbove | ( | Histograms & | histograms, |
TString | cut | ||
) |
Definition at line 1058 of file anautil.cc.
References RooUtil::error().
void RooUtil::Cutflow::bookHistogramsForCutAndBelow | ( | Histograms & | histograms, |
TString | cut | ||
) |
Definition at line 1050 of file anautil.cc.
References DummyCfis::c, DMR_cfg::cut, and SimL1EmulatorRepack_CalouGT_cff::cutlist.
void RooUtil::Cutflow::bookHistogramsForEndCuts | ( | Histograms & | histograms | ) |
Definition at line 1063 of file anautil.cc.
References nano_mu_digi_cff::region.
void RooUtil::Cutflow::bookVecHistogram | ( | TString | cut, |
std::pair< TString, std::tuple< unsigned, float, float, std::function< std::vector< float >()>, std::function< std::vector< float >()>>> | key, | ||
TString | syst = "" |
||
) |
Definition at line 706 of file anautil.cc.
References DMR_cfg::cut, submitPVResolutionJobs::key, WZElectronSkims53X_cff::max, SiStripPI::min, and THist.
void RooUtil::Cutflow::bookVecHistogram | ( | TString | cut, |
std::pair< TString, std::tuple< std::vector< float >, std::function< std::vector< float >()>, std::function< std::vector< float >()>>> | key, | ||
TString | syst = "" |
||
) |
Definition at line 758 of file anautil.cc.
References DMR_cfg::cut, mps_fire::i, submitPVResolutionJobs::key, and THist.
void RooUtil::Cutflow::copyAndEditCuts | ( | TString | , |
std::map< TString, TString > | |||
) |
void RooUtil::Cutflow::createWgtSystBranches | ( | ) |
Definition at line 429 of file anautil.cc.
void RooUtil::Cutflow::fill | ( | void | ) |
Definition at line 472 of file anautil.cc.
References RPCNoise_cfi::fillHistograms, and mps_check::msg.
Referenced by main().
void RooUtil::Cutflow::fillCutflow | ( | std::vector< TString > & | cutlist, |
TH1D * | h, | ||
TH1D * | hraw, | ||
float | wgtsyst = 1 |
||
) |
Definition at line 565 of file anautil.cc.
References SimL1EmulatorRepack_CalouGT_cff::cutlist, h, and mps_fire::i.
void RooUtil::Cutflow::fillCutflow_v2 | ( | std::vector< CutTree *> & | cutlist, |
TH1D * | h, | ||
TH1D * | hraw, | ||
float | wgtsyst = 1 |
||
) |
Definition at line 579 of file anautil.cc.
References hgcalPlots::ct, h, and mps_fire::i.
void RooUtil::Cutflow::fillCutflows | ( | TString | syst = "" , |
bool | iswgtsyst = true |
||
) |
Definition at line 522 of file anautil.cc.
void RooUtil::Cutflow::fillCutflows_v1 | ( | TString | syst = "" , |
bool | iswgtsyst = true |
||
) |
Definition at line 525 of file anautil.cc.
References SimL1EmulatorRepack_CalouGT_cff::cutlist, and RooUtil::CutflowUtil::fillCutflow().
void RooUtil::Cutflow::fillCutflows_v2 | ( | TString | syst = "" , |
bool | iswgtsyst = true |
||
) |
Definition at line 538 of file anautil.cc.
void RooUtil::Cutflow::fillHistograms | ( | TString | syst = "" , |
bool | iswgtsyst = true |
||
) |
Definition at line 599 of file anautil.cc.
void RooUtil::Cutflow::filterCuts | ( | std::vector< TString > | ns | ) |
Definition at line 114 of file anautil.cc.
References submitPVValidationJobs::child, DMR_cfg::cut, SimL1EmulatorRepack_CalouGT_cff::cutlist, spr::find(), mps_fire::i, and create_idmaps::n.
RooUtil::CutTree & RooUtil::Cutflow::getCut | ( | TString | n | ) |
Definition at line 65 of file anautil.cc.
References DummyCfis::c, and create_idmaps::n.
void RooUtil::Cutflow::printCuts | ( | ) |
Definition at line 62 of file anautil.cc.
void RooUtil::Cutflow::printSetFunctionError | ( | TString | msg | ) |
Definition at line 1077 of file anautil.cc.
References mps_check::msg, and RooUtil::print().
void RooUtil::Cutflow::removeCut | ( | TString | n | ) |
Definition at line 107 of file anautil.cc.
References DummyCfis::c, spr::find(), and create_idmaps::n.
void RooUtil::Cutflow::saveCutflows | ( | ) |
Definition at line 318 of file anautil.cc.
References RooUtil::CutflowUtil::saveCutflowHistograms().
void RooUtil::Cutflow::saveHistograms | ( | ) |
Definition at line 325 of file anautil.cc.
void RooUtil::Cutflow::saveOutput | ( | ) |
Definition at line 308 of file anautil.cc.
References corrVsCorr::filename, mps_check::msg, RooUtil::print(), and ntuplePlotting::saveHistograms().
Referenced by main(), and run_lst().
void RooUtil::Cutflow::saveTTreeX | ( | ) |
Definition at line 334 of file anautil.cc.
void RooUtil::Cutflow::setCut | ( | TString | cutname, |
std::function< bool()> | pass, | ||
std::function< float()> | weight | ||
) |
void RooUtil::Cutflow::setCutLists | ( | std::vector< TString > | regions | ) |
Definition at line 144 of file anautil.cc.
References nano_mu_digi_cff::region.
void RooUtil::Cutflow::setCutSyst | ( | TString | cutname, |
TString | syst, | ||
std::function< bool()> | pass, | ||
std::function< float()> | weight | ||
) |
Definition at line 349 of file anautil.cc.
References RooUtil::error(), and mps_merge::weight.
void RooUtil::Cutflow::setEventID | ( | int | run, |
int | lumi, | ||
unsigned long long | evt | ||
) |
Definition at line 447 of file anautil.cc.
References BXlumiParameters_cfi::lumi, mps_check::msg, and writedatasetfile::run.
void RooUtil::Cutflow::setHistsAxesExtendable | ( | ) |
Definition at line 1091 of file anautil.cc.
void RooUtil::Cutflow::setLastActiveCut | ( | TString | n | ) |
void RooUtil::Cutflow::setSaveTTreeX | ( | bool | v = true | ) |
void RooUtil::Cutflow::setSkipSystematicHistograms | ( | bool | v = true | ) |
|
inline |
Definition at line 148 of file anautil.h.
References EcalTangentSkim_cfg::o, and ofile.
Referenced by initializeInputsAndOutputs(), and main().
void RooUtil::Cutflow::setVariable | ( | TString | varname, |
float | val | ||
) |
Definition at line 437 of file anautil.cc.
References mps_check::msg, and heppy_batch::val.
void RooUtil::Cutflow::setWgtSyst | ( | TString | syst, |
float | weight | ||
) |
Definition at line 402 of file anautil.cc.
References mps_check::msg, and mps_merge::weight.
std::map<std::tuple< std::string , std::string , std::string , std::string >, TH2F*> RooUtil::Cutflow::booked_2dhistograms |
std::vector<std::tuple< std::string , std::string , std::string , std::string > > RooUtil::Cutflow::booked_2dhistograms_nominal_keys |
std::map<std::tuple< std::string , std::string , std::string >, TH1D *> RooUtil::Cutflow::booked_histograms |
std::vector<std::tuple< std::string , std::string , std::string > > RooUtil::Cutflow::booked_histograms_nominal_keys |
std::map< TString , TH1D *> RooUtil::Cutflow::cutflow_histograms |
std::vector<std::tuple< TH1D *, std::vector<int*>, std::vector<float*>, std::function<float()> > > RooUtil::Cutflow::cutflow_histograms_v2 |
std::vector<TString> RooUtil::Cutflow::cutflow_nofill_cut_list |
std::map<TString, std::vector<TString> > RooUtil::Cutflow::cutlists |
CutTree RooUtil::Cutflow::cuttree |
std::map<TString, std::vector<CutTree*> > RooUtil::Cutflow::cuttreelists |
std::map< std::string , CutTree*> RooUtil::Cutflow::cuttreemap |
TFile* RooUtil::Cutflow::ofile |
Definition at line 132 of file anautil.h.
Referenced by setTFile().
std::map< TString , TH1D *> RooUtil::Cutflow::rawcutflow_histograms |
std::vector<std::tuple< TH1D *, std::vector<int*> > > RooUtil::Cutflow::rawcutflow_histograms_v2 |
std::map<TString, std::function<float()> > RooUtil::Cutflow::systs_funcs |