Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:18:08

0001 // $Id: $
0002 
0003 /*!
0004  * \file PHG4HitEval.cc
0005  * \brief
0006  * \author Jin Huang <jhuang@bnl.gov>
0007  * \version $Revision:   $
0008  * \date $Date: $
0009  */
0010 
0011 #include "PHG4HitEval.h"
0012 
0013 #include "PHG4Hit.h"  // for PHG4Hit
0014 
0015 #include <phool/PHObject.h>  // for PHObject
0016 
0017 #include <cassert>
0018 #include <cmath>
0019 
0020 PHG4HitEval::PHG4HitEval()
0021   : eion(NAN)
0022   , scint_id(-9999)
0023   , light_yield(NAN)
0024   , path_length(NAN)
0025 
0026 {
0027   // TODO Auto-generated constructor stub
0028 }
0029 
0030 PHG4HitEval::PHG4HitEval(const PHG4Hit *g4hit)
0031   : eion(NAN)
0032   , scint_id(-9999)
0033   , light_yield(NAN)
0034   , path_length(NAN)
0035 {
0036   CopyFrom(g4hit);
0037 }
0038 
0039 void PHG4HitEval::CopyFrom(const PHObject *phobj)
0040 {
0041   const PHG4Hit *g4hit = dynamic_cast<const PHG4Hit *>(phobj);
0042   assert(g4hit);
0043 
0044   PHG4Hit::CopyFrom(phobj);
0045 
0046   // fill the branched variables from the property arrays
0047 
0048   eion = g4hit->get_eion();
0049   scint_id = g4hit->get_scint_id();
0050   light_yield = g4hit->get_light_yield();
0051   path_length = g4hit->get_path_length();
0052 }