StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StMcVertexC.h
1 /***************************************************************************
2  *
3  * $Id: StMcVertexC.h,v 2.1 2010/05/04 23:58:43 fine Exp $
4  * $Log: StMcVertexC.h,v $
5  * Revision 2.1 2010/05/04 23:58:43 fine
6  * Vertex, and emc models
7  *
8  * Revision 2.2 2010/04/28 20:15:45 fine
9  * Implementation if the new OO for Mc hits
10  *
11  * Revision 2.1 2010/04/28 18:10:11 fine
12  * New OO model for Mc event components
13  *
14  * Revision 2.10 2005/11/22 21:44:52 fisyak
15  * Add compress Print for McEvent, add Ssd collections
16  *
17  *
18  **************************************************************************/
19 #ifndef STMCVERTEXT_HH
20 #define STMCVERTEXT_HH
21 
22 #include "StEventObject.h"
23 #include "StMcHitI.h"
24 #include "g2t_vertex.h"
25 
26 #include "TString.h"
27 
28 class StMcVertexC : public StEventObject<g2t_vertex_st*> , public StMcHitI {
29 protected:
30  StMcVertexC(){;}
31 public:
32  StMcVertexC(g2t_vertex_st*data) : StEventObject<g2t_vertex_st*>(data) {;}
33  // StMcVertexC(const StSvtHit&); use default
34  // const StMcVertexC & operator=(const StMcVertexC&); use default
35  virtual ~StMcVertexC(){;}
36  int operator==(const StMcVertexC&r) const;
37  int operator!=(const StMcVertexC&r) const
38  { return !operator==(r); }
39  // "Get" Methods
40  virtual float x() const { return StEventObject<g2t_vertex_st*>::fData->ge_x[0]; }
41  virtual float y() const { return StEventObject<g2t_vertex_st*>::fData->ge_x[1]; }
42  virtual float z() const { return StEventObject<g2t_vertex_st*>::fData->ge_x[2]; }
43 
44  virtual long geantProcess() const { return StEventObject<g2t_vertex_st*>::fData->ge_proc; }
45  virtual long generatorProcess() const { return StEventObject<g2t_vertex_st*>::fData->eg_proc; }
46  virtual long geantMedium() const { return StEventObject<g2t_vertex_st*>::fData->ge_medium; }
47 
48  virtual long key() const { return StEventObject<g2t_vertex_st*>::fData->id; }
49  virtual long volumeId() const { long tmp;
50  memcpy(&tmp, &StEventObject<g2t_vertex_st*>::fData->ge_volume,4);
51  return tmp;
52  }
53  virtual float tof() const { return StEventObject<g2t_vertex_st*>::fData->eg_tof; }
54  TString geantVolume() const { char tmp[5]={0};
55  strncpy(tmp, StEventObject<g2t_vertex_st*>::fData->ge_volume,4);
56  return TString(tmp);
57  }
58 #if 0
59  StPtrVecMcTrack& daughters() { return return StEventObject<g2t_vertex_st*>::fData->*&mDaughters; }
60  const StPtrVecMcTrack& daughters() const { return return StEventObject<g2t_vertex_st*>::fData->*&mDaughters; }
61  unsigned int numberOfDaughters() { return return StEventObject<g2t_vertex_st*>::fData->mDaughters.size(); }
62  unsigned int numberOfDaughters() const { return return StEventObject<g2t_vertex_st*>::fData->mDaughters.size(); }
63  StMcTrack* daughter(unsigned int i) { return (i < mDaughters.size() ? mDaughters[i] : 0); }
64  const StMcTrack* daughter(unsigned int i) const { return (i < mDaughters.size() ? mDaughters[i] : 0); }
65  const StMcTrack* parent() const { return return StEventObject<g2t_vertex_st*>::fData->mParent; }
66 #endif
67 };
68 
69 #endif
70 
Definition: tof.h:15
Monte Carlo Track class All information on a simulated track is stored in this class: kinematics...
Definition: StMcTrack.hh:144
base class for all StMcEvent objects
Definition: StEventObject.h:9