45 for(
unsigned int j=0;
j<triggerPaths.size(); ++
j){
46 if(
accept(event, triggerTable, triggerPaths[
j])){
77 double massWBoson(
const std::vector<reco::Jet>&
jets);
79 double massTopQuark(
const std::vector<reco::Jet>&
jets);
82 double massBTopQuark(
const std::vector<reco::Jet>&
jets, std::vector<double> VbtagWP,
double btagWP_);
93 void operator()(
const std::vector<reco::Jet>&
jets);
95 void operator2(
const std::vector<reco::Jet>& , std::vector<double> ,
double);
174 template <
typename Object>
225 template <
typename Object>
227 select_(cfg.getParameter<std::
string>(
"select")),
262 template <
typename Object>
267 if( !event.
getByToken(src_, src) )
return false;
271 if(!electronId_.isUninitialized()){
272 if( !event.
getByToken(electronId_, electronId) )
return false;
279 if(dynamic_cast<const reco::GsfElectron*>(&*
obj)){
280 unsigned int idx =
obj-src->begin();
281 if( electronId_.isUninitialized() ?
true : ((int)(*electronId)[src->refAt(idx)] & eidPattern_) ){
282 if(select_(*
obj))++n;
287 if(select_(*
obj))++n;
290 bool accept=(min_>=0 ? n>=min_:
true) && (max_>=0 ? n<=max_:
true);
291 return (min_<0 && max_<0) ? (n>0):accept;
296 template <
typename Object>
301 if( !event.
getByToken(src_, src) )
return false;
308 if(!electronId_.isUninitialized()){
309 if( !event.
getByToken(electronId_, electronId) )
return false;
314 unsigned int idx_gsf = 0;
319 if (dynamic_cast<const reco::PFCandidate*>(&*
obj)){
323 if(select_(*
obj)){++
n;
328 if( !event.
getByToken(gsfEs_, elecs_gsf) )
continue;
330 if(elecs_gsf->refAt(idx_gsf).isNonnull()){
331 int eID = (int)(*electronId)[elecs_gsf->refAt(idx_gsf)];
332 if( electronId_.isUninitialized() ?
true : ( (eID & eidPattern_) && (eID >= 5) ) )
342 else if(dynamic_cast<const reco::GsfElectron*>(&*
obj)){
343 unsigned int idx =
obj-src->begin();
344 int eID = (int)(*electronId)[src->refAt(idx)];
345 if( electronId_.isUninitialized() ?
true : ( (eID & eidPattern_) && (eID >= 5) ) ){
346 if(select_(*
obj))++n;
353 if(select_(*
obj))++n;
356 bool accept=(min_>=0 ? n>=min_:
true) && (max_>=0 ? n<=max_:
true);
357 return (min_<0 && max_<0) ? (n>0):accept;
361 template <
typename Object>
366 if( !event.
getByToken(src_, src) )
return false;
370 if(!electronId_.isUninitialized()) {
371 if( !event.
getByToken(electronId_, electronId) )
return false;
378 if(select_(*
obj))++n;
380 bool accept=(min_>=0 ? n>=min_:
true) && (max_>=0 ? n<=max_:
true);
381 return (min_<0 && max_<0) ? (n>0):accept;
385 template <
typename Object>
390 if( !event.
getByToken(src_, src) )
return false;
399 if(!btagLabel_.isUninitialized()){
400 if( !event.
getByToken(src_, bjets) )
return false;
401 if( !event.
getByToken(btagLabel_, btagger) )
return false;
402 if( !event.
getByToken(pvs_, pvertex) )
return false;
408 if( !event.
getByToken(jetIDLabel_, jetID) )
return false;
414 if(!jetCorrector_.empty()){
416 if(setup.
find( edm::eventsetup::EventSetupRecordKey::makeKey<JetCorrectionsRecord>() )){
422 <<
"------------------------------------------------------------------------------------- \n"
423 <<
" No JetCorrectionsRecord available from EventSetup: \n"
424 <<
" - Jets will not be corrected. \n"
425 <<
" - If you want to change this add the following lines to your cfg file \n"
427 <<
" ## load jet corrections \n"
428 <<
" process.load(\"JetMETCorrections.Configuration.JetCorrectionServicesAllAlgos_cff\") \n"
429 <<
" process.prefer(\"ak5CaloL2L3\") \n"
431 <<
"------------------------------------------------------------------------------------- \n";
439 unsigned int idx =
obj-src->begin();
440 if( btagLabel_.isUninitialized() ?
true : (*btagger)[bjets->refAt(idx)]>btagWorkingPoint_ ){
441 bool passedJetID=
true;
443 if( jetIDSelect_ && dynamic_cast<const reco::CaloJet*>(src->refAt(idx).get())){
444 passedJetID=(*jetIDSelect_)((*jetID)[src->refAt(idx)]);
453 bool accept=(min_>=0 ? n>=min_:
true) && (max_>=0 ? n<=max_:
true);
454 return (min_<0 && max_<0) ? (n>0):accept;
double massWBoson_
cache of w boson mass estimate
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
tuple met
____________________________________________________________________________||
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
bool select(const edm::Event &event)
apply selection
~Calculate()
default destructor
SelectionStep(const edm::ParameterSet &cfg, edm::ConsumesCollector &&iC)
default constructor
bool getByToken(EDGetToken token, Handle< PROD > &result) const
virtual double correction(const LorentzVector &fJet) const =0
get correction using Jet information only
double massTopQuark_
cache of top quark mass estimate
double tmassTopQuark_
cache of top quark transverse mass estimate
Base class for all types of Jets.
bool selectVertex(const edm::Event &event)
bool accept() const
Has at least one path accepted the event?
edm::EDGetTokenT< edm::ValueMap< float > > electronId_
electronId label as extra selection type
bool exists(std::string const ¶meterName) const
checks if a parameter exists
edm::EDGetTokenT< edm::View< reco::GsfElectron > > gsfEs_
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
edm::EDGetTokenT< edm::View< reco::Vertex > > pvs_
Strings const & triggerNames() const
~SelectionStep()
default destructor
const eventsetup::EventSetupRecord * find(const eventsetup::EventSetupRecordKey &) const
bool isNonnull() const
Checks for non-null.
Helper class for the calculation of a top and a W boson mass estime.
int min_
min/max for object multiplicity
int maxNJets_
max. number of jets to be considered
reco::GsfElectronRef gsfElectronRef() const
return a reference to the corresponding GsfElectron if any
double wMass_
paramater of the w boson mass
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
reco::MuonRef muonRef() const
edm::EDGetTokenT< reco::JetTagCollection > btagLabel_
choice for b-tag as extra selection type
tuple idx
DEBUGGING if hasattr(process,"trackMonIterativeTracking2012"): print "trackMonIterativeTracking2012 D...
static const JetCorrector * getJetCorrector(const std::string &fName, const edm::EventSetup &fSetup)
retrieve corrector from the event setup. troughs exception if something is missing ...
double btagWorkingPoint_
choice of b-tag working point as extra selection type
Templated helper class to allow a selection on a certain object collection.
Particle reconstructed by the particle flow algorithm.
bool failed_
indicate failed associations
edm::EDGetTokenT< edm::View< Object > > src_
input collection
StringCutObjectSelector< reco::JetID > * jetIDSelect_
selection string on the jetID
static std::string const triggerPaths
std::string jetCorrector_
jet corrector as extra selection type
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
StringCutObjectSelector< Object > select_
string cut selector
double tmassWBoson_
cache of W boson transverse mass estimate
double massBTopQuark_
cache of b-tagged top quark mass estimate
edm::EDGetTokenT< reco::JetIDValueMap > jetIDLabel_
jetID as an extra selection type