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 
16 
19 
24 
27 
31 
32 
33 namespace edm {
34  class ParameterSet;
35  class Event;
36  class EventSetup;
37 }
38 class DQMStore;
39 class HTracks;
40 class HResolution;
41 
42 class MuonServiceProxy;
43 class KFUpdator;
46 
48 
49  public:
51 
52 public:
55 
58 
59  // Operations
60 
61  void analyze(const edm::Event & event, const edm::EventSetup& eventSetup);
62 
63  virtual void beginJob() ;
64  void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
65  virtual void endRun() ;
66 
67 protected:
68 
69 private:
70  bool isInTheAcceptance(double eta);
71 
72  std::map<DetId, const PSimHit*> mapMuSimHitsPerId(edm::Handle<edm::PSimHitContainer> dtSimhits,
75 
77  std::map<DetId,const PSimHit*> &hitIdMap);
78 
79  void computeResolution(Trajectory &trajectory,
80  std::map<DetId,const PSimHit*> &hitIdMap,
82 
83  private:
84 
90 
94 
99 
104 
108 
109  private:
111 
112  // Resolution wrt the 1D Rec Hits
114 
115  // Resolution wrt the 1d Sim Hits
117 
122 
124 
125  unsigned int theSimTkId;
126 
127 
128  std::vector<const PSimHit*> theSimHitContainer;
129 
130 
132 
134 
135  bool operator()(const PSimHit *a,
136  const PSimHit *b) const{
137 
138  const GeomDet *geomDetA = theTG->idToDet(DetId(a->detUnitId()));
139  const GeomDet *geomDetB = theTG->idToDet(DetId(b->detUnitId()));
140 
141  double distA = geomDetA->toGlobal(a->localPosition()).mag();
142  double distB = geomDetB->toGlobal(b->localPosition()).mag();
143 
144  return distA < distB;
145  }
146 
148  };
149 
150 
151 };
152 #endif
153 
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:52
Definition: Event.h:16
bool operator()(const PSimHit *a, const PSimHit *b) const
Local3DPoint localPosition() const
Definition: PSimHit.h:44
MuonTrackResidualAnalyzer(const edm::ParameterSet &ps)
Constructor.
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
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
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
Definition: Run.h:43
edm::EDGetTokenT< std::vector< PSimHit > > theDTSimHitToken