Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 11:19:26

0001 #ifndef GEMRecHit_GEMSegmentBuilder_h
0002 #define GEMRecHit_GEMSegmentBuilder_h
0003 
0004 /** \class GEMSegmentBuilder derived by CSCSegmentBuilder
0005  * Algorithm to build GEMSegment's from GEMRecHit collection
0006  * by implementing a 'build' function required by GEMSegmentProducer.
0007  *
0008  * Implementation notes: <BR>
0009  * Configured via the Producer's ParameterSet. <BR>
0010  * Presume this might become an abstract base class one day. <BR>
0011  *
0012  * \author Piet Verwilligen
0013  *
0014  */
0015 
0016 #include "DataFormats/GEMRecHit/interface/GEMRecHitCollection.h"
0017 #include "DataFormats/GEMRecHit/interface/GEMSegmentCollection.h"
0018 #include "Geometry/GEMGeometry/interface/GEMGeometry.h"
0019 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0020 
0021 class GEMSegmentAlgorithmBase;
0022 
0023 class GEMSegmentBuilder {
0024 public:
0025   /** Configure the algorithm via ctor.
0026      * Receives ParameterSet percolated down from EDProducer
0027      * which owns this Builder.
0028      */
0029   explicit GEMSegmentBuilder(const edm::ParameterSet&);
0030   /// Destructor
0031   ~GEMSegmentBuilder();
0032 
0033   /** Find rechits in each ensemble of 6 GEM layers, build GEMSegment's ,
0034      *  and fill into output collection.
0035      */
0036   void build(const GEMRecHitCollection* rechits, GEMSegmentCollection& oc);
0037 
0038   /** Cache pointer to geometry _for current event_
0039      */
0040   void setGeometry(const GEMGeometry* g);
0041 
0042 private:
0043   std::string segAlgoName;
0044   std::string ge0AlgoName;
0045   edm::ParameterSet segAlgoPSet;
0046   edm::ParameterSet ge0AlgoPSet;
0047   std::unique_ptr<GEMSegmentAlgorithmBase> segAlgo;
0048   std::unique_ptr<GEMSegmentAlgorithmBase> ge0Algo;
0049   const GEMGeometry* geom_;
0050 };
0051 
0052 #endif