63 std::vector<MonitorElement *>
hOffP_;
84 LogDebug(
"HcalIsoTrack") <<
"Folder " <<
folderName_ <<
" Input Tag for Trigger " << labelTrigger_ <<
" track "
85 << labelTrack_ <<
" threshold " << pThr_ <<
" with " << l1FilterTag_.size()
86 <<
" level 1 and " << hltFilterTag_.size() <<
" hlt filter tags"
88 for (
unsigned int k = 0;
k < l1FilterTag_.size(); ++
k)
89 LogDebug(
"HcalIsoTrack") <<
"L1FilterTag[" <<
k <<
"] " << l1FilterTag_[
k] <<
"\n";
90 for (
unsigned int k = 0;
k < hltFilterTag_.size(); ++
k)
91 LogDebug(
"HcalIsoTrack") <<
"HLTFilterTag[" <<
k <<
"] " << hltFilterTag_[
k] <<
"\n";
104 LogDebug(
"HcalIsoTrack") <<
"Gets Trigger information with " << trEv.
isValid() <<
" and offline tracks with "
105 << recoIsoTracks.
isValid() <<
"\n";
113 double etaTrigl1(-10000), phiTrigl1(-10000), ptMaxl1(0);
115 LogDebug(
"HcalIsoTrack") << trEv->filterTag(iFilt).label() <<
" find for " <<
l1FilterTag_[
k] <<
" gives "
117 if ((trEv->filterTag(iFilt).label()).
find(
l1FilterTag_[k]) != std::string::npos) {
118 KEYSl1 = trEv->filterKeys(iFilt);
120 LogDebug(
"HcalIsoTrack") <<
"# of objects " << nRegl1 <<
"\n";
123 LogDebug(
"HcalIsoTrack") <<
"Object[" << iReg <<
"] with pt " << TObj.
pt() <<
" " << TObj.
eta() <<
" "
124 << TObj.
phi() <<
"\n";
125 if (TObj.
pt() > ptMaxl1) {
126 etaTrigl1 = TObj.
eta();
127 phiTrigl1 = TObj.
phi();
133 LogDebug(
"HcalIsoTrack") <<
"For L1 trigger type " <<
k <<
" pt " << ptMaxl1 <<
" eta " << etaTrigl1 <<
" phi "
134 << phiTrigl1 <<
"\n";
145 LogDebug(
"HcalIsoTrack") << trEv->filterTag(iFilt).label() <<
" find for " <<
hltFilterTag_[
l] <<
" gives "
147 if ((trEv->filterTag(iFilt).label()).
find(
hltFilterTag_[l]) != std::string::npos) {
148 KEYS = trEv->filterKeys(iFilt);
150 LogDebug(
"HcalIsoTrack") <<
"# of objects for HLT " << nReg <<
"\n";
154 LogDebug(
"HcalIsoTrack") <<
"HLT Filter Tag " << l <<
" trigger " << iFilt <<
" object " << iReg <<
" p "
164 double minRecoL3dist(1000),
pt(1000);
165 reco::HcalIsolatedTrackCandidateCollection::const_iterator mrtr;
166 for (mrtr = recoIsoTracks->begin(); mrtr != recoIsoTracks->end(); mrtr++) {
167 double R =
deltaR(mrtr->eta(), mrtr->phi(), TObj.
eta(), TObj.
phi());
168 if (R < minRecoL3dist) {
173 LogDebug(
"HcalIsoTrack") <<
"Minimum R " << minRecoL3dist <<
" pt " << pt <<
":" << TObj.
pt() <<
"\n";
175 if (minRecoL3dist < 0.02)
187 for (reco::HcalIsolatedTrackCandidateCollection::const_iterator itr = recoIsoTracks->begin();
188 itr != recoIsoTracks->end();
192 std::pair<int, int>
etaphi = itr->towerIndex();
195 LogDebug(
"HcalIsoTrack") <<
"Reco track p " << itr->p() <<
" eta|phi " << etaphi.first <<
"|" << etaphi.second
196 <<
" maxP " << itr->maxP() <<
" EcalE " << itr->energyEcal() <<
" pointers " <<
hHltP_[3]
198 if (itr->p() >=
pThr_) {
199 hHltP_[3]->Fill(itr->p());
201 hHltPhi_[3]->Fill(itr->phi());
203 double etaAbs =
std::abs(itr->eta());
204 hOffP_[0]->Fill(itr->p());
207 LogDebug(
"HcalIsoTrack") <<
"Range " << l <<
" p " << itr->p() <<
" pointer " <<
hOffP_[
l];
217 LogDebug(
"HcalIsoTrack") <<
"Accept " << accept <<
"\n";
226 sprintf(title,
"p_T of L1 object for %s",
l1FilterTag_[
k].c_str());
227 hL1Pt_.push_back(iBooker.
book1D(name, title, 1000, 0, 1000));
228 hL1Pt_[
k]->setAxisTitle(
"p_T (GeV)", 1);
230 sprintf(title,
"#eta of L1 object for %s",
l1FilterTag_[
k].c_str());
231 hL1Eta_.push_back(iBooker.
book1D(name, title, 100, -2.5, 2.5));
232 hL1Eta_[
k]->setAxisTitle(
"#eta", 1);
234 sprintf(title,
"#phi of L1 object for %s",
l1FilterTag_[
k].c_str());
235 hL1phi_.push_back(iBooker.
book1D(name, title, 100, -3.2, 3.2));
236 hL1phi_[
k]->setAxisTitle(
"#phi", 1);
240 for (
unsigned int l = 0;
l < 4;
l++) {
241 sprintf(name,
"hp%s", types[
l].c_str());
242 sprintf(title,
"Momentum of %s object", types[
l].c_str());
243 hHltP_.push_back(iBooker.
book1D(name, title, 200, 0, 1000));
244 hHltP_[
l]->setAxisTitle(
"p (GeV)", 1);
245 sprintf(name,
"heta%s", types[
l].c_str());
246 sprintf(title,
"#eta of %s object", types[
l].c_str());
249 sprintf(name,
"hphi%s", types[
l].c_str());
250 sprintf(title,
"#phi of %s object", types[
l].c_str());
254 sprintf(title,
"Distance of offline track from L3 object");
257 sprintf(title,
"Ratio of p L3/Offline");
264 ifL3_.push_back(indx == 2);
269 double etaV[6] = {0.0, 0.5, 1.0, 1.5, 2.0, 2.5};
270 for (
unsigned int k = 0;
k < 6; ++
k) {
271 sprintf(name,
"hOffP%d",
k);
273 sprintf(title,
"p of AlCaReco object (All)");
275 sprintf(title,
"p of AlCaReco object (%3.1f < |#eta| < %3.1f)", etaV[
k - 1], etaV[
k]);
278 hOffP_.push_back(iBooker.
book1D(name, title, 1000, 0, 1000));
279 hOffP_[
k]->setAxisTitle(
"E (GeV)", 1);
281 hMaxP_ = iBooker.
book1D(
"hChgIsol",
"Energy for charge isolation", 110, -10, 100);
283 hEnEcal_ = iBooker.
book1D(
"hEnEcal",
"Energy in ECAL", 100, 0, 20);
285 hIeta_ = iBooker.
book1D(
"hIEta",
"i#eta for HCAL tower", 90, -45, 45);
287 hIphi_ = iBooker.
book1D(
"hIPhi",
"i#phi for HCAL tower", 72, 0, 72);
std::pair< T, T > etaphi(T x, T y, T z)
T getUntrackedParameter(std::string const &, T const &) const
edm::InputTag labelTrack_
std::vector< MonitorElement * > hL1phi_
virtual void setCurrentFolder(std::string const &fullpath)
edm::EDGetTokenT< reco::HcalIsolatedTrackCandidateCollection > tokTrack_
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void analyze(const edm::Event &, const edm::EventSetup &) override
#define DEFINE_FWK_MODULE(type)
DQMHcalIsoTrackAlCaReco(const edm::ParameterSet &)
std::vector< unsigned int > indexH_
edm::InputTag labelTrigger_
std::vector< MonitorElement * > hHltP_
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
std::vector< double > etaRange_
Single trigger physics object (e.g., an isolated muon)
edm::EDGetTokenT< trigger::TriggerEvent > tokTrigger_
std::vector< MonitorElement * > hHltPhi_
std::vector< MonitorElement * > hHltEta_
std::vector< MonitorElement * > hL1Pt_
Abs< T >::type abs(const T &t)
~DQMHcalIsoTrackAlCaReco() override
std::vector< std::string > hltFilterTag_
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
std::vector< bool > ifL3_
std::vector< size_type > Keys
T getParameter(std::string const &) const
std::vector< MonitorElement * > hL1Eta_
MonitorElement * hEnEcal_
std::vector< MonitorElement * > hOffP_
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
std::vector< std::string > l1FilterTag_
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)