CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
TkAlCaRecoMonitor Class Reference

#include <TkAlCaRecoMonitor.h>

Inheritance diagram for TkAlCaRecoMonitor:
DQMEDAnalyzer edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
 TkAlCaRecoMonitor (const edm::ParameterSet &)
 
 ~TkAlCaRecoMonitor () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Private Member Functions

void fillHitmaps (const reco::Track &track, const TrackerGeometry &geometry)
 
void fillRawIdMap (const TrackerGeometry &geometry)
 

Private Attributes

MonitorElementAlCaRecoTrackEfficiency_
 
std::map< int, int > binByRawId_
 
edm::ParameterSet conf_
 
double daughterMass_
 
bool fillInvariantMass_
 
bool fillRawIdMap_
 
MonitorElementHits_perDetId_
 
MonitorElementHits_XvsY_
 
MonitorElementHits_ZvsR_
 
MonitorElementinvariantMass_
 
edm::EDGetTokenT< reco::CaloJetCollectionjetCollection_
 
MonitorElementjetPt_
 
double maxJetPt_
 
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecordmfToken_
 
MonitorElementminJetDeltaR_
 
MonitorElementminTrackDeltaR_
 
edm::EDGetTokenT< reco::TrackCollectionreferenceTrackProducer_
 
bool runsOnReco_
 
MonitorElementsumCharge_
 
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecordtkGeomToken_
 
MonitorElementTrackCurvature_
 
edm::EDGetTokenT< reco::TrackCollectiontrackProducer_
 
MonitorElementTrackPtNegative_
 
MonitorElementTrackPtPositive_
 
MonitorElementTrackQuality_
 
bool useSignedR_
 

Additional Inherited Members

- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static void globalEndJob (DQMEDAnalyzerGlobalCache const *)
 
static void globalEndLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup, LuminosityBlockContext const *context)
 
static void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup, RunContext const *context)
 
static std::unique_ptr< DQMEDAnalyzerGlobalCacheinitializeGlobalCache (edm::ParameterSet const &)
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

DQM/TrackerMonitorTrack/src/TkAlCaRecoMonitor.cc Monitoring special quantities related to Tracker Alignment AlCaReco Production.

Definition at line 32 of file TkAlCaRecoMonitor.h.

Constructor & Destructor Documentation

◆ TkAlCaRecoMonitor()

TkAlCaRecoMonitor::TkAlCaRecoMonitor ( const edm::ParameterSet iConfig)
explicit

Definition at line 25 of file TkAlCaRecoMonitor.cc.

27  conf_ = iConfig;
28  trackProducer_ = consumes<reco::TrackCollection>(conf_.getParameter<edm::InputTag>("TrackProducer"));
30  consumes<reco::TrackCollection>(conf_.getParameter<edm::InputTag>("ReferenceTrackProducer"));
31  jetCollection_ = mayConsume<reco::CaloJetCollection>(conf_.getParameter<edm::InputTag>("CaloJetCollection"));
32 }

References conf_, edm::ParameterSet::getParameter(), jetCollection_, referenceTrackProducer_, and trackProducer_.

◆ ~TkAlCaRecoMonitor()

TkAlCaRecoMonitor::~TkAlCaRecoMonitor ( )
override

Definition at line 34 of file TkAlCaRecoMonitor.cc.

34 {}

Member Function Documentation

◆ analyze()

void TkAlCaRecoMonitor::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overridevirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 193 of file TkAlCaRecoMonitor.cc.

