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 AliStarTrack: Event container for flow analysis
19 origin: Mikolaj Krzewicki (mikolaj.krzewicki@cern.ch)
20 *****************************************************************/
25 #include "AliStarTrack.h"
27 ClassImp(AliStarTrack)
29 //______________________________________________________________________________
30 AliStarTrack::AliStarTrack():
37 //______________________________________________________________________________
38 AliStarTrack::AliStarTrack( const Float_t* params ):
43 memcpy(fParams,params,fgkNparams*sizeof(Float_t));
46 //______________________________________________________________________________
47 AliStarTrack::AliStarTrack( const AliStarTrack& track ):
52 memcpy(fParams,track.fParams,fgkNparams*sizeof(Float_t));
55 //______________________________________________________________________________
56 AliStarTrack& AliStarTrack::operator=( const AliStarTrack& track )
59 if (this == &track) return *this;
60 TObject::operator=(track);
61 memcpy(fParams,track.fParams,fgkNparams*sizeof(Float_t));
65 //______________________________________________________________________________
66 void AliStarTrack::SetParams( const Float_t* params )
69 memcpy(fParams,params,fgkNparams*sizeof(Float_t));
72 //______________________________________________________________________________
73 AliStarTrack* AliStarTrack::Clone( const char* /*option*/) const
76 return new AliStarTrack(*this);
79 //______________________________________________________________________________
80 void AliStarTrack::Print( Option_t* option ) const
83 // TNtuple* track: names are documented in the next 2 lines
84 // tracks = new TNtuple("tracks","tracks",
85 // "ID:Charge:Eta:Phi:Pt:Dca:nHits:nHitsFit:nHitsPoss:nHitsDedx:dEdx:nSigElect:nSigPi:nSigK:nSigProton" ) ;
87 TString optionstr(option);
88 if ( optionstr.Contains("legend") )
91 " id charge eta phi pt dca nHits nFit nPoss ndEdx dEdx nSigElec nSigPi nSigK nSigPr\n") ;
95 Int_t id = (Int_t) fParams[0] ; // id - a unique integer for each track in this event
96 Int_t charge = (Int_t) fParams[1] ; // +1 or -1
97 Float_t eta = (Float_t) fParams[2] ; // Pseudo-rapidity at the vertex
98 Float_t phi = (Float_t) fParams[3] ; // Phi emission angle at the vertexcd
99 Float_t pt = (Float_t) fParams[4] ; // Pt of the track at the vertex
100 Float_t dca = (Float_t) fParams[5] ; // Magnitude of 3D DCA to vertex
101 Int_t nHits = (Int_t) fParams[6] ; // Number of clusters available to the Kalman Filter
102 Int_t nHitsFit = (Int_t) fParams[7] ; // Number of clusters used in the fit (after cuts)
103 Int_t nHitsPoss = (Int_t) fParams[8] ; // Number of possible cluster on track (theoretical max)
104 Int_t nHitsDedx = (Int_t) fParams[9] ; // Number of clusters used in the fit (after dEdx cuts)
105 Float_t dEdx = 1.e6*(Float_t)fParams[10] ; // Measured dEdx (Note: GeV/cm so convert to keV/cm!!)
106 Float_t nSigmaElectron = (Float_t) fParams[11] ; // Number of sigma from electron Bethe-Bloch curve
107 Float_t nSigmaPion = (Float_t) fParams[12] ; // Number of sigma from pion Bethe-Bloch curve
108 Float_t nSigmaKaon = (Float_t) fParams[13] ; // Number of sigma from kaon Bethe-Bloch curve
109 Float_t nSigmaProton = (Float_t) fParams[14] ; // Number of sigma from proton Bethe-Bloch curve
111 // Alternative way to access the data
112 // nHitsPoss = (Int_t) ( fTracks->GetLeaf("nHitsPoss")->GetValue() ) ; // Note alternative method to retrieve data
113 // Using the definition of the original NTuple
114 // TrackTuple = new TNtuple("NTtracks","NTtracks",
115 // "ID:Charge:Eta:Phi:Pt:Dca:nHits:nHitsFit:nHitsPoss:nHitsDedx:dEdx:nSigElect:nSigPi:nSigK:nSigProton" )
117 printf("%6d %4d %7.3f %7.3f %7.3f %7.4f %6d %5d %5d %5d %6.2f %6.2f %6.2f %6.2f %6.2f \n",
118 id, charge, eta, phi, pt, dca, nHits, nHitsFit, nHitsPoss, nHitsDedx, dEdx,
119 nSigmaElectron, nSigmaPion, nSigmaKaon, nSigmaProton ) ;
122 //______________________________________________________________________________
123 Int_t AliStarTrack::PID() const
125 // Note: This is a very simple PID selection scheme. More elaborate methods (with multiple cuts) may be required.
126 // When you *are* using dEdx information, you must chose a finite number of good Dedx hits ... but the limit should
127 // be about 2/3 of nHitsMin. This is because some clusters do not form good dEdx hits due to track
128 // merging, etc., and so nHitsDedx is always less than nHitsFit. A rule of thumb says ~2/3 ratio.
132 const Int_t nHitDedxMin = 15 ; // 10 to 20 is typical. nHitDedxMin is often chosen to be about 2/3 of nHitMin.
133 const Float_t nSigmaPID = 2.0 ; // Number of Sigma cut to apply to PID bands
135 // Test on Number of dE/dx hits required, return 0 if not enough hits
136 if ( GetNHitsDedx() < nHitDedxMin ) return pid;
140 if ( TMath::Abs( GetNSigElect() ) >= nSigmaPID )
142 if ( TMath::Abs( GetNSigK() ) <= nSigmaPID )
146 if ( TMath::Abs( GetNSigProton() ) <= nSigmaPID )
150 if ( TMath::Abs( GetNSigPi() ) <= nSigmaPID )
156 // Pion is the default in case of ambiguity because it is most abundent. Don't re-arrange order, above.