CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MuonTrackResidualAnalyzer.h
Go to the documentation of this file.
1 #ifndef Validation_RecoMuon_MuonTrackResidualAnalyzer_H
2 #define Validation_RecoMuon_MuonTrackResidualAnalyzer_H
3 
10 // Base Class Headers
15 
19 
24 
27 
30 
31 namespace edm {
32  class ParameterSet;
33  class Event;
34  class EventSetup;
35 }
36 
37 class HTracks;
38 class HResolution;
39 
40 class MuonServiceProxy;
41 class KFUpdator;
44 
46 
47  public:
49 
50 public:
53 
56 
57  // Operations
58 
59  void analyze(const edm::Event & event, const edm::EventSetup& eventSetup);
60 
61  virtual void beginJob() ;
62  virtual void endJob() ;
63  virtual void beginRun() ;
64  virtual void endRun() ;
65 
66 protected:
67 
68 private:
69  bool isInTheAcceptance(double eta);
70 
71  std::map<DetId, const PSimHit*> mapMuSimHitsPerId(edm::Handle<edm::PSimHitContainer> dtSimhits,
74 
76  std::map<DetId,const PSimHit*> &hitIdMap);
77 
78  void computeResolution(Trajectory &trajectory,
79  std::map<DetId,const PSimHit*> &hitIdMap,
81 
82  private:
83 
86 
88 
92 
97 
102 
106 
107  private:
109 
110  // Resolution wrt the 1D Rec Hits
112 
113  // Resolution wrt the 1d Sim Hits
115 
120 
122 
123  unsigned int theSimTkId;
124 
125 
126  std::vector<const PSimHit*> theSimHitContainer;
127 
128 
130 
132 
133  bool operator()(const PSimHit *a,
134  const PSimHit *b) const{
135 
136  const GeomDet *geomDetA = theTG->idToDet(DetId(a->detUnitId()));
137  const GeomDet *geomDetB = theTG->idToDet(DetId(b->detUnitId()));
138 
139  double distA = geomDetA->toGlobal(a->localPosition()).mag();
140  double distB = geomDetB->toGlobal(b->localPosition()).mag();
141 
142  return distA < distB;
143  }
144 
146  };
147 
148 
149 };
150 #endif
151 
MeasurementEstimator * theEstimator
std::map< DetId, const PSimHit * > mapMuSimHitsPerId(edm::Handle< edm::PSimHitContainer > dtSimhits, edm::Handle< edm::PSimHitContainer > cscSimhits, edm::Handle< edm::PSimHitContainer > rpcSimhits)
RadiusComparatorInOut(edm::ESHandle< GlobalTrackingGeometry > tg)
edm::EDGetTokenT< reco::TrackCollection > theMuonTrackToken
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:47
T eta() const
MuonTrackResidualAnalyzer(const edm::ParameterSet &pset)
Constructor.
bool operator()(const PSimHit *a, const PSimHit *b) const
Local3DPoint localPosition() const
Definition: PSimHit.h:44
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
void analyze(const edm::Event &event, const edm::EventSetup &eventSetup)
Definition: DetId.h:18
std::vector< const PSimHit * > theSimHitContainer
double b
Definition: hdecay.h:120
edm::EDGetTokenT< std::vector< PSimHit > > theRPCSimHitToken
edm::EDGetTokenT< edm::SimTrackContainer > theDataTypeToken
double a
Definition: hdecay.h:121
virtual ~MuonTrackResidualAnalyzer()
Destructor.
void computeResolution(Trajectory &trajectory, std::map< DetId, const PSimHit * > &hitIdMap, HResolution1DRecHit *histos)
edm::EDGetTokenT< std::vector< PSimHit > > theCSCSimHitToken
unsigned int detUnitId() const
Definition: PSimHit.h:93
edm::EDGetTokenT< std::vector< PSimHit > > theDTSimHitToken