CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Private Attributes
TrackEfficiencyMonitor Class Reference

#include <DQM/TrackerMonitorTrack/src/TrackEfficiencyMonitor.cc>

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

Public Types

enum  SemiCylinder { Up, Down }
 
typedef reco::Track Track
 
typedef reco::TrackCollection TrackCollection
 
- 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
 

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
SemiCylinder checkSemiCylinder (const Track &)
 
int compatibleLayers (const NavigationSchool &navigationSchool, TrajectoryStateOnSurface theTSOS)
 
std::pair
< TrajectoryStateOnSurface,
const DetLayer * > 
findNextLayer (TrajectoryStateOnSurface startTSOS, const std::vector< const DetLayer * > &trackCompatibleLayers, bool isUpMuon)
 
void testSTATracks (edm::Handle< TrackCollection > tkTracks, edm::Handle< TrackCollection > staTracks)
 
void testTrackerTracks (edm::Handle< TrackCollection > tkTracks, edm::Handle< TrackCollection > staTracks, const NavigationSchool &navigationSchool)
 
 TrackEfficiencyMonitor (const edm::ParameterSet &)
 
bool trackerAcceptance (TrajectoryStateOnSurface theTSOS, double theRadius, double theMaxZ)
 
 ~TrackEfficiencyMonitor () 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 Attributes

const MagneticFieldbField
 
edm::ParameterSet conf_
 
MonitorElementdeltaX
 
MonitorElementdeltaY
 
DQMStoredqmStore_
 
int failedToPropagate
 
bool findDetLayer
 
MonitorElementGlobalMuonPtEtaPhiHighPt
 
MonitorElementGlobalMuonPtEtaPhiLowPt
 
const edm::ESGetToken
< GeometricSearchTracker,
TrackerRecoGeometryRecord
gstToken_
 
std::string histname
 
bool isBFieldOff_
 
const MeasurementTrackermeasurementTracker
 
const edm::ESGetToken
< MagneticField,
IdealMagneticFieldRecord
mfToken_
 
const edm::ESGetToken
< MeasurementTracker,
CkfComponentsRecord
mtToken_
 
MonitorElementmuonCompatibleLayers
 
MonitorElementmuonD0
 
MonitorElementmuonEta
 
MonitorElementmuonPhi
 
edm::EDGetTokenT< edm::View
< reco::Muon > > 
muonToken_
 
MonitorElementmuonX
 
MonitorElementmuonY
 
MonitorElementmuonZ
 
const edm::ESGetToken
< NavigationSchool,
NavigationSchoolRecord
navToken_
 
int nCompatibleLayers
 
const edm::ESGetToken
< Propagator,
TrackingComponentsRecord
propToken_
 
MonitorElementsignDeltaX
 
MonitorElementsignDeltaY
 
MonitorElementStandaloneMuonPtEtaPhiHighPt
 
MonitorElementStandaloneMuonPtEtaPhiLowPt
 
double theMaxZ_
 
MuonServiceProxytheMuonServiceProxy
 
const DirectTrackerNavigationtheNavigation
 
const PropagatorthePropagator
 
double theRadius_
 
edm::InputTag theSTATracksLabel_
 
edm::EDGetTokenT
< reco::TrackCollection
theSTATracksToken_
 
edm::InputTag theTKTracksLabel_
 
edm::EDGetTokenT
< reco::TrackCollection
theTKTracksToken_
 
const GeometricSearchTrackertheTracker
 
const TransientTrackBuildertheTTrackBuilder
 
MonitorElementtrackCompatibleLayers
 
MonitorElementtrackD0
 
bool trackEfficiency_
 
MonitorElementtrackEta
 
MonitorElementtrackPhi
 
MonitorElementtrackX
 
MonitorElementtrackY
 
MonitorElementtrackZ
 
const edm::ESGetToken
< TransientTrackBuilder,
TransientTrackRecord
ttbToken_
 

Additional Inherited Members

- 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

Monitoring source to measure the track efficiency

Definition at line 41 of file TrackEfficiencyMonitor.h.

Member Typedef Documentation

Definition at line 43 of file TrackEfficiencyMonitor.h.

Definition at line 44 of file TrackEfficiencyMonitor.h.

Member Enumeration Documentation

Constructor & Destructor Documentation

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

Definition at line 38 of file TrackEfficiencyMonitor.cc.

References conf_, dqmStore_, edm::ParameterSet::getParameter(), iConfig, isBFieldOff_, muonToken_, Utilities::operator, theMaxZ_, theRadius_, theSTATracksLabel_, theSTATracksToken_, theTKTracksLabel_, theTKTracksToken_, and trackEfficiency_.

39  : ttbToken_(esConsumes(edm::ESInputTag("", "TransientTrackBuilder"))),
40  propToken_(esConsumes(edm::ESInputTag("", "SteppingHelixPropagatorAny"))),
41  navToken_(esConsumes(edm::ESInputTag("", "CosmicNavigationSchool"))),
45 //-----------------------------------------------------------------------------------
46 {
48 
49  theRadius_ = iConfig.getParameter<double>("theRadius");
50  theMaxZ_ = iConfig.getParameter<double>("theMaxZ");
51  isBFieldOff_ = iConfig.getParameter<bool>("isBFieldOff");
52  trackEfficiency_ = iConfig.getParameter<bool>("trackEfficiency");
53  theTKTracksLabel_ = iConfig.getParameter<edm::InputTag>("TKTrackCollection");
54  theSTATracksLabel_ = iConfig.getParameter<edm::InputTag>("STATrackCollection");
55  muonToken_ = consumes<edm::View<reco::Muon> >(iConfig.getParameter<edm::InputTag>("muoncoll"));
56 
57  theTKTracksToken_ = consumes<reco::TrackCollection>(theTKTracksLabel_);
58  theSTATracksToken_ = consumes<reco::TrackCollection>(theSTATracksLabel_);
59 
60  conf_ = iConfig;
61 }
const edm::ESGetToken< NavigationSchool, NavigationSchoolRecord > navToken_
const edm::ESGetToken< TransientTrackBuilder, TransientTrackRecord > ttbToken_
const edm::ESGetToken< GeometricSearchTracker, TrackerRecoGeometryRecord > gstToken_
edm::EDGetTokenT< edm::View< reco::Muon > > muonToken_
const edm::ESGetToken< MeasurementTracker, CkfComponentsRecord > mtToken_
edm::EDGetTokenT< reco::TrackCollection > theTKTracksToken_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > mfToken_
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
const edm::ESGetToken< Propagator, TrackingComponentsRecord > propToken_
edm::EDGetTokenT< reco::TrackCollection > theSTATracksToken_
TrackEfficiencyMonitor::~TrackEfficiencyMonitor ( )
override

Definition at line 64 of file TrackEfficiencyMonitor.cc.

66 {}

Member Function Documentation

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

Reimplemented from DQMEDAnalyzer.

Definition at line 273 of file TrackEfficiencyMonitor.cc.

