50 for (
unsigned int j = 0;
j < triggerPaths.size(); ++
j) {
51 if (
accept(event, triggerTable, triggerPaths[
j])) {
87 std::vector<double> VbtagWP,
double btagWP_);
110 void operator2(
const std::vector<pat::Jet>&, std::vector<double>,
double);
154 std::vector<double> VbtagWP,
double btagWP_);
169 void operator2(
const std::vector<reco::Jet>&, std::vector<double>,
double);
252 template <
typename Object>
304 template <
typename Object>
307 : select_(cfg.getParameter<std::
string>(
"select")), jetIDSelect_(0) {
324 if (cfg.
exists(
"jetCorrector")) {
344 template <
typename Object>
349 if (!event.
getByToken(src_, src))
return false;
353 if (!electronId_.isUninitialized()) {
354 if (!event.
getByToken(electronId_, electronId))
return false;
360 obj != src->end(); ++
obj) {
362 if (dynamic_cast<const reco::GsfElectron*>(&*
obj)) {
363 unsigned int idx =
obj - src->begin();
364 if (electronId_.isUninitialized()
366 : ((double)(*electronId)[src->refAt(idx)] >= eidCutValue_)) {
367 if (select_(*
obj)) ++n;
372 if (select_(*
obj)) ++n;
376 (min_ >= 0 ? n >= min_ :
true) && (max_ >= 0 ? n <= max_ :
true);
377 return (min_ < 0 && max_ < 0) ? (n > 0) : accept;
381 template <
typename Object>
386 if (!event.
getByToken(src_, src))
return false;
393 if (!electronId_.isUninitialized()) {
394 if (!event.
getByToken(electronId_, electronId))
return false;
400 obj != src->end(); ++
obj) {
403 if (dynamic_cast<const reco::PFCandidate*>(&*
obj)) {
412 if (electronId_.isUninitialized()) {
414 }
else if (((
double)(*electronId)[
obj->gsfElectronRef()] >=
424 else if (dynamic_cast<const reco::GsfElectron*>(&*
obj)) {
425 unsigned int idx =
obj - src->begin();
426 if (electronId_.isUninitialized()
428 : ((double)(*electronId)[src->refAt(idx)] >= eidCutValue_)) {
429 if (select_(*
obj)) ++n;
435 if (select_(*
obj)) ++n;
439 (min_ >= 0 ? n >= min_ :
true) && (max_ >= 0 ? n <= max_ :
true);
440 return (min_ < 0 && max_ < 0) ? (n > 0) : accept;
443 template <
typename Object>
447 if (!event.
getByToken(src_, src))
return false;
451 if (!electronId_.isUninitialized()) {
452 if (!event.
getByToken(electronId_, electronId))
return false;
458 obj != src->end(); ++
obj) {
460 if (select_(*
obj)) ++n;
463 (min_ >= 0 ? n >= min_ :
true) && (max_ >= 0 ? n <= max_ :
true);
464 return (min_ < 0 && max_ < 0) ? (n > 0) : accept;
468 template <
typename Object>
473 if (!event.
getByToken(src_, src))
return false;
482 if (!btagLabel_.isUninitialized()) {
483 if (!event.
getByToken(src_, bjets))
return false;
484 if (!event.
getByToken(btagLabel_, btagger))
return false;
485 if (!event.
getByToken(pvs_, pvertex))
return false;
491 if (!event.
getByToken(jetIDLabel_, jetID))
return false;
496 if (!jetCorrector_.empty()) {
504 <<
"---------------------------------------------------------------\n"
505 <<
" No JetCorrectionsRecord available from EventSetup:\n"
506 <<
" - Jets will not be corrected.\n"
507 <<
" - If you want to change this add the following lines to your "
510 <<
" ## load jet corrections\n"
511 <<
" process.load(\""
512 "JetMETCorrections.Configuration.JetCorrectionServicesAllAlgos_cff"
514 <<
" process.prefer(\"ak5CaloL2L3\")\n"
515 <<
"---------------------------------------------------------------"
522 obj != src->end(); ++
obj) {
525 unsigned int idx =
obj - src->begin();
526 if (btagLabel_.isUninitialized() ?
true : (*btagger)[bjets->refAt(idx)] >
528 bool passedJetID =
true;
531 dynamic_cast<const reco::CaloJet*>(src->refAt(idx).get())) {
532 passedJetID = (*jetIDSelect_)((*jetID)[src->refAt(idx)]);
537 jet.scaleEnergy(corrector ? corrector->
correction(*
obj) : 1.);
538 if (select_(jet)) ++n;
543 (min_ >= 0 ? n >= min_ :
true) && (max_ >= 0 ? n <= max_ :
true);
544 return (min_ < 0 && max_ < 0) ? (n > 0) : accept;
~Calculate_miniAOD()
default destructor
double massWBoson_
cache of w boson mass estimate
Analysis-level MET class.
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
double massBTopQuark_
cache of b-tagged top quark mass estimate
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
double tmassWBoson(pat::Muon *lep, const pat::MET &met, const pat::Jet &b)
calculate W boson transverse mass estimate
SelectionStep(const edm::ParameterSet &cfg, edm::ConsumesCollector &&iC)
default constructor
bool getByToken(EDGetToken token, Handle< PROD > &result) const
double massTopQuark_
cache of top quark mass estimate
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 failed_
indicate failed associations
double massWBoson(const std::vector< pat::Jet > &jets)
calculate W boson mass estimate
double massWBoson_
cache of w boson mass estimate
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
double tmassWBoson_
cache of W boson transverse mass estimate
int maxNJets_
max. number of jets to be considered
edm::EDGetTokenT< reco::JetTagCollection > btagLabel_
choice for b-tag as extra selection type
void operator()(const std::vector< pat::Jet > &jets)
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
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
double massTopQuark(const std::vector< pat::Jet > &jets)
calculate t-quark mass estimate
double tmassTopQuark(pat::Muon *lep, const pat::MET &met, const pat::Jet &b)
calculate top quark transverse mass estimate
reco::MuonRef muonRef() const
void operator2(const std::vector< pat::Jet > &, std::vector< double >, double)
do the calculation of the t-quark mass with one b-jet
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...
double massBTopQuark(const std::vector< pat::Jet > &jets, std::vector< double > VbtagWP, double btagWP_)
calculate b-tagged t-quark mass estimate
static const JetCorrector * getJetCorrector(const std::string &fName, const edm::EventSetup &fSetup)
retrieve corrector from the event setup. troughs exception if something is missing ...
Analysis-level electron class.
Analysis-level calorimeter jet class.
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
Calculate_miniAOD(int maxNJets, double wMass)
default constructor
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
static EventSetupRecordKey makeKey()
double tmassTopQuark_
cache of top quark transverse mass estimate
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
Analysis-level muon class.
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