Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-12-17 09:22:02

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 // $Id: $
0004 
0005 /*!
0006  * \file PHG4HitEval.h
0007  * \brief
0008  * \author Jin Huang <jhuang@bnl.gov>
0009  * \version $Revision:   $
0010  * \date $Date: $
0011  */
0012 
0013 #ifndef G4MAIN_PHG4HITEVAL_H
0014 #define G4MAIN_PHG4HITEVAL_H
0015 
0016 #include "PHG4Hitv1.h"
0017 
0018 #include <limits>
0019 
0020 class PHG4Hit;
0021 class PHObject;
0022 
0023 /*!
0024  * \brief PHG4HitEval for evaluating PHG4Hitv1 in CINT readable evaluation trees
0025  */
0026 class PHG4HitEval : public PHG4Hitv1
0027 {
0028  public:
0029   PHG4HitEval() = default;
0030 
0031   PHG4HitEval(const PHG4Hit *g4hit);
0032 
0033   ~PHG4HitEval() override = default;
0034 
0035   void CopyFrom(const PHObject *phobj) override;
0036 
0037   float get_eion() const override
0038   {
0039     return eion;
0040   }
0041 
0042   void set_eion(const float f) override
0043   {
0044     eion = f;
0045   }
0046 
0047   int get_scint_id() const override
0048   {
0049     return scint_id;
0050   }
0051 
0052   void set_scint_id(const int i) override
0053   {
0054     scint_id = i;
0055   }
0056 
0057   float get_light_yield() const override
0058   {
0059     return light_yield;
0060   }
0061 
0062   void set_light_yield(float lightYield) override
0063   {
0064     light_yield = lightYield;
0065   }
0066 
0067   float get_path_length() const override
0068   {
0069     return path_length;
0070   }
0071 
0072   void set_path_length(float pathLength) override
0073   {
0074     path_length = pathLength;
0075   }
0076 
0077  protected:
0078   float eion{std::numeric_limits<float>::quiet_NaN()};
0079 
0080   int scint_id{std::numeric_limits<int>::min()};
0081 
0082   //! a number proportional to the scintillation light yield.
0083   float light_yield{std::numeric_limits<float>::quiet_NaN()};
0084 
0085   //! path length of the track to the hit
0086   float path_length{std::numeric_limits<float>::quiet_NaN()};
0087 
0088   ClassDefOverride(PHG4HitEval, 1)
0089 };
0090 
0091 #endif /* PHG4HITEVAL_H_ */