References bField, failedToPropagate, dqm::impl::MonitorElement::Fill(), findDetLayer, edm::EventSetup::getData(), edm::Event::getHandle(), GlobalMuonPtEtaPhiHighPt, GlobalMuonPtEtaPhiLowPt, gstToken_, isBFieldOff_, muon::isGoodMuon(), edm::HandleBase::isValid(), measurementTracker, mfToken_, mtToken_, HLT_FULL_cff::muon, patZpeak::muons, muonToken_, navToken_, nCompatibleLayers, HLT_FULL_cff::normalizedChi2, propToken_, StandaloneMuonPtEtaPhiHighPt, StandaloneMuonPtEtaPhiLowPt, muonTagProbeFilters_cff::staTracks, testSTATracks(), testTrackerTracks(), theNavigation, thePropagator, theSTATracksToken_, theTKTracksToken_, theTracker, theTTrackBuilder, trackEfficiency_, and ttbToken_.

275 {
278 
279  //initialize values
280  failedToPropagate = 0;
281  nCompatibleLayers = 0;
282  findDetLayer = false;
283 
284  const NavigationSchool& nav = iSetup.getData(navToken_);
287  thePropagator = &iSetup.getData(propToken_);
288  bField = &iSetup.getData(mfToken_);
289  theTracker = &iSetup.getData(gstToken_);
291 
293  if (!muons.isValid())
294  return;
295  for (edm::View<reco::Muon>::const_iterator muon = muons->begin(); muon != muons->end(); ++muon) {
296  if ((*muon).pt() < 5)
297  continue;
298  if (fabs((*muon).eta()) > 2.4)
299  continue;
300  if ((*muon).vertexNormalizedChi2() > 10)
301  continue;
302  if ((*muon).isStandAloneMuon() and (*muon).isGlobalMuon()) {
303  if ((*muon).pt() < 20)
304  GlobalMuonPtEtaPhiLowPt->Fill((*muon).eta(), (*muon).phi());
305  else
306  GlobalMuonPtEtaPhiHighPt->Fill((*muon).eta(), (*muon).phi());
307  }
308  if ((*muon).isStandAloneMuon()) {
309  if ((*muon).pt() < 20)
310  StandaloneMuonPtEtaPhiLowPt->Fill((*muon).eta(), (*muon).phi());
311  else
312  StandaloneMuonPtEtaPhiHighPt->Fill((*muon).eta(), (*muon).phi());
313  }
314  }
315  if (trackEfficiency_) {
316  //---------------------------------------------------
317  // Select muons with good quality
318  // If B field is on, no up-down matching between the muons
319  //---------------------------------------------------
320  bool isGoodMuon = false;
321  double mudd0 = 0., mudphi = 0., muddsz = 0., mudeta = 0.;
322  if (isBFieldOff_) {
323  if (staTracks->size() == 2) {
324  for (unsigned int bindex = 0; bindex < staTracks->size(); ++bindex) {
325  if (0 == bindex) {
326  mudd0 += (*staTracks)[bindex].d0();
327  mudphi += (*staTracks)[bindex].phi();
328  muddsz += (*staTracks)[bindex].dsz();
329  mudeta += (*staTracks)[bindex].eta();
330  }
331  if (1 == bindex) {
332  mudd0 -= (*staTracks)[bindex].d0();
333  mudphi -= (*staTracks)[bindex].phi();
334  muddsz -= (*staTracks)[bindex].dsz();
335  mudeta -= (*staTracks)[bindex].eta();
336  }
337  }
338  if ((fabs(mudd0) < 15.0) && (fabs(mudphi) < 0.045) && (fabs(muddsz) < 20.0) && (fabs(mudeta) < 0.060))
339  isGoodMuon = true;
340  }
341 
342  if (isGoodMuon)
343  testTrackerTracks(tkTracks, staTracks, nav);
344 
345  } else if (staTracks->size() == 1 || staTracks->size() == 2)
346  testTrackerTracks(tkTracks, staTracks, nav);
347  }
348 
349  if (!trackEfficiency_ && tkTracks->size() == 1) {
350  if ((tkTracks->front()).normalizedChi2() < 5 && (tkTracks->front()).hitPattern().numberOfValidHits() > 8)
351  testSTATracks(tkTracks, staTracks);
352  }
353 
354  delete theNavigation;
355 }
const MagneticField * bField
const edm::ESGetToken< NavigationSchool, NavigationSchoolRecord > navToken_
MonitorElement * GlobalMuonPtEtaPhiHighPt
void testTrackerTracks(edm::Handle< TrackCollection > tkTracks, edm::Handle< TrackCollection > staTracks, const NavigationSchool &navigationSchool)
MonitorElement * GlobalMuonPtEtaPhiLowPt
const edm::ESGetToken< TransientTrackBuilder, TransientTrackRecord > ttbToken_
const edm::ESGetToken< GeometricSearchTracker, TrackerRecoGeometryRecord > gstToken_
edm::EDGetTokenT< edm::View< reco::Muon > > muonToken_
void Fill(long long x)
bool getData(T &iHolder) const
Definition: EventSetup.h:128
const edm::ESGetToken< MeasurementTracker, CkfComponentsRecord > mtToken_
Handle< PROD > getHandle(EDGetTokenT< PROD > token) const
Definition: Event.h:563
const GeometricSearchTracker * theTracker
MonitorElement * StandaloneMuonPtEtaPhiLowPt
const TransientTrackBuilder * theTTrackBuilder
bool isValid() const
Definition: HandleBase.h:70
bool isGoodMuon(const reco::Muon &muon, SelectionType type, reco::Muon::ArbitrationType arbitrationType=reco::Muon::SegmentAndTrackArbitration)
main GoodMuon wrapper call
edm::EDGetTokenT< reco::TrackCollection > theTKTracksToken_
MonitorElement * StandaloneMuonPtEtaPhiHighPt
const Propagator * thePropagator
const DirectTrackerNavigation * theNavigation
tuple normalizedChi2
tuple muons
Definition: patZpeak.py:39
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:86
const MeasurementTracker * measurementTracker
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > mfToken_
const edm::ESGetToken< Propagator, TrackingComponentsRecord > propToken_
void testSTATracks(edm::Handle< TrackCollection > tkTracks, edm::Handle< TrackCollection > staTracks)
edm::EDGetTokenT< reco::TrackCollection > theSTATracksToken_
void TrackEfficiencyMonitor::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  ,
edm::EventSetup const &   
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 69 of file TrackEfficiencyMonitor.cc.

References HLT_FULL_cff::AlgoName, dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::book2D(), conf_, deltaX, deltaY, edm::ParameterSet::getParameter(), GlobalMuonPtEtaPhiHighPt, GlobalMuonPtEtaPhiLowPt, histname, muonCompatibleLayers, muonD0, muonEta, muonPhi, muonX, muonY, muonZ, dqm::impl::MonitorElement::setAxisTitle(), dqm::implementation::NavigatorBase::setCurrentFolder(), signDeltaX, signDeltaY, StandaloneMuonPtEtaPhiHighPt, StandaloneMuonPtEtaPhiLowPt, AlCaHLTBitMon_QueryRunRegistry::string, trackCompatibleLayers, trackD0, trackEta, trackPhi, trackX, trackY, and trackZ.

