Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2025-01-08 03:36:28

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 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0020 #include "FWCore/ParameterSet/interface/ParameterSetDescription.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   static void fillPSetDescription(edm::ParameterSetDescription& desc);
0036 
0037   /** Find rechits in each CSCChamber, build CSCSegment's in each chamber,
0038      *  and fill into output collection.
0039      */
0040   void build(const CSCRecHit2DCollection* rechits, CSCSegmentCollection& oc);
0041 
0042   /** Cache pointer to geometry _for current event_
0043      */
0044   void setGeometry(const CSCGeometry* geom);
0045 
0046 private:
0047   const CSCGeometry* geom_;
0048   std::map<std::string, std::unique_ptr<CSCSegmentAlgorithm>> algoMap;
0049 };
0050 
0051 #endif