Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef RecoLocalMuon_DTNoDriftAlgo_H
0002 #define RecoLocalMuon_DTNoDriftAlgo_H
0003 
0004 /** \class DTNoDriftAlgo
0005  *  Concrete implementation of DTRecHitBaseAlgo.
0006  *  Create pair of RecHits at fixed distance from
0007  *  the wire.
0008  *
0009  *  \author Martijn Mulders - CERN (martijn.mulders@cern.ch)
0010  *  based on DTLinearDriftAlgo
0011  */
0012 
0013 #include "RecoLocalMuon/DTRecHit/interface/DTRecHitBaseAlgo.h"
0014 
0015 class DTNoDriftAlgo : public DTRecHitBaseAlgo {
0016 public:
0017   /// Constructor
0018   DTNoDriftAlgo(const edm::ParameterSet& config, edm::ConsumesCollector);
0019 
0020   /// Destructor
0021   ~DTNoDriftAlgo() override;
0022 
0023   // Operations
0024 
0025   /// Pass the Event Setup to the algo at each event
0026   void setES(const edm::EventSetup& setup) override;
0027 
0028   /// MM: Override virtual function from DTRecHitBaseAlgo--> for the NoDrift
0029   /// algorithm only a maximum of one hit per wire is allowed!
0030   /// Build all hits in the range associated to the layerId, at the 1st step.
0031   edm::OwnVector<DTRecHit1DPair> reconstruct(const DTLayer* layer,
0032                                              const DTLayerId& layerId,
0033                                              const DTDigiCollection::Range& digiRange) override;
0034 
0035   /// First step in computation of Left/Right hits from a Digi.
0036   /// The results are the local position (in DTLayer frame) of the
0037   /// Left and Right hit, and the error (which is common). Returns
0038   /// false on failure. The hit is assumed to be at the wire center.
0039   bool compute(const DTLayer* layer,
0040                const DTDigi& digi,
0041                LocalPoint& leftPoint,
0042                LocalPoint& rightPoint,
0043                LocalError& error) const override;
0044 
0045   /// Second step in hit position computation.
0046   /// It is the same as first step since the angular information is not used
0047   /// NOTE: Only position and error of the new hit are modified
0048   bool compute(const DTLayer* layer,
0049                const DTRecHit1D& recHit1D,
0050                const float& angle,
0051                DTRecHit1D& newHit1D) const override;
0052 
0053   /// Third (and final) step in hits position computation.
0054   /// Also the hit position along the wire is available
0055   /// and can be used to correct the drift time for particle
0056   /// TOF and propagation of signal along the wire.
0057   /// NOTE: Only position and error of the new hit are modified
0058   bool compute(const DTLayer* layer,
0059                const DTRecHit1D& recHit1D,
0060                const float& angle,
0061                const GlobalPoint& globPos,
0062                DTRecHit1D& newHit1D) const override;
0063 
0064 private:
0065   // Do the actual work.
0066   virtual bool compute(const DTLayer* layer,
0067                        const DTWireId& wireId,
0068                        const float digiTime,
0069                        const GlobalPoint& globPos,
0070                        LocalPoint& leftPoint,
0071                        LocalPoint& rightPoint,
0072                        LocalError& error,
0073                        int step) const;
0074 
0075   // Interface to the method which does the actual work suited for 2nd and 3rd steps
0076   virtual bool compute(const DTLayer* layer,
0077                        const DTWireId& wireId,
0078                        const float digiTime,
0079                        const GlobalPoint& globPos,
0080                        DTRecHit1D& newHit1D,
0081                        int step) const;
0082 
0083   // The Drift Velocity (cm/ns)
0084   const float fixedDrift;
0085 
0086   // The resolution on the Hits (cm)
0087   const float hitResolution;
0088 
0089   // Times below MinTime (ns) are considered as coming from previous BXs.
0090   const float minTime;
0091 
0092   // Times above MaxTime (ns) are considered as coming from following BXs
0093   const float maxTime;
0094 
0095   // Switch on/off the verbosity
0096   const bool debug;
0097 };
0098 #endif