CMS 3D CMS Logo

ME0SegmentAlgorithm.h
Go to the documentation of this file.
1 #ifndef GEMRecHit_ME0SegmentAlgorithm_h
2 #define GEMRecHit_ME0SegmentAlgorithm_h
3 
18 
19 #include <deque>
20 #include <vector>
21 
22 class MuonSegFit;
23 
25 
26 
27 public:
28 
30  typedef std::vector<HitAndPositionPtrContainer> ProtoSegments;
31 
33  explicit ME0SegmentAlgorithm(const edm::ParameterSet& ps);
35  virtual ~ME0SegmentAlgorithm();
36 
40  std::vector<ME0Segment> run(const ME0Chamber * chamber, const HitAndPositionContainer& rechits);
41 
42 private:
44 
45  // Build groups of rechits that are separated in x and y to save time on the segment finding
46  ProtoSegments clusterHits(const HitAndPositionContainer& rechits);
47 
48  // Build groups of rechits that are separated in strip numbers and Z to save time on the segment finding
49  ProtoSegments chainHits(const ME0Chamber * chamber, const HitAndPositionContainer& rechits);
50 
51  bool isGoodToMerge(const ME0Chamber * chamber, const HitAndPositionPtrContainer& newChain, const HitAndPositionPtrContainer& oldChain);
52 
53  // Build track segments in this chamber (this is where the actual segment-building algorithm hides.)
54  void buildSegments(const ME0Chamber * chamber, const HitAndPositionPtrContainer& rechits, std::vector<ME0Segment>& me0segs);
55 
56  // Member variables
58 
59  // input from .cfi file
60  bool debug;
61  unsigned int minHitsPerSegment;
63  double dXclusBoxMax;
64  double dYclusBoxMax;
70 
72  std::unique_ptr<MuonSegFit> sfit_;
73 
74 };
75 
76 #endif
std::vector< ME0Segment > run(const ME0Chamber *chamber, const HitAndPositionContainer &rechits)
bool isGoodToMerge(const ME0Chamber *chamber, const HitAndPositionPtrContainer &newChain, const HitAndPositionPtrContainer &oldChain)
void buildSegments(const ME0Chamber *chamber, const HitAndPositionPtrContainer &rechits, std::vector< ME0Segment > &me0segs)
unsigned int minHitsPerSegment
std::vector< HitAndPosition > HitAndPositionContainer
#define constexpr
ProtoSegments chainHits(const ME0Chamber *chamber, const HitAndPositionContainer &rechits)
std::vector< const HitAndPosition * > HitAndPositionPtrContainer
ProtoSegments clusterHits(const HitAndPositionContainer &rechits)
Utility functions.
std::unique_ptr< MuonSegFit > sfit_
std::vector< HitAndPositionPtrContainer > ProtoSegments
Typedefs.
const std::string myName
virtual ~ME0SegmentAlgorithm()
Destructor.
ME0SegmentAlgorithm(const edm::ParameterSet &ps)
Constructor.