13 if( !event.
getByToken(src_, src) )
return false;
22 if(!btagLabel_.isUninitialized()){
23 if( !event.
getByToken(src_, bjets) )
return false;
24 if( !event.
getByToken(btagLabel_, btagger) )
return false;
25 if( !event.
getByToken(pvs_, pvertex) )
return false;
31 if( !event.
getByToken(jetIDLabel_, jetID) )
return false;
37 if(!jetCorrector_.empty()){
39 if(setup.
find( edm::eventsetup::EventSetupRecordKey::makeKey<JetCorrectionsRecord>() )){
45 <<
"------------------------------------------------------------------------------------- \n"
46 <<
" No JetCorrectionsRecord available from EventSetup: \n"
47 <<
" - Jets will not be corrected. \n"
48 <<
" - If you want to change this add the following lines to your cfg file \n"
50 <<
" ## load jet corrections \n"
51 <<
" process.load(\"JetMETCorrections.Configuration.JetCorrectionServicesAllAlgos_cff\") \n"
52 <<
" process.prefer(\"ak5CaloL2L3\") \n"
54 <<
"------------------------------------------------------------------------------------- \n";
62 unsigned int idx =
obj-src->begin();
63 if( btagLabel_.isUninitialized() ?
true : (*btagger)[bjets->refAt(idx)]>btagWorkingPoint_ ){
64 bool passedJetID=
true;
66 if( jetIDSelect_ && dynamic_cast<const reco::CaloJet*>(src->refAt(idx).get())){
67 passedJetID=(*jetIDSelect_)((*jetID)[src->refAt(idx)]);
76 bool accept=(min_>=0 ? n>=min_:
true) && (max_>=0 ? n<=max_:
true);
77 return (min_<0 && max_<0) ? (n>0):accept;
82 failed_(
false), maxNJets_(maxNJets), wMass_(wMass), massWBoson_(-1.), massTopQuark_(-1.),tmassWBoson_(-1),tmassTopQuark_(-1),mlb_(-1)
178 std::vector<int> maxPtIndices;
179 maxPtIndices.push_back(-1);
180 maxPtIndices.push_back(-1);
181 maxPtIndices.push_back(-1);
183 for(
int jdx=0; jdx<
maxNJets_; ++jdx){
if(jdx<=
idx)
continue;
184 for(
int kdx=0; kdx<
maxNJets_; ++kdx){
if(kdx==
idx || kdx==jdx)
continue;
186 if( maxPt<0. || maxPt<sum.pt() ){
188 maxPtIndices.clear();
189 maxPtIndices.push_back(
idx);
190 maxPtIndices.push_back(jdx);
191 maxPtIndices.push_back(kdx);
197 jets[maxPtIndices[1]].p4()+
198 jets[maxPtIndices[2]].p4()).mass();
203 std::vector<int> wMassIndices;
204 wMassIndices.push_back(-1);
205 wMassIndices.push_back(-1);
206 for(
unsigned idx=0;
idx<maxPtIndices.size(); ++
idx){
207 for(
unsigned jdx=0; jdx<maxPtIndices.size(); ++jdx){
208 if( jdx==
idx || maxPtIndices[
idx]>maxPtIndices[jdx] )
continue;
210 if( wDist<0. || wDist>fabs(sum.mass()-
wMass_) ){
211 wDist=fabs(sum.mass()-
wMass_);
212 wMassIndices.clear();
213 wMassIndices.push_back(maxPtIndices[
idx]);
214 wMassIndices.push_back(maxPtIndices[jdx]);
219 jets[wMassIndices[1]].p4()).mass();
bool failed_
indicate failed associations
virtual void scaleEnergy(double fScale)
scale energy of the jet
double masslb(reco::RecoCandidate *mu, const reco::MET &met, const reco::Jet &b)
calculate mlb estimate
double massTopQuark(const std::vector< reco::Jet > &jets)
calculate top quark mass estimate
void operator()(const std::vector< reco::Jet > &jets)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
double wMass_
paramater of the w boson mass
virtual double correction(const LorentzVector &fJet) const =0
get correction using Jet information only
Base class for all types of Jets.
double tmassTopQuark(reco::RecoCandidate *mu, const reco::MET &met, const reco::Jet &b)
calculate top quark transverse mass estimate
double massWBoson(const std::vector< reco::Jet > &jets)
calculate W boson mass estimate
CalculateHLT(int maxNJets, double wMass)
default constructor
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
const eventsetup::EventSetupRecord * find(const eventsetup::EventSetupRecordKey &) const
double massWBoson_
cache of w boson mass estimate
double mlb_
cache of mlb estimate
double massTopQuark_
cache of top quark mass estimate
virtual double py() const final
y coordinate of momentum vector
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
virtual bool select(const edm::Event &event)
apply selection
double tmassWBoson(reco::RecoCandidate *mu, 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 tmassWBoson_
cache of W boson transverse 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 ...
int maxNJets_
max. number of jets to be considered
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
virtual double px() const final
x coordinate of momentum vector
volatile std::atomic< bool > shutdown_flag false
double tmassTopQuark_
cache of top quark transverse mass estimate
math::XYZTLorentzVector LorentzVector
Lorentz vector.
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
virtual const LorentzVector & p4() const final
four-momentum Lorentz vector
Power< A, B >::type pow(const A &a, const B &b)