18 : mInputCollection(iConfig.getParameter<
edm::
InputTag>(
"src")),
19 mInputVtxCollection(iConfig.getUntrackedParameter<
edm::
InputTag>(
"srcVtx",
edm::
InputTag(
"hiSelectedVertex"))),
20 mInputPFCandCollection(iConfig.getParameter<
edm::
InputTag>(
"PFcands")),
21 mInputCsCandCollection(iConfig.exists(
"CScands") ? iConfig.getParameter<
edm::
InputTag>(
"CScands")
23 mOutputFile(iConfig.getUntrackedParameter<
std::
string>(
"OutputFile",
"")),
26 mRecoJetPtThreshold(iConfig.getParameter<double>(
"recoJetPtThreshold")),
27 mReverseEnergyFractionThreshold(iConfig.getParameter<double>(
"reverseEnergyFractionThreshold")),
28 mRThreshold(iConfig.getParameter<double>(
"RThreshold")),
29 JetCorrectionService(iConfig.getParameter<
std::
string>(
"JetCorrections")) {
102 for (
int ipt = 0; ipt <
ptBins_; ipt++) {
188 TH2F *h2D_etabins_vs_pt2 =
190 TH2F *h2D_etabins_vs_pt =
192 TH2F *h2D_pfcand_etabins_vs_pt =
195 const int nHihfBins = 100;
196 const double hihfBins[nHihfBins + 1] = {
197 0, 11.282305, 11.82962, 12.344717, 13.029054, 13.698554, 14.36821, 15.140326,
198 15.845786, 16.684441, 17.449186, 18.364939, 19.247023, 20.448898, 21.776642, 22.870239,
199 24.405788, 26.366919, 28.340206, 30.661842, 33.657627, 36.656773, 40.028049, 44.274784,
200 48.583706, 52.981358, 56.860199, 61.559853, 66.663689, 72.768196, 78.265915, 84.744431,
201 92.483459, 100.281021, 108.646576, 117.023911, 125.901093, 135.224899, 147.046875, 159.864258,
202 171.06015, 184.76535, 197.687103, 212.873535, 229.276413, 245.175369, 262.498322, 280.54599,
203 299.570801, 317.188446, 336.99881, 357.960144, 374.725922, 400.638367, 426.062103, 453.07251,
204 483.99704, 517.556396, 549.421143, 578.050781, 608.358643, 640.940979, 680.361755, 719.215027,
205 757.798645, 793.882385, 839.83728, 887.268127, 931.233276, 980.856689, 1023.191833, 1080.281494,
206 1138.363892, 1191.303345, 1251.439453, 1305.288818, 1368.290894, 1433.700684, 1501.597412, 1557.918335,
207 1625.636475, 1695.08374, 1761.771484, 1848.941162, 1938.178345, 2027.55603, 2127.364014, 2226.186523,
208 2315.188965, 2399.225342, 2501.608643, 2611.077881, 2726.316162, 2848.74707, 2972.975342, 3096.565674,
209 3219.530762, 3361.178223, 3568.028564, 3765.690186, 50000};
211 TH2F *h2D_etabins_forRho =
213 TH2F *h2D_ptBins_forRho =
new TH2F(
"ptBinsForRho",
"#rho vs. p_{T};p_{T};#rho", 300, 0, 300, 500, 0, 300);
214 TH2F *h2D_centBins_forRho =
new TH2F(
"centBinsForRho",
"dummy;HIHF;#rho", nHihfBins, hihfBins, 500, 0, 300);
216 TH2F *h2D_etabins_forRhoM =
218 TH2F *h2D_ptBins_forRhoM =
new TH2F(
"ptBinsForRho",
"#rho_{M} vs. p_{T};p_{T};#rho_{M}", 300, 0, 300, 100, 0, 1.5);
219 TH2F *h2D_centBins_forRhoM =
new TH2F(
"centBinsForRho",
"dummy;HIHF;#rho_{M}", nHihfBins, hihfBins, 100, 0, 1.5);
222 mNPFpart = ibooker.
book1D(
"NPFpart",
"No of particle flow candidates", 1000, 0, 1000);
223 mPFPt = ibooker.
book1D(
"PFPt",
"PF candidate p_{T}", 10000, -500, 500);
224 mPFEta = ibooker.
book1D(
"PFEta",
"PF candidate #eta", 120, -6, 6);
225 mPFPhi = ibooker.
book1D(
"PFPhi",
"PF candidate #phi", 70, -3.5, 3.5);
227 mPFDeltaR = ibooker.
book1D(
"PFDeltaR",
"PF candidate DeltaR", 100, 0, 4);
229 ibooker.
book1D(
"PFDeltaR_Scaled_R",
"PF candidate DeltaR Divided by DeltaR square", 100, 0, 4);
231 mSumPFPt = ibooker.
book1D(
"SumPFPt",
"Sum of initial PF p_{T}", 1000, -10000, 10000);
234 mSumSquaredPFPt = ibooker.
book1D(
"SumSquaredPFPt",
"Sum of initial PF p_{T} squared", 10000, 0, 10000);
238 "SumPFPt_HF",
"HF energy (y axis) vs Sum initial PF p_{T} (x axis)", 1000, -1000, 1000, 1000, 0, 10000);
248 for (
int id = 0;
id < 2;
id++) {
249 if (
histoName.find(
'.') != std::string::npos) {
271 ibooker.
book1D(Form(
"csCandPt_etaBin%d",
ieta),
"CS candidate pt, eta-by-eta", 150, 0, 300);
277 for (
int id = 0;
id < 2;
id++) {
278 if (
histoName.find(
'.') != std::string::npos) {
284 h2D_centBins_forRho->SetTitle(Form(
289 h2D_centBins_forRhoM->SetTitle(Form(
"#rho_{M} vs. HIHF in the range %.3g < #eta < %.3g",
293 for (
int ipt = 0; ipt <
ptBins_; ipt++) {
295 ibooker.
book1D(Form(
"subtractedEFrac_JetPt%d_to_%d_etaBin%d",
ptBin[ipt],
ptBin[ipt + 1],
ieta),
296 "subtracted fraction of CS jet",
302 "subtracted total of CS jet",
308 Form(
"csCandCorrPF%d",
ieta),
"CS to PF candidate correlation, eta-by-eta", 300, 0, 300, 300, 0, 300);
322 Form(
";PF candidate p_{T}, |#eta|<%2.2f; counts",
BarrelEta),
327 Form(
";PF candidate p_{T}, |#eta|<%2.2f; counts",
BarrelEta),
332 Form(
";PF candidate p_{T}, |#eta|<%2.2f; counts",
BarrelEta),
337 Form(
";PF candidate p_{T}, |#eta|<%2.2f; counts",
BarrelEta),
342 Form(
";PF candidate p_{T}, |#eta|<%2.2f; counts",
BarrelEta),
347 Form(
";PF candidate p_{T}, |#eta|<%2.2f; counts",
BarrelEta),
352 Form(
";PF candidate p_{T}, |#eta|<%2.2f; counts",
BarrelEta),
357 Form(
";PF candidate p_{T}, |#eta|<%2.2f; counts",
BarrelEta),
363 ibooker.
book1D(
"mPFCandpT_Endcap_Unknown",
369 ibooker.
book1D(
"mPFCandpT_Endcap_ChargedHadron",
375 ibooker.
book1D(
"mPFCandpT_Endcap_electron",
381 ibooker.
book1D(
"mPFCandpT_Endcap_muon",
387 ibooker.
book1D(
"mPFCandpT_Endcap_photon",
393 ibooker.
book1D(
"mPFCandpT_Endcap_NeutralHadron",
399 ibooker.
book1D(
"mPFCandpT_Endcap_HadE_inHF",
405 ibooker.
book1D(
"mPFCandpT_Endcap_EME_inHF",
412 ibooker.
book1D(
"mPFCandpT_Forward_Unknown",
418 ibooker.
book1D(
"mPFCandpT_Forward_ChargedHadron",
424 ibooker.
book1D(
"mPFCandpT_Forward_electron",
430 ibooker.
book1D(
"mPFCandpT_Forward_muon",
436 ibooker.
book1D(
"mPFCandpT_Forward_photon",
442 ibooker.
book1D(
"mPFCandpT_Forward_NeutralHadron",
448 ibooker.
book1D(
"mPFCandpT_Forward_HadE_inHF",
454 ibooker.
book1D(
"mPFCandpT_Forward_EME_inHF",
462 mNCalopart = ibooker.
book1D(
"NCalopart",
"No of particle flow candidates", 1000, 0, 10000);
463 mCaloPt = ibooker.
book1D(
"CaloPt",
"Calo candidate p_{T}", 1000, -5000, 5000);
464 mCaloEta = ibooker.
book1D(
"CaloEta",
"Calo candidate #eta", 120, -6, 6);
465 mCaloPhi = ibooker.
book1D(
"CaloPhi",
"Calo candidate #phi", 70, -3.5, 3.5);
467 mSumCaloPt = ibooker.
book1D(
"SumCaloPt",
"Sum Calo p_{T}", 1000, -10000, 10000);
470 mSumSquaredCaloPt = ibooker.
book1D(
"SumSquaredCaloPt",
"Sum of initial Calo tower p_{T} squared", 10000, 0, 10000);
474 ibooker.
book2D(
"SumCaloPt_HF",
"HF Energy (y axis) vs Sum Calo tower p_{T}", 1000, -1000, 1000, 1000, 0, 10000);
484 for (
int id = 0;
id < 2;
id++) {
485 if (
histoName.find(
'.') != std::string::npos) {
490 Form(
"Sum Calo tower Pt in the eta range %.3g to %.3g",
500 mSumpt = ibooker.
book1D(
"SumpT",
"Sum p_{T} of all the PF candidates per event", 1000, 0, 10000);
503 mNvtx = ibooker.
book1D(
"Nvtx",
"number of vertices", 60, 0, 60);
504 mHF = ibooker.
book1D(
"HF",
"HF energy distribution", 1000, 0, 10000);
507 mEta = ibooker.
book1D(
"Eta",
"Eta", 120, -6, 6);
508 mPhi = ibooker.
book1D(
"Phi",
"Phi", 70, -3.5, 3.5);
509 mPt = ibooker.
book1D(
"Pt",
"Pt", 1000, 0, 500);
510 mP = ibooker.
book1D(
"P",
"P", 100, 0, 1000);
512 mMass = ibooker.
book1D(
"Mass",
"Mass", 100, 0, 200);
516 mNJets_40 = ibooker.
book1D(
"NJets_pt_greater_40",
"NJets pT > 40 GeV", 50, 0, 50);
520 LogInfo(
"OutputInfo") <<
" Histograms will NOT be saved";
524 delete h2D_etabins_vs_pt2;
525 delete h2D_etabins_vs_pt;
526 delete h2D_pfcand_etabins_vs_pt;
527 delete h2D_etabins_forRho;
528 delete h2D_ptBins_forRho;
529 delete h2D_centBins_forRho;
530 delete h2D_centBins_forRhoM;
556 for (
unsigned int i = 0;
i < vtxs->size(); ++
i) {
557 unsigned int daughter = (*vtxs)[
i].tracksSize();
558 if (daughter > (*vtxs)[greatestvtx].
tracksSize())
565 vtx = (*vtxs)[greatestvtx].position();
567 int nGoodVertices = 0;
570 for (
unsigned i = 0;
i < pvHandle->size();
i++) {
571 if ((*pvHandle)[
i].ndof() > 4 && (fabs((*pvHandle)[
i].
z()) <= 24) && (fabs((*pvHandle)[
i].
position().
rho()) <= 2))
605 double rhoRange[rhoSize];
606 for (
int irho = 0; irho < rhoSize; irho++) {
609 double yaxisLimits[501];
610 for (
int ibin = 0; ibin < 501; ibin++)
611 yaxisLimits[ibin] = ibin * 2;
614 rhoSize - 1, const_cast<double *>(rhoRange), 500, const_cast<double *>(yaxisLimits));
616 rhoSize - 1, const_cast<double *>(rhoRange), 500, const_cast<double *>(yaxisLimits));
663 Int_t NCaloTower = 0;
668 Float_t pfDeltaR = 0;
672 Float_t SumPt_value = 0;
674 vector<vector<float>> numbers;
675 vector<float> tempVector;
688 SumSquaredCaloPt[
i] = 0;
689 hSumCaloPt[
i] =
new TH1F(Form(
"hSumCaloPt_%d",
i),
"", 10000, -10000, 10000);
692 for (
unsigned icand = 0; icand < caloCandidates->
size(); icand++) {
707 SumCaloPt[
k] = SumCaloPt[
k] + caloPt;
708 SumSquaredCaloPt[
k] = SumSquaredCaloPt[
k] + caloPt * caloPt;
714 SumPt_value = SumPt_value + caloPt;
723 hSumCaloPt[
k]->Fill(SumCaloPt[
k]);
727 Float_t Evt_SumCaloPt = 0;
728 Float_t Evt_SumSquaredCaloPt = 0;
735 Evt_SumCaloPt = Evt_SumCaloPt + SumCaloPt[
k];
738 Evt_SumSquaredCaloPt = Evt_SumSquaredCaloPt + SumSquaredCaloPt[
k];
741 delete hSumCaloPt[
k];
765 SumSquaredPFPt[
i] = 0;
767 hSumPFPt[
i] =
new TH1F(Form(
"hSumPFPt_%d",
i),
"", 10000, -10000, 10000);
770 vector<vector<float>> PF_Space(1, vector<float>(3));
775 for (
unsigned iCScand = 0; iCScand < csCandidateColl->size(); iCScand++) {
776 assert(csCandidateColl->size() <= pfCandidateColl->size());
787 for (
unsigned icand = 0; icand < pfCandidateColl->size(); icand++) {
790 if (pfCandidate.
pt() < 5)
794 pfPt = pfCandidate.
pt();
795 pfEta = pfCandidate.
eta();
796 pfPhi = pfCandidate.
phi();
886 tempVector.push_back(pfPt);
887 tempVector.push_back(pfEta);
888 tempVector.push_back(pfPhi);
890 numbers.push_back(tempVector);
895 SumPFPt[
k] = SumPFPt[
k] + pfPt;
896 SumSquaredPFPt[
k] = SumSquaredPFPt[
k] + pfPt * pfPt;
902 SumPt_value = SumPt_value + pfPt;
911 hSumPFPt[
k]->Fill(SumPFPt[
k]);
915 Float_t Evt_SumPFPt = 0;
916 Float_t Evt_SumSquaredPFPt = 0;
923 Evt_SumPFPt = Evt_SumPFPt + SumPFPt[
k];
926 Evt_SumSquaredPFPt = Evt_SumSquaredPFPt + SumSquaredPFPt[
k];
943 for (
unsigned ijet = 0; ijet <
caloJets->size(); ijet++) {
949 for (
unsigned ijet = 0; ijet < jptJets->size(); ijet++)
950 recoJets.push_back((*jptJets)[ijet]);
955 for (
unsigned ijet = 0; ijet < basicJets->size(); ijet++) {
956 recoJets.push_back((*basicJets)[ijet]);
960 for (
unsigned ijet = 0; ijet <
pfJets->size(); ijet++) {
990 for (
unsigned ijet = 0; ijet <
recoJets.size(); ijet++) {
1016 int ipt = 0,
ieta = 0;
1024 for (
unsigned irho = 0; irho <
rho->size(); irho++) {
1034 for (
size_t iii = 0; iii < numbers.size(); iii++) {
MonitorElement * mPFCandpT_Forward_photon
edm::EDGetTokenT< reco::CaloJetCollection > caloJetsToken_
edm::EDGetTokenT< reco::PFCandidateCollection > pfCandToken_
MonitorElement * mCaloEta
edm::InputTag mInputCsCandCollection
T getParameter(std::string const &) const
MonitorElement * mSumSquaredPFPt
MonitorElement * mPFCandpT_vs_eta_electron
edm::EDGetTokenT< reco::CandidateView > caloCandViewToken_
MonitorElement * mCaloPhi
MonitorElement * mPFCandpT_Forward_EME_inHF
edm::EDGetTokenT< reco::JPTJetCollection > jptJetsToken_
double pt() const final
transverse momentum
edm::InputTag centralityTag_
double EtHFtowerSum() const
edm::EDGetTokenT< CaloTowerCollection > caloTowersToken_
virtual void setCurrentFolder(std::string const &fullpath)
MonitorElement * mPFCandpT_Forward_muon
edm::EDGetTokenT< reco::PFJetCollection > pfJetsToken_
MonitorElement * mCSCandpT_vsPt[etaBins_]
MonitorElement * mPFCandpT_Endcap_NeutralHadron
bool exists(std::string const ¶meterName) const
checks if a parameter exists
T const * product() const
MonitorElement * mPFCandpT_vs_eta_EME_inHF
MonitorElement * mSumSquaredCaloPt
bool isForward(DetId const &)
MonitorElement * mSubtractedEFrac[ptBins_][etaBins_]
void analyze(const edm::Event &, const edm::EventSetup &) override
bool getByToken(EDGetToken token, Handle< PROD > &result) const
MonitorElement * mSumPFPtEtaDep[etaBins_]
MonitorElement * mPFCandpT_Forward_electron
MonitorElement * mRhoMDist_vsEta
edm::EDGetTokenT< std::vector< reco::Vertex > > pvToken_
MonitorElement * mSumCaloPt_eta
MonitorElement * mPFCandpT_vs_eta_muon
MonitorElement * mCSCand_corrPFcand[etaBins_]
MonitorElement * mPFCandpT_Endcap_HadE_inHF
edm::EDGetTokenT< int > centralityBinToken
MonitorElement * mSumPFPt_HF
MonitorElement * mPFCandpT_Endcap_ChargedHadron
MonitorElement * mRhoMDist_vsPt
MonitorElement * mPFCandpT_vs_eta_NeutralHadron
MonitorElement * mSumCaloPtEtaDep[etaBins_]
MonitorElement * mSumCaloPt_HF
static constexpr int etaBins_
MonitorElement * rhoEtaRange
MonitorElement * mRhoDist_vsEta
MonitorElement * mPFCandpT_vs_eta_photon
edm::EDGetTokenT< reco::Centrality > centralityToken
MonitorElement * mPFCandpT_Forward_ChargedHadron
MonitorElement * mSubtractedE[ptBins_][etaBins_]
MonitorElement * mPFCandpT_Endcap_muon
MonitorElement * mPFCandpT_Endcap_photon
MonitorElement * mPFDeltaR_Scaled_R
MonitorElement * mSumPFPt
edm::EDGetTokenT< std::vector< reco::Vertex > > hiVertexToken_
static constexpr int ptBins_
MonitorElement * mRhoDist_vsPt
MonitorElement * mConstituents
MonitorElement * mPFCandpT_Barrel_photon
Abs< T >::type abs(const T &t)
math::XYZPoint Point
point in the space
static constexpr int nedge_pseudorapidity
edm::InputTag mInputCollection
MonitorElement * mSumSquaredCaloPt_eta
MonitorElement * mPFCandpT_Barrel_Unknown
edm::EDGetTokenT< std::vector< double > > rhoToken_
edm::EDGetTokenT< std::vector< double > > rhomToken_
MonitorElement * mPFCandpT_Barrel_NeutralHadron
bool isEndcap(GeomDetEnumerators::SubDetector m)
MonitorElement * mPFCandpT_Endcap_Unknown
const Double_t ForwardEta
Log< level::Info, false > LogInfo
MonitorElement * mPFCandpT_vs_eta_ChargedHadron
MonitorElement * mPFCandpT_Forward_HadE_inHF
edm::EDGetTokenT< reco::BasicJetCollection > basicJetsToken_
MonitorElement * mPFCandpT_Barrel_ChargedHadron
MonitorElement * mPFCandpT_Barrel_HadE_inHF
MonitorElement * mPFDeltaR
std::vector< reco::PFCandidate > PFCandidateCollection
collection of PFCandidates
edm::EDGetTokenT< reco::PFCandidateCollection > csCandToken_
const double edge_pseudorapidity[etaBins_+1]
edm::InputTag mInputPFCandCollection
MonitorElement * mSumCaloPt
MonitorElement * mSumSquaredPFPt_eta
MonitorElement * mPFCandpT_Endcap_EME_inHF
edm::InputTag mInputVtxCollection
MonitorElement * mPFCandpT_vs_eta_HadE_inHF
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
edm::EDGetTokenT< reco::CandidateView > pfCandViewToken_
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * mPFCandpT_Forward_Unknown
~JetAnalyzer_HeavyIons() override
Particle reconstructed by the particle flow algorithm.
MonitorElement * mPFCandpT_Barrel_electron
static int position[264][3]
MonitorElement * mPFCandpT_Endcap_electron
MonitorElement * mNPFpart
MonitorElement * mSumPFPt_eta
edm::EDGetTokenT< std::vector< double > > etaToken_
virtual int getNbinsX() const
get # of bins in X-axis
MonitorElement * mNJets_40
double mRecoJetPtThreshold
MonitorElement * mRhoDist_vsCent[etaBins_]
MonitorElement * mJetArea
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
JetAnalyzer_HeavyIons(const edm::ParameterSet &)
const int ptBin[ptBins_+1]
MonitorElement * mPFCandpT_Barrel_EME_inHF
MonitorElement * mRhoMDist_vsCent[etaBins_]
double phi() const final
momentum azimuthal angle
MonitorElement * mjetpileup
MonitorElement * mPFCandpT_vs_eta_Unknown
MonitorElement * mPFCandpT_Forward_NeutralHadron
MonitorElement * mNCalopart
virtual ParticleType particleId() const
double eta() const final
momentum pseudorapidity
MonitorElement * mPFCandpT_Barrel_muon