Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:17:03

0001 /**
0002  * @file trackbase/TrkrHit.h
0003  * @author D. McGlinchey
0004  * @date 4 June 2018
0005  * @brief Base class for hit object
0006  */
0007 #ifndef TRACKBASE_TRKRHIT_H
0008 #define TRACKBASE_TRKRHIT_H
0009 
0010 #include "TrkrDefs.h"
0011 
0012 #include <phool/PHObject.h>
0013 
0014 #include <climits>
0015 #include <cmath>
0016 #include <iostream>
0017 
0018 /**
0019  * @brief Base class for hit object
0020  *
0021  * This is the empty virtual base class for a hit object.
0022  * Each subsystem should implement an inherited version
0023  * which contains the actual storage information.
0024  */
0025 class TrkrHit : public PHObject
0026 {
0027  public:
0028 
0029   //! dtor
0030   ~TrkrHit() override = default;
0031 
0032   // PHObject virtual overloads
0033   void identify(std::ostream& os = std::cout) const override
0034   {
0035     os << "TrkrHit base class" << std::endl;
0036   }
0037   void Reset() override {}
0038   int isValid() const override { return 0; }
0039 
0040   //! import PHObject CopyFrom, in order to avoid clang warning
0041   using PHObject::CopyFrom;
0042 
0043   //! copy content from base class
0044   virtual void CopyFrom(const TrkrHit&)
0045   {}
0046 
0047   //! copy content from base class
0048   virtual void CopyFrom(TrkrHit*)
0049   {}
0050 
0051   // these set and get the energy before digitization
0052   virtual void addEnergy(const double) {}
0053   virtual double getEnergy() const { return 0; }
0054 
0055   // after digitization, these are the adc values
0056   virtual void setAdc(const unsigned int) {}
0057   virtual unsigned int getAdc() const { return 0; }
0058   /*
0059   virtual void setCrossing(const short int) {}
0060   virtual short int getCrossing() { return 0;}
0061   */
0062 
0063  protected:
0064   ClassDefOverride(TrkrHit, 1);
0065 };
0066 
0067 #endif  // TRACKBASE_TRKRHIT_H