41 for(
unsigned int j=0;
j<triggerPaths.size(); ++
j){
42 if(
accept(event, triggerTable, triggerPaths[
j])){
148 template <
typename Object>
197 template <
typename Object>
199 src_( cfg.getParameter<edm::InputTag>(
"src" )),
200 select_( cfg.getParameter<std::
string>(
"select")),
230 template <
typename Object>
235 if( !event.
getByLabel(src_, src) )
return false;
239 if(!electronId_.label().empty()) {
240 if( !event.
getByLabel(electronId_, electronId) )
return false;
247 if(dynamic_cast<const reco::GsfElectron*>(&*
obj)){
248 unsigned int idx =
obj-src->begin();
249 if( electronId_.label().empty() ?
true : ((int)(*electronId)[src->refAt(idx)] & eidPattern_) ){
250 if(select_(*
obj))++n;
255 if(select_(*
obj))++n;
258 bool accept=(min_>=0 ? n>=min_:
true) && (max_>=0 ? n<=max_:
true);
259 return (min_<0 && max_<0) ? (n>0):accept;
261 template <
typename Object>
266 if( !event.
getByLabel(src_, src) )
return false;
270 if(!electronId_.label().empty()) {
271 if( !event.
getByLabel(electronId_, electronId) )
return false;
278 if(select_(*
obj))++n;
280 bool accept=(min_>=0 ? n>=min_:
true) && (max_>=0 ? n<=max_:
true);
281 return (min_<0 && max_<0) ? (n>0):accept;
285 template <
typename Object>
290 if( !event.
getByLabel(src_, src) )
return false;
299 if(!btagLabel_.label().empty()){
300 if( !event.
getByLabel(src_, bjets) )
return false;
301 if( !event.
getByLabel(btagLabel_, btagger) )
return false;
302 if( !event.
getByLabel(pvs_, pvertex) )
return false;
308 if( !event.
getByLabel(jetIDLabel_, jetID) )
return false;
314 if(!jetCorrector_.empty()){
316 if(setup.
find( edm::eventsetup::EventSetupRecordKey::makeKey<JetCorrectionsRecord>() )){
322 <<
"------------------------------------------------------------------------------------- \n"
323 <<
" No JetCorrectionsRecord available from EventSetup: \n"
324 <<
" - Jets will not be corrected. \n"
325 <<
" - If you want to change this add the following lines to your cfg file \n"
327 <<
" ## load jet corrections \n"
328 <<
" process.load(\"JetMETCorrections.Configuration.JetCorrectionServicesAllAlgos_cff\") \n"
329 <<
" process.prefer(\"ak5CaloL2L3\") \n"
331 <<
"------------------------------------------------------------------------------------- \n";
339 unsigned int idx =
obj-src->begin();
340 if( btagLabel_.label().empty() ?
true : (*btagger)[bjets->refAt(idx)]>btagWorkingPoint_ ){
341 bool passedJetID=
true;
343 if( jetIDSelect_ && dynamic_cast<const reco::CaloJet*>(src->refAt(idx).get())){
344 passedJetID=(*jetIDSelect_)((*jetID)[src->refAt(idx)]);
353 bool accept=(min_>=0 ? n>=min_:
true) && (max_>=0 ? n<=max_:
true);
354 return (min_<0 && max_<0) ? (n>0):accept;
double massWBoson_
cache of w boson mass estimate
T getParameter(std::string const &) const
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
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
edm::InputTag src_
input collection
~Calculate()
default destructor
virtual double correction(const LorentzVector &fJet) const =0
get correction using Jet information only
double massTopQuark_
cache of top quark mass estimate
bool selectVertex(const edm::Event &event)
bool accept() const
Has at least one path accepted the event?
double massTopQuark(const std::vector< reco::Jet > &jets)
calculate W boson mass estimate
bool exists(std::string const ¶meterName) const
checks if a parameter exists
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
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
edm::InputTag jetIDLabel_
jetID as an extra selection type
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
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
bool getByLabel(InputTag const &tag, Handle< PROD > &result) 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 ...
edm::InputTag electronId_
electronId label as extra selection type
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)
bool failed_
indicate failed associations
Calculate(int maxNJets, double wMass)
default constructor
StringCutObjectSelector< reco::JetID > * jetIDSelect_
selection string on the jetID
std::string jetCorrector_
jet corrector as extra selection type
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
edm::InputTag btagLabel_
choice for b-tag as extra selection type
StringCutObjectSelector< Object > select_
string cut selector
SelectionStep(const edm::ParameterSet &cfg)
default constructor