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 
12 // Base Class Headers
17 
21 
26 
29 
30 namespace edm {
31  class ParameterSet;
32  class Event;
33  class EventSetup;
34 }
35 
36 class HTracks;
37 class HResolution;
38 
39 class MuonServiceProxy;
40 class KFUpdator;
43 
45 
46  public:
48 
49 public:
52 
55 
56  // Operations
57 
58  void analyze(const edm::Event & event, const edm::EventSetup& eventSetup);
59 
60  virtual void beginJob() ;
61  virtual void endJob() ;
62 
63 protected:
64 
65 private:
66  bool isInTheAcceptance(double eta);
67 
68  std::map<DetId, const PSimHit*> mapMuSimHitsPerId(edm::Handle<edm::PSimHitContainer> dtSimhits,
71 
73  std::map<DetId,const PSimHit*> &hitIdMap);
74 
75  void computeResolution(Trajectory &trajectory,
76  std::map<DetId,const PSimHit*> &hitIdMap,
78 
79  private:
80 
83 
85 
88 
94 
98 
99  private:
101 
102  // Resolution wrt the 1D Rec Hits
104 
105  // Resolution wrt the 1d Sim Hits
107 
112 
114 
115  unsigned int theSimTkId;
116 
117 
118  std::vector<const PSimHit*> theSimHitContainer;
119 
120 
122 
124 
125  bool operator()(const PSimHit *a,
126  const PSimHit *b) const{
127 
128  const GeomDet *geomDetA = theTG->idToDet(DetId(a->detUnitId()));
129  const GeomDet *geomDetB = theTG->idToDet(DetId(b->detUnitId()));
130 
131  double distA = geomDetA->toGlobal(a->localPosition()).mag();
132  double distB = geomDetB->toGlobal(b->localPosition()).mag();
133 
134  return distA < distB;
135  }
136 
138  };
139 
140 
141 };
142 #endif
143 
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)
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:20
std::vector< const PSimHit * > theSimHitContainer
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
virtual ~MuonTrackResidualAnalyzer()
Destructor.
void computeResolution(Trajectory &trajectory, std::map< DetId, const PSimHit * > &hitIdMap, HResolution1DRecHit *histos)
unsigned int detUnitId() const
Definition: PSimHit.h:93