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")) {
32 Double_t BOUNDARIES[
NBINS] = {220, 244, 270, 296, 325, 354, 386, 419, 453, 489, 526, 565,
33 606, 649, 693, 740, 788, 838, 890, 944, 1000, 1058, 1118, 1181,
34 1246, 1313, 1383, 1455, 1530, 1607, 1687, 1770, 1856, 1945, 2037, 2132};
37 hVertexZ = fs->
make<TH1D>(
"hVertexZ",
"Z position of the Vertex", 50, -20, 20);
38 hJetRawPt = fs->
make<TH1D>(
"hJetRawPt",
"Raw Jet Pt", 50, 0, 1000);
39 hJetCorrPt = fs->
make<TH1D>(
"hJetCorrPt",
"Corrected Jet Pt", 50, 0, 1000);
40 hJet1Pt = fs->
make<TH1D>(
"hJet1Pt",
"Corrected Jet1 Pt", 50, 0, 1000);
41 hJet2Pt = fs->
make<TH1D>(
"hJet2Pt",
"Corrected Jet2 Pt", 50, 0, 1000);
43 hJetEta = fs->
make<TH1D>(
"hJetEta",
"Corrected Jet Eta", 10, -5, 5);
44 hJet1Eta = fs->
make<TH1D>(
"hJet1Eta",
"Corrected Jet1 Eta", 10, -5, 5);
45 hJet2Eta = fs->
make<TH1D>(
"hJet2Eta",
"Corrected Jet2 Eta", 10, -5, 5);
47 hJetPhi = fs->
make<TH1D>(
"hJetPhi",
"Corrected Jet Phi", 10, -3.1415, 3.1415);
48 hJet1Phi = fs->
make<TH1D>(
"hJet1Phi",
"Corrected Jet1 Phi", 10, -3.1415, 3.1415);
49 hJet2Phi = fs->
make<TH1D>(
"hJet2Phi",
"Corrected Jet2 Phi", 10, -3.1415, 3.1415);
51 hJetEMF = fs->
make<TH1D>(
"hJetEMF",
"EM Fraction of Jets", 50, 0, 1);
52 hJet1EMF = fs->
make<TH1D>(
"hJet1EMF",
"EM Fraction of Jet1", 50, 0, 1);
53 hJet2EMF = fs->
make<TH1D>(
"hJet2EMF",
"EM Fraction of Jet2", 50, 0, 1);
55 hCorDijetMass = fs->
make<TH1D>(
"hCorDijetMass",
"Corrected Dijet Mass", NBINS - 1, BOUNDARIES);
56 hDijetDeltaPhi = fs->
make<TH1D>(
"hDijetDeltaPhi",
"Dijet |#Delta #phi|", 50, 0, 3.1415);
59 hInnerDijetMass = fs->
make<TH1D>(
"hInnerDijetMass",
"Corrected Inner Dijet Mass", NBINS - 1, BOUNDARIES);
60 hOuterDijetMass = fs->
make<TH1D>(
"hOuterDijetMass",
"Corrected Outer Dijet Mass", NBINS - 1, BOUNDARIES);
71 mWeight = hEventInfo->weight();
90 std::cout <<
"Didja hear the one about the empty vertex collection?\n";
95 if (vertices_h->empty())
102 if (theVertex->
ndof() < 5)
104 if (fabs(theVertex->
z()) > 24.0)
106 if (fabs(theVertex->
position().rho()) > 2.0)
117 std::cout <<
"Didja hear the one about the empty jet collection?\n";
128 for (reco::CaloJetCollection::const_iterator j_it = jets_h->begin(); j_it != jets_h->end(); j_it++) {
150 selectedJets.push_back(jet);
154 if (selectedJets.size() < 2)
158 sort(selectedJets.begin(), selectedJets.end(),
compare_JetPt);
161 if (selectedJets[0].
pt() < 50.0)
163 if (fabs(selectedJets[0].
eta()) > 2.5)
165 if (selectedJets[0].emEnergyFraction() < 0.01)
167 if (selectedJets[1].
pt() < 50.0)
169 if (fabs(selectedJets[1].
eta()) > 2.5)
171 if (selectedJets[1].emEnergyFraction() < 0.01)
175 hJet1Pt->Fill(selectedJets[0].
pt(), mWeight);
178 hJet1EMF->Fill(selectedJets[0].emEnergyFraction(), mWeight);
179 hJet2Pt->Fill(selectedJets[1].
pt(), mWeight);
182 hJet2EMF->Fill(selectedJets[1].emEnergyFraction(), mWeight);
185 double corMass = (selectedJets[0].p4() + selectedJets[1].p4()).M();
186 double deltaEta = fabs(selectedJets[0].
eta() - selectedJets[1].
eta());
Jets made from CaloTowers.
virtual void scaleEnergy(double fScale)
scale energy of the jet
double pt() const final
transverse momentum
void endJob(void) override
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)
T * make(const Args &...args) const
make new ROOT object
const Point & position() const
position
void analyze(const edm::Event &, const edm::EventSetup &) override
CMSDAS11DijetAnalyzer(const edm::ParameterSet &)
const LorentzVector & p4() const final
four-momentum Lorentz vector
static const double deltaEta
double z() const
z coordinate
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
std::string jetCorrections
static const JetCorrector * getJetCorrector(const std::string &fName, const edm::EventSetup &fSetup)
retrieve corrector from the event setup. troughs exception if something is missing ...
double phi() const final
momentum azimuthal angle
float emEnergyFraction() const
double eta() const final
momentum pseudorapidity