]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/FEMTOSCOPY/AliFemto/Infrastructure/AliFemtoKink.cxx
1d62c03070ef12754cc044551cad2592f3f34206
[u/mrichter/AliRoot.git] / PWG2 / FEMTOSCOPY / AliFemto / Infrastructure / AliFemtoKink.cxx
1 /***********************************************************************
2  *
3  * $Id$
4  *
5  * Author: Mike Lisa, Ohio State, 23May2001
6  *
7  ***********************************************************************
8  *
9  * Description: Kink class with information gotten from the StKinkVertex
10  *              of Wenshen Deng and Spiros Margetis
11  *
12  ***********************************************************************
13  *
14  * $Log$
15  * Revision 1.3  2007/04/27 07:24:34  akisiel
16  * Make revisions needed for compilation from the main AliRoot tree
17  *
18  * Revision 1.1.1.1  2007/04/25 15:38:41  panos
19  * Importing the HBT code dir
20  *
21  * Revision 1.1.1.1  2007/03/07 10:14:49  mchojnacki
22  * First version on CVS
23  *
24  * Revision 1.4  2001/11/14 21:07:21  lisa
25  * Fixed several small things (mostly discarded const) that caused fatal errors with gcc2.95.3
26  *
27  * Revision 1.3  2001/09/05 21:55:23  laue
28  * typo fixed
29  *
30  * Revision 1.2  2001/06/21 19:15:46  laue
31  * Modified fiels:
32  *   CTH.h : new constructor added
33  *   AliFemtoEvent, AliFemtoKink, AliFemtoTrack : constructors from the persistent
34  *                                   (TTree) classes added
35  *   AliFemtoLikeSignAnalysis : minor changes, for debugging
36  *   AliFemtoTypes: split into different files
37  * Added files: for the new TTree muDst's
38  *   StExceptions.cxx StExceptions.h AliFemtoEnumeration.h
39  *   AliFemtoHelix.h AliFemtoHisto.h AliFemtoString.h AliFemtoTFile.h
40  *   AliFemtoTTreeEvent.cxx AliFemtoTTreeEvent.h AliFemtoTTreeKink.cxx
41  *   AliFemtoTTreeKink.h AliFemtoTTreeTrack.cxx AliFemtoTTreeTrack.h
42  *   AliFemtoTTreeV0.cxx AliFemtoTTreeV0.h AliFemtoVector.h
43  *
44  * Revision 1.1  2001/05/25 23:23:59  lisa
45  * Added in AliFemtoKink stuff
46  *
47  * 
48  *
49  ***********************************************************************/
50
51 #include "AliFemtoKink.h"
52 #include "Infrastructure/phys_constants.h"
53 #include "Infrastructure/AliFemtoTrack.h"
54 // -----------------------------------------------------------------------
55 AliFemtoKink::AliFemtoKink():
56   fDcaParentDaughter(0), fDcaDaughterPrimaryVertex(0), 
57   fDcaParentPrimaryVertex(0), fHitDistanceParentDaughter(0),  
58   fHitDistanceParentVertex(0),
59   fDecayAngle(0), fDecayAngleCM(0),             
60   fDaughter(),            
61   mParent(),               
62   mPosition(0,0,0)        
63 {/* no-op */}
64 // -----------------------------------------------------------------------
65 AliFemtoKink::AliFemtoKink(const AliFemtoKink& k):
66   fDcaParentDaughter(0), fDcaDaughterPrimaryVertex(0), 
67   fDcaParentPrimaryVertex(0), fHitDistanceParentDaughter(0),  
68   fHitDistanceParentVertex(0),
69   fDecayAngle(0), fDecayAngleCM(0),             
70   fDaughter(),            
71   mParent(),               
72   mPosition(0,0,0)        
73 { // copy constructor
74
75   fDcaParentDaughter          =   k.fDcaParentDaughter;           
76   fDcaDaughterPrimaryVertex   =   k.fDcaDaughterPrimaryVertex;    
77   fDcaParentPrimaryVertex     =   k.fDcaParentPrimaryVertex;      
78   fHitDistanceParentDaughter  =   k.fHitDistanceParentDaughter;   
79   fHitDistanceParentVertex    =   k.fHitDistanceParentVertex;     
80   fDeltaEnergy[0]             =   k.fDeltaEnergy[0];              
81   fDeltaEnergy[1]             =   k.fDeltaEnergy[1];              
82   fDeltaEnergy[2]             =   k.fDeltaEnergy[2];              
83   fDecayAngle                 =   k.fDecayAngle;                  
84   fDecayAngleCM               =   k.fDecayAngleCM;                
85   fDaughter                   =   k.fDaughter;                    
86   mParent                     =   k.mParent;                      
87   mPosition                   =   k.mPosition;                
88
89 }
90 // -----------------------------------------------------------------------
91
92
93 //--------------------- below here is ONLY star ----------------
94 #ifndef __NO_STAR_DEPENDENCE_ALLOWED__
95 #ifdef __ROOT__
96 #include "StEvent/StTrack.h"
97 #include "StEvent/StKinkVertex.h"
98 AliFemtoKink::AliFemtoKink( const StKinkVertex& SKV, AliFemtoThreeVector PrimaryVertex )
99
100
101   fDcaParentDaughter          = SKV.dcaParentDaughter();
102   fDcaDaughterPrimaryVertex   = SKV.dcaDaughterPrimaryVertex();
103   fDcaParentPrimaryVertex     = SKV.dcaParentPrimaryVertex();
104   fHitDistanceParentDaughter  = SKV.hitDistanceParentDaughter();
105   fHitDistanceParentVertex    = SKV.hitDistanceParentVertex();
106   fDeltaEnergy[0]             = SKV.dE(0);
107   fDeltaEnergy[1]             = SKV.dE(1);
108   fDeltaEnergy[2]             = SKV.dE(2);
109   fDecayAngle                 = SKV.decayAngle();
110   fDecayAngleCM               = SKV.decayAngleCM();
111
112   // now fill member AliFemtoTrack data...
113   const StTrack* StTrk;
114   AliFemtoTrack* HbtTrk;
115   // Daughter
116   StTrk = SKV.daughter(0);
117   HbtTrk = new AliFemtoTrack(StTrk,PrimaryVertex); // generate NEW HbtTrack from StTrack
118   fDaughter = *HbtTrk;                         // invoke copy ctr of AliFemtoTrack
119   delete HbtTrk;                               // get rid of the NEW HbtTrack - we are done with that
120   // Parent
121   StTrk = SKV.parent();
122   HbtTrk = new AliFemtoTrack(StTrk,PrimaryVertex); // generate NEW HbtTrack from StTrack
123   mParent = *HbtTrk;                           // invoke copy ctr of AliFemtoTrack
124   delete HbtTrk;                               // get rid of the NEW HbtTrack - we are done with that
125
126   // finally, the kink position
127   mPosition.setX(SKV.position().x());
128   mPosition.setY(SKV.position().y());
129   mPosition.setZ(SKV.position().z());
130
131 }
132
133 // mike removed all AliFemtoTTree stuff 21apr2006
134
135 #endif // __ROOT__
136 #endif  // __NO_STAR_DEPENDENCE_ALLOWED__