StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StKinkMc.cc
1 /***********************************************************************
2  *
3  * $Id: StKinkMc.cc,v 3.2 2002/04/30 16:02:47 genevb Exp $
4  * $Log: StKinkMc.cc,v $
5  * Revision 3.2 2002/04/30 16:02:47 genevb
6  * Common muDst, improved MC code, better kinks, StrangeCuts now a branch
7  *
8  * Revision 3.1 2001/05/04 20:15:13 genevb
9  * Common interfaces and reorganization of components, add MC event info
10  *
11  * Revision 3.0 2000/07/14 12:56:48 genevb
12  * Revision 3 has event multiplicities and dedx information for vertex tracks
13  *
14  * Revision 2.0 2000/06/05 05:19:39 genevb
15  * New version of Strangeness micro DST package
16  *
17  *
18  ***********************************************************************
19  *
20  * Description: Monte Carlo Kink micro dst class
21  *
22  ***********************************************************************/
23 #include "StKinkMc.hh"
24 #include "StMcVertex.hh"
25 #include "StMcTrack.hh"
26 #include "StDecayMode.hh"
27 
28 ClassImp(StKinkMc)
29 
31 {}
32 
33 StKinkMc::StKinkMc(StMcVertex* mcVertex, StMcTrack* mcDaughterTrack) :
34  StKinkBase()
35 {
36  mDecayMode = StDecayMode::Instance()->Process(mcVertex);
37 
38  mParentGeantId = mcVertex->parent()->geantId();
39  mDaughterGeantId = mcDaughterTrack->geantId();
40  mParentMomentumX = 0.;
41  mParentMomentumY = 0.;
42  mParentMomentumZ = 0.;
43  for (unsigned int i=0; i < mcVertex->numberOfDaughters(); i++) {
44  mParentMomentumX += mcVertex->daughter(i)->momentum().x();
45  mParentMomentumY += mcVertex->daughter(i)->momentum().y();
46  mParentMomentumZ += mcVertex->daughter(i)->momentum().z();
47  }
48  mParentPrimMomentumX = mcVertex->parent()->momentum().x();
49  mParentPrimMomentumY = mcVertex->parent()->momentum().y();
50  mParentPrimMomentumZ = mcVertex->parent()->momentum().z();
51  mDaughterMomentumX = mcDaughterTrack->momentum().x();
52  mDaughterMomentumY = mcDaughterTrack->momentum().y();
53  mDaughterMomentumZ = mcDaughterTrack->momentum().z();
54  mPositionX = mcVertex->position().x();
55  mPositionY = mcVertex->position().y();
56  mPositionZ = mcVertex->position().z();
57  mCommonTpcHits = 0;
58  mSimTpcHits = mcDaughterTrack->tpcHits().size();
59 }
60 
61 StKinkMc::~StKinkMc()
62 {}
63 
64 Int_t StKinkMc::parentCharge() const {
65  return (StDecayMode::Instance()->ParentCharge(mDecayMode));
66 }
Monte Carlo Track class All information on a simulated track is stored in this class: kinematics...
Definition: StMcTrack.hh:144
Int_t Process(StMcVertex *mcVertex)
Definition: StDecayMode.cc:84