]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGCF/FEMTOSCOPY/AliFemto/AliFemtoKink.cxx
Merge branch 'master_patch'
[u/mrichter/AliRoot.git] / PWGCF / FEMTOSCOPY / AliFemto / AliFemtoKink.cxx
1 ///////////////////////////////////////////////////////////////////////////
2 //                                                                       //
3 // AliFemtoKink: main class holding all the necessary information        //
4 // about a kink (before the identification) that is required during      //
5 // femtoscopic analysis. This class is filled with information from the  //
6 // input stream by the reader. A particle has a link back to the Kink    //
7 // it was created from, so we do not copy the information.               //
8 //                                                                       //
9 ///////////////////////////////////////////////////////////////////////////
10 /***********************************************************************
11  *
12  * $Id$
13  *
14  * Author: Mike Lisa, Ohio State, 23May2001
15  *
16  ***********************************************************************
17  *
18  * Description: Kink class with information gotten from the StKinkVertex
19  *              of Wenshen Deng and Spiros Margetis
20  *
21  ***********************************************************************
22  *
23  * $Log$
24  * Revision 1.4  2007/05/03 09:42:29  akisiel
25  * Fixing Effective C++ warnings
26  *
27  * Revision 1.3  2007/04/27 07:24:34  akisiel
28  * Make revisions needed for compilation from the main AliRoot tree
29  *
30  * Revision 1.1.1.1  2007/04/25 15:38:41  panos
31  * Importing the HBT code dir
32  *
33  * Revision 1.1.1.1  2007/03/07 10:14:49  mchojnacki
34  * First version on CVS
35  *
36  * Revision 1.4  2001/11/14 21:07:21  lisa
37  * Fixed several small things (mostly discarded const) that caused fatal errors with gcc2.95.3
38  *
39  * Revision 1.3  2001/09/05 21:55:23  laue
40  * typo fixed
41  *
42  * Revision 1.2  2001/06/21 19:15:46  laue
43  * Modified fiels:
44  *   CTH.h : new constructor added
45  *   AliFemtoEvent, AliFemtoKink, AliFemtoTrack : constructors from the persistent
46  *                                   (TTree) classes added
47  *   AliFemtoLikeSignAnalysis : minor changes, for debugging
48  *   AliFemtoTypes: split into different files
49  * Added files: for the new TTree muDst's
50  *   StExceptions.cxx StExceptions.h AliFemtoEnumeration.h
51  *   AliFemtoHelix.h AliFemtoHisto.h AliFemtoString.h AliFemtoTFile.h
52  *   AliFemtoTTreeEvent.cxx AliFemtoTTreeEvent.h AliFemtoTTreeKink.cxx
53  *   AliFemtoTTreeKink.h AliFemtoTTreeTrack.cxx AliFemtoTTreeTrack.h
54  *   AliFemtoTTreeV0.cxx AliFemtoTTreeV0.h AliFemtoVector.h
55  *
56  * Revision 1.1  2001/05/25 23:23:59  lisa
57  * Added in AliFemtoKink stuff
58  *
59  * 
60  *
61  ***********************************************************************/
62
63 #include "AliFemtoKink.h"
64 #include "phys_constants.h"
65 #include "AliFemtoTrack.h"
66 // -----------------------------------------------------------------------
67 AliFemtoKink::AliFemtoKink():
68   fDcaParentDaughter(0), fDcaDaughterPrimaryVertex(0), 
69   fDcaParentPrimaryVertex(0), fHitDistanceParentDaughter(0),  
70   fHitDistanceParentVertex(0),
71   fDecayAngle(0), fDecayAngleCM(0),             
72   fDaughter(),            
73   fParent(),               
74   fPosition(0,0,0)        
75 {
76   for (int id=0; id<3; id++) fDeltaEnergy[id] = 0.0;
77 }
78 // -----------------------------------------------------------------------
79 AliFemtoKink::AliFemtoKink(const AliFemtoKink& k):
80   fDcaParentDaughter(0), fDcaDaughterPrimaryVertex(0), 
81   fDcaParentPrimaryVertex(0), fHitDistanceParentDaughter(0),  
82   fHitDistanceParentVertex(0),
83   fDecayAngle(0), fDecayAngleCM(0),             
84   fDaughter(),            
85   fParent(),               
86   fPosition(0,0,0)        
87 { // copy constructor
88
89   fDcaParentDaughter          =   k.fDcaParentDaughter;           
90   fDcaDaughterPrimaryVertex   =   k.fDcaDaughterPrimaryVertex;    
91   fDcaParentPrimaryVertex     =   k.fDcaParentPrimaryVertex;      
92   fHitDistanceParentDaughter  =   k.fHitDistanceParentDaughter;   
93   fHitDistanceParentVertex    =   k.fHitDistanceParentVertex;     
94   fDeltaEnergy[0]             =   k.fDeltaEnergy[0];              
95   fDeltaEnergy[1]             =   k.fDeltaEnergy[1];              
96   fDeltaEnergy[2]             =   k.fDeltaEnergy[2];              
97   fDecayAngle                 =   k.fDecayAngle;                  
98   fDecayAngleCM               =   k.fDecayAngleCM;                
99   fDaughter                   =   k.fDaughter;                    
100   fParent                     =   k.fParent;                      
101   fPosition                   =   k.fPosition;                
102
103 }
104 // -----------------------------------------------------------------------
105 AliFemtoKink& AliFemtoKink::operator=( const AliFemtoKink& k)
106 {
107   if (this != &k) {
108     fDcaParentDaughter          =   k.fDcaParentDaughter;           
109     fDcaDaughterPrimaryVertex   =   k.fDcaDaughterPrimaryVertex;    
110     fDcaParentPrimaryVertex     =   k.fDcaParentPrimaryVertex;      
111     fHitDistanceParentDaughter  =   k.fHitDistanceParentDaughter;   
112     fHitDistanceParentVertex    =   k.fHitDistanceParentVertex;     
113     fDeltaEnergy[0]             =   k.fDeltaEnergy[0];              
114     fDeltaEnergy[1]             =   k.fDeltaEnergy[1];              
115     fDeltaEnergy[2]             =   k.fDeltaEnergy[2];              
116     fDecayAngle                 =   k.fDecayAngle;                  
117     fDecayAngleCM               =   k.fDecayAngleCM;                
118     fDaughter                   =   k.fDaughter;                    
119     fParent                     =   k.fParent;                      
120     fPosition                   =   k.fPosition;                
121   }
122
123   return *this;
124 }
125
126
127 //--------------------- below here is ONLY star ----------------
128 #ifndef __NO_STAR_DEPENDENCE_ALLOWED__
129 #ifdef __ROOT__
130 #include "StEvent/StTrack.h"
131 #include "StEvent/StKinkVertex.h"
132 AliFemtoKink::AliFemtoKink( const StKinkVertex& SKV, AliFemtoThreeVector PrimaryVertex )
133
134
135   fDcaParentDaughter          = SKV.dcaParentDaughter();
136   fDcaDaughterPrimaryVertex   = SKV.dcaDaughterPrimaryVertex();
137   fDcaParentPrimaryVertex     = SKV.dcaParentPrimaryVertex();
138   fHitDistanceParentDaughter  = SKV.hitDistanceParentDaughter();
139   fHitDistanceParentVertex    = SKV.hitDistanceParentVertex();
140   fDeltaEnergy[0]             = SKV.dE(0);
141   fDeltaEnergy[1]             = SKV.dE(1);
142   fDeltaEnergy[2]             = SKV.dE(2);
143   fDecayAngle                 = SKV.decayAngle();
144   fDecayAngleCM               = SKV.decayAngleCM();
145
146   // now fill member AliFemtoTrack data...
147   const StTrack* StTrk;
148   AliFemtoTrack* HbtTrk;
149   // Daughter
150   StTrk = SKV.daughter(0);
151   HbtTrk = new AliFemtoTrack(StTrk,PrimaryVertex); // generate NEW HbtTrack from StTrack
152   fDaughter = *HbtTrk;                         // invoke copy ctr of AliFemtoTrack
153   delete HbtTrk;                               // get rid of the NEW HbtTrack - we are done with that
154   // Parent
155   StTrk = SKV.parent();
156   HbtTrk = new AliFemtoTrack(StTrk,PrimaryVertex); // generate NEW HbtTrack from StTrack
157   fParent = *HbtTrk;                           // invoke copy ctr of AliFemtoTrack
158   delete HbtTrk;                               // get rid of the NEW HbtTrack - we are done with that
159
160   // finally, the kink position
161   fPosition.setX(SKV.position().x());
162   fPosition.setY(SKV.position().y());
163   fPosition.setZ(SKV.position().z());
164
165 }
166
167 // mike removed all AliFemtoTTree stuff 21apr2006
168
169 #endif // __ROOT__
170 #endif  // __NO_STAR_DEPENDENCE_ALLOWED__