CMS 3D CMS Logo

MuonShowerInformationFiller.h
Go to the documentation of this file.
1 
12 #ifndef MuonIdentification_MuonShowerInformationFiller_h
13 #define MuonIdentification_MuonShowerInformationFiller_h
14 
15 #include <vector>
16 
19 
34 
37 
39 
41 
42 namespace edm {class ParameterSet; class Event; class EventSetup;}
43 namespace reco {class TransientTrack; class MuonShower;}
44 
45 class MuonServiceProxy;
46 class Trajectory;
47 class Cylinder;
48 class Disk;
49 class BarrelDetLayer;
50 class ForwardDetLayer;
55 
56 
58 
59  public:
60 
64 
65  public:
66 
70 
72  virtual ~MuonShowerInformationFiller();
73 
75  reco::MuonShower fillShowerInformation( const reco::Muon& muon, const edm::Event&, const edm::EventSetup&);
76 
78  virtual void setEvent(const edm::Event&);
79 
81  void setServices(const edm::EventSetup&);
82 
83  //set the data members
84  void fillHitsByStation(const reco::Muon&);
85 
86  protected:
87 
88  const MuonServiceProxy* getService() const { return theService; }
89 
90  private:
91 
92  std::vector<float> theStationShowerDeltaR;
93  std::vector<float> theStationShowerTSize;
94  std::vector<int> theAllStationHits;
95  std::vector<int> theCorrelatedStationHits;
96 
98 
99  GlobalPoint crossingPoint(const GlobalPoint&, const GlobalPoint&, const BarrelDetLayer* ) const;
100  GlobalPoint crossingPoint(const GlobalPoint&, const GlobalPoint&, const Cylinder& ) const;
101  GlobalPoint crossingPoint(const GlobalPoint&, const GlobalPoint&, const ForwardDetLayer* ) const;
102  GlobalPoint crossingPoint(const GlobalPoint&, const GlobalPoint&, const Disk& ) const;
103  std::vector<const GeomDet*> dtPositionToDets(const GlobalPoint&) const;
104  std::vector<const GeomDet*> cscPositionToDets(const GlobalPoint&) const;
105  MuonRecHitContainer findPerpCluster(MuonRecHitContainer& muonRecHits) const;
108  std::vector<const GeomDet*> getCompatibleDets(const reco::Track&) const;
109 
110  struct LessMag {
111  LessMag(const GlobalPoint& point) : thePoint(point) {}
112  bool operator()(const GlobalPoint& lhs,
113  const GlobalPoint& rhs) const{
114  return (lhs - thePoint).mag() < (rhs -thePoint).mag();
115  }
118  return (lhs->globalPosition() - thePoint).mag() < (rhs->globalPosition() -thePoint).mag();
119  }
121  };
122 
123  struct LessDPhi {
124  LessDPhi(const GlobalPoint& point) : thePoint(point) {}
127  return deltaPhi(lhs->globalPosition().barePhi(), thePoint.barePhi()) < deltaPhi(rhs->globalPosition().barePhi(), thePoint.barePhi());
128  }
130  };
131 
132  struct AbsLessDPhi {
133  AbsLessDPhi(const GlobalPoint& point) : thePoint(point) {}
136  return ( fabs(deltaPhi(lhs->globalPosition().barePhi(), thePoint.barePhi())) < fabs(deltaPhi(rhs->globalPosition().barePhi(), thePoint.barePhi())) );
137  }
139  };
140 
141  struct AbsLessDTheta {
142  AbsLessDTheta(const GlobalPoint& point) : thePoint(point) {}
145  return ( fabs(lhs->globalPosition().bareTheta() - thePoint.bareTheta()) < fabs(rhs->globalPosition().bareTheta() - thePoint.bareTheta()) );
146  }
148  };
149 
150  struct LessPhi {
151  LessPhi() : thePoint(0,0,0) {}
154  return (lhs->globalPosition().barePhi() < rhs->globalPosition().barePhi());
155  }
157  };
158 
159  struct LessPerp {
160  LessPerp() : thePoint(0,0,0) {}
163  return (lhs->globalPosition().perp() < rhs->globalPosition().perp());
164  }
166  };
167 
168  struct LessAbsMag {
169  LessAbsMag() : thePoint(0,0,0) {}
172  return (lhs->globalPosition().mag() < rhs->globalPosition().mag());
173  }
175  };
176 
178 
179  unsigned long long theCacheId_TRH;
180  unsigned long long theCacheId_MT;
181 
184 
187 
192 
197 
202 
203 
204 
205 
206  // geometry
212 
213 };
214 #endif
MuonTransientTrackingRecHit::MuonRecHitContainer MuonRecHitContainer
edm::ESHandle< MagneticField > theField
bool operator()(const MuonTransientTrackingRecHit::MuonRecHitPointer &lhs, const MuonTransientTrackingRecHit::MuonRecHitPointer &rhs) const
bool operator()(const TransientTrackingRecHit::ConstRecHitPointer &lhs, const TransientTrackingRecHit::ConstRecHitPointer &rhs) const
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
edm::EDGetTokenT< CSCSegmentCollection > theCSCSegmentsToken
edm::ESHandle< GeometricSearchTracker > theTracker
bool operator()(const GlobalPoint &lhs, const GlobalPoint &rhs) const
edm::ESHandle< CSCGeometry > theCSCGeometry
edm::ESHandle< DTGeometry > theDTGeometry
bool operator()(const MuonTransientTrackingRecHit::MuonRecHitPointer &lhs, const MuonTransientTrackingRecHit::MuonRecHitPointer &rhs) const
edm::EDGetTokenT< CSCRecHit2DCollection > theCSCRecHitToken
Definition: BoundDisk.h:19
std::shared_ptr< MuonTransientTrackingRecHit > MuonRecHitPointer
std::shared_ptr< TrackingRecHit const > ConstRecHitPointer
bool operator()(const MuonTransientTrackingRecHit::MuonRecHitPointer &lhs, const MuonTransientTrackingRecHit::MuonRecHitPointer &rhs) const
const MuonServiceProxy * getService() const
edm::Handle< DTRecHitCollection > theDTRecHits
edm::Handle< CSCSegmentCollection > theCSCSegments
bool operator()(const MuonTransientTrackingRecHit::MuonRecHitPointer &lhs, const MuonTransientTrackingRecHit::MuonRecHitPointer &rhs) const
edm::ESHandle< TransientTrackingRecHitBuilder > theTrackerRecHitBuilder
std::vector< ConstRecHitPointer > ConstRecHitContainer
edm::EDGetTokenT< DTRecSegment4DCollection > theDT4DRecSegmentToken
bool operator()(const MuonTransientTrackingRecHit::MuonRecHitPointer &lhs, const MuonTransientTrackingRecHit::MuonRecHitPointer &rhs) const
TransientTrackingRecHit::ConstRecHitContainer ConstRecHitContainer
edm::Handle< CSCRecHit2DCollection > theCSCRecHits
edm::ESHandle< TransientTrackingRecHitBuilder > theMuonRecHitBuilder
fixed size matrix
HLT enums.
bool operator()(const MuonTransientTrackingRecHit::MuonRecHitPointer &lhs, const MuonTransientTrackingRecHit::MuonRecHitPointer &rhs) const
std::shared_ptr< MuonTransientTrackingRecHit const > ConstMuonRecHitPointer
edm::EDGetTokenT< DTRecHitCollection > theDTRecHitToken
edm::ESHandle< GlobalTrackingGeometry > theTrackingGeometry
std::vector< MuonRecHitPointer > MuonRecHitContainer
MuonTransientTrackingRecHit::ConstMuonRecHitPointer ConstMuonRecHitPointer
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5
edm::Handle< DTRecSegment4DCollection > theDT4DRecSegments