73 {
74  std::string MEFolderName = conf_.getParameter<std::string>("FolderName");
76 
77  ibooker.setCurrentFolder(MEFolderName);
78 
79  //
80  int muonXBin = conf_.getParameter<int>("muonXBin");
81  double muonXMin = conf_.getParameter<double>("muonXMin");
82  double muonXMax = conf_.getParameter<double>("muonXMax");
83 
84  histname = "muonX_";
85  muonX = ibooker.book1D(histname + AlgoName, histname + AlgoName, muonXBin, muonXMin, muonXMax);
86  muonX->setAxisTitle("");
87 
88  //
89  int muonYBin = conf_.getParameter<int>("muonYBin");
90  double muonYMin = conf_.getParameter<double>("muonYMin");
91  double muonYMax = conf_.getParameter<double>("muonYMax");
92 
93  histname = "muonY_";
94  muonY = ibooker.book1D(histname + AlgoName, histname + AlgoName, muonYBin, muonYMin, muonYMax);
95  muonY->setAxisTitle("");
96 
97  //
98  int muonZBin = conf_.getParameter<int>("muonZBin");
99  double muonZMin = conf_.getParameter<double>("muonZMin");
100  double muonZMax = conf_.getParameter<double>("muonZMax");
101 
102  histname = "muonZ_";
103  muonZ = ibooker.book1D(histname + AlgoName, histname + AlgoName, muonZBin, muonZMin, muonZMax);
104  muonZ->setAxisTitle("");
105 
106  //
107  int muonEtaBin = conf_.getParameter<int>("muonEtaBin");
108  double muonEtaMin = conf_.getParameter<double>("muonEtaMin");
109  double muonEtaMax = conf_.getParameter<double>("muonEtaMax");
110 
111  histname = "muonEta_";
112  muonEta = ibooker.book1D(histname + AlgoName, histname + AlgoName, muonEtaBin, muonEtaMin, muonEtaMax);
113  muonEta->setAxisTitle("");
114 
115  //
116  int muonPhiBin = conf_.getParameter<int>("muonPhiBin");
117  double muonPhiMin = conf_.getParameter<double>("muonPhiMin");
118  double muonPhiMax = conf_.getParameter<double>("muonPhiMax");
119 
120  histname = "muonPhi_";
121  muonPhi = ibooker.book1D(histname + AlgoName, histname + AlgoName, muonPhiBin, muonPhiMin, muonPhiMax);
122  muonPhi->setAxisTitle("");
123 
124  //
125  int muonD0Bin = conf_.getParameter<int>("muonD0Bin");
126  double muonD0Min = conf_.getParameter<double>("muonD0Min");
127  double muonD0Max = conf_.getParameter<double>("muonD0Max");
128 
129  histname = "muonD0_";
130  muonD0 = ibooker.book1D(histname + AlgoName, histname + AlgoName, muonD0Bin, muonD0Min, muonD0Max);
131  muonD0->setAxisTitle("");
132 
133  //
134  int muonCompatibleLayersBin = conf_.getParameter<int>("muonCompatibleLayersBin");
135  double muonCompatibleLayersMin = conf_.getParameter<double>("muonCompatibleLayersMin");
136  double muonCompatibleLayersMax = conf_.getParameter<double>("muonCompatibleLayersMax");
137 
138  histname = "muonCompatibleLayers_";
139  muonCompatibleLayers = ibooker.book1D(histname + AlgoName,
140  histname + AlgoName,
141  muonCompatibleLayersBin,
142  muonCompatibleLayersMin,
143  muonCompatibleLayersMax);
145 
146  //------------------------------------------------------------------------------------
147 
148  //
149  int trackXBin = conf_.getParameter<int>("trackXBin");
150  double trackXMin = conf_.getParameter<double>("trackXMin");
151  double trackXMax = conf_.getParameter<double>("trackXMax");
152 
153  histname = "trackX_";
154  trackX = ibooker.book1D(histname + AlgoName, histname + AlgoName, trackXBin, trackXMin, trackXMax);
155  trackX->setAxisTitle("");
156 
157  //
158  int trackYBin = conf_.getParameter<int>("trackYBin");
159  double trackYMin = conf_.getParameter<double>("trackYMin");
160  double trackYMax = conf_.getParameter<double>("trackYMax");
161 
162  histname = "trackY_";
163  trackY = ibooker.book1D(histname + AlgoName, histname + AlgoName, trackYBin, trackYMin, trackYMax);
164  trackY->setAxisTitle("");
165 
166  //
167  int trackZBin = conf_.getParameter<int>("trackZBin");
168  double trackZMin = conf_.getParameter<double>("trackZMin");
169  double trackZMax = conf_.getParameter<double>("trackZMax");
170 
171  histname = "trackZ_";
172  trackZ = ibooker.book1D(histname + AlgoName, histname + AlgoName, trackZBin, trackZMin, trackZMax);
173  trackZ->setAxisTitle("");
174 
175  //
176  int trackEtaBin = conf_.getParameter<int>("trackEtaBin");
177  double trackEtaMin = conf_.getParameter<double>("trackEtaMin");
178  double trackEtaMax = conf_.getParameter<double>("trackEtaMax");
179 
180  histname = "trackEta_";
181  trackEta = ibooker.book1D(histname + AlgoName, histname + AlgoName, trackEtaBin, trackEtaMin, trackEtaMax);
182  trackEta->setAxisTitle("");
183 
184  //
185  int trackPhiBin = conf_.getParameter<int>("trackPhiBin");
186  double trackPhiMin = conf_.getParameter<double>("trackPhiMin");
187  double trackPhiMax = conf_.getParameter<double>("trackPhiMax");
188 
189  histname = "trackPhi_";
190  trackPhi = ibooker.book1D(histname + AlgoName, histname + AlgoName, trackPhiBin, trackPhiMin, trackPhiMax);
191  trackPhi->setAxisTitle("");
192 
193  //
194  int trackD0Bin = conf_.getParameter<int>("trackD0Bin");
195  double trackD0Min = conf_.getParameter<double>("trackD0Min");
196  double trackD0Max = conf_.getParameter<double>("trackD0Max");
197 
198  histname = "trackD0_";
199  trackD0 = ibooker.book1D(histname + AlgoName, histname + AlgoName, trackD0Bin, trackD0Min, trackD0Max);
200  trackD0->setAxisTitle("");
201 
202  //
203  int trackCompatibleLayersBin = conf_.getParameter<int>("trackCompatibleLayersBin");
204  double trackCompatibleLayersMin = conf_.getParameter<double>("trackCompatibleLayersMin");
205  double trackCompatibleLayersMax = conf_.getParameter<double>("trackCompatibleLayersMax");
206 
207  histname = "trackCompatibleLayers_";
208  trackCompatibleLayers = ibooker.book1D(histname + AlgoName,
209  histname + AlgoName,
210  trackCompatibleLayersBin,
211  trackCompatibleLayersMin,
212  trackCompatibleLayersMax);
214 
215  //------------------------------------------------------------------------------------
216 
217  //
218  int deltaXBin = conf_.getParameter<int>("deltaXBin");
219  double deltaXMin = conf_.getParameter<double>("deltaXMin");
220  double deltaXMax = conf_.getParameter<double>("deltaXMax");
221 
222  histname = "deltaX_";
223  deltaX = ibooker.book1D(histname + AlgoName, histname + AlgoName, deltaXBin, deltaXMin, deltaXMax);
224  deltaX->setAxisTitle("");
225 
226  //
227  int deltaYBin = conf_.getParameter<int>("deltaYBin");
228  double deltaYMin = conf_.getParameter<double>("deltaYMin");
229  double deltaYMax = conf_.getParameter<double>("deltaYMax");
230 
231  histname = "deltaY_";
232  deltaY = ibooker.book1D(histname + AlgoName, histname + AlgoName, deltaYBin, deltaYMin, deltaYMax);
233  deltaY->setAxisTitle("");
234 
235  //
236  int signDeltaXBin = conf_.getParameter<int>("signDeltaXBin");
237  double signDeltaXMin = conf_.getParameter<double>("signDeltaXMin");
238  double signDeltaXMax = conf_.getParameter<double>("signDeltaXMax");
239 
240  histname = "signDeltaX_";
241  signDeltaX = ibooker.book1D(histname + AlgoName, histname + AlgoName, signDeltaXBin, signDeltaXMin, signDeltaXMax);
243 
244  //
245  int signDeltaYBin = conf_.getParameter<int>("signDeltaYBin");
246  double signDeltaYMin = conf_.getParameter<double>("signDeltaYMin");
247  double signDeltaYMax = conf_.getParameter<double>("signDeltaYMax");
248 
249  histname = "signDeltaY_";
250  signDeltaY = ibooker.book1D(histname + AlgoName, histname + AlgoName, signDeltaYBin, signDeltaYMin, signDeltaYMax);
252 
253  histname = "GlobalMuonPtEtaPhi_LowPt_";
254  GlobalMuonPtEtaPhiLowPt = ibooker.book2D(histname + AlgoName, histname + AlgoName, 20, -2.4, 2.4, 20, -3.25, 3.25);
256 
257  histname = "StandaloneMuonPtEtaPhi_LowPt_";
259  ibooker.book2D(histname + AlgoName, histname + AlgoName, 20, -2.4, 2.4, 20, -3.25, 3.25);
261 
262  histname = "GlobalMuonPtEtaPhi_HighPt_";
263  GlobalMuonPtEtaPhiHighPt = ibooker.book2D(histname + AlgoName, histname + AlgoName, 20, -2.4, 2.4, 20, -3.25, 3.25);
265 
266  histname = "StandaloneMuonPtEtaPhi_HighPt_";
268  ibooker.book2D(histname + AlgoName, histname + AlgoName, 20, -2.4, 2.4, 20, -3.25, 3.25);
270 }
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
MonitorElement * GlobalMuonPtEtaPhiHighPt
MonitorElement * GlobalMuonPtEtaPhiLowPt
MonitorElement * muonCompatibleLayers
MonitorElement * StandaloneMuonPtEtaPhiLowPt
MonitorElement * StandaloneMuonPtEtaPhiHighPt
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 * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
MonitorElement * trackCompatibleLayers
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
TrackEfficiencyMonitor::SemiCylinder TrackEfficiencyMonitor::checkSemiCylinder ( const Track tk)
int TrackEfficiencyMonitor::compatibleLayers ( const NavigationSchool navigationSchool,
TrajectoryStateOnSurface  theTSOS 
)

