CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 {
43  class ParameterSet;
44  class Event;
45  class EventSetup;
46 } // namespace edm
47 namespace reco {
48  class TransientTrack;
49  struct MuonShower;
50 } // namespace reco
51 
52 class MuonServiceProxy;
53 class Trajectory;
54 class Cylinder;
55 class Disk;
56 class BarrelDetLayer;
57 class ForwardDetLayer;
65 class MuonGeometryRecord;
67 
69 public:
73 
74 public:
78 
81 
84 
86  virtual void setEvent(const edm::Event&);
87 
89  void setServices(const edm::EventSetup&);
90 
91  //set the data members
92  void fillHitsByStation(const reco::Muon&);
93 
94 protected:
95  const MuonServiceProxy* getService() const { return theService; }
96 
97 private:
98  std::vector<float> theStationShowerDeltaR;
99  std::vector<float> theStationShowerTSize;
100  std::vector<int> theAllStationHits;
101  std::vector<int> theCorrelatedStationHits;
102 
104 
105  GlobalPoint crossingPoint(const GlobalPoint&, const GlobalPoint&, const BarrelDetLayer*) const;
106  GlobalPoint crossingPoint(const GlobalPoint&, const GlobalPoint&, const Cylinder&) const;
107  GlobalPoint crossingPoint(const GlobalPoint&, const GlobalPoint&, const ForwardDetLayer*) const;
108  GlobalPoint crossingPoint(const GlobalPoint&, const GlobalPoint&, const Disk&) const;
109  std::vector<const GeomDet*> dtPositionToDets(const GlobalPoint&) const;
110  std::vector<const GeomDet*> cscPositionToDets(const GlobalPoint&) const;
113  const GlobalPoint&) const;
117  std::vector<const GeomDet*> getCompatibleDets(const reco::Track&) const;
118 
119  struct LessMag {
120  LessMag(const GlobalPoint& point) : thePoint(point) {}
121  bool operator()(const GlobalPoint& lhs, const GlobalPoint& rhs) const {
122  return (lhs - thePoint).mag() < (rhs - thePoint).mag();
123  }
126  return (lhs->globalPosition() - thePoint).mag() < (rhs->globalPosition() - thePoint).mag();
127  }
129  };
130 
131  struct LessDPhi {
132  LessDPhi(const GlobalPoint& point) : thePoint(point) {}
135  return deltaPhi(lhs->globalPosition().barePhi(), thePoint.barePhi()) <
136  deltaPhi(rhs->globalPosition().barePhi(), thePoint.barePhi());
137  }
139  };
140 
141  struct AbsLessDPhi {
142  AbsLessDPhi(const GlobalPoint& point) : thePoint(point) {}
145  return (fabs(deltaPhi(lhs->globalPosition().barePhi(), thePoint.barePhi())) <
146  fabs(deltaPhi(rhs->globalPosition().barePhi(), thePoint.barePhi())));
147  }
149  };
150 
151  struct AbsLessDTheta {
155  return (fabs(lhs->globalPosition().bareTheta() - thePoint.bareTheta()) <
156  fabs(rhs->globalPosition().bareTheta() - thePoint.bareTheta()));
157  }
159  };
160 
161  struct LessPhi {
162  LessPhi() : thePoint(0, 0, 0) {}
165  return (lhs->globalPosition().barePhi() < rhs->globalPosition().barePhi());
166  }
168  };
169 
170  struct LessPerp {
171  LessPerp() : thePoint(0, 0, 0) {}
174  return (lhs->globalPosition().perp() < rhs->globalPosition().perp());
175  }
177  };
178 
179  struct LessAbsMag {
180  LessAbsMag() : thePoint(0, 0, 0) {}
183  return (lhs->globalPosition().mag() < rhs->globalPosition().mag());
184  }
186  };
187 
189 
190  unsigned long long theCacheId_TRH;
191  unsigned long long theCacheId_MT;
192 
195 
198 
203 
208 
213 
214  // geometry
220 
226 };
227 #endif
MuonTransientTrackingRecHit::MuonRecHitContainer MuonRecHitContainer
virtual void setEvent(const edm::Event &)
pass the Event to the algorithm at each event
edm::ESGetToken< CSCGeometry, MuonGeometryRecord > theCSCGeometryToken
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
reco::MuonShower fillShowerInformation(const reco::Muon &muon, const edm::Event &, const edm::EventSetup &)
fill muon shower variables
void setServices(const edm::EventSetup &)
set the services needed
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
T bareTheta() const
Definition: PV3DBase.h:71
edm::ESGetToken< TransientTrackingRecHitBuilder, TransientRecHitRecord > theMuonRecHitBuilderToken
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
virtual ~MuonShowerInformationFiller()
destructor
Definition: BoundDisk.h:19
T barePhi() const
Definition: PV3DBase.h:65
std::vector< const GeomDet * > dtPositionToDets(const GlobalPoint &) const
edm::ESGetToken< GeometricSearchTracker, TrackerRecoGeometryRecord > theTrackerToken
void fillHitsByStation(const reco::Muon &)
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::ESGetToken< DTGeometry, MuonGeometryRecord > theDTGeometryToken
GlobalPoint crossingPoint(const GlobalPoint &, const GlobalPoint &, const BarrelDetLayer *) const
edm::Handle< CSCSegmentCollection > theCSCSegments
TransientTrackingRecHit::ConstRecHitContainer findThetaCluster(TransientTrackingRecHit::ConstRecHitContainer &, const GlobalPoint &) const
bool operator()(const MuonTransientTrackingRecHit::MuonRecHitPointer &lhs, const MuonTransientTrackingRecHit::MuonRecHitPointer &rhs) const
edm::ESHandle< TransientTrackingRecHitBuilder > theTrackerRecHitBuilder
std::vector< ConstRecHitPointer > ConstRecHitContainer
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > theFieldToken
TransientTrackingRecHit::ConstRecHitContainer hitsFromSegments(const GeomDet *, edm::Handle< DTRecSegment4DCollection >, edm::Handle< CSCSegmentCollection >) const
edm::EDGetTokenT< DTRecSegment4DCollection > theDT4DRecSegmentToken
bool operator()(const MuonTransientTrackingRecHit::MuonRecHitPointer &lhs, const MuonTransientTrackingRecHit::MuonRecHitPointer &rhs) const
std::vector< const GeomDet * > getCompatibleDets(const reco::Track &) const
TransientTrackingRecHit::ConstRecHitContainer ConstRecHitContainer
edm::Handle< CSCRecHit2DCollection > theCSCRecHits
edm::ESGetToken< GlobalTrackingGeometry, GlobalTrackingGeometryRecord > theTrackingGeometryToken
edm::ESHandle< TransientTrackingRecHitBuilder > theMuonRecHitBuilder
std::vector< const GeomDet * > cscPositionToDets(const GlobalPoint &) const
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
edm::ESGetToken< TransientTrackingRecHitBuilder, TransientRecHitRecord > theTrackerRecHitBuilderToken
MuonRecHitContainer findPerpCluster(MuonRecHitContainer &muonRecHits) const
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