CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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::CaloJetCollection
jetCollection_
 
MonitorElementjetPt_
 
double maxJetPt_
 
const edm::ESGetToken
< MagneticField,
IdealMagneticFieldRecord
mfToken_
 
MonitorElementminJetDeltaR_
 
MonitorElementminTrackDeltaR_
 
edm::EDGetTokenT
< reco::TrackCollection
referenceTrackProducer_
 
bool runsOnReco_
 
MonitorElementsumCharge_
 
const edm::ESGetToken
< TrackerGeometry,
TrackerDigiGeometryRecord
tkGeomToken_
 
MonitorElementTrackCurvature_
 
edm::EDGetTokenT
< reco::TrackCollection
trackProducer_
 
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
< DQMEDAnalyzerGlobalCache
initializeGlobalCache (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 ( const edm::ParameterSet iConfig)
explicit

Definition at line 25 of file TkAlCaRecoMonitor.cc.

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

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 }
edm::EDGetTokenT< reco::TrackCollection > trackProducer_
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > mfToken_
edm::EDGetTokenT< reco::CaloJetCollection > jetCollection_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::ParameterSet conf_
edm::EDGetTokenT< reco::TrackCollection > referenceTrackProducer_
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
TkAlCaRecoMonitor::~TkAlCaRecoMonitor ( )
override

Definition at line 34 of file TkAlCaRecoMonitor.cc.

34 {}

Member Function Documentation

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

Reimplemented from DQMEDAnalyzer.

Definition at line 193 of file TkAlCaRecoMonitor.cc.

References AlCaRecoTrackEfficiency_, B, binByRawId_, daughterMass_, HLT_FULL_cff::deltaR, alignCSCRings::e, dqm::impl::MonitorElement::Fill(), fillHitmaps(), fillInvariantMass_, fillRawIdMap(), fillRawIdMap_, relativeConstraints::geometry, edm::Event::getByToken(), edm::EventSetup::getHandle(), mps_fire::i, invariantMass_, edm::HandleBase::isValid(), jetCollection_, jetPt_, fwrapper::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, HLT_FULL_cff::trackCollection, TrackCurvature_, trackProducer_, TrackPtNegative_, TrackPtPositive_, and TrackQuality_.

193  {
195  iEvent.getByToken(trackProducer_, trackCollection);
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  }
247  minJetDeltaR_->Fill(minJetDeltaR);
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 }
std::map< int, int > binByRawId_
Definition: APVGainStruct.h:7
void fillRawIdMap(const TrackerGeometry &geometry)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
TrackQuality
track quality
Definition: TrackBase.h:150
MonitorElement * TrackQuality_
tuple magneticField
MonitorElement * minJetDeltaR_
Log< level::Error, false > LogError
void Fill(long long x)
MonitorElement * AlCaRecoTrackEfficiency_
MonitorElement * sumCharge_
edm::EDGetTokenT< reco::TrackCollection > trackProducer_
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > mfToken_
T sqrt(T t)
Definition: SSEVec.h:19
vector< PseudoJet > jets
MonitorElement * invariantMass_
MonitorElement * TrackPtNegative_
void fillHitmaps(const reco::Track &track, const TrackerGeometry &geometry)
edm::EDGetTokenT< reco::CaloJetCollection > jetCollection_
bool isValid() const
Definition: HandleBase.h:70
Log< level::Info, false > LogInfo
tuple trackCollection
MonitorElement * TrackCurvature_
MonitorElement * jetPt_
MonitorElement * minTrackDeltaR_
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:151
edm::EDGetTokenT< reco::TrackCollection > referenceTrackProducer_
MonitorElement * TrackPtPositive_
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_
void TkAlCaRecoMonitor::bookHistograms ( DQMStore::IBooker iBooker,
edm::Run const &  ,
edm::EventSetup const &   
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 36 of file TkAlCaRecoMonitor.cc.

References AlCaRecoTrackEfficiency_, HLT_FULL_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_, maxJetPt_, minJetDeltaR_, minTrackDeltaR_, reco::TrackBase::qualityName(), reco::TrackBase::qualitySize, referenceTrackProducer_, runsOnReco_, dqm::impl::MonitorElement::setAxisTitle(), dqm::implementation::NavigatorBase::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, sumCharge_, TrackCurvature_, trackProducer_, TrackPtNegative_, TrackPtPositive_, TrackQuality_, and useSignedR_.

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_";
106  iBooker.book1D(histname + AlgoName, histname + AlgoName, TrackCurvatureBin, TrackCurvatureMin, TrackCurvatureMax);
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_";
137  iBooker.book1D(histname + AlgoName, histname + AlgoName, MinTrackDeltaRBin, MinTrackDeltaRMin, MinTrackDeltaRMax);
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_";
146  histname + AlgoName, histname + AlgoName, TrackEfficiencyBin, TrackEfficiencyMin, TrackEfficiencyMax);
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 }
static std::string qualityName(TrackQuality)
Definition: TrackBase.h:572
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
TrackQuality
track quality
Definition: TrackBase.h:150
MonitorElement * TrackQuality_
MonitorElement * minJetDeltaR_
MonitorElement * Hits_XvsY_
MonitorElement * Hits_ZvsR_
MonitorElement * AlCaRecoTrackEfficiency_
MonitorElement * sumCharge_
edm::EDGetTokenT< reco::TrackCollection > trackProducer_
MonitorElement * invariantMass_
MonitorElement * TrackPtNegative_
MonitorElement * Hits_perDetId_
MonitorElement * TrackCurvature_
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
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
MonitorElement * jetPt_
edm::ParameterSet conf_
MonitorElement * minTrackDeltaR_
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
edm::EDGetTokenT< reco::TrackCollection > referenceTrackProducer_
MonitorElement * TrackPtPositive_
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void TkAlCaRecoMonitor::fillHitmaps ( const reco::Track track,
const TrackerGeometry geometry 
)
private

