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 {
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;
111  MuonRecHitContainer findPerpCluster(const MuonRecHitContainer& muonRecHits) const;
113  const GlobalPoint&) const;
117  std::vector<const GeomDet*> getCompatibleDets(const reco::Track&) const;
118 
119  struct MagTransform {
121  double operator()(const GlobalPoint& p) const { return (p - thePoint).mag(); }
123  return (hit->globalPosition() - thePoint).mag();
124  }
126  };
127 
128  struct LessMag {
130  bool operator()(const GlobalPoint& lhs, const GlobalPoint& rhs) const {
131  return (lhs - thePoint).mag() < (rhs - thePoint).mag();
132  }
135  return (lhs->globalPosition() - thePoint).mag() < (rhs->globalPosition() - thePoint).mag();
136  }
138  };
139 
143  return std::fabs(hit->globalPosition().bareTheta() - thePoint.bareTheta());
144  }
146  };
147 
148  struct AbsLessDTheta {
152  return (fabs(lhs->globalPosition().bareTheta() - thePoint.bareTheta()) <
153  fabs(rhs->globalPosition().bareTheta() - thePoint.bareTheta()));
154  }
156  };
157 
158  struct PhiTransform {
160  return hit->globalPosition().barePhi();
161  }
162  };
163 
164  struct LessPhi {
165  LessPhi() : thePoint(0, 0, 0) {}
168  return (lhs->globalPosition().barePhi() < rhs->globalPosition().barePhi());
169  }
171  };
172 
173  struct PerpTransform {
175  return hit->globalPosition().perp();
176  }
177  };
178 
179  struct LessPerp {
182  return (lhs->globalPosition().perp() < rhs->globalPosition().perp());
183  }
184  };
185 
188  return hit->globalPosition().mag();
189  }
190  };
191 
192  struct LessAbsMag {
195  return (lhs->globalPosition().mag() < rhs->globalPosition().mag());
196  }
197  };
198 
200 
201  unsigned long long theCacheId_TRH;
202  unsigned long long theCacheId_MT;
203 
206 
209 
214 
219 
224 
225  // geometry
231 
237 };
238 #endif
MuonTransientTrackingRecHit::MuonRecHitContainer MuonRecHitContainer
std::vector< const GeomDet * > cscPositionToDets(const GlobalPoint &) const
virtual void setEvent(const edm::Event &)
pass the Event to the algorithm at each event
edm::ESGetToken< CSCGeometry, MuonGeometryRecord > theCSCGeometryToken
bool operator()(const MuonTransientTrackingRecHit::MuonRecHitPointer &lhs, const MuonTransientTrackingRecHit::MuonRecHitPointer &rhs) const
edm::ESHandle< MagneticField > theField
bool operator()(const GlobalPoint &lhs, const GlobalPoint &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
bool operator()(const MuonTransientTrackingRecHit::MuonRecHitPointer &lhs, const MuonTransientTrackingRecHit::MuonRecHitPointer &rhs) const
TransientTrackingRecHit::ConstRecHitContainer hitsFromSegments(const GeomDet *, edm::Handle< DTRecSegment4DCollection >, edm::Handle< CSCSegmentCollection >) const
edm::ESGetToken< TransientTrackingRecHitBuilder, TransientRecHitRecord > theMuonRecHitBuilderToken
edm::EDGetTokenT< CSCSegmentCollection > theCSCSegmentsToken
double operator()(const MuonTransientTrackingRecHit::MuonRecHitPointer &hit) const
edm::ESHandle< GeometricSearchTracker > theTracker
edm::ESHandle< CSCGeometry > theCSCGeometry
edm::ESHandle< DTGeometry > theDTGeometry
const MuonServiceProxy * getService() const
T bareTheta() const
Definition: PV3DBase.h:71
double operator()(const TransientTrackingRecHit::ConstRecHitPointer &hit) const
std::vector< const GeomDet * > getCompatibleDets(const reco::Track &) const
edm::EDGetTokenT< CSCRecHit2DCollection > theCSCRecHitToken
virtual ~MuonShowerInformationFiller()
destructor
Definition: BoundDisk.h:19
edm::ESGetToken< GeometricSearchTracker, TrackerRecoGeometryRecord > theTrackerToken
bool operator()(const TransientTrackingRecHit::ConstRecHitPointer &lhs, const TransientTrackingRecHit::ConstRecHitPointer &rhs) const
void fillHitsByStation(const reco::Muon &)
std::shared_ptr< MuonTransientTrackingRecHit > MuonRecHitPointer
std::shared_ptr< TrackingRecHit const > ConstRecHitPointer
GlobalPoint crossingPoint(const GlobalPoint &, const GlobalPoint &, const BarrelDetLayer *) const
TransientTrackingRecHit::ConstRecHitContainer findThetaCluster(const TransientTrackingRecHit::ConstRecHitContainer &, const GlobalPoint &) const
edm::Handle< DTRecHitCollection > theDTRecHits
edm::ESGetToken< DTGeometry, MuonGeometryRecord > theDTGeometryToken
edm::Handle< CSCSegmentCollection > theCSCSegments
edm::ESHandle< TransientTrackingRecHitBuilder > theTrackerRecHitBuilder
std::vector< ConstRecHitPointer > ConstRecHitContainer
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > theFieldToken
double operator()(const MuonTransientTrackingRecHit::MuonRecHitPointer &hit) const
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
edm::EDGetTokenT< DTRecSegment4DCollection > theDT4DRecSegmentToken
TransientTrackingRecHit::ConstRecHitContainer ConstRecHitContainer
double operator()(const MuonTransientTrackingRecHit::MuonRecHitPointer &hit) const
edm::Handle< CSCRecHit2DCollection > theCSCRecHits
bool operator()(const MuonTransientTrackingRecHit::MuonRecHitPointer &lhs, const MuonTransientTrackingRecHit::MuonRecHitPointer &rhs) const
edm::ESGetToken< GlobalTrackingGeometry, GlobalTrackingGeometryRecord > theTrackingGeometryToken
edm::ESHandle< TransientTrackingRecHitBuilder > theMuonRecHitBuilder
fixed size matrix
HLT enums.
double operator()(const MuonTransientTrackingRecHit::MuonRecHitPointer &hit) const
std::shared_ptr< MuonTransientTrackingRecHit const > ConstMuonRecHitPointer
edm::EDGetTokenT< DTRecHitCollection > theDTRecHitToken
edm::ESHandle< GlobalTrackingGeometry > theTrackingGeometry
MuonRecHitContainer findPerpCluster(const MuonRecHitContainer &muonRecHits) const
std::vector< const GeomDet * > dtPositionToDets(const GlobalPoint &) const
edm::ESGetToken< TransientTrackingRecHitBuilder, TransientRecHitRecord > theTrackerRecHitBuilderToken
bool operator()(const MuonTransientTrackingRecHit::MuonRecHitPointer &lhs, const MuonTransientTrackingRecHit::MuonRecHitPointer &rhs) 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