Definition at line 599 of file TrackEfficiencyMonitor.cc.

References alongMomentum, Propagator::clone(), findDetLayer, findNextLayer(), TrajectoryStateOnSurface::freeState(), MeasurementTracker::geometricSearchTracker(), TrajectoryStateOnSurface::globalPosition(), TrajectoryStateOnSurface::isValid(), isotrackApplyRegressor::k, LayerTriplets::layers(), measurementTracker, NavigationSchool::nextLayers(), Propagator::propagate(), Propagator::setPropagationDirection(), GeometricSearchDet::surface(), thePropagator, GeometricSearchTracker::tobLayers(), trackCompatibleLayers, and PV3DBase< T, PVType, FrameType >::y().

Referenced by testTrackerTracks().

601 {
602  //---------------------------------------------------
603  // check the number of compatible layers
604  //---------------------------------------------------
605 
606  std::vector<const BarrelDetLayer*> barrelTOBLayers = measurementTracker->geometricSearchTracker()->tobLayers();
607 
608  unsigned int layers = 0;
609  for (unsigned int k = 0; k < barrelTOBLayers.size(); k++) {
610  const DetLayer* firstLay = barrelTOBLayers[barrelTOBLayers.size() - 1 - k];
611 
612  //Propagator* theTmpPropagator = new SteppingHelixPropagator(&*bField,anyDirection);
613 
614  Propagator* theTmpPropagator = thePropagator->clone();
615  theTmpPropagator->setPropagationDirection(alongMomentum);
616 
617  TrajectoryStateOnSurface startTSOS = theTmpPropagator->propagate(*theTSOS.freeState(), firstLay->surface());
618 
619  std::vector<const DetLayer*> trackCompatibleLayers;
620 
621  findDetLayer = true;
622  bool isUpMuon = false;
623  bool firstdtep = true;
624 
625  if (startTSOS.isValid()) {
626  if (firstdtep)
627  layers++;
628 
629  int nwhile = 0;
630 
631  //for other compatible layers
632  while (startTSOS.isValid() && firstLay && findDetLayer) {
633  if (firstdtep && startTSOS.globalPosition().y() > 0)
634  isUpMuon = true;
635 
636  if (firstdtep) {
637  std::vector<const DetLayer*> firstCompatibleLayers;
638  firstCompatibleLayers.push_back(firstLay);
639  std::pair<TrajectoryStateOnSurface, const DetLayer*> nextLayer =
640  findNextLayer(theTSOS, firstCompatibleLayers, isUpMuon);
641  firstdtep = false;
642  } else {
643  trackCompatibleLayers = navigationSchool.nextLayers(*firstLay, *(startTSOS.freeState()), alongMomentum);
644  if (!trackCompatibleLayers.empty()) {
645  std::pair<TrajectoryStateOnSurface, const DetLayer*> nextLayer =
646  findNextLayer(startTSOS, trackCompatibleLayers, isUpMuon);
647  if (firstLay != nextLayer.second) {
648  firstLay = nextLayer.second;
649  startTSOS = nextLayer.first;
650  layers++;
651  } else
652  firstLay = nullptr;
653  }
654  }
655  nwhile++;
656  if (nwhile > 100)
657  break;
658  }
659  delete theTmpPropagator;
660  break;
661  }
662  delete theTmpPropagator;
663  }
664  return layers;
665 }
virtual const BoundSurface & surface() const =0
The surface of the GeometricSearchDet.
virtual void setPropagationDirection(PropagationDirection dir)
Definition: Propagator.h:130
std::vector< LayerSetAndLayers > layers(const SeedingLayerSetsHits &sets)
Definition: LayerTriplets.cc:4
T y() const
Definition: PV3DBase.h:60
virtual Propagator * clone() const =0
GlobalPoint globalPosition() const
std::vector< BarrelDetLayer const * > const & tobLayers() const
FreeTrajectoryState const * freeState(bool withErrors=true) const
std::pair< TrajectoryStateOnSurface, const DetLayer * > findNextLayer(TrajectoryStateOnSurface startTSOS, const std::vector< const DetLayer * > &trackCompatibleLayers, bool isUpMuon)
std::vector< const DetLayer * > nextLayers(const DetLayer &detLayer, Args &&...args) const
const Propagator * thePropagator
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
Definition: Propagator.h:50
const MeasurementTracker * measurementTracker
MonitorElement * trackCompatibleLayers
const GeometricSearchTracker * geometricSearchTracker() const
std::pair< TrajectoryStateOnSurface, const DetLayer * > TrackEfficiencyMonitor::findNextLayer ( TrajectoryStateOnSurface  startTSOS,
const std::vector< const DetLayer * > &  trackCompatibleLayers,
bool  isUpMuon 
)

