test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 889 of file hltDiff.cc.

Constructor & Destructor Documentation

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

Definition at line 894 of file hltDiff.cc.

894  :
895  GenericSummary(_id, _json, _json.vars.trigger),
896  accepted_o(_json.vars.trigger_passed_count.at(id).first),
897  accepted_n(_json.vars.trigger_passed_count.at(id).second) {}
std::vector< std::pair< int, int > > trigger_passed_count
Definition: hltDiff.cc:614
GenericSummary(int _id, const JsonOutputProducer &_json, const std::vector< std::string > &_names)
Definition: hltDiff.cc:844
std::vector< std::string > trigger
Definition: hltDiff.cc:613

Member Function Documentation

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

Definition at line 899 of file hltDiff.cc.

References revisionDML::addEntry(), and L1Trigger_dataformats::json.

899  {
900  int moduleLabelId = GenericSummary::addEntry(_event, _triggerIndex);
901  // Updating number of events affected by the particular module
902  if (m_modules.count(moduleLabelId) == 0)
903  m_modules.emplace(moduleLabelId, GenericSummary(moduleLabelId, json, _moduleNames));
904  m_modules.at(moduleLabelId).addEntry(_event, _triggerIndex);
905  }
std::map< int, GenericSummary > m_modules
Definition: hltDiff.cc:892
GenericSummary(int _id, const JsonOutputProducer &_json, const std::vector< std::string > &_names)
Definition: hltDiff.cc:844
const JsonOutputProducer & json
Definition: hltDiff.cc:837
int addEntry(const JsonOutputProducer::JsonEvent &_event, const int _triggerIndex)
Definition: hltDiff.cc:850
Pair SummaryOutputProducer::TriggerSummary::changed ( int  type = 0) const
inline

Definition at line 927 of file hltDiff.cc.

References Vispa.Plugins.EdmBrowser.EdmDataAccessor::all(), alignCSCRings::e, SummaryOutputProducer::Pair::e, HLT_25ns10e33_v2_cff::fraction, L1Trigger_dataformats::json, bookConverter::max, mathSSE::sqrt(), and SummaryOutputProducer::Pair::v.

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

927  {
929  if (type == 0) return changed;
930  double all( json.configuration.events - accepted_o );
931  Pair fraction = Pair( changed.v / (all+1e-10), sqrt(all) / (all+1e-10) );
932  if (type == 1) return fraction;
933  if (type == 2) return Pair(std::max(0.0, fraction.v - fraction.e), 0.0); // Smallest value given the uncertainty
934  return Pair( fraction.v / (fraction.e + 1e-10), 0.0 );
935  }
type
Definition: HCALResponse.h:21
const JsonOutputProducer & json
Definition: hltDiff.cc:837
T sqrt(T t)
Definition: SSEVec.h:18
JsonConfiguration configuration
Definition: hltDiff.cc:641
Pair SummaryOutputProducer::TriggerSummary::gained ( int  type = 0) const
inline

Definition at line 907 of file hltDiff.cc.

References Vispa.Plugins.EdmBrowser.EdmDataAccessor::all(), alignCSCRings::e, SummaryOutputProducer::Pair::e, HLT_25ns10e33_v2_cff::fraction, bookConverter::max, mathSSE::sqrt(), and SummaryOutputProducer::Pair::v.

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

907  {
908  Pair gained( GenericSummary::gained() );
909  if (type == 0) return gained; // Absolute number of affected events
910  double all( accepted_n );
911  Pair fraction = Pair( gained.v / (all+1e-10), sqrt(all) / (all+1e-10) );
912  if (type == 1) return fraction; // Relative number of affected events with respect to all accepted
913  if (type == 2) return Pair(std::max(0.0, fraction.v - fraction.e), 0.0); // Smallest value given the uncertainty
914  return Pair( fraction.v / (fraction.e + 1e-10), 0.0 ); // Significance of the effect as N std. deviations
915  }
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 917 of file hltDiff.cc.

References Vispa.Plugins.EdmBrowser.EdmDataAccessor::all(), alignCSCRings::e, SummaryOutputProducer::Pair::e, HLT_25ns10e33_v2_cff::fraction, bookConverter::max, mathSSE::sqrt(), and SummaryOutputProducer::Pair::v.

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

917  {
918  Pair lost( GenericSummary::lost() );
919  if (type == 0) return lost;
920  double all( accepted_o );
921  Pair fraction = Pair( lost.v / (all+1e-10), sqrt(all) / (all+1e-10) );
922  if (type == 1) return fraction;
923  if (type == 2) return Pair(std::max(0.0, fraction.v - fraction.e), 0.0); // Smallest value given the uncertainty
924  return Pair( fraction.v / (fraction.e + 1e-10), 0.0 );
925  }
type
Definition: HCALResponse.h:21
T sqrt(T t)
Definition: SSEVec.h:18

Member Data Documentation

int SummaryOutputProducer::TriggerSummary::accepted_n

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