|
|
Go to the documentation of this file.
40 : selectorPath_(
pset.getUntrackedParameter<
std::
string>(
"SelectorPath",
"")),
44 triggerResultsToken_(consumes<edm::TriggerResults>(
edm::InputTag(
"TriggerResults"))) {}
53 edm::LogVerbatim(
"SimpleSystematicsAnalysis") <<
"Uncertainties will be determined for the following tags: ";
69 edm::LogVerbatim(
"SimpleSystematicsAnalysis") <<
"NO SELECTED EVENTS => NO RESULTS";
73 edm::LogVerbatim(
"SimpleSystematicsAnalysis") <<
"\n>>>> Begin of Weight systematics summary >>>>";
77 <<
"Total number of selected data: " <<
selectedEvents_ <<
" [events], corresponding to acceptance: ["
78 << originalAcceptance * 100 <<
" +- "
84 double acc_central = 0.;
85 double acc2_central = 0.;
92 <<
"\tTotal Events after reweighting: " <<
weightedEvents_[
i] <<
" [events]";
96 <<
"\tAcceptance after reweighting: [" << acc_central * 100 <<
" +- "
97 << 100 *
sqrt((acc2_central / waverage - acc_central * acc_central) /
originalEvents_) <<
"] %";
98 double xi = acc_central - originalAcceptance;
101 deltaxi =
sqrt(deltaxi);
105 <<
"\ti.e. [" << std::setprecision(4) << 100 *
xi / originalAcceptance <<
" +- " << std::setprecision(4)
106 << 100 * deltaxi / originalAcceptance <<
"] % relative variation with respect to the original acceptance";
108 edm::LogVerbatim(
"SimpleSystematicsAnalysis") <<
">>>> End of Weight systematics summary >>>>";
115 bool selectedEvent =
false;
118 edm::LogError(
"SimpleSystematicsAnalysis") <<
">>> TRIGGER collection does not exist !!!";
124 bool pathFound = (pathIndex <
trigNames.size());
127 selectedEvent =
true;
std::vector< double > weightedEvents_
static const char *const trigNames[]
bool filter(edm::Event &, const edm::EventSetup &) override
static const std::string triggerResults
~SimpleSystematicsAnalyzer() override
unsigned int selectedEvents_
std::vector< edm::EDGetTokenT< double > > weightTokens_
#define DEFINE_FWK_MODULE(type)
std::vector< double > weightedSelectedEvents_
std::vector< double > weighted2SelectedEvents_
auto vector_transform(std::vector< InputType > const &input, Function predicate) -> std::vector< typename std::remove_cv< typename std::remove_reference< decltype(predicate(input.front()))>::type >::type >
SimpleSystematicsAnalyzer(const edm::ParameterSet &pset)
std::vector< edm::InputTag > weightTags_
edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_
std::string selectorPath_
Power< A, B >::type pow(const A &a, const B &b)
unsigned int originalEvents_