193  {
196  if (!trackCollection.isValid()) {
197  edm::LogError("Alignment") << "invalid trackcollection encountered!";
198  return;
199  }
200 
201  edm::Handle<reco::TrackCollection> referenceTrackCollection;
202  iEvent.getByToken(referenceTrackProducer_, referenceTrackCollection);
203  if (!trackCollection.isValid()) {
204  edm::LogError("Alignment") << "invalid reference track-collection encountered!";
205  return;
206  }
207 
208  const auto &geometry = iSetup.getHandle(tkGeomToken_);
209  if (!geometry.isValid()) {
210  edm::LogError("Alignment") << "invalid geometry found in event setup!";
211  }
212 
213  const auto &magneticField = iSetup.getHandle(mfToken_);
214  if (!magneticField.isValid()) {
215  edm::LogError("Alignment") << "invalid magnetic field configuration encountered!";
216  return;
217  }
218 
220  if (runsOnReco_) {
221  iEvent.getByToken(jetCollection_, jets);
222  if (!jets.isValid()) {
223  edm::LogError("Alignment") << "no jet collection found in event!";
224  }
225  }
226  // fill only once - not yet in beginJob since no access to geometry
227  if (fillRawIdMap_ && binByRawId_.empty())
228  this->fillRawIdMap(*geometry);
229 
230  AlCaRecoTrackEfficiency_->Fill(static_cast<double>((*trackCollection).size()) / (*referenceTrackCollection).size());
231 
232  double sumOfCharges = 0;
233  for (reco::TrackCollection::const_iterator track = (*trackCollection).begin(); track < (*trackCollection).end();
234  ++track) {
235  double dR = 0;
236  if (runsOnReco_) {
237  double minJetDeltaR = 10; // some number > 2pi
238  for (reco::CaloJetCollection::const_iterator itJet = jets->begin(); itJet != jets->end(); ++itJet) {
239  jetPt_->Fill((*itJet).pt());
240  dR = deltaR((*track), (*itJet));
241  if ((*itJet).pt() > maxJetPt_ && dR < minJetDeltaR)
242  minJetDeltaR = dR;
243 
244  // edm::LogInfo("Alignment") <<"> isolated: "<< isolated << " jetPt "<<
245  // (*itJet).pt() <<" deltaR: "<< deltaR(*(*it),(*itJet)) ;
246  }
248  }
249 
250  double minTrackDeltaR = 10; // some number > 2pi
251  for (reco::TrackCollection::const_iterator track2 = (*trackCollection).begin(); track2 < (*trackCollection).end();
252  ++track2) {
253  dR = deltaR((*track), (*track2));
254  if (dR < minTrackDeltaR && dR > 1e-6)
255  minTrackDeltaR = dR;
256  }
257 
258  for (int i = 0; i < reco::TrackBase::qualitySize; ++i) {
259  if ((*track).quality(reco::TrackBase::TrackQuality(i))) {
260  TrackQuality_->Fill(i);
261  }
262  }
263 
264  GlobalPoint gPoint((*track).vx(), (*track).vy(), (*track).vz());
265  double B = magneticField->inTesla(gPoint).z();
266  double curv = -(*track).charge() * 0.002998 * B / (*track).pt();
267  TrackCurvature_->Fill(curv);
268 
269  if ((*track).charge() > 0)
270  TrackPtPositive_->Fill((*track).pt());
271  if ((*track).charge() < 0)
272  TrackPtNegative_->Fill((*track).pt());
273 
274  minTrackDeltaR_->Fill(minTrackDeltaR);
276  sumOfCharges += (*track).charge();
277  }
278 
279  sumCharge_->Fill(sumOfCharges);
280 
281  if (fillInvariantMass_) {
282  if ((*trackCollection).size() == 2) {
283  TLorentzVector track0(
284  (*trackCollection).at(0).px(),
285  (*trackCollection).at(0).py(),
286  (*trackCollection).at(0).pz(),
287  sqrt(((*trackCollection).at(0).p() * (*trackCollection).at(0).p()) + daughterMass_ * daughterMass_));
288  TLorentzVector track1(
289  (*trackCollection).at(1).px(),
290  (*trackCollection).at(1).py(),
291  (*trackCollection).at(1).pz(),
292  sqrt(((*trackCollection).at(1).p() * (*trackCollection).at(1).p()) + daughterMass_ * daughterMass_));
293  TLorentzVector mother = track0 + track1;
294 
295  invariantMass_->Fill(mother.M());
296  } else {
297  edm::LogInfo("Alignment") << "wrong number of tracks trackcollection encountered: " << (*trackCollection).size();
298  }
299  }
300 }

References AlCaRecoTrackEfficiency_, TtFullHadDaughter::B, binByRawId_, daughterMass_, PbPb_ZMuSkimMuonDPG_cff::deltaR, HGC3DClusterGenMatchSelector_cfi::dR, MillePedeFileConverter_cfg::e, dqm::impl::MonitorElement::Fill(), fillHitmaps(), fillInvariantMass_, fillRawIdMap(), fillRawIdMap_, edm::EventSetup::getHandle(), mps_fire::i, iEvent, invariantMass_, jetCollection_, jetPt_, singleTopDQM_cfi::jets, HLT_FULL_cff::magneticField, maxJetPt_, mfToken_, ALCARECOTkAlMuonIsolated_cff::minJetDeltaR, minJetDeltaR_, minTrackDeltaR_, reco::TrackBase::qualitySize, referenceTrackProducer_, runsOnReco_, mathSSE::sqrt(), sumCharge_, tkGeomToken_, HLT_FULL_cff::track, duplicaterechits_cfi::trackCollection, TrackCurvature_, trackProducer_, TrackPtNegative_, TrackPtPositive_, and TrackQuality_.

◆ bookHistograms()

