1 #ifndef TOPHLTOFFLINEDQMHELPER
2 #define TOPHLTOFFLINEDQMHELPER
33 if(name.Contains(TString(triggerPath.c_str()), TString::kIgnoreCase)) {
47 for(
unsigned int j=0;
j<triggerPaths.size(); ++
j){
48 if(
acceptHLT(event, triggerTable, triggerPaths[
j])){
188 template <
typename Object>
237 template <
typename Object>
239 src_( iC.consumes< edm::
View<Object> >(cfg.getParameter<edm::
InputTag>(
"src" ))),
240 select_( cfg.getParameter<std::
string>(
"select")),
270 template <
typename Object>
275 if( !event.
getByToken(src_, src) )
return false;
279 if(!electronId_.isUninitialized()) {
280 if( !event.
getByToken(electronId_, electronId) )
return false;
287 if(dynamic_cast<const reco::GsfElectron*>(&*
obj)){
288 unsigned int idx =
obj-src->begin();
289 if( electronId_.isUninitialized() ?
true : ((int)(*electronId)[src->refAt(idx)] & eidPattern_) ){
290 if(select_(*
obj))++n;
295 if(select_(*
obj))++n;
298 bool accept=(min_>=0 ? n>=min_:
true) && (max_>=0 ? n<=max_:
true);
299 return (min_<0 && max_<0) ? (n>0):accept;
301 template <
typename Object>
306 if( !event.
getByToken(src_, src) )
return false;
310 if(!electronId_.isUninitialized()) {
311 if( !event.
getByToken(electronId_, electronId) )
return false;
318 if(select_(*
obj))++n;
320 bool accept=(min_>=0 ? n>=min_:
true) && (max_>=0 ? n<=max_:
true);
321 return (min_<0 && max_<0) ? (n>0):accept;
324 template <
typename Object>
327 throw cms::Exception(
"SelectionStepHLT") <<
"you fail" << std::endl;
T getParameter(std::string const &) const
bool failed_
indicate failed associations
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
double masslb(reco::RecoCandidate *mu, const reco::MET &met, const reco::Jet &b)
calculate mlb estimate
double massTopQuark(const std::vector< reco::Jet > &jets)
calculate top quark mass estimate
void operator()(const std::vector< reco::Jet > &jets)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
double wMass_
paramater of the w boson mass
Base class for all types of Jets.
edm::EDGetTokenT< reco::JetTagCollection > btagLabel_
choice for b-tag as extra selection type
int min_
min/max for object multiplicity
bool accept() const
Has at least one path accepted the event?
double tmassTopQuark(reco::RecoCandidate *mu, const reco::MET &met, const reco::Jet &b)
calculate top quark transverse mass estimate
bool exists(std::string const ¶meterName) const
checks if a parameter exists
virtual bool select(const edm::Event &event, const edm::EventSetup &setup)
double massWBoson(const std::vector< reco::Jet > &jets)
calculate W boson mass estimate
CalculateHLT(int maxNJets, double wMass)
default constructor
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Strings const & triggerNames() const
virtual ~SelectionStepHLT()
default destructor
SelectionStepHLT(const edm::ParameterSet &cfg, edm::ConsumesCollector &&iC)
default constructor
double massWBoson_
cache of w boson mass estimate
bool selectVertex(const edm::Event &event)
double mlb_
cache of mlb estimate
~CalculateHLT()
default destructor
double massTopQuark_
cache of top quark mass estimate
StringCutObjectSelector< reco::JetID > * jetIDSelect_
selection string on the jetID
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
virtual bool select(const edm::Event &event)
apply selection
double tmassWBoson(reco::RecoCandidate *mu, const reco::MET &met, const reco::Jet &b)
calculate W boson transverse mass estimate
edm::EDGetTokenT< edm::ValueMap< float > > electronId_
electronId label as extra selection type
StringCutObjectSelector< Object > select_
string cut selector
bool acceptHLT(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
edm::EDGetTokenT< edm::View< Object > > src_
input collection
tuple idx
DEBUGGING if hasattr(process,"trackMonIterativeTracking2012"): print "trackMonIterativeTracking2012 D...
double tmassWBoson_
cache of W boson transverse mass estimate
virtual bool select(const edm::Event &event)
edm::EDGetTokenT< edm::View< reco::Vertex > > pvs_
int maxNJets_
max. number of jets to be considered
double btagWorkingPoint_
choice of b-tag working point as extra selection type
std::string jetCorrector_
jet corrector as extra selection type
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
edm::EDGetTokenT< reco::JetIDValueMap > jetIDLabel_
jetID as an extra selection type
double tmassTopQuark_
cache of top quark transverse mass estimate
static std::string const triggerPaths
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")