88 muonX = ibooker.
book1D(histname + AlgoName, histname + AlgoName, muonXBin, muonXMin, muonXMax);
97 muonY = ibooker.
book1D(histname + AlgoName, histname + AlgoName, muonYBin, muonYMin, muonYMax);
106 muonZ = ibooker.
book1D(histname + AlgoName, histname + AlgoName, muonZBin, muonZMin, muonZMax);
114 histname =
"muonEta_";
115 muonEta = ibooker.
book1D(histname + AlgoName, histname + AlgoName, muonEtaBin, muonEtaMin, muonEtaMax);
123 histname =
"muonPhi_";
124 muonPhi = ibooker.
book1D(histname + AlgoName, histname + AlgoName, muonPhiBin, muonPhiMin, muonPhiMax);
132 histname =
"muonD0_";
133 muonD0 = ibooker.
book1D(histname + AlgoName, histname + AlgoName, muonD0Bin, muonD0Min, muonD0Max);
141 histname =
"muonCompatibleLayers_";
144 muonCompatibleLayersBin,
145 muonCompatibleLayersMin,
146 muonCompatibleLayersMax);
156 histname =
"trackX_";
157 trackX = ibooker.
book1D(histname + AlgoName, histname + AlgoName, trackXBin, trackXMin, trackXMax);
165 histname =
"trackY_";
166 trackY = ibooker.
book1D(histname + AlgoName, histname + AlgoName, trackYBin, trackYMin, trackYMax);
174 histname =
"trackZ_";
175 trackZ = ibooker.
book1D(histname + AlgoName, histname + AlgoName, trackZBin, trackZMin, trackZMax);
183 histname =
"trackEta_";
184 trackEta = ibooker.
book1D(histname + AlgoName, histname + AlgoName, trackEtaBin, trackEtaMin, trackEtaMax);
192 histname =
"trackPhi_";
193 trackPhi = ibooker.
book1D(histname + AlgoName, histname + AlgoName, trackPhiBin, trackPhiMin, trackPhiMax);
201 histname =
"trackD0_";
202 trackD0 = ibooker.
book1D(histname + AlgoName, histname + AlgoName, trackD0Bin, trackD0Min, trackD0Max);
210 histname =
"trackCompatibleLayers_";
213 trackCompatibleLayersBin,
214 trackCompatibleLayersMin,
215 trackCompatibleLayersMax);
225 histname =
"deltaX_";
226 deltaX = ibooker.
book1D(histname + AlgoName, histname + AlgoName, deltaXBin, deltaXMin, deltaXMax);
234 histname =
"deltaY_";
235 deltaY = ibooker.
book1D(histname + AlgoName, histname + AlgoName, deltaYBin, deltaYMin, deltaYMax);
243 histname =
"signDeltaX_";
244 signDeltaX = ibooker.
book1D(histname + AlgoName, histname + AlgoName, signDeltaXBin, signDeltaXMin, signDeltaXMax);
252 histname =
"signDeltaY_";
253 signDeltaY = ibooker.
book1D(histname + AlgoName, histname + AlgoName, signDeltaYBin, signDeltaYMin, signDeltaYMax);
256 histname =
"GlobalMuonPtEtaPhi_LowPt_";
260 histname =
"StandaloneMuonPtEtaPhi_LowPt_";
262 ibooker.
book2D(histname + AlgoName, histname + AlgoName, 20, -2.4, 2.4, 20, -3.25, 3.25);
265 histname =
"GlobalMuonPtEtaPhi_HighPt_";
269 histname =
"StandaloneMuonPtEtaPhi_HighPt_";
271 ibooker.
book2D(histname + AlgoName, histname + AlgoName, 20, -2.4, 2.4, 20, -3.25, 3.25);
308 if ((*muon).pt() < 5)
310 if (fabs((*muon).eta()) > 2.4)
312 if ((*muon).vertexNormalizedChi2() > 10)
314 if ((*muon).isStandAloneMuon() and (*muon).isGlobalMuon()) {
315 if ((*muon).pt() < 20)
320 if ((*muon).isStandAloneMuon()) {
321 if ((*muon).pt() < 20)
333 double mudd0 = 0., mudphi = 0., muddsz = 0., mudeta = 0.;
335 if (staTracks->size() == 2) {
336 for (
unsigned int bindex = 0; bindex < staTracks->size(); ++bindex) {
338 mudd0 += (*staTracks)[bindex].d0();
339 mudphi += (*staTracks)[bindex].phi();
340 muddsz += (*staTracks)[bindex].dsz();
341 mudeta += (*staTracks)[bindex].eta();
344 mudd0 -= (*staTracks)[bindex].d0();
345 mudphi -= (*staTracks)[bindex].phi();
346 muddsz -= (*staTracks)[bindex].dsz();
347 mudeta -= (*staTracks)[bindex].eta();
350 if ((fabs(mudd0) < 15.0) && (fabs(mudphi) < 0.045) && (fabs(muddsz) < 20.0) && (fabs(mudeta) < 0.060))
357 }
else if (staTracks->size() == 1 || staTracks->size() == 2)
362 if ((tkTracks->front()).
normalizedChi2() < 5 && (tkTracks->front()).hitPattern().numberOfValidHits() > 8)
375 if (outputMEsInRootFile) {
398 for (
unsigned int i = 0;
i < staTracks->size();
i++) {
416 double d0 = (*staTracks)[idxUpMuon].d0();
424 bool isInTrackerAcceptance =
false;
432 if (isInTrackerAcceptance && (*staTracks)[idxUpMuon].hitPattern().
numberOfValidHits() > 28) {
441 if (!tkTracks->empty()) {
446 reco::TrackCollection::const_iterator closestTrk = tkTracks->end();
448 for (reco::TrackCollection::const_iterator tkTrack = tkTracks->begin(); tkTrack != tkTracks->end(); ++tkTrack) {
457 double DR2 = diffLocal.
x() * diffLocal.
x() + diffLocal.
y() * diffLocal.
y();
460 closestTrk = tkTrack;
462 if (
pow(DR2, 0.5) < 100.)
467 if (DR2min != 1000) {
514 double d0 = (*tkTracks)[0].d0();
521 if (!staTracks->empty()) {
527 reco::TrackCollection::const_iterator closestTrk = staTracks->end();
529 for (reco::TrackCollection::const_iterator staTrack = staTracks->begin(); staTrack != staTracks->end();
540 double DR2 = diffLocal.
x() * diffLocal.
x() + diffLocal.
y() * diffLocal.
y();
543 closestTrk = staTrack;
545 if (
pow(DR2, 0.5) < 100.)
619 delete theTmpPropagator;
635 for (
unsigned int k = 0;
k < barrelTOBLayers.size();
k++) {
636 const DetLayer* firstLay = barrelTOBLayers[barrelTOBLayers.size() - 1 -
k];
648 bool isUpMuon =
false;
649 bool firstdtep =
true;
663 std::vector<const DetLayer*> firstCompatibleLayers;
664 firstCompatibleLayers.push_back(firstLay);
665 std::pair<TrajectoryStateOnSurface, const DetLayer*> nextLayer =
670 if (!trackCompatibleLayers.empty()) {
671 std::pair<TrajectoryStateOnSurface, const DetLayer*> nextLayer =
673 if (firstLay != nextLayer.second) {
674 firstLay = nextLayer.second;
675 startTSOS = nextLayer.first;
685 delete theTmpPropagator;
688 delete theTmpPropagator;
703 std::vector<const DetLayer*>::const_iterator itl;
705 for (itl = trackCompatibleLayers.begin(); itl != trackCompatibleLayers.end(); ++itl) {
714 std::pair<TrajectoryStateOnSurface, const DetLayer*> blabla;
715 blabla.first = sTSOS;
716 blabla.second = &**itl;
717 delete theTmpPropagator;
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX)
T getParameter(std::string const &) const
edm::ESHandle< MagneticField > bField
virtual void setPropagationDirection(PropagationDirection dir)
virtual Propagator * clone() const =0
bool getByToken(EDGetToken token, Handle< PROD > &result) const
const std::string metname
void setCurrentFolder(std::string const &fullpath)
LocalPoint localPosition() const
edm::ESHandle< GeometricSearchTracker > theTracker
Geom::Phi< T > phi() const
reco::TransientTrack build(const reco::Track *p) const
GlobalPoint globalPosition() const
~TrackEfficiencyMonitor() override
MonitorElement * GlobalMuonPtEtaPhiHighPt
std::vector< BarrelDetLayer const * > const & tobLayers() const
void endJob(void) override
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)
void beginJob(void) override
LocalError positionError() const
TrajectoryStateOnSurface innermostMeasurementState() const
const math::XYZPoint & innerPosition() const
position of the innermost hit
edm::EDGetTokenT< edm::View< reco::Muon > > muonToken_
static CylinderPointer build(const PositionType &pos, const RotationType &rot, Scalar radius, Bounds *bounds=0)
MonitorElement * muonCompatibleLayers
const SurfaceType & surface() const
#define DEFINE_FWK_MODULE(type)
FreeTrajectoryState const * freeState(bool withErrors=true) const
edm::ESHandle< MeasurementTracker > measurementTrackerHandle
MonitorElement * StandaloneMuonPtEtaPhiLowPt
MonitorElement * trackEta
virtual const BoundSurface & surface() const =0
The surface of the GeometricSearchDet.
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
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_
edm::ESHandle< Propagator > thePropagator
std::pair< TrajectoryStateOnSurface, const DetLayer * > findNextLayer(TrajectoryStateOnSurface startTSOS, const std::vector< const DetLayer * > &trackCompatibleLayers, bool isUpMuon)
MonitorElement * signDeltaX
edm::ESHandle< TransientTrackBuilder > theTTrackBuilder
edm::InputTag theTKTracksLabel_
std::vector< const DetLayer * > nextLayers(const DetLayer &detLayer, Args &&...args) const
MonitorElement * StandaloneMuonPtEtaPhiHighPt
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
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
bool trackerAcceptance(TrajectoryStateOnSurface theTSOS, double theRadius, double theMaxZ)
int compatibleLayers(const NavigationSchool &navigationSchool, TrajectoryStateOnSurface theTSOS)
MonitorElement * signDeltaY
TrackEfficiencyMonitor(const edm::ParameterSet &)
TrajectoryStateOnSurface impactPointState() const
MonitorElement * trackPhi
SemiCylinder checkSemiCylinder(const Track &)
MonitorElement * trackCompatibleLayers
const GeometricSearchTracker * geometricSearchTracker() const
T const * product() const
Power< A, B >::type pow(const A &a, const B &b)
void save(std::string const &filename, std::string const &path="", std::string const &pattern="", std::string const &rewrite="", uint32_t run=0, uint32_t lumi=0, SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, std::string const &fileupdate="RECREATE")
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)