13 mInputCollection (iConfig.getParameter<
edm::
InputTag> (
"src")),
16 mRecoJetPtThreshold (iConfig.getParameter<double> (
"recoJetPtThreshold")),
17 mMatchGenPtThreshold (iConfig.getParameter<double> (
"matchGenPtThreshold")),
18 mRThreshold (iConfig.getParameter<double> (
"RThreshold"))
269 double log10PtMin = 0.50;
270 double log10PtMax = 3.75;
271 int log10PtBins = 26;
274 double etaRange[91] = {-6.0, -5.8, -5.6, -5.4, -5.2, -5.0, -4.8, -4.6, -4.4, -4.2,
275 -4.0, -3.8, -3.6, -3.4, -3.2, -3.0, -2.9, -2.8, -2.7, -2.6,
276 -2.5, -2.4, -2.3, -2.2, -2.1, -2.0, -1.9, -1.8, -1.7, -1.6,
277 -1.5, -1.4, -1.3, -1.2, -1.1, -1.0, -0.9, -0.8, -0.7, -0.6,
278 -0.5, -0.4, -0.3, -0.2, -0.1,
279 0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9,
280 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9,
281 2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 2.9,
282 3.0, 3.2, 3.4, 3.6, 3.8, 4.0, 4.2, 4.4, 4.6, 4.8,
283 5.0, 5.2, 5.4, 5.6, 5.8, 6.0};
286 mNvtx = ibooker.
book1D(
"Nvtx",
"number of vertices", 60, 0, 60);
289 mEta = ibooker.
book1D(
"Eta",
"Eta", 120, -6, 6);
290 mPhi = ibooker.
book1D(
"Phi",
"Phi", 70, -3.5, 3.5);
291 mPt = ibooker.
book1D(
"Pt",
"Pt", 100, 0, 1000);
292 mP = ibooker.
book1D(
"P",
"P", 100, 0, 1000);
294 mMass = ibooker.
book1D(
"Mass",
"Mass", 100, 0, 200);
341 mGenPt = ibooker.
book1D(
"GenPt",
"GenPt", 100, 0, 1000);
344 mPtHat = ibooker.
book1D(
"PtHat",
"PtHat", 100, 0, 1000);
420 mMjj = ibooker.
book1D(
"Mjj",
"Mjj", 100, 0, 2000);
426 mNJets1 = ibooker.
bookProfile(
"NJets1",
"Number of jets above Pt threshold", 100, 0, 200, 100, 0, 50,
"s");
427 mNJets2 = ibooker.
bookProfile(
"NJets2",
"Number of jets above Pt threshold", 100, 0, 4000, 100, 0, 50,
"s");
443 n90 = ibooker.
book1D(
"n90",
"n90", 30,0,30);
444 n60 = ibooker.
book1D(
"n60",
"n60", 30,0,30);
499 int nGoodVertices = 0;
503 for (
unsigned i=0;
i<pvHandle->size();
i++)
505 if ((*pvHandle)[
i].ndof() > 4 &&
506 (fabs((*pvHandle)[
i].
z()) <= 24) &&
552 for (
unsigned ijet=0; ijet<caloJets->size(); ijet++)
553 recoJets.push_back((*caloJets)[ijet]);
563 for (
unsigned ijet=0; ijet<pfJets->size(); ijet++)
564 recoJets.push_back((*pfJets)[ijet]);
567 for (
unsigned ijet=0; ijet<patJets->size(); ijet++)
568 recoJets.push_back((*patJets)[ijet]);
572 int nJet_E_20_40 = 0;
573 int nJet_B_20_40 = 0;
578 int index_first_jet=-1;
581 int index_second_jet=-1;
584 for (
unsigned ijet=0; ijet<recoJets.size(); ijet++) {
585 bool pass_lowjet=
false;
586 bool pass_mediumjet =
false;
593 if((recoJets[ijet].
pt()*(*patJets)[ijet].jecFactor(
"Uncorrected"))>20. && ((recoJets[ijet].
pt()*(*patJets)[ijet].jecFactor(
"Uncorrected")) <
mRecoJetPtThreshold)){
598 if (fabs(recoJets[ijet].
eta()) > 1.5)
605 pass_mediumjet =
true;
613 if (pass_mediumjet) {
615 if( (recoJets[ijet].
pt()*(*patJets)[ijet].jecFactor(
"Uncorrected"))>pt_first){
617 pt_first=recoJets[ijet].pt()*(*patJets)[ijet].jecFactor(
"Uncorrected");
618 index_second_jet=index_first_jet;
619 index_first_jet=ijet;
620 }
else if( (recoJets[ijet].
pt()*(*patJets)[ijet].jecFactor(
"Uncorrected"))>pt_second){
621 index_second_jet=ijet;
622 pt_second=recoJets[ijet].pt()*(*patJets)[ijet].jecFactor(
"Uncorrected");
626 if (fabs(recoJets[ijet].
eta()) > 1.5)
642 if (
mEnergy)
mEnergy ->
Fill(recoJets[ijet].energy()*(*patJets)[ijet].jecFactor(
"Uncorrected"));
643 if (
mP)
mP ->
Fill(recoJets[ijet].
p()*(*patJets)[ijet].jecFactor(
"Uncorrected"));
644 if (
mPt)
mPt ->
Fill(recoJets[ijet].
pt()*(*patJets)[ijet].jecFactor(
"Uncorrected"));
645 if (
mMass)
mMass ->
Fill(recoJets[ijet].
mass()*(*patJets)[ijet].jecFactor(
"Uncorrected"));
655 if (ijet == 0) {nJet++; p4tmp[0] = recoJets[ijet].p4();}
656 if (ijet == 1) {nJet++; p4tmp[1] = recoJets[ijet].p4();}
766 if(index_first_jet>-1){
769 if (
mPtFirst)
mPtFirst ->
Fill(recoJets[index_first_jet].
pt()*(*patJets)[index_first_jet].jecFactor(
"Uncorrected"));
770 nJet++; p4tmp[0] = recoJets[index_first_jet].p4()*(*patJets)[index_first_jet].jecFactor(
"Uncorrected");
772 if(index_second_jet>-1){
773 nJet++; p4tmp[1] = recoJets[index_second_jet].p4()*(*patJets)[index_second_jet].jecFactor(
"Uncorrected");
783 for (
int istep=0; istep<100; ++istep)
788 float ptStep1 = (istep * ( 200. / 100.));
789 float ptStep2 = (istep * (4000. / 100.));
791 for (
unsigned ijet=0; ijet<recoJets.size(); ijet++) {
793 if (recoJets[ijet].
pt() > ptStep1) njets1++;
794 if (recoJets[ijet].
pt() > ptStep2) njets2++;
796 if ((recoJets[ijet].
pt()*(*patJets)[ijet].jecFactor(
"Uncorrected")) > ptStep1) njets1++;
797 if ((recoJets[ijet].
pt()*(*patJets)[ijet].jecFactor(
"Uncorrected")) > ptStep2) njets2++;
809 bool pass_correction_flag =
false;
813 pass_correction_flag=
true;
817 pass_correction_flag =
true;
819 for (
unsigned ijet=0; ijet<recoJets.size(); ijet++) {
820 Jet correctedJet = recoJets[ijet];
821 if(pass_correction_flag){
829 if (correctedJet.
pt() < 20)
continue;
841 if (correctedJet.
pt() >= 40) {
846 double ijetEta = recoJets[ijet].eta();
847 double ijetPt = recoJets[ijet].pt();
849 ijetPt=recoJets[ijet].pt()*(*patJets)[ijet].jecFactor(
"Uncorrected");
851 double ratio = correctedJet.
pt() / ijetPt;
853 ratio =1./(*patJets)[ijet].jecFactor(
"Uncorrected");
894 if (!genJets.
isValid())
return;
896 for (GenJetCollection::const_iterator gjet=genJets->begin(); gjet!=genJets->end(); gjet++) {
902 if (gjet == genJets->begin()) {
910 for (GenJetCollection::const_iterator gjet=genJets->begin(); gjet!=genJets->end(); gjet++) {
911 if (fabs(gjet->eta()) > 6.)
continue;
913 if (recoJets.empty())
continue;
917 double CorrdeltaRBest = 999;
918 double CorrJetPtBest = 0;
919 double CorrJetMassBest = 0;
920 for (
unsigned ijet=0; ijet<recoJets.size(); ++ijet) {
921 Jet correctedJet = recoJets[ijet];
927 double CorrJetPt = correctedJet.
pt();
928 if (CorrJetPt > 10) {
929 double CorrdR =
deltaR(gjet->eta(), gjet->phi(), correctedJet.
eta(), correctedJet.
phi());
930 if (CorrdR < CorrdeltaRBest) {
931 CorrJetMassBest = correctedJet.
mass();
932 CorrdeltaRBest = CorrdR;
933 CorrJetPtBest = CorrJetPt;
938 if (iMatch<0)
continue;
941 fillMatchHists(gjet->eta(), gjet->phi(), gjet->pt(), gjet->mass(), recoJets[iMatch].eta(), recoJets[iMatch].phi(), recoJets[iMatch].pt(),CorrJetMassBest);
943 fillMatchHists(gjet->eta(), gjet->phi(), gjet->pt(), gjet->mass(), (*patJets)[iMatch].eta(), (*patJets)[iMatch].phi(),(*patJets)[iMatch].pt()*(*patJets)[iMatch].jecFactor(
"Uncorrected"),recoJets[iMatch].mass());
945 if (pass_correction_flag) {
947 double response = CorrJetPtBest / gjet->pt();
953 if (gjet->pt() > 20) {
977 const double GenMass,
978 const double RecoEta,
979 const double RecoPhi,
981 const double RecoMass)
989 if (fabs(GenEta) < 1.5)
1013 else if (fabs(GenEta) < 3.0)
1038 else if (fabs(GenEta) < 6.0)
MonitorElement * mMassRecoOverGen_F_1500
T getParameter(std::string const &) const
MonitorElement * mNJetsEta_B_40
MonitorElement * mPtRecoOverGen_E_20_40
MonitorElement * mPtRecoOverGen_B_5000_6500
edm::EDGetTokenT< std::vector< reco::Vertex > > pvToken_
MonitorElement * mPtCorrOverGen_GenEta_40_200
MonitorElement * mPtCorrOverReco_Pt_E
MonitorElement * genPartonPDGID
MonitorElement * hadEnergyInHE
MonitorElement * HFHadronEnergyFraction
MonitorElement * mPtRecoOverGen_B_20_40
MonitorElement * mPtCorrOverGen_GenPt_F
MonitorElement * mPtRecoOverGen_F_40_200
double eta() const final
momentum pseudorapidity
const std::vector< double > & binningValues() const
edm::EDGetTokenT< reco::GenJetCollection > genJetsToken_
MonitorElement * mMassRecoOverGen_F_750_1000
MonitorElement * mPtRecoOverGen_GenEta_3500
MonitorElement * HOEnergy
virtual void scaleEnergy(double fScale)
scale energy of the jet
MonitorElement * mMassRecoOverGen_E_1500_3500
MonitorElement * neutralHadronEnergy
MonitorElement * electronEnergyFraction
MonitorElement * mPtRecoOverGen_B_200_600
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * HFEMEnergyFraction
MonitorElement * mPtRecoOverGen_E_3500_5000
MonitorElement * mPtRecoOverGen_GenPt_F
edm::InputTag mInputGenCollection
MonitorElement * mPtFirst
MonitorElement * mMassRecoOverGen_B_3500_5000
bool hasBinningValues() const
MonitorElement * bookProfile(Args &&...args)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< reco::CaloJetCollection > caloJetsToken_
MonitorElement * photonEnergyFraction
edm::EDGetTokenT< pat::JetCollection > patJetsToken_
MonitorElement * neutralMultiplicity
MonitorElement * mPtRecoOverGen_F_3500
MonitorElement * mDeltaPhi
MonitorElement * mPtRecoOverGen_GenEta_3500_5000
MonitorElement * mMassRecoOverGen_B_1500_3500
MonitorElement * mMassRecoOverGen_E_500_750
edm::InputTag mJetCorrector
MonitorElement * mMassRecoOverGen_F_40_200
MonitorElement * mPtRecoOverGen_GenPhi_E
MonitorElement * mPtRecoOverGen_GenEta_20_40
MonitorElement * hadEnergyInHB
MonitorElement * mPtCorrOverReco_Eta_40_200
MonitorElement * photonMultiplicity
MonitorElement * mCorrJetPhi
MonitorElement * mMassRecoOverGen_B_200_500
MonitorElement * energyFractionHadronic
double pt() const final
transverse momentum
double mMatchGenPtThreshold
double correction(const LorentzVector &fJet) const
get correction using Jet information only
MonitorElement * mMassRecoOverGen_F_20_40
MonitorElement * mPtRecoOverGen_E_40_200
edm::EDGetTokenT< reco::JetCorrector > jetCorrectorToken_
MonitorElement * mPtCorrOverReco_Eta_200_600
MonitorElement * muonEnergyFraction
MonitorElement * mPtRecoOverGen_GenPhi_B
MonitorElement * mEtaFirst
MonitorElement * mPtRecoOverGen_E_5000_6500
MonitorElement * mMassRecoOverGen_B_5000
MonitorElement * mPtCorrOverGen_GenEta_3500_5000
void fillMatchHists(const double GenEta, const double GenPhi, const double GenPt, const double GenMass, const double RecoEta, const double RecoPhi, const double RecoPt, const double RecoMass)
MonitorElement * emEnergyFraction
MonitorElement * mMassRecoOverGen_B_40_200
MonitorElement * mCorrJetEta
MonitorElement * mPtCorrOverReco_Eta_3500
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 * mMassRecoOverGen_F_500_750
MonitorElement * mPtRecoOverGen_GenPt_E
MonitorElement * mNJetsEta_E_40
MonitorElement * mGenEtaFirst
MonitorElement * mNJetsEta_B_20_40
MonitorElement * mPtRecoOverGen_B_3500
MonitorElement * chargedMuEnergy
MonitorElement * mPtRecoOverGen_F_1500_3500
MonitorElement * mDeltaEta
MonitorElement * mNJets_40
MonitorElement * HFHadronEnergy
MonitorElement * mNJetsEta_E_20_40
MonitorElement * hadronFlavor
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
MonitorElement * mMassRecoOverGen_B_500_750
edm::EDGetTokenT< GenEventInfoProduct > evtToken_
MonitorElement * mPtCorrOverGen_GenPt_B
MonitorElement * mPtCorrOverReco_Eta_600_1500
MonitorElement * mPtCorrOverReco_Eta_5000_6500
MonitorElement * book1D(Args &&...args)
MonitorElement * mPtCorrOverReco_Eta_3500_5000
MonitorElement * HOEnergyFraction
MonitorElement * hadEnergyInHO
MonitorElement * mPtRecoOverGen_E_3500
MonitorElement * mMassRecoOverGen_F_1000_1500
MonitorElement * mPtCorrOverGen_GenEta_3500
MonitorElement * mPtCorrOverGen_GenEta_200_600
edm::InputTag mInputCollection
MonitorElement * emEnergyInHF
MonitorElement * mPtRecoOverGen_E_200_600
MonitorElement * mMassRecoOverGen_E_750_1000
JetTester(const edm::ParameterSet &)
MonitorElement * mPtRecoOverGen_GenPhi_F
MonitorElement * chargedHadronEnergyFraction
MonitorElement * mPtRecoOverGen_E_600_1500
MonitorElement * mMassRecoOverGen_E_40_200
MonitorElement * chargedHadronEnergy
MonitorElement * mPtCorrOverReco_Pt_B
MonitorElement * mPtRecoOverGen_GenPt_B
double deltaR(double eta1, double eta2, double phi1, double phi2)
MonitorElement * mMassRecoOverGen_B_20_40
MonitorElement * mPtCorrOverReco_Eta_1500_3500
MonitorElement * mJetArea
MonitorElement * mMassRecoOverGen_B_750_1000
MonitorElement * HFEMMultiplicity
MonitorElement * chargedEmEnergy
MonitorElement * mPtRecoOverGen_GenEta_40_200
MonitorElement * mPtRecoOverGen_E_1500_3500
MonitorElement * mMassRecoOverGen_B_1000_1500
void setCurrentFolder(const std::string &fullpath)
MonitorElement * mMassRecoOverGen_E_200_500
MonitorElement * mPtRecoOverGen_F_600_1500
MonitorElement * mMassRecoOverGen_E_5000
MonitorElement * chargedMuEnergyFraction
MonitorElement * electronEnergy
MonitorElement * emEnergyInEE
MonitorElement * mPtCorrOverGen_GenEta_20_40
double mRecoJetPtThreshold
MonitorElement * mPtCorrOverGen_GenEta_1500_3500
MonitorElement * maxEInHadTowers
MonitorElement * mCorrJetEta_Pt40
MonitorElement * emEnergyInEB
MonitorElement * mMassRecoOverGen_E_1000_1500
edm::EDGetTokenT< reco::PFJetCollection > pfJetsToken_
MonitorElement * mConstituents
MonitorElement * maxEInEmTowers
MonitorElement * mPtRecoOverGen_F_20_40
MonitorElement * mGenPhiFirst
MonitorElement * mCorrJetPt
MonitorElement * mMassRecoOverGen_E_3500_5000
MonitorElement * mPtCorrOverGen_GenPt_E
MonitorElement * mPtRecoOverGen_GenEta_600_1500
static int position[264][3]
MonitorElement * mPtRecoOverGen_GenEta_200_600
MonitorElement * mMassRecoOverGen_F_200_500
MonitorElement * mPtCorrOverReco_Eta_20_40
MonitorElement * chargedEmEnergyFraction
MonitorElement * mPtCorrOverReco_Pt_F
MonitorElement * muonMultiplicity
MonitorElement * neutralHadronEnergyFraction
MonitorElement * neutralEmEnergy
MonitorElement * chargedHadronMultiplicity
MonitorElement * mPtRecoOverGen_B_3500_5000
MonitorElement * mPtRecoOverGen_GenEta_1500_3500
MonitorElement * mPtCorrOverGen_GenEta_600_1500
MonitorElement * chargedMultiplicity
MonitorElement * partonFlavor
void analyze(const edm::Event &, const edm::EventSetup &) override
double phi() const final
momentum azimuthal angle
MonitorElement * HFEMEnergy
MonitorElement * mMassRecoOverGen_E_20_40
MonitorElement * mCorrJetPhi_Pt40
MonitorElement * neutralHadronMultiplicity
MonitorElement * neutralEmEnergyFraction
double mass() const final
mass
MonitorElement * mPtRecoOverGen_GenEta_5000_6500
MonitorElement * mPtCorrOverGen_GenEta_5000_6500