]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PHOS/AliPHOSRecParticle.cxx
Full PID delegated to AliPHOSPID
[u/mrichter/AliRoot.git] / PHOS / AliPHOSRecParticle.cxx
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
4  * Author: The ALICE Off-line Project.                                    *
5  * Contributors are mentioned in the code where appropriate.              *
6  *                                                                        *
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  **************************************************************************/
15
16 //_________________________________________________________________________
17 // Reconstructed Particle
18 //*-- Y. Schutz:   SUBATECH 
19 //////////////////////////////////////////////////////////////////////////////
20
21 // --- ROOT system ---
22
23 // --- Standard library ---
24
25 // --- AliRoot header files ---
26
27 #include "AliPHOSRecParticle.h"
28
29 ClassImp(AliPHOSRecParticle)
30
31
32 //____________________________________________________________________________
33  AliPHOSRecParticle::AliPHOSRecParticle(AliPHOSTrackSegment * ts)
34 {
35   // ctor
36  
37   fPHOSTrackSegment = new AliPHOSTrackSegment(*ts) ; 
38   fE                = ts->GetEnergy() ; 
39   TVector3 momdir   = ts->GetMomentumDirection() ;
40   fPx               = fE * momdir.X() ; 
41   fPy               = fE * momdir.Y() ; 
42   fPz               = fE * momdir.Z() ; 
43   fType             = kUNDEFINED ;  
44                            
45 }
46
47 //____________________________________________________________________________
48 TString AliPHOSRecParticle::Name()
49 {
50   TString  name ; 
51   switch (fType) {
52   case kGAMMA:
53     name = "PHOTON" ;
54     break ; 
55    case kELECTRON:
56      name = "ELECTRON" ;
57     break ; 
58   case kNEUTRAL:
59     name = "NEUTRAL" ;
60     break ; 
61    case kCHARGEDHADRON:
62     name = "CHARGED HADRON" ;
63     break ; 
64   case kNEUTRALHADRON:
65     name = "NEUTRAL HADRON" ; 
66     break ; 
67   case kNEUTRALEM:
68     name = "NEUTRAL EM" ; 
69     break ; 
70   }
71   return name ; 
72 }
73
74 //____________________________________________________________________________
75 void AliPHOSRecParticle::Print()
76 {
77   cout << "AliPHOSRecParticle > " << "type is  " << Name() << endl 
78        << "                     " << "Energy = " << fE << endl 
79        << "                     " << "Px     = " << fPx << endl 
80        << "                     " << "Py     = " << fPy << endl 
81        << "                     " << "Pz     = " << fPz << endl ; 
82 }