45 for (
unsigned int j = 0;
j < triggerPaths.size(); ++
j) {
46 if (
accept(event, triggerTable, triggerPaths[
j])) {
76 double massWBoson(
const std::vector<reco::Jet>&
jets);
78 double massTopQuark(
const std::vector<reco::Jet>&
jets);
82 double massBTopQuark(
const std::vector<reco::Jet>&
jets,
83 std::vector<double> VbtagWP,
double btagWP_);
96 void operator()(
const std::vector<reco::Jet>&
jets);
98 void operator2(
const std::vector<reco::Jet>&, std::vector<double>,
double);
181 template <
typename Object>
233 template <
typename Object>
236 : select_(cfg.getParameter<std::
string>(
"select")), jetIDSelect_(0) {
253 if (cfg.
exists(
"jetCorrector")) {
273 template <
typename Object>
278 if (!event.
getByToken(src_, src))
return false;
282 if (!electronId_.isUninitialized()) {
283 if (!event.
getByToken(electronId_, electronId))
return false;
289 obj != src->end(); ++
obj) {
291 if (dynamic_cast<const reco::GsfElectron*>(&*
obj)) {
292 unsigned int idx =
obj - src->begin();
293 if (electronId_.isUninitialized()
295 : ((double)(*electronId)[src->refAt(idx)] >= eidCutValue_)) {
296 if (select_(*
obj)) ++n;
301 if (select_(*
obj)) ++n;
305 (min_ >= 0 ? n >= min_ :
true) && (max_ >= 0 ? n <= max_ :
true);
306 return (min_ < 0 && max_ < 0) ? (n > 0) : accept;
310 template <
typename Object>
315 if (!event.
getByToken(src_, src))
return false;
322 if (!electronId_.isUninitialized()) {
323 if (!event.
getByToken(electronId_, electronId))
return false;
329 obj != src->end(); ++
obj) {
332 if (dynamic_cast<const reco::PFCandidate*>(&*
obj)) {
341 if (electronId_.isUninitialized()) {
343 }
else if (((
double)(*electronId)[
obj->gsfElectronRef()] >=
353 else if (dynamic_cast<const reco::GsfElectron*>(&*
obj)) {
354 unsigned int idx =
obj - src->begin();
355 if (electronId_.isUninitialized()
357 : ((double)(*electronId)[src->refAt(idx)] >= eidCutValue_)) {
358 if (select_(*
obj)) ++n;
364 if (select_(*
obj)) ++n;
368 (min_ >= 0 ? n >= min_ :
true) && (max_ >= 0 ? n <= max_ :
true);
369 return (min_ < 0 && max_ < 0) ? (n > 0) : accept;
372 template <
typename Object>
376 if (!event.
getByToken(src_, src))
return false;
380 if (!electronId_.isUninitialized()) {
381 if (!event.
getByToken(electronId_, electronId))
return false;
387 obj != src->end(); ++
obj) {
389 if (select_(*
obj)) ++n;
392 (min_ >= 0 ? n >= min_ :
true) && (max_ >= 0 ? n <= max_ :
true);
393 return (min_ < 0 && max_ < 0) ? (n > 0) : accept;
397 template <
typename Object>
402 if (!event.
getByToken(src_, src))
return false;
411 if (!btagLabel_.isUninitialized()) {
412 if (!event.
getByToken(src_, bjets))
return false;
413 if (!event.
getByToken(btagLabel_, btagger))
return false;
414 if (!event.
getByToken(pvs_, pvertex))
return false;
420 if (!event.
getByToken(jetIDLabel_, jetID))
return false;
425 if (!jetCorrector_.empty()) {
433 <<
"---------------------------------------------------------------\n"
434 <<
" No JetCorrectionsRecord available from EventSetup:\n"
435 <<
" - Jets will not be corrected.\n"
436 <<
" - If you want to change this add the following lines to your "
439 <<
" ## load jet corrections\n"
440 <<
" process.load(\""
441 "JetMETCorrections.Configuration.JetCorrectionServicesAllAlgos_cff"
443 <<
" process.prefer(\"ak5CaloL2L3\")\n"
444 <<
"---------------------------------------------------------------"
451 obj != src->end(); ++
obj) {
454 unsigned int idx =
obj - src->begin();
455 if (btagLabel_.isUninitialized() ?
true : (*btagger)[bjets->refAt(idx)] >
457 bool passedJetID =
true;
460 dynamic_cast<const reco::CaloJet*>(src->refAt(idx).get())) {
461 passedJetID = (*jetIDSelect_)((*jetID)[src->refAt(idx)]);
466 jet.scaleEnergy(corrector ? corrector->
correction(*
obj) : 1.);
467 if (select_(jet)) ++n;
472 (min_ >= 0 ? n >= min_ :
true) && (max_ >= 0 ? n <= max_ :
true);
473 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
bool isNonnull() const
Checks for non-null.
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
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
edm::EDGetTokenT< reco::JetTagCollection > btagLabel_
choice for b-tag as extra selection type
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
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
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
static EventSetupRecordKey makeKey()
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