StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StMcVertex.hh
1 /***************************************************************************
2  *
3  * $Id: StMcVertex.hh,v 2.13 2005/11/22 21:44:52 fisyak Exp $
4  * $Log: StMcVertex.hh,v $
5  * Revision 2.13 2005/11/22 21:44:52 fisyak
6  * Add compress Print for McEvent, add Ssd collections
7  *
8  * Revision 2.12 2005/09/28 21:30:15 fisyak
9  * Persistent StMcEvent
10  *
11  * Revision 2.11 2005/01/27 23:40:49 calderon
12  * Adding persistency to StMcEvent as a step for Virtual MonteCarlo.
13  *
14  * Revision 2.10 2004/01/13 21:03:34 fisyak
15  * Replace iostream by Stiostream.h (for icc)
16  *
17  * Revision 2.9 2003/12/04 05:56:47 calderon
18  * Inclusion of Endcap EMC hit collection in StMcEvent and
19  * of the Endcap hit vector in StMcTrack.
20  * fix const of StMcVertex::parent() to avoid warnings in user code
21  *
22  * Revision 2.8 2003/10/08 20:17:55 calderon
23  * -using <iostream>, std::cout, std::ostream.
24  * -changes in FTPC volume Id.
25  * o Causes changes in decoding of plane().
26  * o sector() is added.
27  * o print volumeId and sector() in the operator<<.
28  *
29  * Revision 2.7 2003/09/02 17:58:41 perev
30  * gcc 3.2 updates + WarnOff
31  *
32  * Revision 2.6 2003/08/20 18:50:21 calderon
33  * Addition of Tof classes and Pixel classes. Modified track, event, and
34  * container code to reflect this.
35  * Fix bug in StMcVertex and in clearing of some hit collections.
36  *
37  * Revision 2.5 2000/03/29 16:15:55 calderon
38  * Added more information from g2t_vertex table
39  *
40  * Revision 2.4 2000/01/18 20:52:31 calderon
41  * Works with CC5
42  *
43  * Revision 2.3 1999/12/14 07:04:50 calderon
44  * Numbering scheme as per SVT request.
45  *
46  * Revision 2.2 1999/12/03 00:51:53 calderon
47  * Tested with new StMcEventMaker. Added messages for
48  * diagnostics.
49  *
50  * Revision 2.1 1999/11/19 19:06:34 calderon
51  * Recommit after redoing the files.
52  *
53  * Revision 2.0 1999/11/17 02:12:17 calderon
54  * Completely revised for new StEvent
55  *
56  * Revision 1.4 1999/09/24 01:23:17 fisyak
57  * Reduced Include Path
58  *
59  * Revision 1.3 1999/09/23 21:25:55 calderon
60  * Added Log & Id
61  * Modified includes according to Yuri
62  *
63  *
64  **************************************************************************/
65 #ifndef StMcVertex_hh
66 #define StMcVertex_hh
67 #include "StMcContainers.hh"
68 #include "Stiostream.h"
69 #include "StObject.h"
70 #include "TString.h"
71 #include "StThreeVectorF.hh"
72 
73 class g2t_vertex_st;
74 
75 class StMcVertex : public StObject {
76 public:
77  StMcVertex();
78  StMcVertex(g2t_vertex_st*);
79  ~StMcVertex();
80 
81  int operator==(const StMcVertex&) const;
82  int operator!=(const StMcVertex&) const;
83 
84  // "Get" Methods
85 
86  const StThreeVectorF& position() const { return *&mPosition;}
87  StPtrVecMcTrack& daughters() { return *&mDaughters; }
88  const StPtrVecMcTrack& daughters() const { return *&mDaughters; }
89  unsigned int numberOfDaughters() { return mDaughters.size(); }
90  unsigned int numberOfDaughters() const { return mDaughters.size(); }
91  StMcTrack* daughter(unsigned int i) { return (i < mDaughters.size() ? mDaughters[i] : 0); }
92  const StMcTrack* daughter(unsigned int i) const { return (i < mDaughters.size() ? mDaughters[i] : 0); }
93  const StMcTrack* parent() const { return mParent; }
94  TString const &geantVolume() const { return *&mGeantVolume; }
95  float tof() const { return mTof; }
96  long geantProcess() const { return mGeantProcess; }
97  long geantMedium() const { return mGeantMedium; }
98  long generatorProcess() const { return mGeneratorProcess; }
99  long key() const { return mKey; }
100 
101  // "Set" Methods
102 
103  void setPosition(const StThreeVectorF&);
104  void setParent(StMcTrack* );
105  void addDaughter(StMcTrack*);
106  void setGeantVolume(const Char_t *name);
107  void setTof(float);
108  void setGeantProcess(int);
109  void removeDaughter(StMcTrack*);
110  virtual void Print(Option_t *option="") const; // *MENU*
111 protected:
112 
113  StThreeVectorF mPosition;
114  StPtrVecMcTrack mDaughters;
115  StMcTrack* mParent;
116  TString mGeantVolume;
117  float mTof;
118  long mGeantProcess;
119  long mGeneratorProcess;
120  long mKey;
121  long mGeantMedium;
122  ClassDef(StMcVertex,1)
123 };
124 ostream& operator<<(ostream& os, const StMcVertex&);
125 #endif
Definition: tof.h:15
Monte Carlo Track class All information on a simulated track is stored in this class: kinematics...
Definition: StMcTrack.hh:144