CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
SummaryOutputProducer::TriggerSummary Struct Reference
Inheritance diagram for SummaryOutputProducer::TriggerSummary:
SummaryOutputProducer::GenericSummary

Public Member Functions

void addEntry (const JsonOutputProducer::JsonEvent &_event, const int _triggerIndex, const std::vector< std::string > &_moduleNames)
 
Pair changed (int type=0) const
 
Pair gained (int type=0) const
 
Pair lost (int type=0) const
 
 TriggerSummary (int _id, const JsonOutputProducer &_json)
 
- Public Member Functions inherited from SummaryOutputProducer::GenericSummary
int addEntry (const JsonOutputProducer::JsonEvent &_event, const int _triggerIndex)
 
Pair changed () const
 
Pair gained () const
 
 GenericSummary (int _id, const JsonOutputProducer &_json, const std::vector< std::string > &_names)
 
bool keepForC () const
 
bool keepForGL () const
 
Pair lost () const
 

Public Attributes

int accepted_n
 
int accepted_o
 
std::map< int, GenericSummarym_modules
 
- Public Attributes inherited from SummaryOutputProducer::GenericSummary
int id
 
const JsonOutputProducerjson
 
std::string name
 
std::set< Eventv_changed
 
std::set< Eventv_gained
 
std::set< Eventv_lost
 

Detailed Description

Definition at line 918 of file hltDiff.cc.

Constructor & Destructor Documentation

SummaryOutputProducer::TriggerSummary::TriggerSummary ( int  _id,
const JsonOutputProducer _json 
)
inline

Definition at line 923 of file hltDiff.cc.

923  :
924  GenericSummary(_id, _json, _json.vars.trigger),
925  accepted_o(_json.vars.trigger_passed_count.at(id).first),
926  accepted_n(_json.vars.trigger_passed_count.at(id).second) {}
std::vector< std::pair< int, int > > trigger_passed_count
Definition: hltDiff.cc:619
GenericSummary(int _id, const JsonOutputProducer &_json, const std::vector< std::string > &_names)
Definition: hltDiff.cc:873
std::vector< std::string > trigger
Definition: hltDiff.cc:618

Member Function Documentation

void SummaryOutputProducer::TriggerSummary::addEntry ( const JsonOutputProducer::JsonEvent _event,
const int  _triggerIndex,
const std::vector< std::string > &  _moduleNames 
)
inline

Definition at line 928 of file hltDiff.cc.

References revisionDML::addEntry().

928  {
929  int moduleLabelId = GenericSummary::addEntry(_event, _triggerIndex);
930  // Updating number of events affected by the particular module
931  if (m_modules.count(moduleLabelId) == 0)
932  m_modules.emplace(moduleLabelId, GenericSummary(moduleLabelId, json, _moduleNames));
933  m_modules.at(moduleLabelId).addEntry(_event, _triggerIndex);
934  }
std::map< int, GenericSummary > m_modules
Definition: hltDiff.cc:921
GenericSummary(int _id, const JsonOutputProducer &_json, const std::vector< std::string > &_names)
Definition: hltDiff.cc:873
const JsonOutputProducer & json
Definition: hltDiff.cc:866
int addEntry(const JsonOutputProducer::JsonEvent &_event, const int _triggerIndex)
Definition: hltDiff.cc:879
Pair SummaryOutputProducer::TriggerSummary::changed ( int  type = 0) const
inline

Definition at line 956 of file hltDiff.cc.

References Vispa.Plugins.EdmBrowser.EdmDataAccessor::all(), JsonOutputProducer::configuration, MillePedeFileConverter_cfg::e, SummaryOutputProducer::Pair::e, JsonOutputProducer::JsonConfiguration::events, dedxEstimators_cff::fraction, hpstanc_transforms::max, mathSSE::sqrt(), and SummaryOutputProducer::Pair::v.

Referenced by SummaryOutputProducer::writeCSV_trigger(), and SummaryOutputProducer::writeHistograms().

956  {
958  if (type == 0) return changed;
959  double all( json.configuration.events - accepted_o );
960  Pair fraction = Pair( changed.v / (all+1e-10), sqrt(all) / (all+1e-10) );
961  if (type == 1) return fraction;
962  if (type == 2) return Pair(std::max(0.0, fraction.v - fraction.e), 0.0); // Smallest value given the uncertainty
963  return Pair( fraction.v / (fraction.e + 1e-10), 0.0 );
964  }
type
Definition: HCALResponse.h:21
const JsonOutputProducer & json
Definition: hltDiff.cc:866
T sqrt(T t)
Definition: SSEVec.h:18
JsonConfiguration configuration
Definition: hltDiff.cc:646
Pair SummaryOutputProducer::TriggerSummary::gained ( int  type = 0) const
inline

Definition at line 936 of file hltDiff.cc.

References Vispa.Plugins.EdmBrowser.EdmDataAccessor::all(), MillePedeFileConverter_cfg::e, SummaryOutputProducer::Pair::e, dedxEstimators_cff::fraction, hpstanc_transforms::max, mathSSE::sqrt(), and SummaryOutputProducer::Pair::v.

Referenced by SummaryOutputProducer::writeCSV_trigger(), and SummaryOutputProducer::writeHistograms().

936  {
937  Pair gained( GenericSummary::gained() );
938  if (type == 0) return gained; // Absolute number of affected events
939  double all( accepted_n );
940  Pair fraction = Pair( gained.v / (all+1e-10), sqrt(all) / (all+1e-10) );
941  if (type == 1) return fraction; // Relative number of affected events with respect to all accepted
942  if (type == 2) return Pair(std::max(0.0, fraction.v - fraction.e), 0.0); // Smallest value given the uncertainty
943  return Pair( fraction.v / (fraction.e + 1e-10), 0.0 ); // Significance of the effect as N std. deviations
944  }
type
Definition: HCALResponse.h:21
T sqrt(T t)
Definition: SSEVec.h:18
Pair SummaryOutputProducer::TriggerSummary::lost ( int  type = 0) const
inline

Definition at line 946 of file hltDiff.cc.

References Vispa.Plugins.EdmBrowser.EdmDataAccessor::all(), MillePedeFileConverter_cfg::e, SummaryOutputProducer::Pair::e, dedxEstimators_cff::fraction, hpstanc_transforms::max, mathSSE::sqrt(), and SummaryOutputProducer::Pair::v.

Referenced by SummaryOutputProducer::writeCSV_trigger(), and SummaryOutputProducer::writeHistograms().

946  {
947  Pair lost( GenericSummary::lost() );
948  if (type == 0) return lost;
949  double all( accepted_o );
950  Pair fraction = Pair( lost.v / (all+1e-10), sqrt(all) / (all+1e-10) );
951  if (type == 1) return fraction;
952  if (type == 2) return Pair(std::max(0.0, fraction.v - fraction.e), 0.0); // Smallest value given the uncertainty
953  return Pair( fraction.v / (fraction.e + 1e-10), 0.0 );
954  }
type
Definition: HCALResponse.h:21
T sqrt(T t)
Definition: SSEVec.h:18

Member Data Documentation

int SummaryOutputProducer::TriggerSummary::accepted_n

Definition at line 920 of file hltDiff.cc.

Referenced by SummaryOutputProducer::writeCSV_trigger().

int SummaryOutputProducer::TriggerSummary::accepted_o
std::map<int, GenericSummary> SummaryOutputProducer::TriggerSummary::m_modules

Definition at line 921 of file hltDiff.cc.