|
DAS
3.0
Das Analysis System
|
|
void | applyPhotonConversionVeto (const vector< fs::path > &inputs, const fs::path &output, const pt::ptree &config, const int steering, const DT::Slice slice={1, 0}) |
|
void | applyPhotonID (const vector< fs::path > &inputs, const fs::path &output, const pt::ptree &config, const int steering, const DT::Slice slice={1, 0}) |
|
◆ applyPhotonConversionVeto()
void DAS::Photon::applyPhotonConversionVeto |
( |
const vector< fs::path > & |
inputs, |
|
|
const fs::path & |
output, |
|
|
const pt::ptree & |
config, |
|
|
const int |
steering, |
|
|
const DT::Slice |
slice = {1,0} |
|
) |
| |
Applies one of the photon conversion veto and (optionally) scale factors.
This function fetches the scale factor for the ID cut previously applied using applyPhotonID (automatically retrieved from the metainfo).
- Todo:
- ControlPlots
- Parameters
-
inputs | input ROOT files (n-tuples) |
output | output ROOT file (n-tuple) |
config | config handled with `Darwin::Tools::options` |
steering | parameters obtained from explicit options |
slice | number and index of slice |
123 cout << __func__ <<
' ' << slice <<
" start" << endl;
127 auto tOut = unique_ptr<TTree>(tIn->CloneTree(0));
132 vector<RecPhoton> * recPhotons =
nullptr;
133 tIn->SetBranchAddress(
"recPhotons", &recPhotons);
135 auto ID = metainfo.Get<
string>(
"corrections",
"photons",
"ID",
"WP");
136 auto table =
config.get<fs::path>(
"corrections.photons.conversion_veto.table");
137 auto type =
config.get<
string>(
"corrections.photons.conversion_veto.type");
138 metainfo.Set<
string>(
"corrections",
"photons",
"conversion_veto",
"type", type);
139 metainfo.Set<fs::path>(
"corrections",
"photons",
"conversion_veto",
"table", table);
141 ConversionVetoApplier applier(table, ID, table !=
"/dev/null",
143 for (
const auto&
name: applier.weightNames())
144 metainfo.Set<
string>(
"variations", RecPhoton::WeightVar,
name);
148 for (
DT::Looper looper(tIn, slice); looper(); ++looper) {
152 applier(*recPhotons);
154 static const bool fillTree = steering &
DT::fill;
155 if (fillTree) tOut->Fill();
158 metainfo.Set<
bool>(
"git",
"complete",
true);
162 cout << __func__ <<
' ' << slice <<
" stop" << endl;
◆ applyPhotonID()
void DAS::Photon::applyPhotonID |
( |
const vector< fs::path > & |
inputs, |
|
|
const fs::path & |
output, |
|
|
const pt::ptree & |
config, |
|
|
const int |
steering, |
|
|
const DT::Slice |
slice = {1,0} |
|
) |
| |
- Todo:
- ControlPlots
- Parameters
-
inputs | input ROOT files (n-tuples) |
output | output ROOT file (n-tuple) |
config | config handled with `Darwin::Tools::options` |
steering | parameters obtained from explicit options |
slice | number and index of slice |
103 cout << __func__ <<
' ' << slice <<
" start" << endl;
107 auto tOut = unique_ptr<TTree>(tIn->CloneTree(0));
112 vector<RecPhoton> * recPhotons =
nullptr;
113 tIn->SetBranchAddress(
"recPhotons", &recPhotons);
115 auto ID =
config.get<
string>(
"corrections.photons.ID.WP");
116 auto path =
config.get<fs::path>(
"corrections.photons.ID.table");
117 metainfo.Set<
string>(
"corrections",
"photons",
"ID",
"WP", ID);
118 metainfo.Set<fs::path>(
"corrections",
"photons",
"ID",
"table", path);
119 IDApplier applier(path, ID, path !=
"/dev/null", steering &
DT::syst);
120 for (
const auto&
name: applier.weightNames())
121 metainfo.Set<
string>(
"variations", RecPhoton::WeightVar,
name);
125 for (
DT::Looper looper(tIn, slice); looper(); ++looper) {
129 applier(*recPhotons);
131 static const bool fillTree = steering &
DT::fill;
132 if (fillTree) tOut->Fill();
135 metainfo.Set<
bool>(
"git",
"complete",
true);
139 cout << __func__ <<
' ' << slice <<
" stop" << endl;
name
Definition: DYToLL_M-50_13TeV_pythia8_cff_GEN_SIM_RECOBEFMIX_DIGI_L1_DIGI2RAW_L1Reco_RECO.py:48
static bool verbose
Definition: Step.h:40
config
Definition: Ntupliser_cfg.py:263
def inputs
Definition: jercExample.py:118
#define DT_GetOutput(output)
Definition: FileUtils.h:96