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;
573 for (
unsigned int i = 0;
i < vtxs->size(); ++
i) {
574 unsigned int daughter = (*vtxs)[
i].tracksSize();
575 if (daughter > (*vtxs)[greatestvtx].tracksSize())
582 vtx = (*vtxs)[greatestvtx].position();
584 int nGoodVertices = 0;
587 for (
unsigned i = 0;
i < pvHandle->size();
i++) {
588 if ((*pvHandle)[
i].ndof() > 4 && (fabs((*pvHandle)[
i].
z()) <= 24) && (fabs((*pvHandle)[
i].
position().
rho()) <= 2))
622 double rhoRange[rhoSize];
623 for (
int irho = 0; irho < rhoSize; irho++) {
626 double yaxisLimits[501];
627 for (
int ibin = 0; ibin < 501; ibin++)
628 yaxisLimits[ibin] = ibin * 2;
631 rhoSize - 1, const_cast<double *>(rhoRange), 500, const_cast<double *>(yaxisLimits));
633 rhoSize - 1, const_cast<double *>(rhoRange), 500, const_cast<double *>(yaxisLimits));
680 Int_t NCaloTower = 0;
685 Float_t pfDeltaR = 0;
689 Float_t SumPt_value = 0;
691 vector<vector<float>> numbers;
692 vector<float> tempVector;
705 SumSquaredCaloPt[
i] = 0;
706 hSumCaloPt[
i] =
new TH1F(Form(
"hSumCaloPt_%d",
i),
"", 10000, -10000, 10000);
709 for (
unsigned icand = 0; icand < caloCandidates->
size(); icand++) {
724 SumCaloPt[
k] = SumCaloPt[
k] + caloPt;
725 SumSquaredCaloPt[
k] = SumSquaredCaloPt[
k] + caloPt * caloPt;
731 SumPt_value = SumPt_value + caloPt;
740 hSumCaloPt[
k]->Fill(SumCaloPt[
k]);
744 Float_t Evt_SumCaloPt = 0;
745 Float_t Evt_SumSquaredCaloPt = 0;
752 Evt_SumCaloPt = Evt_SumCaloPt + SumCaloPt[
k];
755 Evt_SumSquaredCaloPt = Evt_SumSquaredCaloPt + SumSquaredCaloPt[
k];
758 delete hSumCaloPt[
k];
782 SumSquaredPFPt[
i] = 0;
784 hSumPFPt[
i] =
new TH1F(Form(
"hSumPFPt_%d",
i),
"", 10000, -10000, 10000);
787 vector<vector<float>> PF_Space(1, vector<float>(3));
792 for (
unsigned iCScand = 0; iCScand < csCandidateColl->size(); iCScand++) {
793 assert(csCandidateColl->size() <= pfCandidateColl->size());
804 for (
unsigned icand = 0; icand < pfCandidateColl->size(); icand++) {
807 if (pfCandidate.
pt() < 5)
811 pfPt = pfCandidate.
pt();
812 pfEta = pfCandidate.
eta();
813 pfPhi = pfCandidate.
phi();
903 tempVector.push_back(pfPt);
904 tempVector.push_back(pfEta);
905 tempVector.push_back(pfPhi);
907 numbers.push_back(tempVector);
912 SumPFPt[
k] = SumPFPt[
k] + pfPt;
913 SumSquaredPFPt[
k] = SumSquaredPFPt[
k] + pfPt * pfPt;
919 SumPt_value = SumPt_value + pfPt;
928 hSumPFPt[
k]->Fill(SumPFPt[
k]);
932 Float_t Evt_SumPFPt = 0;
933 Float_t Evt_SumSquaredPFPt = 0;
940 Evt_SumPFPt = Evt_SumPFPt + SumPFPt[
k];
943 Evt_SumSquaredPFPt = Evt_SumSquaredPFPt + SumSquaredPFPt[
k];
960 for (
unsigned ijet = 0; ijet <
caloJets->size(); ijet++) {
966 for (
unsigned ijet = 0; ijet < jptJets->size(); ijet++)
967 recoJets.push_back((*jptJets)[ijet]);
972 for (
unsigned ijet = 0; ijet < basicJets->size(); ijet++) {
973 recoJets.push_back((*basicJets)[ijet]);
977 for (
unsigned ijet = 0; ijet <
pfJets->size(); ijet++) {
1007 for (
unsigned ijet = 0; ijet <
recoJets.size(); ijet++) {
1033 int ipt = 0,
ieta = 0;
1041 for (
unsigned irho = 0; irho <
rho->size(); irho++) {
1051 for (
size_t iii = 0; iii < numbers.size(); iii++) {