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 919 of file hltDiff.cc.

Constructor & Destructor Documentation

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

Definition at line 924 of file hltDiff.cc.

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

Member Function Documentation

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

Definition at line 929 of file hltDiff.cc.

References revisionDML::addEntry().

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

Definition at line 957 of file hltDiff.cc.

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

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

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

Definition at line 937 of file hltDiff.cc.

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

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

937  {
938  Pair gained( GenericSummary::gained() );
939  if (type == 0) return gained; // Absolute number of affected events
940  double all( accepted_n );
941  Pair fraction = Pair( gained.v / (all+1e-10), sqrt(all) / (all+1e-10) );
942  if (type == 1) return fraction; // Relative number of affected events with respect to all accepted
943  if (type == 2) return Pair(std::max(0.0, fraction.v - fraction.e), 0.0); // Smallest value given the uncertainty
944  return Pair( fraction.v / (fraction.e + 1e-10), 0.0 ); // Significance of the effect as N std. deviations
945  }
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 947 of file hltDiff.cc.

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

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

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

Member Data Documentation

int SummaryOutputProducer::TriggerSummary::accepted_n

Definition at line 921 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 922 of file hltDiff.cc.