Skip to content

Commit

Permalink
Merge pull request #12310 from rkunnawa/HIN_75X_CentBin_JetDQM
Browse files Browse the repository at this point in the history
Add centrality bin in 75X and Jet DQM update
  • Loading branch information
davidlange6 committed Nov 15, 2015
2 parents fcc5b23 + 6c2b9b4 commit 4079148
Show file tree
Hide file tree
Showing 13 changed files with 2,987 additions and 1,131 deletions.
2 changes: 1 addition & 1 deletion DQM/Physics/python/CentralityDQM_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
CentralityDQM = cms.EDAnalyzer(
"CentralityDQM",
centralitycollection = cms.InputTag("hiCentrality"),
centralitybincollection = cms.InputTag("centralityBin","HFtowers"),
vertexcollection = cms.InputTag("hiSelectedVertex"),
eventplanecollection= cms.InputTag("hiEvtPlane")

)
83 changes: 51 additions & 32 deletions DQM/Physics/src/CentralityDQM.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,14 @@ CentralityDQM::CentralityDQM(const edm::ParameterSet& ps) {

edm::LogInfo("CentralityDQM") << " Starting CentralityDQM "
<< "\n";

centralityTag_ = ps.getParameter<InputTag>("centralitycollection");
centralityToken = consumes<reco::Centrality>(centralityTag_);

centralityBinTag_ = (ps.getParameter<edm::InputTag> ("centralitybincollection"));
centralityBinToken = consumes<int>(centralityBinTag_);


vertexTag_ = ps.getParameter<InputTag>("vertexcollection");
vertexToken = consumes<std::vector<reco::Vertex> >(vertexTag_);

Expand Down Expand Up @@ -62,27 +66,27 @@ void CentralityDQM::bookHistograms(DQMStore::IBooker& bei, edm::Run const&,

h_hiNpix = bei.book1D("h_hiNpix", "h_hiNpix", 750, 0, 75000);
h_hiNpixelTracks =
bei.book1D("h_hiNpixelTracks", "hiNpixelTracks", 500, 0, 5000);
bei.book1D("h_hiNpixelTracks", "hiNpixelTracks", 500, 0, 5000);
h_hiNtracks = bei.book1D("h_hiNtracks", "h_hiNtracks", 500, 0, 5000);
h_hiNtracksPtCut =
bei.book1D("h_hiNtracksPtCut", "h_hiNtracksPtCut", 500, 0, 5000);
bei.book1D("h_hiNtracksPtCut", "h_hiNtracksPtCut", 500, 0, 5000);
h_hiNtracksEtaCut =
bei.book1D("h_hiNtracksEtaCut", "h_hiNtracksEtaCut", 500, 0, 5000);
bei.book1D("h_hiNtracksEtaCut", "h_hiNtracksEtaCut", 500, 0, 5000);
h_hiNtracksEtaPtCut =
bei.book1D("h_hiNtracksEtaPtCut", "h_hiNtracksEtaPtCut", 500, 0, 5000);

bei.book1D("h_hiNtracksEtaPtCut", "h_hiNtracksEtaPtCut", 500, 0, 5000);
h_hiHF = bei.book1D("h_hiHF", "h_hiHF", 900, 0, 9000);
h_hiHFplus = bei.book1D("h_hiHFplus", "h_hiHFplus", 900, 0, 9000);
h_hiHFminus = bei.book1D("h_hiHFminus", "h_hiHFminus", 900, 0, 9000);
h_hiHFplusEta4 = bei.book1D("h_hiHFplusEta4", "h_hiHFplusEta4", 900, 0, 9000);
h_hiHFminusEta4 =
bei.book1D("h_hiHFminusEta4", "h_hiHFminusEta4", 900, 0, 9000);

bei.book1D("h_hiHFminusEta4", "h_hiHFminusEta4", 900, 0, 9000);
h_hiHFhit = bei.book1D("h_hiHFhit", "h_hiHFhit", 3000, 0, 300000);
h_hiHFhitPlus = bei.book1D("h_hiHFhitPlus", "h_hiHFhitPlus", 2000, 0, 200000);
h_hiHFhitMinus =
bei.book1D("h_hiHFhitMinus", "h_hiHFhitMinus", 2000, 0, 200000);

bei.book1D("h_hiHFhitMinus", "h_hiHFhitMinus", 2000, 0, 200000);
h_hiEB = bei.book1D("h_hiEB", "h_hiEB", 600, 0, 6000);
h_hiET = bei.book1D("h_hiET", "h_hiET", 600, 0, 6000);
h_hiEE = bei.book1D("h_hiEE", "h_hiEE", 600, 0, 6000);
Expand All @@ -91,10 +95,12 @@ void CentralityDQM::bookHistograms(DQMStore::IBooker& bei, edm::Run const&,
h_hiZDC = bei.book1D("h_hiZDC", "h_hiZDC", 600, 0, 6000);
h_hiZDCplus = bei.book1D("h_hiZDCplus", "h_hiZDCplus", 600, 0, 6000);
h_hiZDCminus = bei.book1D("h_hiZDCminus", "h_hiZDCminus", 600, 0, 6000);

h_vertex_x = bei.book1D("h_vertex_x", "h_vertex_x", 400, -4, 4);
h_vertex_y = bei.book1D("h_vertex_y", "h_vertex_y", 400, -4, 4);
h_vertex_z = bei.book1D("h_vertex_z", "h_vertex_z", 400, -40, 40);

h_cent_bin = bei.book1D("h_cent_bin", "h_cent_bin", 200, 0, 200);

Double_t psirange = 4;
bei.setCurrentFolder("Physics/Centrality/EventPlane/");
Expand All @@ -112,25 +118,34 @@ void CentralityDQM::bookHistograms(DQMStore::IBooker& bei, edm::Run const&,
h_ep_HFm3 = bei.book1D("h_ep_HFm3", "h_ep_HFm3", 800,-psirange,psirange);
h_ep_HFp3 = bei.book1D("h_ep_HFp3", "h_ep_HFp3", 800,-psirange,psirange);
h_ep_trackmid3 = bei.book1D("h_ep_trackmid3", "h_ep_trackmid3", 800,-psirange,psirange);

}

//
// -- Analyze
//
void CentralityDQM::analyze(const edm::Event& iEvent,
const edm::EventSetup& iSetup) {

using namespace edm;
edm::Handle<reco::Centrality> cent;
iEvent.getByToken(centralityToken, cent); //_centralitytag comes from the cfg

edm::Handle<int> cbin;
iEvent.getByToken(centralityBinToken, cbin);

// as an inputTag and is
//"hiCentrality"
edm::Handle<reco::EvtPlaneCollection> ep;
iEvent.getByToken(eventplaneToken, ep);

if (!cent.isValid()) return;
// if (!cent.isValid()) return;
if(cent.isValid()){
int hibin = *cbin;

// std::cout<< " ------------------------------------- " << hibin << std::endl;

h_cent_bin->Fill(hibin);
h_hiNpix->Fill(cent->multiplicityPixel());
h_hiNpixelTracks->Fill(cent->NpixelTracks());
h_hiNtracks->Fill(cent->Ntracks()); //
Expand Down Expand Up @@ -159,31 +174,35 @@ void CentralityDQM::analyze(const edm::Event& iEvent,
h_hiEB->Fill(cent->EtEBSum());
h_hiET->Fill(cent->EtMidRapiditySum());



edm::Handle<std::vector<reco::Vertex> > vertex;
iEvent.getByToken(vertexToken, vertex);
h_vertex_x->Fill(vertex->begin()->x());
h_vertex_y->Fill(vertex->begin()->y());
h_vertex_z->Fill(vertex->begin()->z());
}

if (ep.isValid()){

EvtPlaneCollection::const_iterator rp = ep->begin();
h_ep_HFm1->Fill(rp[HFm1].angle());
h_ep_HFp1->Fill(rp[HFp1].angle());
h_ep_trackm1->Fill(rp[trackm1].angle());
h_ep_trackp1->Fill(rp[trackp1].angle());
h_ep_castor1->Fill(rp[Castor1].angle());

h_ep_HFm2->Fill(rp[HFm2].angle());
h_ep_HFp2->Fill(rp[HFp2].angle());
h_ep_trackmid2->Fill(rp[trackmid2].angle());
h_ep_trackm2->Fill(rp[trackm2].angle());
h_ep_trackp2->Fill(rp[trackp2].angle());
h_ep_castor2->Fill(rp[Castor2].angle());

h_ep_HFm3->Fill(rp[HFm3].angle());
h_ep_HFp3->Fill(rp[HFp3].angle());
h_ep_trackmid3->Fill(rp[trackmid3].angle());
}

h_ep_HFm1->Fill(rp[HFm1].angle(0));
h_ep_HFp1->Fill(rp[HFp1].angle(0));
h_ep_trackm1->Fill(rp[trackm1].angle(0));
h_ep_trackp1->Fill(rp[trackp1].angle(0));
h_ep_castor1->Fill(rp[Castor1].angle(0));


h_ep_HFm2->Fill(rp[HFm2].angle(0));
h_ep_HFp2->Fill(rp[HFp2].angle(0));
h_ep_trackmid2->Fill(rp[trackmid2].angle(0));
h_ep_trackm2->Fill(rp[trackm2].angle(0));
h_ep_trackp2->Fill(rp[trackp2].angle(0));
h_ep_castor2->Fill(rp[Castor2].angle(0));

h_ep_HFm3->Fill(rp[HFm3].angle(0));
h_ep_HFp3->Fill(rp[HFp3].angle(0));
h_ep_trackmid3->Fill(rp[trackmid3].angle(0));

}
}
7 changes: 7 additions & 0 deletions DQM/Physics/src/CentralityDQM.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ class CentralityDQM : public DQMEDAnalyzer {

edm::InputTag eventplaneTag_;
edm::EDGetTokenT<reco::EvtPlaneCollection> eventplaneToken;

edm::InputTag centralityBinTag_;
edm::EDGetTokenT<int> centralityBinToken;
edm::Handle<int>centralityBin_;


///////////////////////////
// Histograms
Expand Down Expand Up @@ -81,6 +86,8 @@ class CentralityDQM : public DQMEDAnalyzer {
MonitorElement* h_vertex_y;
MonitorElement* h_vertex_z;

MonitorElement* h_cent_bin;

MonitorElement* h_ep_HFm1;
MonitorElement* h_ep_HFp1;
MonitorElement* h_ep_trackm1;
Expand Down
137 changes: 135 additions & 2 deletions DQMOffline/JetMET/interface/JetAnalyzer_HeavyIons.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@


const Int_t MAXPARTICLE = 10000;
const Double_t BarrelEta = 2.0;
const Double_t EndcapEta = 3.0;
const Double_t ForwardEta = 5.0;

class MonitorElement;

Expand All @@ -91,7 +94,6 @@ class JetAnalyzer_HeavyIons : public DQMEDAnalyzer {

edm::InputTag mInputCollection;
edm::InputTag mInputPFCandCollection;
edm::InputTag centrality;

std::string mOutputFile;
std::string JetType;
Expand All @@ -102,6 +104,14 @@ class JetAnalyzer_HeavyIons : public DQMEDAnalyzer {
double mRThreshold;
std::string JetCorrectionService;

edm::InputTag centralityTag_;
edm::EDGetTokenT<reco::Centrality> centralityToken;
edm::Handle<reco::Centrality> centrality_;

edm::InputTag centralityBinTag_;
edm::EDGetTokenT<int> centralityBinToken;
edm::Handle<int>centralityBin_;

//Tokens
edm::EDGetTokenT<std::vector<reco::Vertex> > pvToken_;
edm::EDGetTokenT<CaloTowerCollection > caloTowersToken_;
Expand All @@ -115,7 +125,6 @@ class JetAnalyzer_HeavyIons : public DQMEDAnalyzer {

edm::EDGetTokenT<edm::ValueMap<reco::VoronoiBackground>> backgrounds_;
edm::EDGetTokenT<std::vector<float>> backgrounds_value_;
edm::EDGetTokenT<reco::Centrality> centralityToken_;
edm::EDGetTokenT<std::vector<reco::Vertex> > hiVertexToken_;

MonitorElement *mNPFpart;
Expand All @@ -124,7 +133,93 @@ class JetAnalyzer_HeavyIons : public DQMEDAnalyzer {
MonitorElement *mPFPhi;
MonitorElement *mPFVsPt;
MonitorElement *mPFVsPtInitial;
MonitorElement *mPFVsPtInitial_HF; //MZ

MonitorElement *mPFVsPtInitial_Barrel_Centrality_100_95; //MZ
MonitorElement *mPFVsPtInitial_Barrel_Centrality_95_90; //MZ
MonitorElement *mPFVsPtInitial_Barrel_Centrality_90_85; //MZ
MonitorElement *mPFVsPtInitial_Barrel_Centrality_85_80; //MZ
MonitorElement *mPFVsPtInitial_Barrel_Centrality_80_75; //MZ
MonitorElement *mPFVsPtInitial_Barrel_Centrality_75_70; //MZ
MonitorElement *mPFVsPtInitial_Barrel_Centrality_70_65; //MZ
MonitorElement *mPFVsPtInitial_Barrel_Centrality_65_60; //MZ
MonitorElement *mPFVsPtInitial_Barrel_Centrality_60_55; //MZ
MonitorElement *mPFVsPtInitial_Barrel_Centrality_55_50; //MZ
MonitorElement *mPFVsPtInitial_Barrel_Centrality_50_45; //MZ
MonitorElement *mPFVsPtInitial_Barrel_Centrality_45_40; //MZ
MonitorElement *mPFVsPtInitial_Barrel_Centrality_40_35; //MZ
MonitorElement *mPFVsPtInitial_Barrel_Centrality_35_30; //MZ
MonitorElement *mPFVsPtInitial_Barrel_Centrality_30_25; //MZ
MonitorElement *mPFVsPtInitial_Barrel_Centrality_25_20; //MZ
MonitorElement *mPFVsPtInitial_Barrel_Centrality_20_15; //MZ
MonitorElement *mPFVsPtInitial_Barrel_Centrality_15_10; //MZ
MonitorElement *mPFVsPtInitial_Barrel_Centrality_10_5; //MZ
MonitorElement *mPFVsPtInitial_Barrel_Centrality_5_0; //MZ

MonitorElement *mPFVsPtInitial_EndCap_Centrality_100_95; //MZ
MonitorElement *mPFVsPtInitial_EndCap_Centrality_95_90; //MZ
MonitorElement *mPFVsPtInitial_EndCap_Centrality_90_85; //MZ
MonitorElement *mPFVsPtInitial_EndCap_Centrality_85_80; //MZ
MonitorElement *mPFVsPtInitial_EndCap_Centrality_80_75; //MZ
MonitorElement *mPFVsPtInitial_EndCap_Centrality_75_70; //MZ
MonitorElement *mPFVsPtInitial_EndCap_Centrality_70_65; //MZ
MonitorElement *mPFVsPtInitial_EndCap_Centrality_65_60; //MZ
MonitorElement *mPFVsPtInitial_EndCap_Centrality_60_55; //MZ
MonitorElement *mPFVsPtInitial_EndCap_Centrality_55_50; //MZ
MonitorElement *mPFVsPtInitial_EndCap_Centrality_50_45; //MZ
MonitorElement *mPFVsPtInitial_EndCap_Centrality_45_40; //MZ
MonitorElement *mPFVsPtInitial_EndCap_Centrality_40_35; //MZ
MonitorElement *mPFVsPtInitial_EndCap_Centrality_35_30; //MZ
MonitorElement *mPFVsPtInitial_EndCap_Centrality_30_25; //MZ
MonitorElement *mPFVsPtInitial_EndCap_Centrality_25_20; //MZ
MonitorElement *mPFVsPtInitial_EndCap_Centrality_20_15; //MZ
MonitorElement *mPFVsPtInitial_EndCap_Centrality_15_10; //MZ
MonitorElement *mPFVsPtInitial_EndCap_Centrality_10_5; //MZ
MonitorElement *mPFVsPtInitial_EndCap_Centrality_5_0; //MZ

MonitorElement *mPFVsPtInitial_HF_Centrality_100_95; //MZ
MonitorElement *mPFVsPtInitial_HF_Centrality_95_90; //MZ
MonitorElement *mPFVsPtInitial_HF_Centrality_90_85; //MZ
MonitorElement *mPFVsPtInitial_HF_Centrality_85_80; //MZ
MonitorElement *mPFVsPtInitial_HF_Centrality_80_75; //MZ
MonitorElement *mPFVsPtInitial_HF_Centrality_75_70; //MZ
MonitorElement *mPFVsPtInitial_HF_Centrality_70_65; //MZ
MonitorElement *mPFVsPtInitial_HF_Centrality_65_60; //MZ
MonitorElement *mPFVsPtInitial_HF_Centrality_60_55; //MZ
MonitorElement *mPFVsPtInitial_HF_Centrality_55_50; //MZ
MonitorElement *mPFVsPtInitial_HF_Centrality_50_45; //MZ
MonitorElement *mPFVsPtInitial_HF_Centrality_45_40; //MZ
MonitorElement *mPFVsPtInitial_HF_Centrality_40_35; //MZ
MonitorElement *mPFVsPtInitial_HF_Centrality_35_30; //MZ
MonitorElement *mPFVsPtInitial_HF_Centrality_30_25; //MZ
MonitorElement *mPFVsPtInitial_HF_Centrality_25_20; //MZ
MonitorElement *mPFVsPtInitial_HF_Centrality_20_15; //MZ
MonitorElement *mPFVsPtInitial_HF_Centrality_15_10; //MZ
MonitorElement *mPFVsPtInitial_HF_Centrality_10_5; //MZ
MonitorElement *mPFVsPtInitial_HF_Centrality_5_0; //MZ

MonitorElement *mPFArea;
MonitorElement *mPFDeltaR; //MZ
MonitorElement *mPFDeltaR_Scaled_R; //MZ
MonitorElement *mPFDeltaR_pTCorrected; //MZ
MonitorElement *mPFDeltaR_pTCorrected_PFpT_20To30; //MZ
MonitorElement *mPFDeltaR_pTCorrected_PFpT_30To50; //MZ
MonitorElement *mPFDeltaR_pTCorrected_PFpT_50To80; //MZ
MonitorElement *mPFDeltaR_pTCorrected_PFpT_80To120; //MZ
MonitorElement *mPFDeltaR_pTCorrected_PFpT_120To180; //MZ
MonitorElement *mPFDeltaR_pTCorrected_PFpT_180To300; //MZ
MonitorElement *mPFDeltaR_pTCorrected_PFpT_300ToInf; //MZ

MonitorElement *mPFDeltaR_pTCorrected_PFVsInitialpT_20To30; //MZ
MonitorElement *mPFDeltaR_pTCorrected_PFVsInitialpT_30To50; //MZ
MonitorElement *mPFDeltaR_pTCorrected_PFVsInitialpT_50To80; //MZ
MonitorElement *mPFDeltaR_pTCorrected_PFVsInitialpT_80To120; //MZ
MonitorElement *mPFDeltaR_pTCorrected_PFVsInitialpT_120To180; //MZ
MonitorElement *mPFDeltaR_pTCorrected_PFVsInitialpT_180To300; //MZ
MonitorElement *mPFDeltaR_pTCorrected_PFVsInitialpT_300ToInf; //MZ

MonitorElement *mPFVsPtInitialDeltaR_pTCorrected; //MZ
MonitorElement *mPFVsPtDeltaR_pTCorrected; //MZ
MonitorElement *mNCalopart;
MonitorElement *mCaloPt;
MonitorElement *mCaloEta;
Expand Down Expand Up @@ -288,6 +383,42 @@ class JetAnalyzer_HeavyIons : public DQMEDAnalyzer {
MonitorElement* mNJets;
MonitorElement* mNJets_40;

MonitorElement* mPFCandpT_vs_eta_Unknown; // pf id 0
MonitorElement* mPFCandpT_vs_eta_ChargedHadron; // pf id - 1
MonitorElement* mPFCandpT_vs_eta_electron; // pf id - 2
MonitorElement* mPFCandpT_vs_eta_muon; // pf id - 3
MonitorElement* mPFCandpT_vs_eta_photon; // pf id - 4
MonitorElement* mPFCandpT_vs_eta_NeutralHadron; // pf id - 5
MonitorElement* mPFCandpT_vs_eta_HadE_inHF; // pf id - 6
MonitorElement* mPFCandpT_vs_eta_EME_inHF; // pf id - 7

MonitorElement* mPFCandpT_Barrel_Unknown; // pf id 0
MonitorElement* mPFCandpT_Barrel_ChargedHadron; // pf id - 1
MonitorElement* mPFCandpT_Barrel_electron; // pf id - 2
MonitorElement* mPFCandpT_Barrel_muon; // pf id - 3
MonitorElement* mPFCandpT_Barrel_photon; // pf id - 4
MonitorElement* mPFCandpT_Barrel_NeutralHadron; // pf id - 5
MonitorElement* mPFCandpT_Barrel_HadE_inHF; // pf id - 6
MonitorElement* mPFCandpT_Barrel_EME_inHF; // pf id - 7

MonitorElement* mPFCandpT_Endcap_Unknown; // pf id 0
MonitorElement* mPFCandpT_Endcap_ChargedHadron; // pf id - 1
MonitorElement* mPFCandpT_Endcap_electron; // pf id - 2
MonitorElement* mPFCandpT_Endcap_muon; // pf id - 3
MonitorElement* mPFCandpT_Endcap_photon; // pf id - 4
MonitorElement* mPFCandpT_Endcap_NeutralHadron; // pf id - 5
MonitorElement* mPFCandpT_Endcap_HadE_inHF; // pf id - 6
MonitorElement* mPFCandpT_Endcap_EME_inHF; // pf id - 7

MonitorElement* mPFCandpT_Forward_Unknown; // pf id 0
MonitorElement* mPFCandpT_Forward_ChargedHadron; // pf id - 1
MonitorElement* mPFCandpT_Forward_electron; // pf id - 2
MonitorElement* mPFCandpT_Forward_muon; // pf id - 3
MonitorElement* mPFCandpT_Forward_photon; // pf id - 4
MonitorElement* mPFCandpT_Forward_NeutralHadron; // pf id - 5
MonitorElement* mPFCandpT_Forward_HadE_inHF; // pf id - 6
MonitorElement* mPFCandpT_Forward_EME_inHF; // pf id - 7

// Parameters

bool isCaloJet;
Expand All @@ -299,6 +430,8 @@ class JetAnalyzer_HeavyIons : public DQMEDAnalyzer {

static const Int_t nedge_pseudorapidity = etaBins_ + 1;




};

Expand Down
Loading

0 comments on commit 4079148

Please sign in to comment.