44 bool is_B (
const reco::Jet& fJet) {
return fabs (fJet.
eta()) < 1.3;}
45 bool is_E (
const reco::Jet& fJet) {
return fabs (fJet.
eta()) >= 1.3 && fabs (fJet.
eta()) < 3.;}
46 bool is_F (
const reco::Jet& fJet) {
return fabs (fJet.
eta()) >= 3.;}
50 : mInputCollection (iConfig.getParameter<edm::
InputTag>(
"src" )),
51 mInputGenCollection (iConfig.getParameter<edm::
InputTag>(
"srcGen" )),
52 mOutputFile (iConfig.getUntrackedParameter<std::string>(
"outputFile",
"")),
53 mMatchGenPtThreshold (iConfig.getParameter<double>(
"genPtThreshold")),
54 mGenEnergyFractionThreshold (iConfig.getParameter<double>(
"genEnergyFractionThreshold")),
55 mReverseEnergyFractionThreshold (iConfig.getParameter<double>(
"reverseEnergyFractionThreshold")),
56 mRThreshold (iConfig.getParameter<double>(
"RThreshold")),
57 JetCorrectionService (iConfig.getParameter<std::string> (
"JetCorrectionService" )),
58 mTurnOnEverything (iConfig.getUntrackedParameter<std::string>(
"TurnOnEverything",
""))
150 mPhi = dbe->
book1D(
"Phi",
"Phi", 70, -3.5, 3.5);
153 mE = dbe->
book1D(
"E",
"E", 100, 0, 500);
156 mP = dbe->
book1D(
"P",
"P", 100, 0, 500);
159 mPt = dbe->
book1D(
"Pt",
"Pt", 100, 0, 150);
174 mMjj = dbe->
book1D(
"Mjj",
"Mjj", 100, 0, 2000);
329 double log10PtMin = 0.5;
330 double log10PtMax = 3.75;
331 int log10PtBins = 26;
335 double etaRange[91] = {-6.0,-5.8,-5.6,-5.4,-5.2,-5.0,-4.8,-4.6,-4.4,-4.2,-4.0,-3.8,-3.6,-3.4,-3.2,-3.0,-2.9,-2.8,-2.7,-2.6,-2.5,-2.4,-2.3,-2.2,-2.1,-2.0,-1.9,-1.8,-1.7,-1.6,-1.5,-1.4,-1.3,-1.2,-1.1,-1.0,-0.9,-0.8,-0.7,-0.6,-0.5,-0.4,-0.3,-0.2,-0.1,0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,1.9,2.0,2.1,2.2,2.3,2.4,2.5,2.6,2.7,2.8,2.9,3.0,3.2,3.4,3.6,3.8,4.0,4.2,4.4,4.6,4.8,5.0,5.2,5.4,5.6,5.8,6.0};
402 log10PtBins, log10PtMin, log10PtMax, 0, 2,
" ");
404 log10PtBins, log10PtMin, log10PtMax, 0, 2,
" ");
406 log10PtBins, log10PtMin, log10PtMax, 0, 2,
" ");
408 70, -3.5, 3.5, 0, 2,
" ");
410 70, -3.5, 3.5, 0, 2,
" ");
412 70, -3.5, 3.5, 0, 2,
" ");
424 90,etaRange, 0., 2.,
" ");
426 90,etaRange, 0., 2.,
" ");
428 90,etaRange, 0., 2.,
" ");
430 90,etaRange, 0., 2.,
" ");
471 log10PtBins, log10PtMin, log10PtMax, 0, 2,
" ");
473 log10PtBins, log10PtMin, log10PtMax, 0, 2,
" ");
475 log10PtBins, log10PtMin, log10PtMax, 0, 2,
" ");
477 log10PtBins, log10PtMin, log10PtMax, 0, 2,
" ");
479 log10PtBins, log10PtMin, log10PtMax, 0, 2,
" ");
481 log10PtBins, log10PtMin, log10PtMax, 0, 2,
" ");
483 log10PtBins, log10PtMin, log10PtMax, 0, 2,
" ");
486 log10PtBins, log10PtMin, log10PtMax, 100, 0.,5.,
" ");
488 log10PtBins, log10PtMin, log10PtMax, 0, 5,
" ");
490 log10PtBins, log10PtMin, log10PtMax, 0, 5,
" ");
492 log10PtBins, log10PtMin, log10PtMax, 0, 5,
" ");
494 90,etaRange, 0., 5.,
" ");
496 90,etaRange, 0., 5.,
" ");
499 90,etaRange, 0., 5.,
" ");
501 log10PtBins, log10PtMin, log10PtMax, 100, 0.8,1.2,
" ");
503 log10PtBins, log10PtMin, log10PtMax, 0.8, 1.2,
" ");
505 log10PtBins, log10PtMin, log10PtMax, 0.8, 1.2,
" ");
507 log10PtBins, log10PtMin, log10PtMax, 0.8, 1.2,
" ");
509 90,etaRange, 0.8, 1.2,
" ");
511 90,etaRange, 0.8, 1.2,
" ");
513 90,etaRange, 0.8, 1.2,
" ");
515 90,etaRange, 0.8, 1.2,
" ");
517 90,etaRange, 0.8, 1.2,
" ");
527 LogInfo(
"OutputInfo") <<
" PFJet histograms will NOT be saved";
548 double countsfornumberofevents = 1;
554 mEvent.
getByLabel(
"offlinePrimaryVertices", pvHandle );
559 for (
unsigned i = 0;
i < pvHandle->size();
i++) {
560 if ( (*pvHandle)[
i].ndof() > 4 &&
561 ( fabs((*pvHandle)[
i].
z()) <= 24. ) &&
563 goodVertices.push_back((*pvHandle)[
i]);
576 HepMC::GenEvent * myGenEvent =
new HepMC::GenEvent(*(evt->GetEvent()));
578 double pthat = myGenEvent->event_scale();
625 mEvent.
getByLabel(
"towerMaker", caloTowers );
648 std::vector<edm::Handle<HBHERecHitCollection> > colls;
650 std::vector<edm::Handle<HBHERecHitCollection> >::iterator
i;
651 for (i=colls.begin(); i!=colls.end(); i++) {
671 std::vector<edm::Handle<HFRecHitCollection> > colls;
673 std::vector<edm::Handle<HFRecHitCollection> >::iterator
i;
674 for (i=colls.begin(); i!=colls.end(); i++) {
690 std::vector<edm::Handle<HORecHitCollection> > colls;
692 std::vector<edm::Handle<HORecHitCollection> >::iterator
i;
693 for (i=colls.begin(); i!=colls.end(); i++) {
707 std::vector<edm::Handle<EBRecHitCollection> > colls;
709 std::vector<edm::Handle<EBRecHitCollection> >::iterator
i;
710 for (i=colls.begin(); i!=colls.end(); i++) {
725 std::vector<edm::Handle<EERecHitCollection> > colls;
727 std::vector<edm::Handle<EERecHitCollection> >::iterator
i;
728 for (i=colls.begin(); i!=colls.end(); i++) {
749 PFJetCollection::const_iterator
jet = pfJets->begin ();
755 for (; jet != pfJets->end (); jet++, jetIndex++) {
757 if (jet->pt() > 10.) {
758 if (fabs(jet->eta()) > 1.5)
763 if (jet->pt() > 30.) nJetF_30++;
764 if (jet->pt() > 10.) {
787 if (jet == pfJets->begin ()) {
796 p4tmp[0] = jet->p4();
800 p4tmp[1] = jet->p4();
878 for (
int istep = 0; istep < 100; ++istep) {
880 float ptStep = (istep * (200./100.));
882 for ( PFJetCollection::const_iterator cal = pfJets->begin(); cal != pfJets->end(); ++ cal ) {
883 if ( cal->pt() > ptStep ) njet++;
888 for (
int istep = 0; istep < 100; ++istep) {
890 float ptStep = (istep * (4000./100.));
891 for ( PFJetCollection::const_iterator cal = pfJets->begin(); cal != pfJets->end(); ++ cal ) {
892 if ( cal->pt() > ptStep ) njet++;
900 for (PFJetCollection::const_iterator jet = pfJets->begin(); jet !=pfJets ->end(); jet++)
907 if(correctedJet.
pt()>30){
914 if (fabs(jet->eta())<1.5) {
918 if (fabs(jet->eta())>1.5 && fabs(jet->eta())<3.0) {
921 if (fabs(jet->eta())>3.0 && fabs(jet->eta())<6.0) {
924 if (jet->pt()>30.0 && jet->pt()<200.0) {
927 if (jet->pt()>200.0 && jet->pt()<600.0) {
930 if (jet->pt()>600.0 && jet->pt()<1500.0) {
933 if (jet->pt()>1500.0 && jet->pt()<3500.0) {
946 if (!genJets.
isValid())
return;
947 GenJetCollection::const_iterator gjet = genJets->begin ();
949 for (; gjet != genJets->end (); gjet++, gjetIndex++) {
954 if (gjet == genJets->begin ()) {
967 std::vector <std::vector <const reco::GenParticle*> > genJetConstituents (genJets->size());
968 std::vector <std::vector <const reco::GenParticle*> > pfJetConstituents (pfJets->size());
983 for (
unsigned iGenJet = 0; iGenJet < genJets->size(); ++iGenJet) {
985 const GenJet& genJet = (*genJets) [iGenJet];
986 double genJetPt = genJet.
pt();
990 if (fabs(genJet.
eta()) > 6.)
continue;
995 if (pfJets->size() <= 0)
continue;
997 unsigned iPFJetBest = 0;
998 double deltaRBest = 999.;
999 for (
unsigned iPFJet = 0; iPFJet < pfJets->size(); ++iPFJet) {
1000 double dR =
deltaR (genJet.
eta(), genJet.
phi(), (*pfJets) [iPFJet].eta(), (*pfJets) [iPFJet].phi());
1009 if (dR < deltaRBest) {
1010 iPFJetBest = iPFJet;
1022 double CorrdeltaRBest = 999.;
1023 double CorrJetPtBest = 0;
1024 for (PFJetCollection::const_iterator jet = pfJets->begin(); jet !=pfJets ->end(); jet++) {
1029 double CorrJetPt = correctedJet.
pt();
1031 double CorrdR =
deltaR (genJet.
eta(), genJet.
phi(), correctedJet.
eta(), correctedJet.
phi());
1032 if (CorrdR < CorrdeltaRBest) {
1033 CorrdeltaRBest = CorrdR;
1034 CorrJetPtBest = CorrJetPt;
1041 if (fabs(genJet.
eta())<1.5) {
1045 if (fabs(genJet.
eta())>1.5 && fabs(genJet.
eta())<3.0) {
1048 if (fabs(genJet.
eta())>3.0 && fabs(genJet.
eta())<6.0) {
1051 if (genJet.
pt()>30.0 && genJet.
pt()<200.0) {
1054 if (genJet.
pt()>200.0 && genJet.
pt()<600.0) {
1057 if (genJet.
pt()>600.0 && genJet.
pt()<1500.0) {
1060 if (genJet.
pt()>1500.0 && genJet.
pt()<3500.0) {
1063 if (genJet.
pt()>30.0) {
1110 double logPtGen = log10 (fGenJet.
pt());
1111 double PtGen = fGenJet.
pt();
1112 double PtPF = fPFJet.
pt();
1116 double PtThreshold = 10.;
1127 if (fGenJet.
pt()>PtThreshold) {
1133 if (fPFJet.
pt() > PtThreshold) {
1139 if (fabs(fGenJet.
eta())<1.5) {
1145 if (PtGen>30.0 && PtGen<200.0) {
1148 if (PtGen>200.0 && PtGen<600.0) {
1151 if (PtGen>600.0 && PtGen<1500.0) {
1154 if (PtGen>1500.0 && PtGen<3500.0) {
1160 if (fabs(fGenJet.
eta())>1.5 && fabs(fGenJet.
eta())<3.0) {
1166 if (PtGen>30.0 && PtGen<200.0) {
1169 if (PtGen>200.0 && PtGen<600.0) {
1172 if (PtGen>600.0 && PtGen<1500.0) {
1175 if (PtGen>1500.0 && PtGen<3500.0) {
1181 if (fabs(fGenJet.
eta())>3.0 && fabs(fGenJet.
eta())<6.0) {
1187 if (PtGen>30.0 && PtGen<200.0) {
1190 if (PtGen>200.0 && PtGen<600.0) {
1193 if (PtGen>600.0 && PtGen<1500.0) {
1196 if (PtGen>1500.0 && PtGen<3500.0) {
1202 if (fGenJet.
pt()>30.0 && fGenJet.
pt()<200.0) {
1208 if (fGenJet.
pt()>200.0 && fGenJet.
pt()<600.0) {
1214 if (fGenJet.
pt()>600.0 && fGenJet.
pt()<1500.0) {
1220 if (fGenJet.
pt()>1500.0 && fGenJet.
pt()<3500.0) {
1225 if (fabs(fGenJet.
eta())<1.3) {
1226 if(fGenJet.
pt()>60.0 && fGenJet.
pt()<120.0) {
1229 if(fGenJet.
pt()>200.0 && fGenJet.
pt()<300.0) {
1232 if(fGenJet.
pt()>600.0 && fGenJet.
pt()<900.0) {
1236 if(fGenJet.
pt()>60.0 && fGenJet.
pt()<120.0) {
1239 if(fGenJet.
pt()>200.0 && fGenJet.
pt()<300.0) {
1242 if(fGenJet.
pt()>600.0 && fGenJet.
pt()<900.0) {
1246 if(fGenJet.
pt()>60.0 && fGenJet.
pt()<120.0) {
1249 if(fGenJet.
pt()>200.0 && fGenJet.
pt()<300.0) {
1252 if(fGenJet.
pt()>600.0 && fGenJet.
pt()<900.0) {
1256 if(fGenJet.
pt()>60.0 && fGenJet.
pt()<120.0) {
1259 if(fGenJet.
pt()>200.0 && fGenJet.
pt()<300.0) {
1262 if(fGenJet.
pt()>600.0 && fGenJet.
pt()<900.0) {
1266 if(fGenJet.
pt()>60.0 && fGenJet.
pt()<120.0) {
1269 if(fGenJet.
pt()>200.0 && fGenJet.
pt()<300.0) {
1272 if(fGenJet.
pt()>600.0 && fGenJet.
pt()<900.0) {
1276 if(fGenJet.
pt()>60.0 && fGenJet.
pt()<120.0) {
1279 if(fGenJet.
pt()>200.0 && fGenJet.
pt()<300.0) {
1282 if(fGenJet.
pt()>600.0 && fGenJet.
pt()<900.0) {
1293 if (fabs(fGenJet.
eta())<1.3) {
MonitorElement * mPhiFineBin
MonitorElement * mChargedHadronEnergy_80
void getManyByType(std::vector< Handle< PROD > > &results) const
MonitorElement * mDeltaEta
MonitorElement * mpTScale1DB_30_200
MonitorElement * mpTScale1DF_30_200
MonitorElement * mpTResponseE_d
MonitorElement * mpTScale1DE_1500_3500
MonitorElement * mpTScaleB_d
MonitorElement * mpTScale_b_nvtx_20_30
MonitorElement * mChargedEmEnergy_80
MonitorElement * mpTScale_600_1500_d
MonitorElement * mpTScale_c_nvtx_15_20
MonitorElement * mpTScale_30_200_d
MonitorElement * mpTResponse_600_1500_d
MonitorElement * nvtx_0_60
MonitorElement * nvtx_0_30
MonitorElement * mpTResponse_30_200_d
edm::InputTag mInputCollection
MonitorElement * mpTScale_nvtx_20_30
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
MonitorElement * mpTScale_200_600_d
MonitorElement * mNeutralEmEnergy_80
MonitorElement * mpTScale1DF_600_1500
MonitorElement * mpTScale1DE_200_600
virtual double correction(const LorentzVector &fJet) const =0
get correction using Jet information only
MonitorElement * mChargedEmEnergyFraction_E
Base class for all types of Jets.
MonitorElement * mpTResponse_1500_3500_d
MonitorElement * mChargedEmEnergy_3000
PFJetTester(const edm::ParameterSet &)
MonitorElement * mpTScale_a_nvtx_15_20
MonitorElement * mNJetsEtaC
MonitorElement * numberofevents
MonitorElement * mpTScale_a
MonitorElement * mpTScaleE_d
std::vector< CaloTower >::const_iterator const_iterator
MonitorElement * mEmEnergyInHF
MonitorElement * mConstituents
MonitorElement * mNeutralHadronEnergy_80
MonitorElement * mCorrJetPt_80
virtual void scaleEnergy(double fScale)
scale energy of the jet
MonitorElement * mpTScale_b_nvtx_15_20
MonitorElement * mPthat_3000
MonitorElement * mpTRatio_200_600_d
MonitorElement * mMjj_3000
MonitorElement * mpTRatio_600_1500_d
MonitorElement * mNeutralHadronEnergyFraction_F
MonitorElement * mpTScale_a_nvtx_0_5
MonitorElement * mPtFirst_80
Jets made from PFObjects.
MonitorElement * mpTScale_pT
virtual double eta() const
momentum pseudorapidity
static int position[TOTALCHAMBERS][3]
MonitorElement * mpTScale1DF_1500_3500
MonitorElement * mpTScale1DB_200_600
MonitorElement * mpTRatioE_d
MonitorElement * mpTResponse_nvtx_5_10
MonitorElement * mpTResponse_nvtx_20_30
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
MonitorElement * mNeutralEmEnergyFraction_E
MonitorElement * mpTScale_b_nvtx_5_10
MonitorElement * mpTRatioF_d
MonitorElement * mpTScale_nvtx_30_inf
MonitorElement * mpTResponse_nvtx_30_inf
MonitorElement * mpTScale_nvtx_15_20
virtual double energy() const
energy
MonitorElement * mpTResponse_nvtx_15_20
MonitorElement * mpTScale1DB_1500_3500
MonitorElement * mpTScalePhiB_d
MonitorElement * mpTScale_c_nvtx_30_inf
MonitorElement * mPtFirst
MonitorElement * mpTScale_b_nvtx_30_inf
MonitorElement * mNJetsEtaF_30
MonitorElement * mNeutralHadronEnergyFraction_E
MonitorElement * mPtFirst_3000
MonitorElement * mMass_80
MonitorElement * mpTScale_a_nvtx_10_15
MonitorElement * mCorrJetPhi
MonitorElement * mpTScale_b_nvtx_0_5
MonitorElement * mEScale_pt10
MonitorElement * mEmTiming
MonitorElement * mEtaFirst
MonitorElement * mpTScale1DE_600_1500
void fillMatchHists(const reco::GenJet &fGenJet, const reco::PFJet &fPFJet, std::vector< reco::Vertex > goodVertices)
MonitorElement * mpTScale_b
MonitorElement * mNeutralEmEnergy_3000
std::string JetCorrectionService
Jets made from MC generator particles.
MonitorElement * mpTScaleF_d
MonitorElement * mpTRatioB_d
MonitorElement * mpTScale_c_nvtx_10_15
MonitorElement * mChargedEmEnergyFraction_B
MonitorElement * mpTScale_c
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 * mpTScale1DE_30_200
tuple goodVertices
The Good vertices collection needed by the tracking failure filter ________||.
virtual void analyze(const edm::Event &, const edm::EventSetup &)
double mMatchGenPtThreshold
MonitorElement * mConstituents_80
MonitorElement * mHadEnergyInHF_80
MonitorElement * mpTScale_b_nvtx_10_15
MonitorElement * mNeutralEmEnergyFraction_B
MonitorElement * mHadEnergyInHF
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
double deltaR(double eta1, double eta2, double phi1, double phi2)
MonitorElement * mGenPt_80
MonitorElement * mpTScale_a_nvtx_5_10
MonitorElement * mCorrJetEta
MonitorElement * mChargedHadronEnergyFraction_F
MonitorElement * mGenEtaFirst
MonitorElement * mpTRatio_30_200_d
MonitorElement * mChargedHadronEnergyFraction_E
virtual double pt() const
transverse momentum
edm::InputTag mInputGenCollection
MonitorElement * mCorrJetPt
MonitorElement * mpTScale_1500_3500_d
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 * mpTScale1DF_200_600
MonitorElement * mpTScale_c_nvtx_20_30
MonitorElement * mpTScale_nvtx_5_10
MonitorElement * mpTScale_c_nvtx_0_5
MonitorElement * mNeutralHadronEnergy_3000
MonitorElement * mpTScale_nvtx_10_15
MonitorElement * mpTResponse_nvtx_10_15
MonitorElement * mpTResponse_200_600_d
MonitorElement * mNeutralHadronEnergyFraction_B
MonitorElement * mEmEnergyInHF_3000
MonitorElement * mpTRatio_1500_3500_d
MonitorElement * mEScaleFineBin
MonitorElement * mpTScale_c_nvtx_5_10
MonitorElement * mpTResponse_30_d
MonitorElement * mpTScale_a_nvtx_30_inf
MonitorElement * mpTResponseF_d
MonitorElement * mHadTiming
MonitorElement * mChargedHadronEnergy_3000
MonitorElement * mpTResponse
MonitorElement * mpTResponseB_d
std::string mTurnOnEverything
MonitorElement * mHadEnergyInHF_3000
MonitorElement * mEtaFineBin
MonitorElement * mPhiFirst
MonitorElement * mNeutralEmEnergyFraction_F
MonitorElement * mpTRatio
MonitorElement * mpTScale1DB_600_1500
MonitorElement * mpTResponse_nvtx_0_5
MonitorElement * mGenPhiFirst
virtual double phi() const
momentum azimuthal angle
MonitorElement * mpTScale_nvtx_0_5
MonitorElement * mpTScalePhiE_d
MonitorElement * mjetArea
MonitorElement * mChargedEmEnergyFraction_F
MonitorElement * mpTScale_a_nvtx_20_30
void setCurrentFolder(const std::string &fullpath)
MonitorElement * mChargedHadronEnergyFraction_B
MonitorElement * mDeltaPhi
MonitorElement * mPthat_80
MonitorElement * mEmEnergyInHF_80
MonitorElement * mNJetsEtaF
MonitorElement * mpTScalePhiF_d