22 jetSrc(params.getParameter<edm::InputTag>(
"jetSrc")),
23 vertexSrc(params.getParameter<edm::InputTag>(
"vertexSrc")),
24 jetCorrections(params.getParameter<std::
string>(
"jetCorrections")),
25 innerDeltaEta(params.getParameter<double>(
"innerDeltaEta")),
26 outerDeltaEta(params.getParameter<double>(
"outerDeltaEta")),
27 JESbias(params.getParameter<double>(
"JESbias"))
33 Double_t BOUNDARIES[
NBINS] = { 220, 244, 270, 296, 325, 354, 386, 419, 453,
34 489, 526, 565, 606, 649, 693, 740, 788, 838,
35 890, 944, 1000, 1058, 1118, 1181, 1246, 1313, 1383,
36 1455, 1530, 1607, 1687, 1770, 1856, 1945, 2037, 2132 };
39 hVertexZ = fs->
make<TH1D>(
"hVertexZ",
"Z position of the Vertex",50,-20,20);
40 hJetRawPt = fs->
make<TH1D>(
"hJetRawPt",
"Raw Jet Pt",50,0,1000);
41 hJetCorrPt = fs->
make<TH1D>(
"hJetCorrPt",
"Corrected Jet Pt",50,0,1000);
42 hJet1Pt = fs->
make<TH1D>(
"hJet1Pt",
"Corrected Jet1 Pt",50,0,1000);
43 hJet2Pt = fs->
make<TH1D>(
"hJet2Pt",
"Corrected Jet2 Pt",50,0,1000);
45 hJetEta = fs->
make<TH1D>(
"hJetEta",
"Corrected Jet Eta", 10,-5,5);
46 hJet1Eta = fs->
make<TH1D>(
"hJet1Eta",
"Corrected Jet1 Eta",10,-5,5);
47 hJet2Eta = fs->
make<TH1D>(
"hJet2Eta",
"Corrected Jet2 Eta",10,-5,5);
49 hJetPhi = fs->
make<TH1D>(
"hJetPhi",
"Corrected Jet Phi", 10,-3.1415,3.1415);
50 hJet1Phi = fs->
make<TH1D>(
"hJet1Phi",
"Corrected Jet1 Phi",10,-3.1415,3.1415);
51 hJet2Phi = fs->
make<TH1D>(
"hJet2Phi",
"Corrected Jet2 Phi",10,-3.1415,3.1415);
53 hJetEMF = fs->
make<TH1D>(
"hJetEMF",
"EM Fraction of Jets",50,0,1);
54 hJet1EMF = fs->
make<TH1D>(
"hJet1EMF",
"EM Fraction of Jet1",50,0,1);
55 hJet2EMF = fs->
make<TH1D>(
"hJet2EMF",
"EM Fraction of Jet2",50,0,1);
57 hCorDijetMass = fs->
make<TH1D>(
"hCorDijetMass",
"Corrected Dijet Mass",NBINS-1,BOUNDARIES);
61 hInnerDijetMass = fs->
make<TH1D>(
"hInnerDijetMass",
"Corrected Inner Dijet Mass",NBINS-1,BOUNDARIES);
62 hOuterDijetMass = fs->
make<TH1D>(
"hOuterDijetMass",
"Corrected Outer Dijet Mass",NBINS-1,BOUNDARIES);
77 mWeight = hEventInfo->weight();
96 std::cout<<
"Didja hear the one about the empty vertex collection?\n";
101 if(vertices_h->size()<=0)
return;
107 if(theVertex->
ndof()<5)
return;
108 if(fabs(theVertex->
z())>24.0)
return;
109 if(fabs(theVertex->
position().rho())>2.0)
return;
119 std::cout<<
"Didja hear the one about the empty jet collection?\n";
127 std::vector<reco::CaloJet> selectedJets;
130 for(reco::CaloJetCollection::const_iterator j_it = jets_h->begin(); j_it!=jets_h->end(); j_it++) {
152 selectedJets.push_back(jet);
156 if(selectedJets.size()<2)
return;
162 if (selectedJets[0].pt()<50.0)
return;
163 if (fabs(selectedJets[0].
eta())>2.5)
return;
164 if (selectedJets[0].emEnergyFraction()<0.01)
return;
165 if (selectedJets[1].pt()<50.0)
return;
166 if (fabs(selectedJets[1].
eta())>2.5)
return;
167 if (selectedJets[1].emEnergyFraction()<0.01)
return;
171 hJet1Pt ->Fill(selectedJets[0].pt(),mWeight);
174 hJet1EMF->Fill(selectedJets[0].emEnergyFraction(),mWeight);
175 hJet2Pt ->Fill(selectedJets[1].pt(),mWeight);
178 hJet2EMF->Fill(selectedJets[1].emEnergyFraction(),mWeight);
181 double corMass = (selectedJets[0].p4()+selectedJets[1].p4()).M();
182 double deltaEta = fabs(selectedJets[0].
eta()-selectedJets[1].
eta());
183 if (corMass < 489)
return;
184 if (deltaEta > 1.3)
return;
Jets made from CaloTowers.
virtual const LorentzVector & p4() const GCC11_FINAL
four-momentum Lorentz vector
void analyze(const edm::Event &, const edm::EventSetup &)
static bool compare_JetPt(const reco::CaloJet &jet1, const reco::CaloJet &jet2)
virtual double correction(const LorentzVector &fJet) const =0
get correction using Jet information only
#define DEFINE_FWK_MODULE(type)
virtual void scaleEnergy(double fScale)
scale energy of the jet
const Point & position() const
position
CMSDAS11DijetAnalyzer(const edm::ParameterSet &)
virtual float phi() const GCC11_FINAL
momentum azimuthal angle
double z() const
y coordinate
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
std::string jetCorrections
virtual float eta() const GCC11_FINAL
momentum pseudorapidity
virtual void endJob(void)
static const JetCorrector * getJetCorrector(const std::string &fName, const edm::EventSetup &fSetup)
retrieve corrector from the event setup. troughs exception if something is missing ...
T * make() const
make new ROOT object
virtual float pt() const GCC11_FINAL
transverse momentum
float emEnergyFraction() const