13 mInputCollection (iConfig.getParameter<edm::
InputTag> (
"src")),
14 mInputGenCollection (iConfig.getParameter<edm::
InputTag> (
"srcGen")),
16 mOutputFile (iConfig.getUntrackedParameter<std::
string>(
"OutputFile",
"")),
17 JetType (iConfig.getUntrackedParameter<std::
string>(
"JetType")),
18 mRecoJetPtThreshold (iConfig.getParameter<double> (
"recoJetPtThreshold")),
19 mMatchGenPtThreshold (iConfig.getParameter<double> (
"matchGenPtThreshold")),
20 mGenEnergyFractionThreshold (iConfig.getParameter<double> (
"genEnergyFractionThreshold")),
21 mRThreshold (iConfig.getParameter<double> (
"RThreshold")),
22 JetCorrectionService (iConfig.getParameter<std::
string> (
"JetCorrections"))
243 double log10PtMin = 0.50;
244 double log10PtMax = 3.75;
245 int log10PtBins = 26;
247 double etaRange[91] = {-6.0, -5.8, -5.6, -5.4, -5.2, -5.0, -4.8, -4.6, -4.4, -4.2,
248 -4.0, -3.8, -3.6, -3.4, -3.2, -3.0, -2.9, -2.8, -2.7, -2.6,
249 -2.5, -2.4, -2.3, -2.2, -2.1, -2.0, -1.9, -1.8, -1.7, -1.6,
250 -1.5, -1.4, -1.3, -1.2, -1.1, -1.0, -0.9, -0.8, -0.7, -0.6,
251 -0.5, -0.4, -0.3, -0.2, -0.1,
252 0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9,
253 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9,
254 2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 2.9,
255 3.0, 3.2, 3.4, 3.6, 3.8, 4.0, 4.2, 4.4, 4.6, 4.8,
256 5.0, 5.2, 5.4, 5.6, 5.8, 6.0};
259 mNvtx = ibooker.
book1D(
"Nvtx",
"number of vertices", 60, 0, 60);
262 mEta = ibooker.
book1D(
"Eta",
"Eta", 120, -6, 6);
263 mPhi = ibooker.
book1D(
"Phi",
"Phi", 70, -3.5, 3.5);
264 mPt = ibooker.
book1D(
"Pt",
"Pt", 100, 0, 1000);
265 mP = ibooker.
book1D(
"P",
"P", 100, 0, 1000);
267 mMass = ibooker.
book1D(
"Mass",
"Mass", 100, 0, 200);
305 mGenPt = ibooker.
book1D(
"GenPt",
"GenPt", 100, 0, 1000);
308 mPtHat = ibooker.
book1D(
"PtHat",
"PtHat", 100, 0, 1000);
347 mMjj = ibooker.
book1D(
"Mjj",
"Mjj", 100, 0, 2000);
353 mNJets1 = ibooker.
bookProfile(
"NJets1",
"Number of jets above Pt threshold", 100, 0, 200, 100, 0, 50,
"s");
354 mNJets2 = ibooker.
bookProfile(
"NJets2",
"Number of jets above Pt threshold", 100, 0, 4000, 100, 0, 50,
"s");
370 n90 = ibooker.
book1D(
"n90",
"n90", 30,0,30);
371 n60 = ibooker.
book1D(
"n60",
"n60", 30,0,30);
408 LogInfo(
"OutputInfo") <<
" Histograms will NOT be saved";
433 int nGoodVertices = 0;
437 for (
unsigned i=0;
i<pvHandle->size();
i++)
439 if ((*pvHandle)[
i].ndof() > 4 &&
440 (fabs((*pvHandle)[
i].
z()) <= 24) &&
457 cal!=caloTowers->end(); ++cal)
500 for (
unsigned ijet=0; ijet<caloJets->size(); ijet++)
501 recoJets.push_back((*caloJets)[ijet]);
511 for (
unsigned ijet=0; ijet<pfJets->size(); ijet++)
512 recoJets.push_back((*pfJets)[ijet]);
516 int nJet_E_20_40 = 0;
517 int nJet_B_20_40 = 0;
522 for (
unsigned ijet=0; ijet<recoJets.size(); ijet++) {
524 if (fabs(recoJets[ijet].
eta()) > 1.5)
531 if (fabs(recoJets[ijet].
eta()) > 1.5)
553 if (ijet == 0) {nJet++; p4tmp[0] = recoJets[ijet].p4();}
554 if (ijet == 1) {nJet++; p4tmp[1] = recoJets[ijet].p4();}
645 for (
int istep=0; istep<100; ++istep)
650 float ptStep1 = (istep * ( 200. / 100.));
651 float ptStep2 = (istep * (4000. / 100.));
653 for (
unsigned ijet=0; ijet<recoJets.size(); ijet++) {
654 if (recoJets[ijet].
pt() > ptStep1) njets1++;
655 if (recoJets[ijet].
pt() > ptStep2) njets2++;
669 for (
unsigned ijet=0; ijet<recoJets.size(); ijet++) {
670 Jet correctedJet = recoJets[ijet];
678 if (correctedJet.
pt() < 20)
continue;
683 if (correctedJet.
pt() >= 40) {
688 double ijetEta = recoJets[ijet].eta();
689 double ijetPt = recoJets[ijet].pt();
690 double ratio = correctedJet.
pt() / ijetPt;
718 HepMC::GenEvent* myGenEvent =
new HepMC::GenEvent(*(evt->GetEvent()));
719 double ptHat = myGenEvent->event_scale();
728 if (!genJets.
isValid())
return;
730 for (GenJetCollection::const_iterator gjet=genJets->begin(); gjet!=genJets->end(); gjet++) {
734 if (gjet == genJets->begin()) {
741 for (GenJetCollection::const_iterator gjet=genJets->begin(); gjet!=genJets->end(); gjet++) {
742 if (fabs(gjet->eta()) > 6.)
continue;
744 if (recoJets.size() <= 0)
continue;
749 double CorrdeltaRBest = 999;
750 double CorrJetPtBest = 0;
751 for (
unsigned ijet=0; ijet<recoJets.size(); ++ijet) {
752 Jet correctedJet = recoJets[ijet];
754 double CorrJetPt = correctedJet.
pt();
755 if (CorrJetPt > 10) {
756 double CorrdR =
deltaR(gjet->eta(), gjet->phi(), correctedJet.
eta(), correctedJet.
phi());
757 if (CorrdR < CorrdeltaRBest) {
758 CorrdeltaRBest = CorrdR;
759 CorrJetPtBest = CorrJetPt;
764 if (iMatch<0)
continue;
765 fillMatchHists(gjet->eta(), gjet->phi(), gjet->pt(), recoJets[iMatch].eta(), recoJets[iMatch].phi(), recoJets[iMatch].pt());
768 double response = CorrJetPtBest / gjet->pt();
774 if (gjet->pt() > 20) {
795 const double RecoEta,
796 const double RecoPhi,
805 if (fabs(GenEta) < 1.5)
816 else if (fabs(GenEta) < 3.0)
827 else if (fabs(GenEta) < 6.0)
MonitorElement * mNJetsEta_B_40
MonitorElement * mPtRecoOverGen_E_20_40
edm::EDGetTokenT< std::vector< reco::Vertex > > pvToken_
MonitorElement * mPtCorrOverGen_GenEta_40_200
MonitorElement * mPtCorrOverReco_Pt_E
MonitorElement * hadEnergyInHE
MonitorElement * HFHadronEnergyFraction
MonitorElement * mPtRecoOverGen_B_20_40
MonitorElement * mPtCorrOverGen_GenPt_F
MonitorElement * mPtRecoOverGen_F_40_200
edm::EDGetTokenT< reco::GenJetCollection > genJetsToken_
MonitorElement * neutralHadronEnergy
MonitorElement * electronEnergyFraction
MonitorElement * mPtRecoOverGen_B_200_600
virtual void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * HFEMEnergyFraction
MonitorElement * mPtRecoOverGen_GenPt_F
edm::InputTag mInputGenCollection
MonitorElement * mPtFirst
MonitorElement * bookProfile(Args &&...args)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< reco::CaloJetCollection > caloJetsToken_
MonitorElement * photonEnergyFraction
MonitorElement * neutralMultiplicity
MonitorElement * mDeltaPhi
virtual double correction(const LorentzVector &fJet) const =0
get correction using Jet information only
Base class for all types of Jets.
MonitorElement * mPtRecoOverGen_GenPhi_E
MonitorElement * mPtRecoOverGen_GenEta_20_40
MonitorElement * hadEnergyInHB
std::vector< CaloTower >::const_iterator const_iterator
MonitorElement * mPtCorrOverReco_Eta_40_200
MonitorElement * photonMultiplicity
MonitorElement * mCorrJetPhi
MonitorElement * energyFractionHadronic
double mMatchGenPtThreshold
MonitorElement * mPtRecoOverGen_E_40_200
virtual void scaleEnergy(double fScale)
scale energy of the jet
MonitorElement * mPtCorrOverReco_Eta_200_600
MonitorElement * muonEnergyFraction
MonitorElement * mPtRecoOverGen_GenPhi_B
MonitorElement * mEtaFirst
static int position[TOTALCHAMBERS][3]
MonitorElement * emEnergyFraction
std::string JetCorrectionService
MonitorElement * mCorrJetEta
MonitorElement * photonEnergy
MonitorElement * towersArea
MonitorElement * hadEnergyInHF
MonitorElement * HFHadronMultiplicity
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
MonitorElement * muonEnergy
MonitorElement * electronMultiplicity
MonitorElement * mPtRecoOverGen_B_600_1500
MonitorElement * mPtRecoOverGen_GenPt_E
MonitorElement * mNJetsEta_E_40
MonitorElement * mGenEtaFirst
MonitorElement * mNJetsEta_B_20_40
virtual float phi() const GCC11_FINAL
momentum azimuthal angle
MonitorElement * chargedMuEnergy
MonitorElement * mPtRecoOverGen_F_1500_3500
MonitorElement * mDeltaEta
MonitorElement * mNJets_40
MonitorElement * HFHadronEnergy
MonitorElement * mNJetsEta_E_20_40
MonitorElement * mDeltaPt
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
MonitorElement * mPtRecoOverGen_B_40_200
MonitorElement * mPtRecoOverGen_B_1500_3500
MonitorElement * mPtRecoOverGen_F_200_600
MonitorElement * mPhiFirst
void fillMatchHists(const double GenEta, const double GenPhi, const double GenPt, const double RecoEta, const double RecoPhi, const double RecoPt)
MonitorElement * mEmTiming
MonitorElement * mPtCorrOverGen_GenPt_B
MonitorElement * mPtCorrOverReco_Eta_600_1500
MonitorElement * book1D(Args &&...args)
MonitorElement * hadEnergyInHO
MonitorElement * mPtCorrOverGen_GenEta_200_600
edm::InputTag mInputCollection
MonitorElement * emEnergyInHF
MonitorElement * mPtRecoOverGen_E_200_600
JetTester(const edm::ParameterSet &)
MonitorElement * mPtRecoOverGen_GenPhi_F
MonitorElement * chargedHadronEnergyFraction
MonitorElement * mPtRecoOverGen_E_600_1500
MonitorElement * chargedHadronEnergy
MonitorElement * mPtCorrOverReco_Pt_B
edm::EDGetTokenT< CaloTowerCollection > caloTowersToken_
virtual float eta() const GCC11_FINAL
momentum pseudorapidity
MonitorElement * mPtRecoOverGen_GenPt_B
double deltaR(double eta1, double eta2, double phi1, double phi2)
MonitorElement * mPtCorrOverReco_Eta_1500_3500
MonitorElement * mJetArea
edm::EDGetTokenT< edm::HepMCProduct > evtToken_
MonitorElement * HFEMMultiplicity
MonitorElement * chargedEmEnergy
MonitorElement * mPtRecoOverGen_GenEta_40_200
MonitorElement * mPtRecoOverGen_E_1500_3500
void setCurrentFolder(const std::string &fullpath)
MonitorElement * mPtRecoOverGen_F_600_1500
MonitorElement * chargedMuEnergyFraction
MonitorElement * electronEnergy
MonitorElement * emEnergyInEE
static const JetCorrector * getJetCorrector(const std::string &fName, const edm::EventSetup &fSetup)
retrieve corrector from the event setup. troughs exception if something is missing ...
MonitorElement * mPtCorrOverGen_GenEta_20_40
double mRecoJetPtThreshold
MonitorElement * mPtCorrOverGen_GenEta_1500_3500
MonitorElement * maxEInHadTowers
MonitorElement * mCorrJetEta_Pt40
MonitorElement * emEnergyInEB
edm::EDGetTokenT< reco::PFJetCollection > pfJetsToken_
MonitorElement * mConstituents
MonitorElement * maxEInEmTowers
MonitorElement * mPtRecoOverGen_F_20_40
MonitorElement * mGenPhiFirst
MonitorElement * mCorrJetPt
MonitorElement * mPtCorrOverGen_GenPt_E
MonitorElement * mPtRecoOverGen_GenEta_600_1500
MonitorElement * mHadTiming
MonitorElement * mPtRecoOverGen_GenEta_200_600
MonitorElement * mPtCorrOverReco_Eta_20_40
MonitorElement * chargedEmEnergyFraction
MonitorElement * mPtCorrOverReco_Pt_F
MonitorElement * muonMultiplicity
MonitorElement * neutralHadronEnergyFraction
MonitorElement * neutralEmEnergy
MonitorElement * chargedHadronMultiplicity
MonitorElement * mPtRecoOverGen_GenEta_1500_3500
virtual float pt() const GCC11_FINAL
transverse momentum
MonitorElement * mPtCorrOverGen_GenEta_600_1500
MonitorElement * chargedMultiplicity
virtual void analyze(const edm::Event &, const edm::EventSetup &)
MonitorElement * HFEMEnergy
MonitorElement * mCorrJetPhi_Pt40
MonitorElement * neutralHadronMultiplicity
MonitorElement * neutralEmEnergyFraction