CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MuonShowerInformationFiller.h
Go to the documentation of this file.
1 
14 #ifndef MuonIdentification_MuonShowerInformationFiller_h
15 #define MuonIdentification_MuonShowerInformationFiller_h
16 
17 #include <vector>
18 
21 
36 
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 BoundDisk;
49 class BarrelDetLayer;
50 class ForwardDetLayer;
55 
56 
58 
59  public:
60 
64 
65  public:
66 
70 
73 
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 BoundDisk& ) const;
103  std::vector<const GeomDet*> dtPositionToDets(const GlobalPoint&) const;
104  std::vector<const GeomDet*> cscPositionToDets(const GlobalPoint&) const;
109  std::vector<const GeomDet*> getCompatibleDets(const reco::Track&) const;
110 
111  struct LessMag {
112  LessMag(const GlobalPoint& point) : thePoint(point) {}
113  bool operator()(const GlobalPoint& lhs,
114  const GlobalPoint& rhs) const{
115  return (lhs - thePoint).mag() < (rhs -thePoint).mag();
116  }
119  return (lhs->globalPosition() - thePoint).mag() < (rhs->globalPosition() -thePoint).mag();
120  }
122  };
123 
124  struct LessDPhi {
125  LessDPhi(const GlobalPoint& point) : thePoint(point) {}
128  return deltaPhi(lhs->globalPosition().phi(), thePoint.phi()) < deltaPhi(rhs->globalPosition().phi(), thePoint.phi());
129  }
131  };
132 
133  struct AbsLessDPhi {
134  AbsLessDPhi(const GlobalPoint& point) : thePoint(point) {}
137  return ( fabs(deltaPhi(lhs->globalPosition().phi(), thePoint.phi())) < fabs(deltaPhi(rhs->globalPosition().phi(), thePoint.phi())) );
138  }
140  };
141 
142  struct AbsLessDTheta {
146  return ( fabs(lhs->globalPosition().phi() - thePoint.phi()) < fabs(rhs->globalPosition().phi() - thePoint.phi()) );
147  }
149  };
150 
151  struct LessPhi {
152  LessPhi() : thePoint(0,0,0) {}
155  return (lhs->globalPosition().phi() < rhs->globalPosition().phi());
156  }
158  };
159 
160  struct LessPerp {
161  LessPerp() : thePoint(0,0,0) {}
164  return (lhs->globalPosition().perp() < rhs->globalPosition().perp());
165  }
167  };
168 
169  struct LessAbsMag {
170  LessAbsMag() : thePoint(0,0,0) {}
173  return (lhs->globalPosition().mag() < rhs->globalPosition().mag());
174  }
176  };
177 
178  std::string category_;
179 
180  unsigned long long theCacheId_TRH;
181  unsigned long long theCacheId_MT;
182 
185 
188 
197 
198  // geometry
204 
205 };
206 #endif
MuonTransientTrackingRecHit::MuonRecHitContainer MuonRecHitContainer
virtual void setEvent(const edm::Event &)
pass the Event to the algorithm at each event
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())
Geom::Phi< T > phi() const
Definition: PV3DBase.h:68
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
std::vector< const GeomDet * > dtPositionToDets(const GlobalPoint &) const
void fillHitsByStation(const reco::Muon &)
bool operator()(const MuonTransientTrackingRecHit::MuonRecHitPointer &lhs, const MuonTransientTrackingRecHit::MuonRecHitPointer &rhs) const
const MuonServiceProxy * getService() const
edm::Handle< DTRecHitCollection > theDTRecHits
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
TransientTrackingRecHit::ConstRecHitContainer hitsFromSegments(const GeomDet *, edm::Handle< DTRecSegment4DCollection >, edm::Handle< CSCSegmentCollection >) const
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::ESHandle< TransientTrackingRecHitBuilder > theMuonRecHitBuilder
std::vector< const GeomDet * > cscPositionToDets(const GlobalPoint &) const
bool operator()(const MuonTransientTrackingRecHit::MuonRecHitPointer &lhs, const MuonTransientTrackingRecHit::MuonRecHitPointer &rhs) const
edm::ESHandle< GlobalTrackingGeometry > theTrackingGeometry
MuonRecHitContainer findPerpCluster(MuonRecHitContainer &muonRecHits) const
std::vector< MuonRecHitPointer > MuonRecHitContainer
MuonRecHitContainer findPhiCluster(MuonRecHitContainer &, const GlobalPoint &) const
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