Class Reference for E1039 Core & Analysis Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SQCalMCHit_v1.cxx
Go to the documentation of this file.
1 #include "SQCalMCHit_v1.h"
2 
3 #include <limits>
4 #include <cmath>
5 
6 using namespace std;
7 
9 
11  _track_id(std::numeric_limits<int>::max()),
12  _shower_id(std::numeric_limits<int>::max()),
13  _g4hit_id(std::numeric_limits<PHG4HitDefs::keytype>::max())
14 {
15 }
16 
17 void SQCalMCHit_v1::identify(ostream& os) const {
18  os << "---SQCalMCHit_v1--------------------" << endl;
19  os << "track_id: " << get_track_id() << endl;
20  os << "hit_id: " << get_hit_id() << endl;
21  os << "shower_id: 0x" << hex << get_hit_id() << dec << endl;
22  os << "truth_pos: (" << _truth_x << ", " << _truth_y << ", " << _truth_z << ")" << endl;
23  os << "truth_mom: (" << _truth_px << ", " << _truth_py << ", " << _truth_pz << ")" << endl;
24 
26 
27  return;
28 }
29 
31  if (_track_id == std::numeric_limits<int>::max()) return 0;
32  return SQCalHit_v1::isValid();
33 }
ClassImp(SQCalMCHit_v1)
int isValid() const
isValid returns non zero if object contains vailid data
Definition: SQCalHit_v1.cxx:33
void identify(std::ostream &os=std::cout) const
Definition: SQCalHit_v1.cxx:24
virtual int get_hit_id() const
Return the ID of this hit.
Definition: SQCalHit_v1.h:25
void identify(std::ostream &os=std::cout) const
virtual int get_track_id() const
Return the track ID associated with this hit. Probably the value is not properly set at present.
Definition: SQCalMCHit_v1.h:24
int isValid() const
isValid returns non zero if object contains vailid data
unsigned long long keytype
Definition: PHG4CellDefs.h:7