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

Constructor & Destructor Documentation

◆ TriggerSummary()

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

Definition at line 875 of file hltDiff.cc.

876  : GenericSummary(_id, _json, _json.vars.trigger),
877  accepted_o(_json.vars.trigger_passed_count.at(id).first),
878  accepted_n(_json.vars.trigger_passed_count.at(id).second) {}

Member Function Documentation

◆ addEntry()

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

Definition at line 880 of file hltDiff.cc.

882  {
883  int moduleLabelId = GenericSummary::addEntry(_event, _triggerIndex);
884  // Updating number of events affected by the particular module
885  if (m_modules.count(moduleLabelId) == 0)
886  m_modules.emplace(moduleLabelId, GenericSummary(moduleLabelId, json, _moduleNames));
887  m_modules.at(moduleLabelId).addEntry(_event, _triggerIndex);
888  }

◆ changed()

Pair SummaryOutputProducer::TriggerSummary::changed ( int  type = 0) const
inline

Definition at line 916 of file hltDiff.cc.

916  {
918  if (type == 0)
919  return changed;
920  double all(json.configuration.events - accepted_o);
921  Pair fraction = Pair(changed.v / (all + 1e-10), sqrt(all) / (all + 1e-10));
922  if (type == 1)
923  return fraction;
924  if (type == 2)
925  return Pair(std::max(0.0, fraction.v - fraction.e), 0.0); // Smallest value given the uncertainty
926  return Pair(fraction.v / (fraction.e + 1e-10), 0.0);
927  }

References python.cmstools::all(), MillePedeFileConverter_cfg::e, HLT_FULL_cff::fraction, SiStripPI::max, mathSSE::sqrt(), and SummaryOutputProducer::Pair::v.

◆ gained()

Pair SummaryOutputProducer::TriggerSummary::gained ( int  type = 0) const
inline

Definition at line 890 of file hltDiff.cc.

890  {
892  if (type == 0)
893  return gained; // Absolute number of affected events
894  double all(accepted_n);
895  Pair fraction = Pair(gained.v / (all + 1e-10), sqrt(all) / (all + 1e-10));
896  if (type == 1)
897  return fraction; // Relative number of affected events with respect to all accepted
898  if (type == 2)
899  return Pair(std::max(0.0, fraction.v - fraction.e), 0.0); // Smallest value given the uncertainty
900  return Pair(fraction.v / (fraction.e + 1e-10), 0.0); // Significance of the effect as N std. deviations
901  }

References python.cmstools::all(), MillePedeFileConverter_cfg::e, HLT_FULL_cff::fraction, SiStripPI::max, mathSSE::sqrt(), and SummaryOutputProducer::Pair::v.

◆ lost()

Pair SummaryOutputProducer::TriggerSummary::lost ( int  type = 0) const
inline

Definition at line 903 of file hltDiff.cc.

903  {
904  Pair lost(GenericSummary::lost());
905  if (type == 0)
906  return lost;
907  double all(accepted_o);
908  Pair fraction = Pair(lost.v / (all + 1e-10), sqrt(all) / (all + 1e-10));
909  if (type == 1)
910  return fraction;
911  if (type == 2)
912  return Pair(std::max(0.0, fraction.v - fraction.e), 0.0); // Smallest value given the uncertainty
913  return Pair(fraction.v / (fraction.e + 1e-10), 0.0);
914  }

References python.cmstools::all(), MillePedeFileConverter_cfg::e, HLT_FULL_cff::fraction, SiStripPI::max, mathSSE::sqrt(), and SummaryOutputProducer::Pair::v.

Member Data Documentation

◆ accepted_n

int SummaryOutputProducer::TriggerSummary::accepted_n

Definition at line 872 of file hltDiff.cc.

◆ accepted_o

int SummaryOutputProducer::TriggerSummary::accepted_o

Definition at line 871 of file hltDiff.cc.

◆ m_modules

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

Definition at line 873 of file hltDiff.cc.

JsonOutputProducer::JsonVars::trigger
std::vector< std::string > trigger
Definition: hltDiff.cc:567
SummaryOutputProducer::GenericSummary::gained
Pair gained() const
Definition: hltDiff.cc:859
JsonOutputProducer::vars
JsonVars vars
Definition: hltDiff.cc:596
SummaryOutputProducer::GenericSummary::lost
Pair lost() const
Definition: hltDiff.cc:861
SummaryOutputProducer::GenericSummary::addEntry
int addEntry(const JsonOutputProducer::JsonEvent &_event, const int _triggerIndex)
Definition: hltDiff.cc:843
python.cmstools.all
def all(container)
workaround iterator generators for ROOT classes
Definition: cmstools.py:25
SummaryOutputProducer::Pair::v
double v
Definition: hltDiff.cc:814
HLT_FULL_cff.fraction
fraction
Definition: HLT_FULL_cff.py:52823
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
SummaryOutputProducer::GenericSummary::GenericSummary
GenericSummary(int _id, const JsonOutputProducer &_json, const std::vector< std::string > &_names)
Definition: hltDiff.cc:838
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
type
type
Definition: SiPixelVCal_PayloadInspector.cc:39
SummaryOutputProducer::TriggerSummary::m_modules
std::map< int, GenericSummary > m_modules
Definition: hltDiff.cc:873
SummaryOutputProducer::TriggerSummary::accepted_o
int accepted_o
Definition: hltDiff.cc:871
JsonOutputProducer::JsonVars::trigger_passed_count
std::vector< std::pair< int, int > > trigger_passed_count
Definition: hltDiff.cc:568
SummaryOutputProducer::GenericSummary::changed
Pair changed() const
Definition: hltDiff.cc:863
json
nlohmann::json json
Definition: FastTimerService.cc:21
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
SummaryOutputProducer::TriggerSummary::accepted_n
int accepted_n
Definition: hltDiff.cc:872