180 std::unique_ptr<std::vector<pat::Particle> > pPartonsHadP(
new std::vector<pat::Particle>);
181 std::unique_ptr<std::vector<pat::Particle> > pPartonsHadQ(
new std::vector<pat::Particle>);
182 std::unique_ptr<std::vector<pat::Particle> > pPartonsHadB(
new std::vector<pat::Particle>);
183 std::unique_ptr<std::vector<pat::Particle> > pPartonsLepB(
new std::vector<pat::Particle>);
184 std::unique_ptr<std::vector<pat::Particle> > pLeptons(
new std::vector<pat::Particle>);
185 std::unique_ptr<std::vector<pat::Particle> > pNeutrinos(
new std::vector<pat::Particle>);
187 std::unique_ptr<std::vector<std::vector<int> > > pCombi(
new std::vector<std::vector<int> >);
188 std::unique_ptr<std::vector<double> > pChi2(
new std::vector<double>);
189 std::unique_ptr<std::vector<double> > pProb(
new std::vector<double>);
190 std::unique_ptr<std::vector<double> > pMT(
new std::vector<double>);
191 std::unique_ptr<std::vector<double> > pSigMT(
new std::vector<double>);
192 std::unique_ptr<std::vector<int> > pStatus(
new std::vector<int>);
193 std::unique_ptr<int> pJetsConsidered(
new int);
215 bool foundLepton =
false;
216 if (!
leps->empty()) {
218 if (!dynamic_cast<const reco::Muon*>(&((*
leps)[0])))
220 for (
unsigned iLep = 0; iLep < (*leps).size() && !foundLepton; ++iLep) {
229 unsigned int nJetsFound = 0;
230 for (
unsigned iJet = 0; iJet < (*jets).size() && (
int)nJetsFound !=
maxNJets_; ++iJet) {
231 double jet_eta = (*jets)[iJet].eta();
232 if ((*
jets)[iJet].isCaloJet()) {
233 jet_eta = ((
reco::CaloJet*)((*
jets)[iJet]).originalObject())->detectorP4().eta();
240 *pJetsConsidered = nJetsFound;
246 if (!foundLepton ||
mets->empty() || nJetsFound <
nPartons) {
255 std::vector<int> invalidCombi;
257 invalidCombi.push_back(-1);
258 pCombi->push_back(invalidCombi);
260 pChi2->push_back(-1.);
262 pProb->push_back(-1.);
265 pSigMT->push_back(-1.);
267 pStatus->push_back(-1);
281 evt.
put(
std::move(pJetsConsidered),
"NumberOfConsideredJets");
285 std::list<FitResult> FitResultList;
298 size_t nHitFitJet = 0;
301 std::vector<hitfit::Fit_Result> hitFitResult;
309 nHitFit =
HitFit->FitAllPermutation();
316 nHitFitJet =
HitFit->GetUnfittedEvent()[0].njets();
319 hitFitResult =
HitFit->GetFitAllPermutation();
322 for (
size_t fit = 0;
fit != nHitFit; ++
fit) {
333 std::vector<int> hitCombi(4);
334 for (
size_t jet = 0;
jet != nHitFitJet; ++
jet) {
372 if (hitFitResult[
fit].chisq() > 0
382 result.Prob =
exp(-1.0 * (hitFitResult[
fit].chisq()) / 2.0);
384 result.SigMT = hitFitResult[
fit].sigmt();
398 fittedEvent.
met().x(), fittedEvent.
met().y(), fittedEvent.
met().z(), fittedEvent.
met().t()),
400 result.JetCombi = hitCombi;
402 FitResultList.push_back(
result);
407 FitResultList.sort();
414 if (((
unsigned)FitResultList.size()) < 1) {
422 std::vector<int> invalidCombi;
424 invalidCombi.push_back(-1);
425 pCombi->push_back(invalidCombi);
427 pChi2->push_back(-1.);
429 pProb->push_back(-1.);
432 pSigMT->push_back(-1.);
434 pStatus->push_back(-1);
436 unsigned int iComb = 0;
437 for (
typename std::list<FitResult>::const_iterator
result = FitResultList.begin();
result != FitResultList.end();
443 pPartonsHadP->push_back(
result->HadP);
444 pPartonsHadQ->push_back(
result->HadQ);
445 pPartonsHadB->push_back(
result->HadB);
446 pPartonsLepB->push_back(
result->LepB);
448 pLeptons->push_back(
result->LepL);
450 pNeutrinos->push_back(
result->LepN);
452 pCombi->push_back(
result->JetCombi);
454 pChi2->push_back(
result->Chi2);
456 pProb->push_back(
result->Prob);
458 pMT->push_back(
result->MT);
459 pSigMT->push_back(
result->SigMT);
461 pStatus->push_back(
result->Status);
476 evt.
put(
std::move(pJetsConsidered),
"NumberOfConsideredJets");
int maxNComb_
maximal number of combinations to be written to the event
double maxEtaEle_
maximum eta value for electrons, needed to limited range in which resolutions are provided ...
double maxBTagValueNonBJet_
max value of bTag for a non-b-jet
static const unsigned int nPartons
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Jets made from CaloTowers.
Represent a lepton in an instance of Lepjets_Event class. This class hold the following information: ...
edm::EDGetTokenT< std::vector< pat::MET > > metsToken_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Lepjets_Event_Jet & jet(std::vector< Lepjets_Event_Jet >::size_type i)
Return a reference to jet at index position i.
double maxEtaJet_
maximum eta value for jets, needed to limited range in which resolutions are provided ...
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
int & type()
Return a reference to the type code.
bool useBTag_
switch to tell whether to use b-tagging or not
Represent a simple event consisting of lepton(s) and jet(s). An instance of this class holds a list o...
std::unique_ptr< PatHitFit > HitFit
Abs< T >::type abs(const T &t)
A class to represent a jet in an instance of Lepjets_Event class. The class is derived from the Lepje...
int maxNJets_
maximal number of jets (-1 possible to indicate 'all')
edm::EDGetTokenT< std::vector< pat::Jet > > jetsToken_
Fourvec & met()
Return a reference to the missing transverse energy.
Lepjets_Event_Lep & lep(std::vector< Lepjets_Event_Lep >::size_type i)
Return a reference to lepton at index position i.
edm::EDGetTokenT< LeptonCollection > lepsToken_
XYZPointD XYZPoint
point in space with cartesian internal representation
Analysis-level particle class.
Fourvec & p()
Return a reference to the four-momentum.
double maxEtaMu_
maximum eta value for muons, needed to limited range in which resolutions are provided ...
double minBTagValueBJet_
min value of bTag for a b-jet
std::string bTagAlgo_
input tag for b-tagging algorithm