44 for (
unsigned int j = 0;
j < triggerPaths.size(); ++
j) {
45 if (
accept(event, triggerTable, triggerPaths[
j])) {
82 std::vector<double> VbtagWP,
double btagWP_);
97 void operator2(
const std::vector<reco::Jet>&, std::vector<double>,
double);
180 template <
typename Object>
232 template <
typename Object>
235 : select_(cfg.getParameter<std::
string>(
"select")), jetIDSelect_(0) {
252 if (cfg.
exists(
"jetCorrector")) {
272 template <
typename Object>
277 if (!event.
getByToken(src_, src))
return false;
281 if (!electronId_.isUninitialized()) {
282 if (!event.
getByToken(electronId_, electronId))
return false;
288 obj != src->end(); ++
obj) {
290 if (dynamic_cast<const reco::GsfElectron*>(&*
obj)) {
291 unsigned int idx =
obj - src->begin();
292 if (electronId_.isUninitialized()
294 : ((double)(*electronId)[src->refAt(idx)] >= eidCutValue_)) {
295 if (select_(*
obj)) ++n;
300 if (select_(*
obj)) ++n;
304 (min_ >= 0 ? n >= min_ :
true) && (max_ >= 0 ? n <= max_ :
true);
305 return (min_ < 0 && max_ < 0) ? (n > 0) : accept;
309 template <
typename Object>
314 if (!event.
getByToken(src_, src))
return false;
321 if (!electronId_.isUninitialized()) {
322 if (!event.
getByToken(electronId_, electronId))
return false;
328 obj != src->end(); ++
obj) {
331 if (dynamic_cast<const reco::PFCandidate*>(&*
obj)) {
340 if (electronId_.isUninitialized()) {
342 }
else if (((
double)(*electronId)[
obj->gsfElectronRef()] >=
352 else if (dynamic_cast<const reco::GsfElectron*>(&*
obj)) {
353 unsigned int idx =
obj - src->begin();
354 if (electronId_.isUninitialized()
356 : ((double)(*electronId)[src->refAt(idx)] >= eidCutValue_)) {
357 if (select_(*
obj)) ++n;
363 if (select_(*
obj)) ++n;
367 (min_ >= 0 ? n >= min_ :
true) && (max_ >= 0 ? n <= max_ :
true);
368 return (min_ < 0 && max_ < 0) ? (n > 0) : accept;
371 template <
typename Object>
375 if (!event.
getByToken(src_, src))
return false;
379 if (!electronId_.isUninitialized()) {
380 if (!event.
getByToken(electronId_, electronId))
return false;
386 obj != src->end(); ++
obj) {
388 if (select_(*
obj)) ++n;
391 (min_ >= 0 ? n >= min_ :
true) && (max_ >= 0 ? n <= max_ :
true);
392 return (min_ < 0 && max_ < 0) ? (n > 0) : accept;
396 template <
typename Object>
401 if (!event.
getByToken(src_, src))
return false;
410 if (!btagLabel_.isUninitialized()) {
411 if (!event.
getByToken(src_, bjets))
return false;
412 if (!event.
getByToken(btagLabel_, btagger))
return false;
413 if (!event.
getByToken(pvs_, pvertex))
return false;
419 if (!event.
getByToken(jetIDLabel_, jetID))
return false;
424 if (!jetCorrector_.empty()) {
432 <<
"---------------------------------------------------------------\n"
433 <<
" No JetCorrectionsRecord available from EventSetup:\n"
434 <<
" - Jets will not be corrected.\n"
435 <<
" - If you want to change this add the following lines to your "
438 <<
" ## load jet corrections\n"
439 <<
" process.load(\""
440 "JetMETCorrections.Configuration.JetCorrectionServicesAllAlgos_cff"
442 <<
" process.prefer(\"ak5CaloL2L3\")\n"
443 <<
"---------------------------------------------------------------"
450 obj != src->end(); ++
obj) {
453 unsigned int idx =
obj - src->begin();
454 if (btagLabel_.isUninitialized() ?
true : (*btagger)[bjets->refAt(idx)] >
456 bool passedJetID =
true;
459 dynamic_cast<const reco::CaloJet*>(src->refAt(idx).get())) {
460 passedJetID = (*jetIDSelect_)((*jetID)[src->refAt(idx)]);
465 jet.scaleEnergy(corrector ? corrector->
correction(*
obj) : 1.);
466 if (select_(jet)) ++n;
471 (min_ >= 0 ? n >= min_ :
true) && (max_ >= 0 ? n <= max_ :
true);
472 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.
double massBTopQuark(const std::vector< reco::Jet > &jets, std::vector< double > VbtagWP, double btagWP_)
calculate b-tagged t-quark mass estimate
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
double massTopQuark(const std::vector< reco::Jet > &jets)
calculate t-quark mass estimate
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
double massWBoson(const std::vector< reco::Jet > &jets)
calculate W boson mass estimate
~SelectionStep()
default destructor
const eventsetup::EventSetupRecord * find(const eventsetup::EventSetupRecordKey &) const
void operator2(const std::vector< reco::Jet > &, std::vector< double >, double)
do the calculation of the t-quark mass with one b-jet
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
double tmassTopQuark(reco::RecoCandidate *lep, const reco::MET &met, const reco::Jet &b)
calculate top quark transverse mass estimate
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
double tmassWBoson(reco::RecoCandidate *lep, const reco::MET &met, const reco::Jet &b)
calculate W boson transverse mass estimate
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.
void operator()(const std::vector< reco::Jet > &jets)
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
Calculate(int maxNJets, double wMass)
default constructor
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