50 theTriggerPathToPass_ =
parameters.getParameter<
string>(
"triggerPathToPass");
51 thePlotTheseTriggersToo_ =
parameters.getParameter<vector<string> >(
"plotTheseTriggersToo");
54 thePhotonCollectionToken_ = consumes<reco::PhotonCollection>(
parameters.getParameter<
InputTag>(
"photonCollection"));
55 theJetCollectionToken_ = consumes<edm::View<reco::Jet> >(
parameters.getParameter<
InputTag>(
"jetCollection"));
56 theVertexCollectionToken_ = consumes<reco::VertexCollection>(
parameters.getParameter<
InputTag>(
"vertexCollection"));
57 theMinJetPt_ =
parameters.getParameter<
double>(
"minJetPt");
58 theMinPhotonEt_ =
parameters.getParameter<
double>(
"minPhotonEt");
59 theRequirePhotonFound_ =
parameters.getParameter<
bool>(
"requirePhotonFound");
60 thePlotPhotonMaxEt_ =
parameters.getParameter<
double>(
"plotPhotonMaxEt");
61 thePlotPhotonMaxEta_ =
parameters.getParameter<
double>(
"plotPhotonMaxEta");
62 thePlotJetMaxEta_ =
parameters.getParameter<
double>(
"plotJetMaxEta");
65 theBarrelRecHitToken_ = consumes<EcalRecHitCollection>(
parameters.getParameter<
InputTag>(
"barrelRecHitTag"));
66 theEndcapRecHitToken_ = consumes<EcalRecHitCollection>(
parameters.getParameter<
InputTag>(
"endcapRecHitTag"));
69 h_deltaEt_photon_jet =
nullptr;
70 h_deltaPhi_jet_jet2 =
nullptr;
71 h_deltaPhi_photon_jet =
nullptr;
72 h_deltaPhi_photon_jet2 =
nullptr;
73 h_deltaR_jet_jet2 =
nullptr;
74 h_deltaR_photon_jet2 =
nullptr;
77 h_jet2_ptOverPhotonEt =
nullptr;
78 h_jet_count =
nullptr;
81 h_photon_count_bar =
nullptr;
82 h_photon_count_end =
nullptr;
83 h_photon_et =
nullptr;
84 h_photon_et_beforeCuts =
nullptr;
85 h_photon_et_jetco =
nullptr;
86 h_photon_et_jetcs =
nullptr;
87 h_photon_et_jetfo =
nullptr;
88 h_photon_et_jetfs =
nullptr;
89 h_photon_eta =
nullptr;
90 h_triggers_passed =
nullptr;
102 std::stringstream aStringStream;
105 aString = aStringStream.str();
110 "triggers_passed",
"Events passing these trigger paths", numOfTriggersToMonitor, 0, numOfTriggersToMonitor);
111 for (
int i = 0;
i < numOfTriggersToMonitor;
i++) {
117 "photon_et_beforeCuts",
"#gamma with highest E_{T};E_{T}(#gamma) (GeV)", 20, 0.,
thePlotPhotonMaxEt_);
123 "photon_count_bar",
"Number of #gamma's passing selection (Barrel);Number of #gamma's", 8, -0.5, 7.5);
125 "photon_count_end",
"Number of #gamma's passing selection (Endcap);Number of #gamma's", 8, -0.5, 7.5);
138 ibooker.
book1D(
"deltaPhi_photon_jet",
139 "#Delta#phi between Highest E_{T} #gamma and jet;#Delta#phi(#gamma,1^{st} jet)",
144 "#Delta#phi between Highest E_{T} jet and 2^{nd} " 145 "jet;#Delta#phi(1^{st} jet,2^{nd} jet)",
150 "(E_{T}(#gamma)-p_{T}(jet))/E_{T}(#gamma) when #Delta#phi(#gamma,1^{st} " 151 "jet) > 2.8;#DeltaE_{T}(#gamma,1^{st} jet)/E_{T}(#gamma)",
156 ibooker.
book1D(
"jet_count",
168 ibooker.
book1D(
"jet2_eta",
174 "jet2_ptOverPhotonEt",
"p_{T}(2^{nd} highest jet) / E_{T}(#gamma);p_{T}(2^{nd} Jet)/E_{T}(#gamma)", 20, 0.0, 4.0);
176 "#Delta#phi between Highest E_{T} #gamma and 2^{nd} " 177 "highest jet;#Delta#phi(#gamma,2^{nd} jet)",
182 "deltaR_jet_jet2",
"#DeltaR between Highest Jet and 2^{nd} Highest;#DeltaR(1^{st} jet,2^{nd} jet)", 30, 0, 6.0);
184 "#DeltaR between Highest E_{T} #gamma and 2^{nd} " 185 "jet;#DeltaR(#gamma, 2^{nd} jet)",
191 Float_t bins_et[] = {15, 20, 30, 50, 80};
194 "#gamma with highest E_{T} (#eta(jet)<1.45, " 195 "#eta(#gamma)#eta(jet)>0);E_{T}(#gamma) (GeV)",
199 "#gamma with highest E_{T} (#eta(jet)<1.45, " 200 "#eta(#gamma)#eta(jet)<0);E_{T}(#gamma) (GeV)",
204 "#gamma with highest E_{T} (1.55<#eta(jet)<2.5, " 205 "#eta(#gamma)#eta(jet)>0);E_{T}(#gamma) (GeV)",
209 "#gamma with highest E_{T} (1.55<#eta(jet)<2.5, " 210 "#eta(#gamma)#eta(jet)<0);E_{T}(#gamma) (GeV)",
215 if (
me->getTH1F()->GetSumw2N() == 0) {
239 bool passed_HLT =
false;
245 for (
unsigned int ti = 0; (ti <
trigNames.size()) && !passed_HLT; ++ti) {
248 passed_HLT = HLTresults->
accept(ti);
266 for (
unsigned int ti = 0; ti <
trigNames.size(); ++ti) {
269 passed_HLT = HLTresults->
accept(ti);
339 float photon_et = -9.0;
340 float photon_eta = -9.0;
341 float photon_phi = -9.0;
342 bool photon_passPhotonID =
false;
343 bool found_lead_pho =
false;
344 int photon_count_bar = 0;
345 int photon_count_end = 0;
348 auto pho_maxet = std::max_element(
378 bool pho_current_passPhotonID =
false;
379 bool pho_current_isEB = pho_maxet->isEB();
380 bool pho_current_isEE = pho_maxet->isEE();
382 if (pho_current_isEB && (pho_maxet->sigmaIetaIeta() < 0.01 || pho_maxet->hadronicOverEm() < 0.05)) {
384 pho_current_passPhotonID =
true;
386 }
else if (pho_current_isEE && (pho_maxet->hadronicOverEm() < 0.05)) {
388 pho_current_passPhotonID =
true;
392 if (!found_lead_pho) {
393 found_lead_pho =
true;
394 photon_passPhotonID = pho_current_passPhotonID;
395 photon_et = pho_maxet->et();
396 photon_eta = pho_maxet->eta();
397 photon_phi = pho_maxet->phi();
415 float jet_eta = -8.0;
416 float jet_phi = -8.0;
418 float jet2_pt = -9.0;
419 float jet2_eta = -9.0;
420 float jet2_phi = -9.0;
422 for (
unsigned int i_jet = 0; i_jet <
jetCollection->size(); i_jet++) {
425 float jet_current_pt =
jet->pt();
428 if (
deltaR(
jet->eta(),
jet->phi(), photon_eta, photon_phi) < 0.5)
435 if (jet_current_pt > jet_pt) {
439 jet_pt = jet_current_pt;
440 jet_eta =
jet->eta();
441 jet_phi =
jet->phi();
442 }
else if (jet_current_pt > jet2_pt) {
443 jet2_pt = jet_current_pt;
444 jet2_eta =
jet->eta();
445 jet2_phi =
jet->phi();
462 if (fabs(photon_eta) < 1.45 && photon_passPhotonID) {
463 if (fabs(jet_eta) < 1.45) {
464 if (photon_eta * jet_eta > 0) {
469 }
else if (jet_eta > 1.55 && jet_eta < 2.5) {
470 if (photon_eta * jet_eta > 0) {
bool accept() const
Has at least one path accepted the event?
edm::EDGetTokenT< edm::View< reco::Jet > > theJetCollectionToken_
MonitorElement * h_photon_et
edm::InputTag theJetCollectionLabel_
double thePlotPhotonMaxEta_
MonitorElement * h_photon_eta
const bool isValid(const Frame &aFrame, const FrameQuality &aQuality, const uint16_t aExpectedPos)
MonitorElement * h_photon_count_bar
edm::EDGetTokenT< edm::TriggerResults > trigTagToken_
MonitorElement * h_photon_et_jetco
virtual void setCurrentFolder(std::string const &fullpath)
std::vector< std::string > thePlotTheseTriggersToo_
edm::EDGetTokenT< reco::VertexCollection > theVertexCollectionToken_
MonitorElement * h_deltaR_jet_jet2
T const * product() const
MonitorElement * h_deltaR_photon_jet2
MonitorElement * h_photon_et_jetfs
std::vector< Vertex > VertexCollection
collection of Vertex objects
MonitorElement * h_deltaEt_photon_jet
MonitorElement * h_jet_count
MonitorElement * h_jet_eta
QcdPhotonsDQM(const edm::ParameterSet &)
Constructor.
double thePlotPhotonMaxEt_
MonitorElement * h_photon_et_jetfo
MonitorElement * h_jet2_ptOverPhotonEt
MonitorElement * h_photon_et_jetcs
Container::value_type value_type
MonitorElement * h_jet2_pt
MonitorElement * h_photon_et_beforeCuts
MonitorElement * h_jet_pt
Abs< T >::type abs(const T &t)
edm::EDGetTokenT< EcalRecHitCollection > theBarrelRecHitToken_
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
bool theRequirePhotonFound_
MonitorElement * h_photon_count_end
static const char *const trigNames[]
std::string theTriggerPathToPass_
MonitorElement * h_jet2_eta
MonitorElement * h_deltaPhi_photon_jet2
EcalClusterLazyTools::ESGetTokens ecalClusterToolsESGetTokens_
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * h_triggers_passed
edm::EDGetTokenT< reco::PhotonCollection > thePhotonCollectionToken_
MonitorElement * h_deltaPhi_jet_jet2
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
MonitorElement * h_deltaPhi_photon_jet
void analyze(const edm::Event &, const edm::EventSetup &) override
Get the analysis.
edm::EDGetTokenT< EcalRecHitCollection > theEndcapRecHitToken_
~QcdPhotonsDQM() override
Destructor.