void TkAlCaRecoMonitor::bookHistograms ( DQMStore::IBooker iBooker,
edm::Run const &  ,
edm::EventSetup const &   
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 36 of file TkAlCaRecoMonitor.cc.

36  {
37  std::string histname; // for naming the histograms according to algorithm used
38 
40  std::string MEFolderName = conf_.getParameter<std::string>("FolderName");
41 
42  daughterMass_ = conf_.getParameter<double>("daughterMass");
43 
44  maxJetPt_ = conf_.getParameter<double>("maxJetPt");
45 
46  iBooker.setCurrentFolder(MEFolderName + "/TkAlignmentSpecific");
47  fillInvariantMass_ = conf_.getParameter<bool>("fillInvariantMass");
48  runsOnReco_ = conf_.getParameter<bool>("runsOnReco");
49  useSignedR_ = conf_.getParameter<bool>("useSignedR");
50  fillRawIdMap_ = conf_.getParameter<bool>("fillRawIdMap");
51 
52  //
53  unsigned int MassBin = conf_.getParameter<unsigned int>("MassBin");
54  double MassMin = conf_.getParameter<double>("MassMin");
55  double MassMax = conf_.getParameter<double>("MassMax");
56 
57  if (fillInvariantMass_) {
58  histname = "InvariantMass_";
59  invariantMass_ = iBooker.book1D(histname + AlgoName, histname + AlgoName, MassBin, MassMin, MassMax);
60  invariantMass_->setAxisTitle("invariant Mass / GeV");
61  } else {
62  invariantMass_ = nullptr;
63  }
64 
65  unsigned int TrackPtPositiveBin = conf_.getParameter<unsigned int>("TrackPtBin");
66  double TrackPtPositiveMin = conf_.getParameter<double>("TrackPtMin");
67  double TrackPtPositiveMax = conf_.getParameter<double>("TrackPtMax");
68 
69  histname = "TrackPtPositive_";
70  TrackPtPositive_ = iBooker.book1D(
71  histname + AlgoName, histname + AlgoName, TrackPtPositiveBin, TrackPtPositiveMin, TrackPtPositiveMax);
72  TrackPtPositive_->setAxisTitle("p_{T} of tracks charge > 0");
73 
74  unsigned int TrackPtNegativeBin = conf_.getParameter<unsigned int>("TrackPtBin");
75  double TrackPtNegativeMin = conf_.getParameter<double>("TrackPtMin");
76  double TrackPtNegativeMax = conf_.getParameter<double>("TrackPtMax");
77 
78  histname = "TrackPtNegative_";
79  TrackPtNegative_ = iBooker.book1D(
80  histname + AlgoName, histname + AlgoName, TrackPtNegativeBin, TrackPtNegativeMin, TrackPtNegativeMax);
81  TrackPtNegative_->setAxisTitle("p_{T} of tracks charge < 0");
82 
83  histname = "TrackQuality_";
84  TrackQuality_ = iBooker.book1D(
85  histname + AlgoName, histname + AlgoName, reco::TrackBase::qualitySize, -0.5, reco::TrackBase::qualitySize - 0.5);
86  TrackQuality_->setAxisTitle("quality");
87  for (int i = 0; i < reco::TrackBase::qualitySize; ++i) {
88  TrackQuality_->getTH1()->GetXaxis()->SetBinLabel(
90  }
91 
92  unsigned int SumChargeBin = conf_.getParameter<unsigned int>("SumChargeBin");
93  double SumChargeMin = conf_.getParameter<double>("SumChargeMin");
94  double SumChargeMax = conf_.getParameter<double>("SumChargeMax");
95 
96  histname = "SumCharge_";
97  sumCharge_ = iBooker.book1D(histname + AlgoName, histname + AlgoName, SumChargeBin, SumChargeMin, SumChargeMax);
98  sumCharge_->setAxisTitle("#SigmaCharge");
99 
100  unsigned int TrackCurvatureBin = conf_.getParameter<unsigned int>("TrackCurvatureBin");
101  double TrackCurvatureMin = conf_.getParameter<double>("TrackCurvatureMin");
102  double TrackCurvatureMax = conf_.getParameter<double>("TrackCurvatureMax");
103 
104  histname = "TrackCurvature_";
107  TrackCurvature_->setAxisTitle("#kappa track");
108 
109  if (runsOnReco_) {
110  unsigned int JetPtBin = conf_.getParameter<unsigned int>("JetPtBin");
111  double JetPtMin = conf_.getParameter<double>("JetPtMin");
112  double JetPtMax = conf_.getParameter<double>("JetPtMax");
113 
114  histname = "JetPt_";
115  jetPt_ = iBooker.book1D(histname + AlgoName, histname + AlgoName, JetPtBin, JetPtMin, JetPtMax);
116  jetPt_->setAxisTitle("jet p_{T} / GeV");
117 
118  unsigned int MinJetDeltaRBin = conf_.getParameter<unsigned int>("MinJetDeltaRBin");
119  double MinJetDeltaRMin = conf_.getParameter<double>("MinJetDeltaRMin");
120  double MinJetDeltaRMax = conf_.getParameter<double>("MinJetDeltaRMax");
121 
122  histname = "MinJetDeltaR_";
123  minJetDeltaR_ =
124  iBooker.book1D(histname + AlgoName, histname + AlgoName, MinJetDeltaRBin, MinJetDeltaRMin, MinJetDeltaRMax);
125  minJetDeltaR_->setAxisTitle("minimal Jet #DeltaR / rad");
126  } else {
127  jetPt_ = nullptr;
128  minJetDeltaR_ = nullptr;
129  }
130 
131  unsigned int MinTrackDeltaRBin = conf_.getParameter<unsigned int>("MinTrackDeltaRBin");
132  double MinTrackDeltaRMin = conf_.getParameter<double>("MinTrackDeltaRMin");
133  double MinTrackDeltaRMax = conf_.getParameter<double>("MinTrackDeltaRMax");
134 
135  histname = "MinTrackDeltaR_";
138  minTrackDeltaR_->setAxisTitle("minimal Track #DeltaR / rad");
139 
140  unsigned int TrackEfficiencyBin = conf_.getParameter<unsigned int>("TrackEfficiencyBin");
141  double TrackEfficiencyMin = conf_.getParameter<double>("TrackEfficiencyMin");
142  double TrackEfficiencyMax = conf_.getParameter<double>("TrackEfficiencyMax");
143 
144  histname = "AlCaRecoTrackEfficiency_";
147  Labels l_tp, l_rtp;
148  labelsForToken(referenceTrackProducer_, l_rtp);
149  labelsForToken(trackProducer_, l_tp);
150  AlCaRecoTrackEfficiency_->setAxisTitle("n(" + std::string(l_tp.module) + ") / n(" + std::string(l_rtp.module) + ")");
151 
152  int zBin = conf_.getParameter<unsigned int>("HitMapsZBin"); // 300
153  double zMax = conf_.getParameter<double>("HitMapZMax"); // 300.0; //cm
154 
155  int rBin = conf_.getParameter<unsigned int>("HitMapsRBin"); // 120;
156  double rMax = conf_.getParameter<double>("HitMapRMax"); // 120.0; //cm
157 
158  histname = "Hits_ZvsR_";
159  double rMin = 0.0;
160  if (useSignedR_)
161  rMin = -rMax;
162 
163  Hits_ZvsR_ = iBooker.book2D(histname + AlgoName, histname + AlgoName, zBin, -zMax, zMax, rBin, rMin, rMax);
164 
165  histname = "Hits_XvsY_";
166  Hits_XvsY_ = iBooker.book2D(histname + AlgoName, histname + AlgoName, rBin, -rMax, rMax, rBin, -rMax, rMax);
167 
168  if (fillRawIdMap_) {
169  histname = "Hits_perDetId_";
170 
171  // leads to differences in axsis between samples??
172  // int nModules = binByRawId_.size();
173  // Hits_perDetId_ = iBooker.book1D(histname+AlgoName, histname+AlgoName,
174  // nModules, static_cast<double>(nModules) -0.5,
175  // static_cast<double>(nModules) -0.5);
176  Hits_perDetId_ = iBooker.book1D(histname + AlgoName, histname + AlgoName, 16601, -0.5, 16600.5);
177  Hits_perDetId_->setAxisTitle("rawId Bins");
178 
180  // std::stringstream binLabel;
181  // for( std::map<int,int>::iterator it = binByRawId_.begin(); it !=
182  // binByRawId_.end(); ++it ){
183  // binLabel.str() = "";
184  // binLabel << (*it).first;
185  // Hits_perDetId_->getTH1()->GetXaxis()->SetBinLabel( (*it).second +1,
186  // binLabel.str().c_str());
187  // }
188  }
189 }

References AlCaRecoTrackEfficiency_, HLTSiStripMonitoring_cff::AlgoName, dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::book2D(), conf_, daughterMass_, fillInvariantMass_, fillRawIdMap_, edm::ParameterSet::getParameter(), dqm::impl::MonitorElement::getTH1(), Hits_perDetId_, Hits_XvsY_, Hits_ZvsR_, mps_fire::i, invariantMass_, jetPt_, TkAlCaRecoMonitor_cfi::JetPtBin, TkAlCaRecoMonitor_cfi::JetPtMax, TkAlCaRecoMonitor_cfi::JetPtMin, ALCARECOTkAlDQM_cff::MassBin, ALCARECOTkAlDQM_cff::MassMax, ALCARECOTkAlDQM_cff::MassMin, maxJetPt_, minJetDeltaR_, TkAlCaRecoMonitor_cfi::MinJetDeltaRBin, TkAlCaRecoMonitor_cfi::MinJetDeltaRMax, TkAlCaRecoMonitor_cfi::MinJetDeltaRMin, minTrackDeltaR_, TkAlCaRecoMonitor_cfi::MinTrackDeltaRBin, TkAlCaRecoMonitor_cfi::MinTrackDeltaRMax, TkAlCaRecoMonitor_cfi::MinTrackDeltaRMin, reco::TrackBase::qualityName(), reco::TrackBase::qualitySize, photonAnalyzer_cfi::rBin, referenceTrackProducer_, photonAnalyzer_cfi::rMax, photonAnalyzer_cfi::rMin, runsOnReco_, dqm::impl::MonitorElement::setAxisTitle(), dqm::implementation::NavigatorBase::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, sumCharge_, ALCARECOTkAlDQM_cff::SumChargeBin, ALCARECOTkAlDQM_cff::SumChargeMax, ALCARECOTkAlDQM_cff::SumChargeMin, TrackCurvature_, TkAlCaRecoMonitor_cfi::TrackCurvatureBin, TkAlCaRecoMonitor_cfi::TrackCurvatureMax, TkAlCaRecoMonitor_cfi::TrackCurvatureMin, TkAlCaRecoMonitor_cfi::TrackEfficiencyBin, TkAlCaRecoMonitor_cfi::TrackEfficiencyMax, TkAlCaRecoMonitor_cfi::TrackEfficiencyMin, trackProducer_, TrackPtNegative_, TrackPtPositive_, TrackQuality_, useSignedR_, photonAnalyzer_cfi::zBin, and photonAnalyzer_cfi::zMax.

◆ fillHitmaps()

void TkAlCaRecoMonitor::fillHitmaps ( const reco::Track track,
const TrackerGeometry geometry 
)
private

Definition at line 302 of file TkAlCaRecoMonitor.cc.

302  {
303  for (trackingRecHit_iterator iHit = track.recHitsBegin(); iHit != track.recHitsEnd(); ++iHit) {
304  if ((*iHit)->isValid()) {
305  const TrackingRecHit *hit = (*iHit);
306  const DetId geoId(hit->geographicalId());
307  const GeomDet *gd = geometry.idToDet(geoId);
308  // since 2_1_X local hit positions are transient. taking center of the hit
309  // module for now. The alternative would be the coarse estimation or a
310  // refit.
311  // const GlobalPoint globP( gd->toGlobal( hit->localPosition() ) );
312  const GlobalPoint globP(gd->toGlobal(Local3DPoint(0., 0., 0.)));
313  double r = sqrt(globP.x() * globP.x() + globP.y() * globP.y());
314  if (useSignedR_)
315  r *= globP.y() / fabs(globP.y());
316 
317  Hits_ZvsR_->Fill(globP.z(), r);
318  Hits_XvsY_->Fill(globP.x(), globP.y());
319 
320  if (fillRawIdMap_)
321  Hits_perDetId_->Fill(binByRawId_[geoId.rawId()]);
322  }
323  }
324 }

References binByRawId_, dqm::impl::MonitorElement::Fill(), fillRawIdMap_, Hits_perDetId_, Hits_XvsY_, Hits_ZvsR_, alignCSCRings::r, mathSSE::sqrt(), HLT_FULL_cff::track, and useSignedR_.

Referenced by analyze().

◆ fillRawIdMap()

void TkAlCaRecoMonitor::fillRawIdMap ( const TrackerGeometry geometry)
private

Definition at line 326 of file TkAlCaRecoMonitor.cc.

326  {
327  std::vector<int> sortedRawIds;
328  for (std::vector<DetId>::const_iterator iDetId = geometry.detUnitIds().begin(); iDetId != geometry.detUnitIds().end();
329  ++iDetId) {
330  sortedRawIds.push_back((*iDetId).rawId());
331  }
332  std::sort(sortedRawIds.begin(), sortedRawIds.end());
333 
334  int i = 0;
335  for (std::vector<int>::iterator iRawId = sortedRawIds.begin(); iRawId != sortedRawIds.end(); ++iRawId) {
336  binByRawId_[*iRawId] = i;
337  ++i;
338  }
339 }

References binByRawId_, mps_fire::i, and jetUpdater_cfi::sort.

Referenced by analyze().

Member Data Documentation

◆ AlCaRecoTrackEfficiency_

MonitorElement* TkAlCaRecoMonitor::AlCaRecoTrackEfficiency_
private

Definition at line 59 of file TkAlCaRecoMonitor.h.

Referenced by analyze(), and bookHistograms().

◆ binByRawId_

std::map<int, int> TkAlCaRecoMonitor::binByRawId_
private

Definition at line 77 of file TkAlCaRecoMonitor.h.

Referenced by analyze(), fillHitmaps(), and fillRawIdMap().

◆ conf_

edm::ParameterSet TkAlCaRecoMonitor::conf_
private

Definition at line 48 of file TkAlCaRecoMonitor.h.

Referenced by bookHistograms(), and TkAlCaRecoMonitor().

◆ daughterMass_

double TkAlCaRecoMonitor::daughterMass_
private

Definition at line 76 of file TkAlCaRecoMonitor.h.

Referenced by analyze(), and bookHistograms().

◆ fillInvariantMass_

bool TkAlCaRecoMonitor::fillInvariantMass_
private

Definition at line 68 of file TkAlCaRecoMonitor.h.

Referenced by analyze(), and bookHistograms().

◆ fillRawIdMap_

bool TkAlCaRecoMonitor::fillRawIdMap_
private

Definition at line 69 of file TkAlCaRecoMonitor.h.

Referenced by analyze(), bookHistograms(), and fillHitmaps().

◆ Hits_perDetId_

MonitorElement* TkAlCaRecoMonitor::Hits_perDetId_
private

Definition at line 60 of file TkAlCaRecoMonitor.h.

Referenced by bookHistograms(), and fillHitmaps().

◆ Hits_XvsY_

MonitorElement* TkAlCaRecoMonitor::Hits_XvsY_
private

Definition at line 66 of file TkAlCaRecoMonitor.h.

Referenced by bookHistograms(), and fillHitmaps().

◆ Hits_ZvsR_

MonitorElement* TkAlCaRecoMonitor::Hits_ZvsR_
private

Definition at line 65 of file TkAlCaRecoMonitor.h.

Referenced by bookHistograms(), and fillHitmaps().

◆ invariantMass_

MonitorElement* TkAlCaRecoMonitor::invariantMass_
private

Definition at line 53 of file TkAlCaRecoMonitor.h.

Referenced by analyze(), and bookHistograms().

◆ jetCollection_

edm::EDGetTokenT<reco::CaloJetCollection> TkAlCaRecoMonitor::jetCollection_
private

Definition at line 75 of file TkAlCaRecoMonitor.h.

Referenced by analyze(), and TkAlCaRecoMonitor().

◆ jetPt_

MonitorElement* TkAlCaRecoMonitor::jetPt_
private

Definition at line 56 of file TkAlCaRecoMonitor.h.

Referenced by analyze(), and bookHistograms().

◆ maxJetPt_

double TkAlCaRecoMonitor::maxJetPt_
private

Definition at line 50 of file TkAlCaRecoMonitor.h.

Referenced by analyze(), and bookHistograms().

◆ mfToken_

const edm::ESGetToken<MagneticField, IdealMagneticFieldRecord> TkAlCaRecoMonitor::mfToken_
private

Definition at line 46 of file TkAlCaRecoMonitor.h.

Referenced by analyze().

◆ minJetDeltaR_

MonitorElement* TkAlCaRecoMonitor::minJetDeltaR_
private

Definition at line 57 of file TkAlCaRecoMonitor.h.

Referenced by analyze(), and bookHistograms().

◆ minTrackDeltaR_

MonitorElement* TkAlCaRecoMonitor::minTrackDeltaR_
private

Definition at line 58 of file TkAlCaRecoMonitor.h.

Referenced by analyze(), and bookHistograms().

◆ referenceTrackProducer_

edm::EDGetTokenT<reco::TrackCollection> TkAlCaRecoMonitor::referenceTrackProducer_
private

Definition at line 74 of file TkAlCaRecoMonitor.h.

Referenced by analyze(), bookHistograms(), and TkAlCaRecoMonitor().

◆ runsOnReco_

bool TkAlCaRecoMonitor::runsOnReco_
private

Definition at line 70 of file TkAlCaRecoMonitor.h.

Referenced by analyze(), and bookHistograms().

◆ sumCharge_

MonitorElement* TkAlCaRecoMonitor::sumCharge_
private

Definition at line 54 of file TkAlCaRecoMonitor.h.

Referenced by analyze(), and bookHistograms().

◆ tkGeomToken_

const edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> TkAlCaRecoMonitor::tkGeomToken_
private

Definition at line 45 of file TkAlCaRecoMonitor.h.

Referenced by analyze().

◆ TrackCurvature_

MonitorElement* TkAlCaRecoMonitor::TrackCurvature_
private

Definition at line 63 of file TkAlCaRecoMonitor.h.

Referenced by analyze(), and bookHistograms().

◆ trackProducer_

edm::EDGetTokenT<reco::TrackCollection> TkAlCaRecoMonitor::trackProducer_
private

Definition at line 73 of file TkAlCaRecoMonitor.h.

Referenced by analyze(), bookHistograms(), and TkAlCaRecoMonitor().

◆ TrackPtNegative_

MonitorElement* TkAlCaRecoMonitor::TrackPtNegative_
private

Definition at line 62 of file TkAlCaRecoMonitor.h.

Referenced by analyze(), and bookHistograms().

◆ TrackPtPositive_

MonitorElement* TkAlCaRecoMonitor::TrackPtPositive_
private

Definition at line 61 of file TkAlCaRecoMonitor.h.

Referenced by analyze(), and bookHistograms().

◆ TrackQuality_

MonitorElement* TkAlCaRecoMonitor::TrackQuality_
private

Definition at line 55 of file TkAlCaRecoMonitor.h.

Referenced by analyze(), and bookHistograms().

◆ useSignedR_

bool TkAlCaRecoMonitor::useSignedR_
private

Definition at line 71 of file TkAlCaRecoMonitor.h.

Referenced by bookHistograms(), and fillHitmaps().

photonAnalyzer_cfi.rMax
rMax
Definition: photonAnalyzer_cfi.py:91
TkAlCaRecoMonitor_cfi.TrackCurvatureMin
TrackCurvatureMin
Definition: TkAlCaRecoMonitor_cfi.py:34
mps_fire.i
i
Definition: mps_fire.py:428
TkAlCaRecoMonitor_cfi.MinJetDeltaRMin
MinJetDeltaRMin
Definition: TkAlCaRecoMonitor_cfi.py:42
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11724
photonAnalyzer_cfi.zMax
zMax
Definition: photonAnalyzer_cfi.py:95
TkAlCaRecoMonitor::binByRawId_
std::map< int, int > binByRawId_
Definition: TkAlCaRecoMonitor.h:77
GeomDet
Definition: GeomDet.h:27
photonAnalyzer_cfi.zBin
zBin
Definition: photonAnalyzer_cfi.py:93
TkAlCaRecoMonitor_cfi.JetPtBin
JetPtBin
Definition: TkAlCaRecoMonitor_cfi.py:37
ALCARECOTkAlDQM_cff.SumChargeBin
SumChargeBin
Definition: ALCARECOTkAlDQM_cff.py:40
geometry
Definition: geometry.py:1
TkAlCaRecoMonitor::fillRawIdMap_
bool fillRawIdMap_
Definition: TkAlCaRecoMonitor.h:69
TkAlCaRecoMonitor::fillRawIdMap
void fillRawIdMap(const TrackerGeometry &geometry)
Definition: TkAlCaRecoMonitor.cc:326
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
reco::TrackBase::TrackQuality
TrackQuality
track quality
Definition: TrackBase.h:150
TkAlCaRecoMonitor_cfi.JetPtMin
JetPtMin
Definition: TkAlCaRecoMonitor_cfi.py:38
reco::TrackBase::qualityName
static std::string qualityName(TrackQuality)
Definition: TrackBase.h:572
TkAlCaRecoMonitor::TrackQuality_
MonitorElement * TrackQuality_
Definition: TkAlCaRecoMonitor.h:55
TkAlCaRecoMonitor_cfi.TrackEfficiencyMin
TrackEfficiencyMin
Definition: TkAlCaRecoMonitor_cfi.py:16
singleTopDQM_cfi.jets
jets
Definition: singleTopDQM_cfi.py:42
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
HLT_FULL_cff.magneticField
magneticField
Definition: HLT_FULL_cff.py:348
TkAlCaRecoMonitor_cfi.TrackCurvatureMax
TrackCurvatureMax
Definition: TkAlCaRecoMonitor_cfi.py:35
edm::Handle< reco::TrackCollection >
HLTSiStripMonitoring_cff.AlgoName
AlgoName
Definition: HLTSiStripMonitoring_cff.py:232
TkAlCaRecoMonitor_cfi.JetPtMax
JetPtMax
Definition: TkAlCaRecoMonitor_cfi.py:39
TkAlCaRecoMonitor::minJetDeltaR_
MonitorElement * minJetDeltaR_
Definition: TkAlCaRecoMonitor.h:57
TkAlCaRecoMonitor_cfi.MinJetDeltaRBin
MinJetDeltaRBin
Definition: TkAlCaRecoMonitor_cfi.py:41
TkAlCaRecoMonitor::AlCaRecoTrackEfficiency_
MonitorElement * AlCaRecoTrackEfficiency_
Definition: TkAlCaRecoMonitor.h:59
DetId
Definition: DetId.h:17
TkAlCaRecoMonitor::sumCharge_
MonitorElement * sumCharge_
Definition: TkAlCaRecoMonitor.h:54
ALCARECOTkAlDQM_cff.SumChargeMin
SumChargeMin
Definition: ALCARECOTkAlDQM_cff.py:41
TkAlCaRecoMonitor::Hits_XvsY_
MonitorElement * Hits_XvsY_
Definition: TkAlCaRecoMonitor.h:66
TkAlCaRecoMonitor::Hits_ZvsR_
MonitorElement * Hits_ZvsR_
Definition: TkAlCaRecoMonitor.h:65
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
TkAlCaRecoMonitor::runsOnReco_
bool runsOnReco_
Definition: TkAlCaRecoMonitor.h:70
TkAlCaRecoMonitor_cfi.MinJetDeltaRMax
MinJetDeltaRMax
Definition: TkAlCaRecoMonitor_cfi.py:43
TkAlCaRecoMonitor::TrackPtNegative_
MonitorElement * TrackPtNegative_
Definition: TkAlCaRecoMonitor.h:62
Point3DBase< float, GlobalTag >
reco::TrackBase::qualitySize
Definition: TrackBase.h:160
dqm::impl::MonitorElement::getTH1
virtual TH1 * getTH1()
Definition: MonitorElement.cc:972
TkAlCaRecoMonitor::trackProducer_
edm::EDGetTokenT< reco::TrackCollection > trackProducer_
Definition: TkAlCaRecoMonitor.h:73
PbPb_ZMuSkimMuonDPG_cff.deltaR
deltaR
Definition: PbPb_ZMuSkimMuonDPG_cff.py:63
TkAlCaRecoMonitor::mfToken_
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > mfToken_
Definition: TkAlCaRecoMonitor.h:46
edm::OwnVector::const_iterator
Definition: OwnVector.h:41
TkAlCaRecoMonitor::jetCollection_
edm::EDGetTokenT< reco::CaloJetCollection > jetCollection_
Definition: TkAlCaRecoMonitor.h:75
TkAlCaRecoMonitor_cfi.TrackEfficiencyMax
TrackEfficiencyMax
Definition: TkAlCaRecoMonitor_cfi.py:17
TkAlCaRecoMonitor_cfi.TrackCurvatureBin
TrackCurvatureBin
Definition: TkAlCaRecoMonitor_cfi.py:33
duplicaterechits_cfi.trackCollection
trackCollection
Definition: duplicaterechits_cfi.py:4
TkAlCaRecoMonitor::invariantMass_
MonitorElement * invariantMass_
Definition: TkAlCaRecoMonitor.h:53
jetUpdater_cfi.sort
sort
Definition: jetUpdater_cfi.py:29
TkAlCaRecoMonitor::fillHitmaps
void fillHitmaps(const reco::Track &track, const TrackerGeometry &geometry)
Definition: TkAlCaRecoMonitor.cc:302
TkAlCaRecoMonitor::fillInvariantMass_
bool fillInvariantMass_
Definition: TkAlCaRecoMonitor.h:68
ALCARECOTkAlDQM_cff.MassMax
MassMax
Definition: ALCARECOTkAlDQM_cff.py:39
iEvent
int iEvent
Definition: GenABIO.cc:224
photonAnalyzer_cfi.rBin
rBin
Definition: photonAnalyzer_cfi.py:89
edm::EventSetup::getHandle
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:155
TkAlCaRecoMonitor::jetPt_
MonitorElement * jetPt_
Definition: TkAlCaRecoMonitor.h:56
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
TkAlCaRecoMonitor_cfi.MinTrackDeltaRBin
MinTrackDeltaRBin
Definition: TkAlCaRecoMonitor_cfi.py:45
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
TkAlCaRecoMonitor_cfi.TrackEfficiencyBin
TrackEfficiencyBin
Definition: TkAlCaRecoMonitor_cfi.py:15
TkAlCaRecoMonitor::daughterMass_
double daughterMass_
Definition: TkAlCaRecoMonitor.h:76
TkAlCaRecoMonitor::Hits_perDetId_
MonitorElement * Hits_perDetId_
Definition: TkAlCaRecoMonitor.h:60
TrackingRecHit
Definition: TrackingRecHit.h:21
alignCSCRings.r
r
Definition: alignCSCRings.py:93
TkAlCaRecoMonitor::useSignedR_
bool useSignedR_
Definition: TkAlCaRecoMonitor.h:71
TtFullHadDaughter::B
static const std::string B
Definition: TtFullHadronicEvent.h:9
ALCARECOTkAlMuonIsolated_cff.minJetDeltaR
minJetDeltaR
Definition: ALCARECOTkAlMuonIsolated_cff.py:43
TkAlCaRecoMonitor::TrackCurvature_
MonitorElement * TrackCurvature_
Definition: TkAlCaRecoMonitor.h:63
ALCARECOTkAlDQM_cff.MassMin
MassMin
Definition: ALCARECOTkAlDQM_cff.py:38
TkAlCaRecoMonitor::conf_
edm::ParameterSet conf_
Definition: TkAlCaRecoMonitor.h:48
dqm::implementation::IBooker::book2D
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:177
ALCARECOTkAlDQM_cff.MassBin
MassBin
Definition: ALCARECOTkAlDQM_cff.py:37
TkAlCaRecoMonitor_cfi.MinTrackDeltaRMin
MinTrackDeltaRMin
Definition: TkAlCaRecoMonitor_cfi.py:46
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
TkAlCaRecoMonitor_cfi.MinTrackDeltaRMax
MinTrackDeltaRMax
Definition: TkAlCaRecoMonitor_cfi.py:47
photonAnalyzer_cfi.rMin
rMin
Definition: photonAnalyzer_cfi.py:90
TkAlCaRecoMonitor::minTrackDeltaR_
MonitorElement * minTrackDeltaR_
Definition: TkAlCaRecoMonitor.h:58
TkAlCaRecoMonitor::TrackPtPositive_
MonitorElement * TrackPtPositive_
Definition: TkAlCaRecoMonitor.h:61
TkAlCaRecoMonitor::tkGeomToken_
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_
Definition: TkAlCaRecoMonitor.h:45
HGC3DClusterGenMatchSelector_cfi.dR
dR
Definition: HGC3DClusterGenMatchSelector_cfi.py:7
ALCARECOTkAlDQM_cff.SumChargeMax
SumChargeMax
Definition: ALCARECOTkAlDQM_cff.py:42
TkAlCaRecoMonitor::maxJetPt_
double maxJetPt_
Definition: TkAlCaRecoMonitor.h:50
DeDxTools::esConsumes
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
dqm::impl::MonitorElement::setAxisTitle
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:791
edm::InputTag
Definition: InputTag.h:15
TkAlCaRecoMonitor::referenceTrackProducer_
edm::EDGetTokenT< reco::TrackCollection > referenceTrackProducer_
Definition: TkAlCaRecoMonitor.h:74
hit
Definition: SiStripHitEffFromCalibTree.cc:88
dqm::implementation::IBooker::book1D
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37