Back to home page

Project CMSSW displayed by LXR

 
 

    


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

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 #include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
0021 
0022 class GEMSegmentAlgorithmBase;
0023 
0024 class GEMSegmentBuilder {
0025 public:
0026   /** Configure the algorithm via ctor.
0027      * Receives ParameterSet percolated down from EDProducer
0028      * which owns this Builder.
0029      */
0030   explicit GEMSegmentBuilder(const edm::ParameterSet&);
0031   /// Destructor
0032   ~GEMSegmentBuilder();
0033 
0034   /** Find rechits in each ensemble of 6 GEM layers, build GEMSegment's ,
0035      *  and fill into output collection.
0036      */
0037   void build(const GEMRecHitCollection* rechits, GEMSegmentCollection& oc);
0038 
0039   /** Cache pointer to geometry _for current event_
0040      */
0041   void setGeometry(const GEMGeometry* g);
0042 
0043   static void fillDescription(edm::ParameterSetDescription& descriptions);
0044 
0045 private:
0046   bool enableGE0;
0047   bool enableGE12;
0048   std::string segAlgoName;
0049   std::string ge0AlgoName;
0050   edm::ParameterSet segAlgoPSet;
0051   edm::ParameterSet ge0AlgoPSet;
0052   std::unique_ptr<GEMSegmentAlgorithmBase> segAlgo;
0053   std::unique_ptr<GEMSegmentAlgorithmBase> ge0Algo;
0054   const GEMGeometry* geom_;
0055 };
0056 
0057 #endif