85 muonX = ibooker.
book1D(histname + AlgoName, histname + AlgoName, muonXBin, muonXMin, muonXMax);
94 muonY = ibooker.
book1D(histname + AlgoName, histname + AlgoName, muonYBin, muonYMin, muonYMax);
103 muonZ = ibooker.
book1D(histname + AlgoName, histname + AlgoName, muonZBin, muonZMin, muonZMax);
111 histname =
"muonEta_";
112 muonEta = ibooker.
book1D(histname + AlgoName, histname + AlgoName, muonEtaBin, muonEtaMin, muonEtaMax);
120 histname =
"muonPhi_";
121 muonPhi = ibooker.
book1D(histname + AlgoName, histname + AlgoName, muonPhiBin, muonPhiMin, muonPhiMax);
129 histname =
"muonD0_";
130 muonD0 = ibooker.
book1D(histname + AlgoName, histname + AlgoName, muonD0Bin, muonD0Min, muonD0Max);
134 int muonCompatibleLayersBin =
conf_.
getParameter<
int>(
"muonCompatibleLayersBin");
135 double muonCompatibleLayersMin =
conf_.
getParameter<
double>(
"muonCompatibleLayersMin");
136 double muonCompatibleLayersMax =
conf_.
getParameter<
double>(
"muonCompatibleLayersMax");
138 histname =
"muonCompatibleLayers_";
141 muonCompatibleLayersBin,
142 muonCompatibleLayersMin,
143 muonCompatibleLayersMax);
153 histname =
"trackX_";
154 trackX = ibooker.
book1D(histname + AlgoName, histname + AlgoName, trackXBin, trackXMin, trackXMax);
162 histname =
"trackY_";
163 trackY = ibooker.
book1D(histname + AlgoName, histname + AlgoName, trackYBin, trackYMin, trackYMax);
171 histname =
"trackZ_";
172 trackZ = ibooker.
book1D(histname + AlgoName, histname + AlgoName, trackZBin, trackZMin, trackZMax);
180 histname =
"trackEta_";
181 trackEta = ibooker.
book1D(histname + AlgoName, histname + AlgoName, trackEtaBin, trackEtaMin, trackEtaMax);
189 histname =
"trackPhi_";
190 trackPhi = ibooker.
book1D(histname + AlgoName, histname + AlgoName, trackPhiBin, trackPhiMin, trackPhiMax);
198 histname =
"trackD0_";
199 trackD0 = ibooker.
book1D(histname + AlgoName, histname + AlgoName, trackD0Bin, trackD0Min, trackD0Max);
203 int trackCompatibleLayersBin =
conf_.
getParameter<
int>(
"trackCompatibleLayersBin");
204 double trackCompatibleLayersMin =
conf_.
getParameter<
double>(
"trackCompatibleLayersMin");
205 double trackCompatibleLayersMax =
conf_.
getParameter<
double>(
"trackCompatibleLayersMax");
207 histname =
"trackCompatibleLayers_";
210 trackCompatibleLayersBin,
211 trackCompatibleLayersMin,
212 trackCompatibleLayersMax);
222 histname =
"deltaX_";
223 deltaX = ibooker.
book1D(histname + AlgoName, histname + AlgoName, deltaXBin, deltaXMin, deltaXMax);
231 histname =
"deltaY_";
232 deltaY = ibooker.
book1D(histname + AlgoName, histname + AlgoName, deltaYBin, deltaYMin, deltaYMax);
240 histname =
"signDeltaX_";
241 signDeltaX = ibooker.
book1D(histname + AlgoName, histname + AlgoName, signDeltaXBin, signDeltaXMin, signDeltaXMax);
249 histname =
"signDeltaY_";
250 signDeltaY = ibooker.
book1D(histname + AlgoName, histname + AlgoName, signDeltaYBin, signDeltaYMin, signDeltaYMax);
253 histname =
"GlobalMuonPtEtaPhi_LowPt_";
257 histname =
"StandaloneMuonPtEtaPhi_LowPt_";
259 ibooker.
book2D(histname + AlgoName, histname + AlgoName, 20, -2.4, 2.4, 20, -3.25, 3.25);
262 histname =
"GlobalMuonPtEtaPhi_HighPt_";
266 histname =
"StandaloneMuonPtEtaPhi_HighPt_";
268 ibooker.
book2D(histname + AlgoName, histname + AlgoName, 20, -2.4, 2.4, 20, -3.25, 3.25);
296 if ((*muon).pt() < 5)
298 if (fabs((*muon).eta()) > 2.4)
300 if ((*muon).vertexNormalizedChi2() > 10)
302 if ((*muon).isStandAloneMuon() and (*muon).isGlobalMuon()) {
303 if ((*muon).pt() < 20)
308 if ((*muon).isStandAloneMuon()) {
309 if ((*muon).pt() < 20)
321 double mudd0 = 0., mudphi = 0., muddsz = 0., mudeta = 0.;
323 if (staTracks->size() == 2) {
324 for (
unsigned int bindex = 0; bindex < staTracks->size(); ++bindex) {
326 mudd0 += (*staTracks)[bindex].d0();
327 mudphi += (*staTracks)[bindex].phi();
328 muddsz += (*staTracks)[bindex].dsz();
329 mudeta += (*staTracks)[bindex].eta();
332 mudd0 -= (*staTracks)[bindex].d0();
333 mudphi -= (*staTracks)[bindex].phi();
334 muddsz -= (*staTracks)[bindex].dsz();
335 mudeta -= (*staTracks)[bindex].eta();
338 if ((fabs(mudd0) < 15.0) && (fabs(mudphi) < 0.045) && (fabs(muddsz) < 20.0) && (fabs(mudeta) < 0.060))
345 }
else if (staTracks->size() == 1 || staTracks->size() == 2)
350 if ((tkTracks->front()).
normalizedChi2() < 5 && (tkTracks->front()).hitPattern().numberOfValidHits() > 8)
372 for (
unsigned int i = 0;
i < staTracks->size();
i++) {
390 double d0 = (*staTracks)[idxUpMuon].d0();
398 bool isInTrackerAcceptance =
false;
406 if (isInTrackerAcceptance && (*staTracks)[idxUpMuon].hitPattern().
numberOfValidHits() > 28) {
415 if (!tkTracks->empty()) {
420 reco::TrackCollection::const_iterator closestTrk = tkTracks->end();
422 for (reco::TrackCollection::const_iterator tkTrack = tkTracks->begin(); tkTrack != tkTracks->end(); ++tkTrack) {
431 double DR2 = diffLocal.
x() * diffLocal.
x() + diffLocal.
y() * diffLocal.
y();
434 closestTrk = tkTrack;
436 if (
pow(DR2, 0.5) < 100.)
441 if (DR2min != 1000) {
488 double d0 = (*tkTracks)[0].d0();
495 if (!staTracks->empty()) {
501 reco::TrackCollection::const_iterator closestTrk = staTracks->end();
503 for (reco::TrackCollection::const_iterator staTrack = staTracks->begin(); staTrack != staTracks->end();
514 double DR2 = diffLocal.
x() * diffLocal.
x() + diffLocal.
y() * diffLocal.
y();
517 closestTrk = staTrack;
519 if (
pow(DR2, 0.5) < 100.)
593 delete theTmpPropagator;
609 for (
unsigned int k = 0;
k < barrelTOBLayers.size();
k++) {
610 const DetLayer* firstLay = barrelTOBLayers[barrelTOBLayers.size() - 1 -
k];
622 bool isUpMuon =
false;
623 bool firstdtep =
true;
637 std::vector<const DetLayer*> firstCompatibleLayers;
638 firstCompatibleLayers.push_back(firstLay);
639 std::pair<TrajectoryStateOnSurface, const DetLayer*> nextLayer =
644 if (!trackCompatibleLayers.empty()) {
645 std::pair<TrajectoryStateOnSurface, const DetLayer*> nextLayer =
647 if (firstLay != nextLayer.second) {
648 firstLay = nextLayer.second;
649 startTSOS = nextLayer.first;
659 delete theTmpPropagator;
662 delete theTmpPropagator;
677 std::vector<const DetLayer*>::const_iterator itl;
679 for (itl = trackCompatibleLayers.begin(); itl != trackCompatibleLayers.end(); ++itl) {
688 std::pair<TrajectoryStateOnSurface, const DetLayer*> blabla;
689 blabla.first = sTSOS;
690 blabla.second = &**itl;
691 delete theTmpPropagator;
virtual const BoundSurface & surface() const =0
The surface of the GeometricSearchDet.
virtual void setPropagationDirection(PropagationDirection dir)
std::vector< LayerSetAndLayers > layers(const SeedingLayerSetsHits &sets)
const MagneticField * bField
virtual void setCurrentFolder(std::string const &fullpath)
const std::string metname
#define DEFINE_FWK_MODULE(type)
LocalPoint localPosition() const
Geom::Phi< T > phi() const
reco::TransientTrack build(const reco::Track *p) const
virtual Propagator * clone() const =0
GlobalPoint globalPosition() const
~TrackEfficiencyMonitor() override
const edm::ESGetToken< NavigationSchool, NavigationSchoolRecord > navToken_
MonitorElement * GlobalMuonPtEtaPhiHighPt
std::vector< BarrelDetLayer const * > const & tobLayers() const
void testTrackerTracks(edm::Handle< TrackCollection > tkTracks, edm::Handle< TrackCollection > staTracks, const NavigationSchool &navigationSchool)
MonitorElement * GlobalMuonPtEtaPhiLowPt
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
const edm::ESGetToken< TransientTrackBuilder, TransientTrackRecord > ttbToken_
LocalError positionError() const
const edm::ESGetToken< GeometricSearchTracker, TrackerRecoGeometryRecord > gstToken_
TrajectoryStateOnSurface innermostMeasurementState() const
const math::XYZPoint & innerPosition() const
position of the innermost hit
edm::EDGetTokenT< edm::View< reco::Muon > > muonToken_
bool getData(T &iHolder) const
const edm::ESGetToken< MeasurementTracker, CkfComponentsRecord > mtToken_
Handle< PROD > getHandle(EDGetTokenT< PROD > token) const
MonitorElement * muonCompatibleLayers
const SurfaceType & surface() const
FreeTrajectoryState const * freeState(bool withErrors=true) const
const GeometricSearchTracker * theTracker
MonitorElement * StandaloneMuonPtEtaPhiLowPt
MonitorElement * trackEta
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
const TransientTrackBuilder * theTTrackBuilder
const LocalTrajectoryError & localError() const
TrajectoryStateOnSurface outermostMeasurementState() const
edm::InputTag theSTATracksLabel_
bool isGoodMuon(const reco::Muon &muon, SelectionType type, reco::Muon::ArbitrationType arbitrationType=reco::Muon::SegmentAndTrackArbitration)
main GoodMuon wrapper call
edm::EDGetTokenT< reco::TrackCollection > theTKTracksToken_
static constexpr float d0
std::pair< TrajectoryStateOnSurface, const DetLayer * > findNextLayer(TrajectoryStateOnSurface startTSOS, const std::vector< const DetLayer * > &trackCompatibleLayers, bool isUpMuon)
MonitorElement * signDeltaX
static CylinderPointer build(const PositionType &pos, const RotationType &rot, Scalar radius, Bounds *bounds=nullptr)
edm::InputTag theTKTracksLabel_
std::vector< const DetLayer * > nextLayers(const DetLayer &detLayer, Args &&...args) const
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())
T getParameter(std::string const &) const
const Propagator * thePropagator
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
const DirectTrackerNavigation * theNavigation
void analyze(const edm::Event &, const edm::EventSetup &) override
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
bool trackerAcceptance(TrajectoryStateOnSurface theTSOS, double theRadius, double theMaxZ)
int compatibleLayers(const NavigationSchool &navigationSchool, TrajectoryStateOnSurface theTSOS)
MonitorElement * signDeltaY
TrackEfficiencyMonitor(const edm::ParameterSet &)
TrajectoryStateOnSurface impactPointState() const
const MeasurementTracker * measurementTracker
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > mfToken_
MonitorElement * trackPhi
SemiCylinder checkSemiCylinder(const Track &)
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
MonitorElement * trackCompatibleLayers
const GeometricSearchTracker * geometricSearchTracker() const
const edm::ESGetToken< Propagator, TrackingComponentsRecord > propToken_
Power< A, B >::type pow(const A &a, const B &b)
void testSTATracks(edm::Handle< TrackCollection > tkTracks, edm::Handle< TrackCollection > staTracks)
edm::EDGetTokenT< reco::TrackCollection > theSTATracksToken_
GlobalVector globalDirection() const
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)