1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
16 //_________________________________________________________________________
17 // class of PHOS Sub Track
18 //*-- Author : Dmitri Peressounko RRC KI
19 //////////////////////////////////////////////////////////////////////////////
21 // --- ROOT system ---
25 // --- Standard library ---
29 // --- AliRoot header files ---
31 #include "AliPHOSTrackSegment.h"
32 #include "AliPHOSv0.h"
34 ClassImp(AliPHOSTrackSegment)
36 //____________________________________________________________________________
37 AliPHOSTrackSegment::AliPHOSTrackSegment( AliPHOSEmcRecPoint * emc , AliPHOSPpsdRecPoint * ppsdRP1,
38 AliPHOSPpsdRecPoint * ppsdRP2 )
49 fCutOnDispersion = 1.5 ;
52 //____________________________________________________________________________
53 AliPHOSTrackSegment::~AliPHOSTrackSegment() // dtor
55 // fEmcRecPoint.Delete() ; Not Owners !!!
57 // fPpsdLow.Delete() ;
60 //____________________________________________________________________________
61 Float_t AliPHOSTrackSegment::GetDistanceInPHOSPlane()
65 fEmcRecPoint->GetLocalPosition(vecEmc) ;
68 if( fPpsdLow->GetMultiplicity() )
69 fPpsdLow->GetLocalPosition(vecPpsd) ;
71 vecPpsd.SetX(10000.) ;
75 Float_t R = vecEmc.Mag();;
80 //____________________________________________________________________________
81 Bool_t AliPHOSTrackSegment::GetMomentumDirection( TVector3 & dir )
84 Bool_t ifdeterm = kTRUE ;
88 if( fPpsdUp->GetMultiplicity() ) { // draw line trough 2 points
90 fEmcRecPoint->GetGlobalPosition(posEmc,mdummy) ;
92 fPpsdLow->GetGlobalPosition(posPpsd,mdummy) ;
93 dir = posEmc - posPpsd ;
97 else { // draw line through 3 pionts
99 fEmcRecPoint->GetGlobalPosition(posEmc,mdummy) ;
101 fPpsdLow->GetGlobalPosition(posPpsdl,mdummy) ;
103 fPpsdUp->GetGlobalPosition(posPpsdup,mdummy) ;
104 posPpsdl = 0.5*( posPpsdup+posPpsdl ) ;
105 dir = posEmc - posPpsdl ;
116 //____________________________________________________________________________
117 Int_t AliPHOSTrackSegment::GetPartType()
121 // 2 - neutral hadron
122 // 3 - charged hadron
125 if( fPpsdUp ){ // Neutral
127 if( fPpsdLow ) // Neutral hadron
136 if( fEmcRecPoint->GetDispersion() > fCutOnDispersion)
147 //____________________________________________________________________________
148 void AliPHOSTrackSegment::GetPosition( TVector3 & pos )
150 // Returns positions of hits
152 fEmcRecPoint->GetGlobalPosition(pos, Dummy) ;
155 //____________________________________________________________________________
156 void AliPHOSTrackSegment::Print()
158 cout << "--------AliPHOSTrackSegment-------- "<<endl ;
159 cout << "EMC Reconstructed Point: " << fEmcRecPoint << endl;
164 fEmcRecPoint->GetGlobalPosition( pos, Dummy ) ;
166 cout << " position " << pos.X() << " " << pos.Y() << " " << pos.Z() << " Energy " << fEmcRecPoint->GetTotalEnergy() << endl ;
167 cout << "PPSD Low Reconstructed Point: " << endl;
170 fPpsdLow->GetGlobalPosition( pos , Dummy ) ;
171 cout << " position " << pos.X() << " " << pos.Y() << " " << pos.Z() << endl ;
174 cout << "PPSD Up Reconstructed Point: " << endl;
177 fPpsdUp->GetGlobalPosition( pos, Dummy ) ;
178 cout << " position " << pos.X() << " " << pos.Y() << " " << pos.Z() << endl ;