ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
EICG4dRICHHit.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file EICG4dRICHHit.cc
1 #include "EICG4dRICHHit.h"
2 
3 #include <phool/phool.h>
4 
5 EICG4dRICHHit::EICG4dRICHHit(const PHG4Hit *g4hit) { CopyFrom(g4hit); };
6 
8 { // TODO: make sure this is filled out
9  hitid = ULONG_LONG_MAX;
10  //trackid = INT_MIN;
11  showerid = INT_MIN;
12  edep = NAN;
13  for (int i = 0; i < 2; i++)
14  {
15  set_position(i, G4ThreeVector(NAN, NAN, NAN));
16  set_t(i, NAN);
17  };
18 };
19 
21 {
22  // a compile time check if the hit_idbits are within range (1-32)
23  static_assert(PHG4HitDefs::hit_idbits <= sizeof(unsigned int) * 8,
24  "hit_idbits < 32, fix in PHG4HitDefs.h");
25  int detid = (hitid >> PHG4HitDefs::hit_idbits);
26  return detid;
27 };
28 
30 {
31  std::cout << "New EICG4dRICHHit " << hitid << " on track " << trackid << " EDep "
32  << edep << std::endl;
33  std::cout << "Location: X " << x[0] << "/" << x[1] << " Y " << y[0] << "/" << y[1]
34  << " Z " << z[0] << "/" << z[1] << std::endl;
35  std::cout << "Time " << t[0] << "/" << t[1] << std::endl;
36 }