Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef CSCSegment_CSCSegmentBuilder_h
0002 #define CSCSegment_CSCSegmentBuilder_h
0003 
0004 /** \class CSCSegmentBuilder 
0005  * Algorithm to build CSCSegment's from CSCRecHit2D collection
0006  * by implementing a 'build' function required by CSCSegmentProducer.
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 M. Sani
0013  *
0014  *
0015  */
0016 
0017 #include <DataFormats/CSCRecHit/interface/CSCRecHit2DCollection.h>
0018 #include <DataFormats/CSCRecHit/interface/CSCSegmentCollection.h>
0019 
0020 #include <FWCore/ParameterSet/interface/ParameterSet.h>
0021 
0022 class CSCGeometry;
0023 class CSCSegmentAlgorithm;
0024 
0025 class CSCSegmentBuilder {
0026 public:
0027   /** Configure the algorithm via ctor.
0028      * Receives ParameterSet percolated down from EDProducer
0029      * which owns this Builder.
0030      */
0031   explicit CSCSegmentBuilder(const edm::ParameterSet&);
0032   /// Destructor
0033   ~CSCSegmentBuilder();
0034 
0035   /** Find rechits in each CSCChamber, build CSCSegment's in each chamber,
0036      *  and fill into output collection.
0037      */
0038   void build(const CSCRecHit2DCollection* rechits, CSCSegmentCollection& oc);
0039 
0040   /** Cache pointer to geometry _for current event_
0041      */
0042   void setGeometry(const CSCGeometry* geom);
0043 
0044 private:
0045   const CSCGeometry* geom_;
0046   std::map<std::string, std::unique_ptr<CSCSegmentAlgorithm>> algoMap;
0047 };
0048 
0049 #endif