Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:26:14

0001 #ifndef GEMRecHit_ME0SegmentAlgorithmBase_h
0002 #define GEMRecHit_ME0SegmentAlgorithmBase_h
0003 
0004 /** \class ME0SegmentAlgo derived from CSC
0005  * An abstract base class for algorithmic classes used to
0006  * build segments in one ensemble of ME0 detector
0007  *
0008  * Implementation notes: <BR>
0009  * For example, ME0SegmAlgoMM inherits from this class,
0010  *
0011  * \author Marcello Maggi
0012  *
0013  */
0014 
0015 #include "DataFormats/GEMRecHit/interface/ME0RecHitCollection.h"
0016 #include "DataFormats/GEMRecHit/interface/ME0Segment.h"
0017 #include "Geometry/GEMGeometry/interface/ME0EtaPartition.h"
0018 #include "Geometry/GEMGeometry/interface/ME0Chamber.h"
0019 #include "FWCore/Framework/interface/Frameworkfwd.h"
0020 #include <map>
0021 #include <vector>
0022 
0023 class ME0SegmentAlgorithmBase {
0024 public:
0025   struct HitAndPosition {
0026     HitAndPosition(const ME0RecHit* rh, const LocalPoint& lp, const GlobalPoint& gp, unsigned int idx)
0027         : rh(rh), lp(lp), gp(gp), layer(rh->me0Id().layer()), idx(idx) {}
0028     const ME0RecHit* rh;
0029     LocalPoint lp;
0030     GlobalPoint gp;
0031     unsigned int layer;
0032     unsigned int idx;
0033   };
0034 
0035   typedef std::vector<HitAndPosition> HitAndPositionContainer;
0036   typedef std::vector<const HitAndPosition*> HitAndPositionPtrContainer;
0037 
0038   /// Constructor
0039   explicit ME0SegmentAlgorithmBase(const edm::ParameterSet&){};
0040   /// Destructor
0041   virtual ~ME0SegmentAlgorithmBase(){};
0042 
0043   /** Run the algorithm = build the segments in this chamber
0044     */
0045   virtual std::vector<ME0Segment> run(const ME0Chamber* chamber, const HitAndPositionContainer& rechits) = 0;
0046 
0047 private:
0048 };
0049 #endif