CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PrescaleWeightProvider.h
Go to the documentation of this file.
1 #ifndef CommonTools_TriggerUtils_PrescaleWeightProvider_h
2 #define CommonTools_TriggerUtils_PrescaleWeightProvider_h
3 
4 
5 // -*- C++ -*-
6 //
7 // Package: CommonTools/TriggerUtils
8 // Class: PrescaleWeightProvider
9 //
23 #include <vector>
24 #include <string>
25 
30 
33 
34 
36 
38  bool init_;
41 
42  std::vector< std::string > l1SeedPaths_;
43 
44  // configuration parameters
45  unsigned verbosity_; // optional (default: 0)
46  edm::InputTag triggerResultsTag_; // optional (default: "TriggerResults::HLT")
48  edm::InputTag l1GtTriggerMenuLiteTag_; // optional (default: "l1GtTriggerMenuLite")
49  edm::EDGetTokenT< L1GtTriggerMenuLite > l1GtTriggerMenuLiteToken_; // optional (default: "l1GtTriggerMenuLite")
50  std::vector< std::string > hltPaths_;
51 
52  public:
53 
54  PrescaleWeightProvider( const edm::ParameterSet & config, edm::ConsumesCollector && iC ) : PrescaleWeightProvider( config, iC ) {}; // to be called from the ED module's c'tor
55  PrescaleWeightProvider( const edm::ParameterSet & config, edm::ConsumesCollector & iC ); // to be called from the ED module's c'tor
57 
58  void initRun( const edm::Run & run, const edm::EventSetup & setup ); // to be called from the ED module's beginRun() method
59  int prescaleWeight ( const edm::Event & event, const edm::EventSetup & setup ); // to be called from the ED module's event loop method
60 
61  private:
62 
63  void parseL1Seeds( const std::string & l1Seeds );
64 
65 };
66 
67 
68 #endif
edm::EDGetTokenT< L1GtTriggerMenuLite > l1GtTriggerMenuLiteToken_
int prescaleWeight(const edm::Event &event, const edm::EventSetup &setup)
edm::Handle< L1GtTriggerMenuLite > triggerMenuLite_
std::vector< std::string > l1SeedPaths_
std::vector< std::string > hltPaths_
edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_
void initRun(const edm::Run &run, const edm::EventSetup &setup)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
This class takes a vector of HLT paths and returns a weight based on their HLT and L1 prescales...
PrescaleWeightProvider(const edm::ParameterSet &config, edm::ConsumesCollector &&iC)
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
void parseL1Seeds(const std::string &l1Seeds)
Definition: Run.h:41