Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:22:10

0001 /*! \class   TTStubAlgorithm
0002  *  \brief   Base class for any algorithm to be used
0003  *           in TTStubBuilder
0004  *  \details After moving from SimDataFormats to DataFormats,
0005  *           the template structure of the class was maintained
0006  *           in order to accomodate any types other than PixelDigis
0007  *           in case there is such a need in the future.
0008  *
0009  *  \author Andrew W. Rose
0010  *  \author Nicola Pozzobon
0011  *  \date   2013, Jul 18
0012  *
0013  */
0014 
0015 #ifndef L1_TRACK_TRIGGER_STUB_ALGO_BASE_H
0016 #define L1_TRACK_TRIGGER_STUB_ALGO_BASE_H
0017 
0018 #include "MagneticField/Engine/interface/MagneticField.h"
0019 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
0020 #include "DataFormats/TrackerCommon/interface/TrackerTopology.h"
0021 #include "DataFormats/L1TrackTrigger/interface/TTTypes.h"
0022 
0023 #include <sstream>
0024 #include <string>
0025 #include <map>
0026 #include "classNameFinder.h"
0027 
0028 template <typename T>
0029 class TTStubAlgorithm {
0030 protected:
0031   /// Data members
0032   const TrackerGeometry *const theTrackerGeom_;
0033   const TrackerTopology *const theTrackerTopo_;
0034   std::string className_;
0035 
0036 public:
0037   /// Constructors
0038   TTStubAlgorithm(const TrackerGeometry *const theTrackerGeom,
0039                   const TrackerTopology *const theTrackerTopo,
0040                   std::string fName)
0041       : theTrackerGeom_(theTrackerGeom), theTrackerTopo_(theTrackerTopo) {
0042     className_ = classNameFinder<T>(fName);
0043   }
0044 
0045   /// Destructor
0046   virtual ~TTStubAlgorithm() {}
0047 
0048   /// Matching operations
0049   virtual void PatternHitCorrelation(
0050       bool &aConfirmation, int &aDisplacement, int &anOffset, float &anHardBend, const TTStub<T> &aTTStub) const {}
0051   // Removed real offset.  Ivan Reid 10/2019
0052 
0053   /// Algorithm name
0054   virtual std::string AlgorithmName() const { return className_; }
0055 
0056 };  /// Close class
0057 
0058 #endif