Definition at line 302 of file TkAlCaRecoMonitor.cc.

References binByRawId_, dqm::impl::MonitorElement::Fill(), fillRawIdMap_, TrackingRecHit::geographicalId(), Hits_perDetId_, Hits_XvsY_, Hits_ZvsR_, TrackerGeometry::idToDet(), alignCSCRings::r, reco::Track::recHitsBegin(), reco::Track::recHitsEnd(), mathSSE::sqrt(), and useSignedR_.

Referenced by analyze().

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 }
std::map< int, int > binByRawId_
MonitorElement * Hits_XvsY_
MonitorElement * Hits_ZvsR_
void Fill(long long x)
T sqrt(T t)
Definition: SSEVec.h:19
trackingRecHit_iterator recHitsBegin() const
Iterator to first hit on the track.
Definition: Track.h:88
const TrackerGeomDet * idToDet(DetId) const override
Definition: DetId.h:17
MonitorElement * Hits_perDetId_
DetId geographicalId() const
trackingRecHit_iterator recHitsEnd() const
Iterator to last hit on the track.
Definition: Track.h:91
void TkAlCaRecoMonitor::fillRawIdMap ( const TrackerGeometry geometry)
private

Definition at line 326 of file TkAlCaRecoMonitor.cc.

References binByRawId_, TrackerGeometry::detUnitIds(), and mps_fire::i.

Referenced by analyze().

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 }
std::map< int, int > binByRawId_
const DetIdContainer & detUnitIds() const override
Returm a vector of all GeomDetUnit DetIds.

Member Data Documentation

MonitorElement* TkAlCaRecoMonitor::AlCaRecoTrackEfficiency_
private

Definition at line 59 of file TkAlCaRecoMonitor.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 77 of file TkAlCaRecoMonitor.h.

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

edm::ParameterSet TkAlCaRecoMonitor::conf_
private

Definition at line 48 of file TkAlCaRecoMonitor.h.

Referenced by bookHistograms(), and TkAlCaRecoMonitor().

double TkAlCaRecoMonitor::daughterMass_
private

Definition at line 76 of file TkAlCaRecoMonitor.h.

Referenced by analyze(), and bookHistograms().

bool TkAlCaRecoMonitor::fillInvariantMass_
private

Definition at line 68 of file TkAlCaRecoMonitor.h.

Referenced by analyze(), and bookHistograms().

bool TkAlCaRecoMonitor::fillRawIdMap_
private

Definition at line 69 of file TkAlCaRecoMonitor.h.

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

MonitorElement* TkAlCaRecoMonitor::Hits_perDetId_
private

Definition at line 60 of file TkAlCaRecoMonitor.h.

Referenced by bookHistograms(), and fillHitmaps().

MonitorElement* TkAlCaRecoMonitor::Hits_XvsY_
private

Definition at line 66 of file TkAlCaRecoMonitor.h.

Referenced by bookHistograms(), and fillHitmaps().

MonitorElement* TkAlCaRecoMonitor::Hits_ZvsR_
private

Definition at line 65 of file TkAlCaRecoMonitor.h.

Referenced by bookHistograms(), and fillHitmaps().

MonitorElement* TkAlCaRecoMonitor::invariantMass_
private

Definition at line 53 of file TkAlCaRecoMonitor.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 75 of file TkAlCaRecoMonitor.h.

Referenced by analyze(), and TkAlCaRecoMonitor().

MonitorElement* TkAlCaRecoMonitor::jetPt_
private

Definition at line 56 of file TkAlCaRecoMonitor.h.

Referenced by analyze(), and bookHistograms().

double TkAlCaRecoMonitor::maxJetPt_
private

Definition at line 50 of file TkAlCaRecoMonitor.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 46 of file TkAlCaRecoMonitor.h.

Referenced by analyze().

MonitorElement* TkAlCaRecoMonitor::minJetDeltaR_
private

Definition at line 57 of file TkAlCaRecoMonitor.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* TkAlCaRecoMonitor::minTrackDeltaR_
private

Definition at line 58 of file TkAlCaRecoMonitor.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 74 of file TkAlCaRecoMonitor.h.

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

bool TkAlCaRecoMonitor::runsOnReco_
private

Definition at line 70 of file TkAlCaRecoMonitor.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* TkAlCaRecoMonitor::sumCharge_
private

Definition at line 54 of file TkAlCaRecoMonitor.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 45 of file TkAlCaRecoMonitor.h.

Referenced by analyze().

MonitorElement* TkAlCaRecoMonitor::TrackCurvature_
private

Definition at line 63 of file TkAlCaRecoMonitor.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 73 of file TkAlCaRecoMonitor.h.

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

MonitorElement* TkAlCaRecoMonitor::TrackPtNegative_
private

Definition at line 62 of file TkAlCaRecoMonitor.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* TkAlCaRecoMonitor::TrackPtPositive_
private

Definition at line 61 of file TkAlCaRecoMonitor.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* TkAlCaRecoMonitor::TrackQuality_
private

Definition at line 55 of file TkAlCaRecoMonitor.h.

Referenced by analyze(), and bookHistograms().

bool TkAlCaRecoMonitor::useSignedR_
private

Definition at line 71 of file TkAlCaRecoMonitor.h.

Referenced by bookHistograms(), and fillHitmaps().