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"))
247 double log10PtMin = 0.50;
248 double log10PtMax = 3.75;
249 int log10PtBins = 26;
251 double etaRange[91] = {-6.0, -5.8, -5.6, -5.4, -5.2, -5.0, -4.8, -4.6, -4.4, -4.2,
252 -4.0, -3.8, -3.6, -3.4, -3.2, -3.0, -2.9, -2.8, -2.7, -2.6,
253 -2.5, -2.4, -2.3, -2.2, -2.1, -2.0, -1.9, -1.8, -1.7, -1.6,
254 -1.5, -1.4, -1.3, -1.2, -1.1, -1.0, -0.9, -0.8, -0.7, -0.6,
255 -0.5, -0.4, -0.3, -0.2, -0.1,
256 0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9,
257 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9,
258 2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 2.9,
259 3.0, 3.2, 3.4, 3.6, 3.8, 4.0, 4.2, 4.4, 4.6, 4.8,
260 5.0, 5.2, 5.4, 5.6, 5.8, 6.0};
263 mNvtx = dbe->
book1D(
"Nvtx",
"number of vertices", 60, 0, 60);
267 mPhi = dbe->
book1D(
"Phi",
"Phi", 70, -3.5, 3.5);
268 mPt = dbe->
book1D(
"Pt",
"Pt", 100, 0, 1000);
269 mP = dbe->
book1D(
"P",
"P", 100, 0, 1000);
352 mMjj = dbe->
book1D(
"Mjj",
"Mjj", 100, 0, 2000);
358 mNJets1 = dbe->
bookProfile(
"NJets1",
"Number of jets above Pt threshold", 100, 0, 200, 100, 0, 50,
"s");
359 mNJets2 = dbe->
bookProfile(
"NJets2",
"Number of jets above Pt threshold", 100, 0, 4000, 100, 0, 50,
"s");
386 n90 = dbe->
book1D(
"n90",
"n90", 30,0,30);
387 n60 = dbe->
book1D(
"n60",
"n60", 30,0,30);
432 LogInfo(
"OutputInfo") <<
" Histograms will NOT be saved";
475 int nGoodVertices = 0;
479 for (
unsigned i=0;
i<pvHandle->size();
i++)
481 if ((*pvHandle)[
i].ndof() > 4 &&
482 (fabs((*pvHandle)[
i].
z()) <= 24) &&
499 cal!=caloTowers->end(); ++cal)
541 for (
unsigned ijet=0; ijet<caloJets->size(); ijet++)
542 recoJets.push_back((*caloJets)[ijet]);
547 for (
unsigned ijet=0; ijet<jptJets->size(); ijet++)
548 recoJets.push_back((*jptJets)[ijet]);
552 for (
unsigned ijet=0; ijet<pfJets->size(); ijet++)
553 recoJets.push_back((*pfJets)[ijet]);
557 int nJet_E_20_40 = 0;
558 int nJet_B_20_40 = 0;
563 for (
unsigned ijet=0; ijet<recoJets.size(); ijet++) {
565 if (fabs(recoJets[ijet].
eta()) > 1.5)
572 if (fabs(recoJets[ijet].
eta()) > 1.5)
594 if (ijet == 0) {nJet++; p4tmp[0] = recoJets[ijet].p4();}
595 if (ijet == 1) {nJet++; p4tmp[1] = recoJets[ijet].p4();}
691 for (
int istep=0; istep<100; ++istep)
696 float ptStep1 = (istep * ( 200. / 100.));
697 float ptStep2 = (istep * (4000. / 100.));
699 for (
unsigned ijet=0; ijet<recoJets.size(); ijet++) {
700 if (recoJets[ijet].
pt() > ptStep1) njets1++;
701 if (recoJets[ijet].
pt() > ptStep2) njets2++;
715 for (
unsigned ijet=0; ijet<recoJets.size(); ijet++) {
716 Jet correctedJet = recoJets[ijet];
724 if (correctedJet.
pt() < 20)
continue;
729 if (correctedJet.
pt() >= 40) {
734 double ijetEta = recoJets[ijet].eta();
735 double ijetPt = recoJets[ijet].pt();
736 double ratio = correctedJet.
pt() / ijetPt;
764 HepMC::GenEvent* myGenEvent =
new HepMC::GenEvent(*(evt->GetEvent()));
765 double ptHat = myGenEvent->event_scale();
774 if (!genJets.
isValid())
return;
776 for (GenJetCollection::const_iterator gjet=genJets->begin(); gjet!=genJets->end(); gjet++) {
780 if (gjet == genJets->begin()) {
791 for (GenJetCollection::const_iterator gjet=genJets->begin(); gjet!=genJets->end(); gjet++) {
792 if (fabs(gjet->eta()) > 6.)
continue;
794 if (recoJets.size() <= 0)
continue;
799 double CorrdeltaRBest = 999;
800 double CorrJetPtBest = 0;
801 for (
unsigned ijet=0; ijet<recoJets.size(); ++ijet) {
802 Jet correctedJet = recoJets[ijet];
804 double CorrJetPt = correctedJet.
pt();
805 if (CorrJetPt > 10) {
806 double CorrdR =
deltaR(gjet->eta(), gjet->phi(), correctedJet.
eta(), correctedJet.
phi());
807 if (CorrdR < CorrdeltaRBest) {
808 CorrdeltaRBest = CorrdR;
809 CorrJetPtBest = CorrJetPt;
814 if (iMatch<0)
continue;
815 fillMatchHists(gjet->eta(), gjet->phi(), gjet->pt(), recoJets[iMatch].eta(), recoJets[iMatch].phi(), recoJets[iMatch].pt());
818 double response = CorrJetPtBest / gjet->pt();
824 if (gjet->pt() > 20) {
845 const double RecoEta,
846 const double RecoPhi,
855 if (fabs(GenEta) < 1.5)
866 else if (fabs(GenEta) < 3.0)
877 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
MonitorElement * HFEMEnergyFraction
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
MonitorElement * mPtRecoOverGen_GenPt_F
edm::InputTag mInputGenCollection
MonitorElement * mPtFirst
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 * elecMultiplicity
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)
edm::EDGetTokenT< reco::JPTJetCollection > jptJetsToken_
MonitorElement * mEmTiming
MonitorElement * mPtCorrOverGen_GenPt_B
MonitorElement * mPtCorrOverReco_Eta_600_1500
MonitorElement * hadEnergyInHO
MonitorElement * mPtCorrOverGen_GenEta_200_600
edm::InputTag mInputCollection
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
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
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
void setCurrentFolder(const std::string &fullpath)
MonitorElement * mCorrJetPhi_Pt40
MonitorElement * neutralHadronMultiplicity
MonitorElement * neutralEmEnergyFraction