CMS 3D CMS Logo

GEMSegmentAlgorithm.h
Go to the documentation of this file.
1 #ifndef GEMRecHit_GEMSegmentAlgorithm_h
2 #define GEMRecHit_GEMSegmentAlgorithm_h
3 
20 #include <deque>
21 #include <vector>
22 
23 class MuonSegFit;
24 
26 
27 public:
28 
30  typedef std::vector<const GEMRecHit*> EnsembleHitContainer;
31  typedef std::vector<EnsembleHitContainer> ProtoSegments;
32 
34  explicit GEMSegmentAlgorithm(const edm::ParameterSet& ps);
36  ~GEMSegmentAlgorithm() override;
37 
41  std::vector<GEMSegment> run(const GEMEnsemble& ensemble, const EnsembleHitContainer& rechits) override;
42 
43 private:
45 
46  // Build groups of rechits that are separated in x and y to save time on the segment finding
47  ProtoSegments clusterHits(const GEMEnsemble& ensemble, const EnsembleHitContainer& rechits);
48 
49  // Build groups of rechits that are separated in strip numbers and Z to save time on the segment finding
50  ProtoSegments chainHits(const GEMEnsemble& ensemble, const EnsembleHitContainer& rechits);
51 
52  bool isGoodToMerge(const GEMEnsemble& ensemble, const EnsembleHitContainer& newChain, const EnsembleHitContainer& oldChain);
53 
54  // Build track segments in this chamber (this is where the actual segment-building algorithm hides.)
55  void buildSegments(const GEMEnsemble& ensemble, const EnsembleHitContainer& rechits, std::vector<GEMSegment>& gemsegs);
56 
57  // Member variables
59 
60  // input from .cfi file
61  bool debug;
62  unsigned int minHitsPerSegment;
64  double dXclusBoxMax;
65  double dYclusBoxMax;
71 
72  EnsembleHitContainer proto_segment;
74 
76  std::unique_ptr<MuonSegFit> sfit_;
77 
78 };
79 
80 #endif
~GEMSegmentAlgorithm() override
Destructor.
ProtoSegments chainHits(const GEMEnsemble &ensemble, const EnsembleHitContainer &rechits)
std::vector< const GEMRecHit * > EnsembleHitContainer
Typedefs.
std::pair< const GEMSuperChamber *, std::map< uint32_t, const GEMEtaPartition * > > GEMEnsemble
const std::string myName
bool isGoodToMerge(const GEMEnsemble &ensemble, const EnsembleHitContainer &newChain, const EnsembleHitContainer &oldChain)
unsigned int minHitsPerSegment
ProtoSegments clusterHits(const GEMEnsemble &ensemble, const EnsembleHitContainer &rechits)
Utility functions.
std::vector< EnsembleHitContainer > ProtoSegments
std::unique_ptr< MuonSegFit > sfit_
GEMSegmentAlgorithm(const edm::ParameterSet &ps)
Constructor.
EnsembleHitContainer proto_segment
std::vector< GEMSegment > run(const GEMEnsemble &ensemble, const EnsembleHitContainer &rechits) override
#define constexpr
void buildSegments(const GEMEnsemble &ensemble, const EnsembleHitContainer &rechits, std::vector< GEMSegment > &gemsegs)