Definition at line 668 of file TrackEfficiencyMonitor.cc.

References alongMomentum, Propagator::clone(), findDetLayer, TrajectoryStateOnSurface::freeState(), TrajectoryStateOnSurface::isValid(), Propagator::propagate(), Propagator::setPropagationDirection(), and thePropagator.

Referenced by compatibleLayers().

671 {
672  //Propagator* theTmpPropagator = new SteppingHelixPropagator(&*bField,anyDirection);
673 
674  Propagator* theTmpPropagator = thePropagator->clone();
675  theTmpPropagator->setPropagationDirection(alongMomentum);
676 
677  std::vector<const DetLayer*>::const_iterator itl;
678  findDetLayer = false;
679  for (itl = trackCompatibleLayers.begin(); itl != trackCompatibleLayers.end(); ++itl) {
680  TrajectoryStateOnSurface tsos = theTmpPropagator->propagate(*(sTSOS.freeState()), (**itl).surface());
681  if (tsos.isValid()) {
682  sTSOS = tsos;
683  findDetLayer = true;
684 
685  break;
686  }
687  }
688  std::pair<TrajectoryStateOnSurface, const DetLayer*> blabla;
689  blabla.first = sTSOS;
690  blabla.second = &**itl;
691  delete theTmpPropagator;
692  return blabla;
693 }
virtual void setPropagationDirection(PropagationDirection dir)
Definition: Propagator.h:130
virtual Propagator * clone() const =0
const Propagator * thePropagator
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
Definition: Propagator.h:50
MonitorElement * trackCompatibleLayers
void TrackEfficiencyMonitor::testSTATracks ( edm::Handle< TrackCollection tkTracks,
edm::Handle< TrackCollection staTracks 
)

Definition at line 478 of file TrackEfficiencyMonitor.cc.

References TransientTrackBuilder::build(), checkSemiCylinder(), d0, PVValHelper::eta, PV3DBase< T, PVType, FrameType >::eta(), failedToPropagate, dqm::impl::MonitorElement::Fill(), TrajectoryStateOnSurface::globalDirection(), TrajectoryStateOnSurface::globalPosition(), reco::TransientTrack::impactPointState(), reco::TransientTrack::innermostMeasurementState(), PFRecoTauChargedHadronQualityPlugins_cfi::isTrack, TrajectoryStateOnSurface::isValid(), TrajectoryStateOnSurface::localPosition(), muonD0, muonEta, muonPhi, muonX, muonY, muonZ, reco::TransientTrack::outermostMeasurementState(), phi, PV3DBase< T, PVType, FrameType >::phi(), funct::pow(), Propagator::propagate(), TrajectoryStateOnSurface::surface(), thePropagator, theTTrackBuilder, trackD0, trackEta, trackPhi, trackX, trackY, trackZ, Up, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by analyze().

481 {
482  reco::TransientTrack tkTT = theTTrackBuilder->build(tkTracks->front());
483  double ipX = tkTT.impactPointState().globalPosition().x();
484  double ipY = tkTT.impactPointState().globalPosition().y();
485  double ipZ = tkTT.impactPointState().globalPosition().z();
486  double eta = tkTT.impactPointState().globalDirection().eta();
487  double phi = tkTT.impactPointState().globalDirection().phi();
488  double d0 = (*tkTracks)[0].d0();
489 
491  LocalVector diffLocal;
492  TrajectoryStateOnSurface staState;
493  bool isTrack = false;
494 
495  if (!staTracks->empty()) {
496  //---------------------------------------------------
497  //look for associated muons
498  //---------------------------------------------------
499 
500  float DR2min = 1000;
501  reco::TrackCollection::const_iterator closestTrk = staTracks->end();
502  //----------------------loop on tracker tracks:
503  for (reco::TrackCollection::const_iterator staTrack = staTracks->begin(); staTrack != staTracks->end();
504  ++staTrack) {
505  if (checkSemiCylinder(*staTrack) == TrackEfficiencyMonitor::Up) {
506  reco::TransientTrack staTT = theTTrackBuilder->build(*staTrack);
507  failedToPropagate = 1;
508  staState = thePropagator->propagate(staTT.outermostMeasurementState(), tkInner.surface());
509 
510  if (staState.isValid()) {
511  failedToPropagate = 0;
512  diffLocal = tkInner.localPosition() - staState.localPosition();
513 
514  double DR2 = diffLocal.x() * diffLocal.x() + diffLocal.y() * diffLocal.y();
515  if (DR2 < DR2min) {
516  DR2min = DR2;
517  closestTrk = staTrack;
518  }
519  if (pow(DR2, 0.5) < 100.)
520  isTrack = true;
521  }
522  }
523  }
524  }
525 
526  if (failedToPropagate == 0) {
527  trackX->Fill(ipX);
528  trackY->Fill(ipY);
529  trackZ->Fill(ipZ);
530  trackEta->Fill(eta);
531  trackPhi->Fill(phi);
532  trackD0->Fill(d0);
533 
534  if (isTrack) {
535  muonX->Fill(ipX);
536  muonY->Fill(ipY);
537  muonZ->Fill(ipZ);
538  muonEta->Fill(eta);
539  muonPhi->Fill(phi);
540  muonD0->Fill(d0);
541  }
542  }
543 }
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
reco::TransientTrack build(const reco::Track *p) const
T y() const
Definition: PV3DBase.h:60
GlobalPoint globalPosition() const
TrajectoryStateOnSurface innermostMeasurementState() const
void Fill(long long x)
const SurfaceType & surface() const
T z() const
Definition: PV3DBase.h:61
const TransientTrackBuilder * theTTrackBuilder
TrajectoryStateOnSurface outermostMeasurementState() const
static constexpr float d0
const Propagator * thePropagator
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
Definition: Propagator.h:50
T eta() const
Definition: PV3DBase.h:73
TrajectoryStateOnSurface impactPointState() const
SemiCylinder checkSemiCylinder(const Track &)
T x() const
Definition: PV3DBase.h:59
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
GlobalVector globalDirection() const
void TrackEfficiencyMonitor::testTrackerTracks ( edm::Handle< TrackCollection tkTracks,
edm::Handle< TrackCollection staTracks,
const NavigationSchool navigationSchool 
)

Definition at line 358 of file TrackEfficiencyMonitor.cc.

References TransientTrackBuilder::build(), checkSemiCylinder(), compatibleLayers(), d0, deltaX, deltaY, PVValHelper::eta, PV3DBase< T, PVType, FrameType >::eta(), failedToPropagate, dqm::impl::MonitorElement::Fill(), TrajectoryStateOnSurface::globalDirection(), TrajectoryStateOnSurface::globalPosition(), mps_fire::i, reco::TransientTrack::impactPointState(), reco::TransientTrack::innermostMeasurementState(), PFRecoTauChargedHadronQualityPlugins_cfi::isTrack, TrajectoryStateOnSurface::isValid(), TrajectoryStateOnSurface::localError(), TrajectoryStateOnSurface::localPosition(), metname, muonCompatibleLayers, muonD0, muonEta, muonPhi, muonX, muonY, muonZ, nCompatibleLayers, HLT_FULL_cff::numberOfValidHits, reco::TransientTrack::outermostMeasurementState(), phi, PV3DBase< T, PVType, FrameType >::phi(), LocalTrajectoryError::positionError(), funct::pow(), Propagator::propagate(), signDeltaX, signDeltaY, AlCaHLTBitMon_QueryRunRegistry::string, TrajectoryStateOnSurface::surface(), theMaxZ_, thePropagator, theRadius_, theTTrackBuilder, trackCompatibleLayers, trackD0, trackerAcceptance(), trackEta, trackPhi, trackX, trackY, trackZ, Up, PV3DBase< T, PVType, FrameType >::x(), LocalError::xx(), PV3DBase< T, PVType, FrameType >::y(), LocalError::yy(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by analyze().

362 {
363  const std::string metname = "testStandAloneMuonTracks";
364 
365  //---------------------------------------------------
366  // get the index of the "up" muon
367  // histograms will only be computed for the "up" muon
368  //---------------------------------------------------
369 
370  int nUpMuon = 0;
371  int idxUpMuon = -1;
372  for (unsigned int i = 0; i < staTracks->size(); i++) {
373  if (checkSemiCylinder((*staTracks)[i]) == TrackEfficiencyMonitor::Up) {
374  nUpMuon++;
375  idxUpMuon = i;
376  }
377  }
378 
379  if (nUpMuon == 1) {
380  //---------------------------------------------------
381  //get the muon informations
382  //---------------------------------------------------
383 
384  reco::TransientTrack staTT = theTTrackBuilder->build((*staTracks)[idxUpMuon]);
385  double ipX = staTT.impactPointState().globalPosition().x();
386  double ipY = staTT.impactPointState().globalPosition().y();
387  double ipZ = staTT.impactPointState().globalPosition().z();
388  double eta = staTT.impactPointState().globalDirection().eta();
389  double phi = staTT.impactPointState().globalDirection().phi();
390  double d0 = (*staTracks)[idxUpMuon].d0();
391 
393  TrajectoryStateOnSurface theTSOSCompLayers = staTT.outermostMeasurementState();
394 
395  //---------------------------------------------------
396  //check if the muon is in the tracker acceptance
397  //---------------------------------------------------
398  bool isInTrackerAcceptance = false;
399  isInTrackerAcceptance = trackerAcceptance(theTSOS, theRadius_, theMaxZ_);
400 
401  //---------------------------------------------------st
402  //count the number of compatible layers
403  //---------------------------------------------------
404  nCompatibleLayers = compatibleLayers(navigationSchool, theTSOSCompLayers);
405 
406  if (isInTrackerAcceptance && (*staTracks)[idxUpMuon].hitPattern().numberOfValidHits() > 28) {
407  //---------------------------------------------------
408  //count the number of good muon candidates
409  //---------------------------------------------------
410 
411  TrajectoryStateOnSurface staState;
412  LocalVector diffLocal;
413 
414  bool isTrack = false;
415  if (!tkTracks->empty()) {
416  //---------------------------------------------------
417  //look for associated tracks
418  //---------------------------------------------------
419  float DR2min = 1000;
420  reco::TrackCollection::const_iterator closestTrk = tkTracks->end();
421 
422  for (reco::TrackCollection::const_iterator tkTrack = tkTracks->begin(); tkTrack != tkTracks->end(); ++tkTrack) {
423  reco::TransientTrack tkTT = theTTrackBuilder->build(*tkTrack);
425  staState = thePropagator->propagate(staTT.outermostMeasurementState(), tkInner.surface());
426  failedToPropagate = 1;
427 
428  if (staState.isValid()) {
429  failedToPropagate = 0;
430  diffLocal = tkInner.localPosition() - staState.localPosition();
431  double DR2 = diffLocal.x() * diffLocal.x() + diffLocal.y() * diffLocal.y();
432  if (DR2 < DR2min) {
433  DR2min = DR2;
434  closestTrk = tkTrack;
435  }
436  if (pow(DR2, 0.5) < 100.)
437  isTrack = true;
438  }
439  }
440 
441  if (DR2min != 1000) {
442  reco::TransientTrack tkTT = theTTrackBuilder->build(*closestTrk);
444  staState = thePropagator->propagate(staTT.outermostMeasurementState(), tkInner.surface());
445  deltaX->Fill(diffLocal.x());
446  deltaY->Fill(diffLocal.y());
447  signDeltaX->Fill(diffLocal.x() /
448  (tkInner.localError().positionError().xx() + staState.localError().positionError().xx()));
449  signDeltaY->Fill(diffLocal.y() /
450  (tkInner.localError().positionError().yy() + staState.localError().positionError().yy()));
451  }
452  }
453 
454  if (failedToPropagate == 0) {
455  muonX->Fill(ipX);
456  muonY->Fill(ipY);
457  muonZ->Fill(ipZ);
458  muonEta->Fill(eta);
459  muonPhi->Fill(phi);
460  muonD0->Fill(d0);
462 
463  if (isTrack) {
464  trackX->Fill(ipX);
465  trackY->Fill(ipY);
466  trackZ->Fill(ipZ);
467  trackEta->Fill(eta);
468  trackPhi->Fill(phi);
469  trackD0->Fill(d0);
471  }
472  }
473  }
474  }
475 }
float xx() const
Definition: LocalError.h:22
const std::string metname
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
reco::TransientTrack build(const reco::Track *p) const
T y() const
Definition: PV3DBase.h:60
GlobalPoint globalPosition() const
LocalError positionError() const
tuple numberOfValidHits
TrajectoryStateOnSurface innermostMeasurementState() const
void Fill(long long x)
MonitorElement * muonCompatibleLayers
const SurfaceType & surface() const
float yy() const
Definition: LocalError.h:24
T z() const
Definition: PV3DBase.h:61
const TransientTrackBuilder * theTTrackBuilder
const LocalTrajectoryError & localError() const
TrajectoryStateOnSurface outermostMeasurementState() const
static constexpr float d0
const Propagator * thePropagator
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
Definition: Propagator.h:50
T eta() const
Definition: PV3DBase.h:73
bool trackerAcceptance(TrajectoryStateOnSurface theTSOS, double theRadius, double theMaxZ)
int compatibleLayers(const NavigationSchool &navigationSchool, TrajectoryStateOnSurface theTSOS)
TrajectoryStateOnSurface impactPointState() const
SemiCylinder checkSemiCylinder(const Track &)
MonitorElement * trackCompatibleLayers
T x() const
Definition: PV3DBase.h:59
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
GlobalVector globalDirection() const
bool TrackEfficiencyMonitor::trackerAcceptance ( TrajectoryStateOnSurface  theTSOS,
double  theRadius,
double  theMaxZ 
)

Definition at line 553 of file TrackEfficiencyMonitor.cc.

References accept(), alongMomentum, Cylinder::build(), Propagator::clone(), TrajectoryStateOnSurface::freeState(), TrajectoryStateOnSurface::globalPosition(), TrajectoryStateOnSurface::isValid(), oppositeToMomentum, Propagator::propagate(), Propagator::setPropagationDirection(), thePropagator, PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by testTrackerTracks().

555 {
556  //---------------------------------------------------
557  // check if the muon is in the tracker acceptance
558  // check the compatibility with a cylinder of radius "theRadius"
559  //---------------------------------------------------
560 
561  //Propagator* theTmpPropagator = new SteppingHelixPropagator(&*bField,anyDirection);
562 
563  //Propagator* theTmpPropagator = &*thePropagator;
564  Propagator* theTmpPropagator = thePropagator->clone();
565 
566  if (theTSOS.globalPosition().y() < 0)
567  theTmpPropagator->setPropagationDirection(oppositeToMomentum);
568  else
569  theTmpPropagator->setPropagationDirection(alongMomentum);
570 
573  const Cylinder::CylinderPointer cyl = Cylinder::build(pos0, rot0, theRadius);
574  TrajectoryStateOnSurface tsosAtCyl = theTmpPropagator->propagate(*theTSOS.freeState(), *cyl);
575  double accept = false;
576  if (tsosAtCyl.isValid()) {
577  if (fabs(tsosAtCyl.globalPosition().z()) < theMaxZ) {
580  const Cylinder::CylinderPointer cyl2 = Cylinder::build(pos02, rot02, theRadius - 10);
581  TrajectoryStateOnSurface tsosAtCyl2 = theTmpPropagator->propagate(*tsosAtCyl.freeState(), *cyl2);
582  if (tsosAtCyl2.isValid()) {
585  const Cylinder::CylinderPointer cyl3 = Cylinder::build(pos03, rot03, theRadius);
586  TrajectoryStateOnSurface tsosAtCyl3 = theTmpPropagator->propagate(*tsosAtCyl2.freeState(), *cyl3);
587  if (tsosAtCyl3.isValid()) {
588  accept = true;
589  }
590  }
591  }
592  }
593  delete theTmpPropagator;
594  //muon propagated to the barrel cylinder
595  return accept;
596 }
virtual void setPropagationDirection(PropagationDirection dir)
Definition: Propagator.h:130
T y() const
Definition: PV3DBase.h:60
virtual Propagator * clone() const =0
GlobalPoint globalPosition() const
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:31
FreeTrajectoryState const * freeState(bool withErrors=true) const
T z() const
Definition: PV3DBase.h:61
static CylinderPointer build(const PositionType &pos, const RotationType &rot, Scalar radius, Bounds *bounds=nullptr)
Definition: Cylinder.h:45
const Propagator * thePropagator
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
Definition: Propagator.h:50

Member Data Documentation

const MagneticField* TrackEfficiencyMonitor::bField
private

Definition at line 124 of file TrackEfficiencyMonitor.h.

Referenced by analyze().

edm::ParameterSet TrackEfficiencyMonitor::conf_
private

Definition at line 68 of file TrackEfficiencyMonitor.h.

Referenced by bookHistograms(), and TrackEfficiencyMonitor().

MonitorElement* TrackEfficiencyMonitor::deltaX
private

Definition at line 101 of file TrackEfficiencyMonitor.h.

Referenced by bookHistograms(), and testTrackerTracks().

MonitorElement* TrackEfficiencyMonitor::deltaY
private

Definition at line 102 of file TrackEfficiencyMonitor.h.

Referenced by bookHistograms(), and testTrackerTracks().

DQMStore* TrackEfficiencyMonitor::dqmStore_
private

Definition at line 67 of file TrackEfficiencyMonitor.h.

Referenced by TrackEfficiencyMonitor().

int TrackEfficiencyMonitor::failedToPropagate
private

Definition at line 81 of file TrackEfficiencyMonitor.h.

Referenced by analyze(), testSTATracks(), and testTrackerTracks().

bool TrackEfficiencyMonitor::findDetLayer
private

Definition at line 83 of file TrackEfficiencyMonitor.h.

Referenced by analyze(), compatibleLayers(), and findNextLayer().

MonitorElement* TrackEfficiencyMonitor::GlobalMuonPtEtaPhiHighPt
private

Definition at line 107 of file TrackEfficiencyMonitor.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackEfficiencyMonitor::GlobalMuonPtEtaPhiLowPt
private

Definition at line 105 of file TrackEfficiencyMonitor.h.

Referenced by analyze(), and bookHistograms().

const edm::ESGetToken<GeometricSearchTracker, TrackerRecoGeometryRecord> TrackEfficiencyMonitor::gstToken_
private

Definition at line 115 of file TrackEfficiencyMonitor.h.

Referenced by analyze().

std::string TrackEfficiencyMonitor::histname
private

Definition at line 65 of file TrackEfficiencyMonitor.h.

Referenced by bookHistograms().

bool TrackEfficiencyMonitor::isBFieldOff_
private

Definition at line 72 of file TrackEfficiencyMonitor.h.

Referenced by analyze(), and TrackEfficiencyMonitor().

const MeasurementTracker* TrackEfficiencyMonitor::measurementTracker
private

Definition at line 125 of file TrackEfficiencyMonitor.h.

Referenced by analyze(), and compatibleLayers().

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

Definition at line 116 of file TrackEfficiencyMonitor.h.

Referenced by analyze().

const edm::ESGetToken<MeasurementTracker, CkfComponentsRecord> TrackEfficiencyMonitor::mtToken_
private

Definition at line 117 of file TrackEfficiencyMonitor.h.

Referenced by analyze().

MonitorElement* TrackEfficiencyMonitor::muonCompatibleLayers
private

Definition at line 91 of file TrackEfficiencyMonitor.h.

Referenced by bookHistograms(), and testTrackerTracks().

MonitorElement* TrackEfficiencyMonitor::muonD0
private

Definition at line 90 of file TrackEfficiencyMonitor.h.

Referenced by bookHistograms(), testSTATracks(), and testTrackerTracks().

MonitorElement* TrackEfficiencyMonitor::muonEta
private

Definition at line 88 of file TrackEfficiencyMonitor.h.

Referenced by bookHistograms(), testSTATracks(), and testTrackerTracks().

MonitorElement* TrackEfficiencyMonitor::muonPhi
private

Definition at line 89 of file TrackEfficiencyMonitor.h.

Referenced by bookHistograms(), testSTATracks(), and testTrackerTracks().

edm::EDGetTokenT<edm::View<reco::Muon> > TrackEfficiencyMonitor::muonToken_
private

Definition at line 119 of file TrackEfficiencyMonitor.h.

Referenced by analyze(), and TrackEfficiencyMonitor().

MonitorElement* TrackEfficiencyMonitor::muonX
private

Definition at line 85 of file TrackEfficiencyMonitor.h.

Referenced by bookHistograms(), testSTATracks(), and testTrackerTracks().

MonitorElement* TrackEfficiencyMonitor::muonY
private

Definition at line 86 of file TrackEfficiencyMonitor.h.

Referenced by bookHistograms(), testSTATracks(), and testTrackerTracks().

MonitorElement* TrackEfficiencyMonitor::muonZ
private

Definition at line 87 of file TrackEfficiencyMonitor.h.

Referenced by bookHistograms(), testSTATracks(), and testTrackerTracks().

const edm::ESGetToken<NavigationSchool, NavigationSchoolRecord> TrackEfficiencyMonitor::navToken_
private

Definition at line 114 of file TrackEfficiencyMonitor.h.

Referenced by analyze().

int TrackEfficiencyMonitor::nCompatibleLayers
private

Definition at line 82 of file TrackEfficiencyMonitor.h.

Referenced by analyze(), and testTrackerTracks().

const edm::ESGetToken<Propagator, TrackingComponentsRecord> TrackEfficiencyMonitor::propToken_
private

Definition at line 113 of file TrackEfficiencyMonitor.h.

Referenced by analyze().

MonitorElement* TrackEfficiencyMonitor::signDeltaX
private

Definition at line 103 of file TrackEfficiencyMonitor.h.

Referenced by bookHistograms(), and testTrackerTracks().

MonitorElement* TrackEfficiencyMonitor::signDeltaY
private

Definition at line 104 of file TrackEfficiencyMonitor.h.

Referenced by bookHistograms(), and testTrackerTracks().

MonitorElement* TrackEfficiencyMonitor::StandaloneMuonPtEtaPhiHighPt
private

Definition at line 108 of file TrackEfficiencyMonitor.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackEfficiencyMonitor::StandaloneMuonPtEtaPhiLowPt
private

Definition at line 106 of file TrackEfficiencyMonitor.h.

Referenced by analyze(), and bookHistograms().

double TrackEfficiencyMonitor::theMaxZ_
private

Definition at line 71 of file TrackEfficiencyMonitor.h.

Referenced by testTrackerTracks(), and TrackEfficiencyMonitor().

MuonServiceProxy* TrackEfficiencyMonitor::theMuonServiceProxy
private

Definition at line 110 of file TrackEfficiencyMonitor.h.

const DirectTrackerNavigation* TrackEfficiencyMonitor::theNavigation
private

Definition at line 109 of file TrackEfficiencyMonitor.h.

Referenced by analyze().

const Propagator* TrackEfficiencyMonitor::thePropagator
private
double TrackEfficiencyMonitor::theRadius_
private

Definition at line 70 of file TrackEfficiencyMonitor.h.

Referenced by testTrackerTracks(), and TrackEfficiencyMonitor().

edm::InputTag TrackEfficiencyMonitor::theSTATracksLabel_
private

Definition at line 77 of file TrackEfficiencyMonitor.h.

Referenced by TrackEfficiencyMonitor().

edm::EDGetTokenT<reco::TrackCollection> TrackEfficiencyMonitor::theSTATracksToken_
private

Definition at line 79 of file TrackEfficiencyMonitor.h.

Referenced by analyze(), and TrackEfficiencyMonitor().

edm::InputTag TrackEfficiencyMonitor::theTKTracksLabel_
private

Definition at line 76 of file TrackEfficiencyMonitor.h.

Referenced by TrackEfficiencyMonitor().

edm::EDGetTokenT<reco::TrackCollection> TrackEfficiencyMonitor::theTKTracksToken_
private

Definition at line 78 of file TrackEfficiencyMonitor.h.

Referenced by analyze(), and TrackEfficiencyMonitor().

const GeometricSearchTracker* TrackEfficiencyMonitor::theTracker
private

Definition at line 123 of file TrackEfficiencyMonitor.h.

Referenced by analyze().

const TransientTrackBuilder* TrackEfficiencyMonitor::theTTrackBuilder
private

Definition at line 122 of file TrackEfficiencyMonitor.h.

Referenced by analyze(), testSTATracks(), and testTrackerTracks().

MonitorElement* TrackEfficiencyMonitor::trackCompatibleLayers
private

Definition at line 99 of file TrackEfficiencyMonitor.h.

Referenced by bookHistograms(), compatibleLayers(), and testTrackerTracks().

MonitorElement* TrackEfficiencyMonitor::trackD0
private

Definition at line 98 of file TrackEfficiencyMonitor.h.

Referenced by bookHistograms(), testSTATracks(), and testTrackerTracks().

bool TrackEfficiencyMonitor::trackEfficiency_
private

Definition at line 73 of file TrackEfficiencyMonitor.h.

Referenced by analyze(), and TrackEfficiencyMonitor().

MonitorElement* TrackEfficiencyMonitor::trackEta
private

Definition at line 96 of file TrackEfficiencyMonitor.h.

Referenced by bookHistograms(), testSTATracks(), and testTrackerTracks().

MonitorElement* TrackEfficiencyMonitor::trackPhi
private

Definition at line 97 of file TrackEfficiencyMonitor.h.

Referenced by bookHistograms(), testSTATracks(), and testTrackerTracks().

MonitorElement* TrackEfficiencyMonitor::trackX
private

Definition at line 93 of file TrackEfficiencyMonitor.h.

Referenced by bookHistograms(), testSTATracks(), and testTrackerTracks().

MonitorElement* TrackEfficiencyMonitor::trackY
private

Definition at line 94 of file TrackEfficiencyMonitor.h.

Referenced by bookHistograms(), testSTATracks(), and testTrackerTracks().

MonitorElement* TrackEfficiencyMonitor::trackZ
private

Definition at line 95 of file TrackEfficiencyMonitor.h.

Referenced by bookHistograms(), testSTATracks(), and testTrackerTracks().

const edm::ESGetToken<TransientTrackBuilder, TransientTrackRecord> TrackEfficiencyMonitor::ttbToken_
private

Definition at line 112 of file TrackEfficiencyMonitor.h.

Referenced by analyze().