AliRoot Core  v5-06-30 (35d6c57)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliTPCCombinedTrackfit Class Reference

Combine cosmic track pairs (upper, lower) and do track fitting. More...

#include <AliTPCCombinedTrackfit.h>

Public Member Functions

 AliTPCCombinedTrackfit (const Int_t dlev=0, const TString tag="test")
 
 ~AliTPCCombinedTrackfit ()
 
Bool_t CombineESDtracks (AliESDtrack *&trk0, AliESDtrack *&trk1)
 
Bool_t CombineTPCseeds (AliTPCseed *&seed0, AliTPCseed *&seed1)
 
void Print () const
 
Int_t GetStatus () const
 
Int_t GetFitNcls () const
 
Int_t GetMissNcls () const
 
Double_t GetChi2PerCluster () const
 
Double_t GetLeverArm () const
 
TVector3 GetInnerClusterUp () const
 
TVector3 GetInnerClusterLow () const
 
Double_t ImpactParameter () const
 
Double_t MinPhi () const
 
AliExternalTrackParam * GetTrackParamUp () const
 
AliExternalTrackParam * GetTrackParamLow () const
 
AliTPCseed * GetTPCseedUp () const
 
AliTPCseed * GetTPCseedLow () const
 
TTreeSRedirector * GetStreamer () const
 

Private Types

enum  CombineStatus {
  kFailGetTPCseeds =1, kFailNclsMin =2, kFailSwapSeeds =3, kFailLeverArm =4,
  kFailMakeSeed =5, kFailPropagation =6, kFailChi2 =7
}
 

Private Member Functions

 AliTPCCombinedTrackfit (const AliTPCCombinedTrackfit &p)
 
AliTPCCombinedTrackfitoperator= (const AliTPCCombinedTrackfit &p)
 
void IniCombineESDtracks ()
 
Bool_t GetTPCseeds (const AliESDtrack *trk0, const AliESDtrack *trk1)
 
Bool_t CheckNcls ()
 
Bool_t CheckLeverArm ()
 
Bool_t AnaSeeds (Bool_t &kswap)
 
void CombineTPCseeds (Bool_t &kswap)
 
void Update ()
 

Private Attributes

TTreeSRedirector * fStreamer
 ! debug streamer More...
 
Int_t fDebugLevel
 debug level More...
 
AliTPCseed * fSeedUp
 TPC seed of upper track. More...
 
AliTPCseed * fSeedLow
 TPC seed of lower track. More...
 
AliExternalTrackParam * fTrackparUp
 track param of upper track More...
 
AliExternalTrackParam * fTrackparLow
 track param of lower track More...
 
Int_t fStatus
 status for CombineESDtracks/CombineTPCseeds: 0-successful, otherwise fail More...
 
TVector3 fInnerClusterUp
 xyz of the inner most TPC trackpoint of the Upper track More...
 
TVector3 fInnerClusterLow
 xyz of the inner most TPC trackpoint of the Lower track More...
 
Double_t fLeverArm
 transverse difference between upper most and lower most clusters More...
 
Int_t fFitNcls
 number of TPC clusters successful in propagation (mean of the two propagation: upwards and downwards) More...
 
Int_t fMissNcls
 number of TPC clusters fail in propagation (sum of the two propagation) More...
 
Double_t fPreChi2
 Predicted chi2/nfit over the two propagation. More...
 

Static Private Attributes

static const Double_t fgkCutLeverArm = 350
 minimum lever arm 350 ~ 250 * sqrt(2) More...
 
static const Double_t fgkMaxChi2 = 10
 max. chi2/ncls More...
 

Detailed Description

Combine cosmic track pairs (upper, lower) and do track fitting.

Combine cosmic track pairs (upper, lower) and do track fitting

Author
Xianguo Lu lu@ph.nosp@m.ysi..nosp@m.uni-h.nosp@m.eide.nosp@m.lberg.nosp@m..de

Usage

fCombinedTrackfit = new AliTPCCombinedTrackfit(debuglevel, "anystring");
//order not important; will be internally ordered (potinters modified due to &) such that track0 is the upper one
//kfit = kTRUE: good fit, kFALSE: bad fit
const Bool_t kfit = fCombinedTrackfit->CombineESDtracks(esdtrack0, esdtrack1);
//status = 0 for good fit (i.e. kfit=kTRUE), non-0 for bad fit (i.e. kfit=kFALSE), see "enum CombineStatus" definition in header file
const Int_t status = fCombinedTrackfit->GetStatus();
//in Analysis Task write when terminate
fCombinedTrackfit->GetStreamer()->GetFile()->Write();

Debug output

For (debuglevel & 1)==1 && good fit, the following info saved:

(*fStreamer)<<"TrackProp"<<
"Tup.="<<fTrackparUp<< //AliExternalTrackParam at uppermost cluster obtained by upward propagation
"Tlow.="<<fTrackparLow<< //AliExternalTrackParam at lowermost cluster obtained by downward propagation
"icup.="<<&fInnerClusterUp<< //TVector3 position of the innermost cluster of the upper track
"iclow.="<<&fInnerClusterLow<<
"leverarm="<<fLeverArm<<
"ncl="<<fFitNcls<< //number of clusters used in successful propagation
"nmiss="<<fMissNcls<< //number of clusters failed in propagation, should always be 0 in this case.
"chi2="<<fPreChi2<< //chi2/nfit
"momup="<< momup << //momentum at uppermost cluster with upward propagation
"momlow="<< momlow << //momentum at lowermost cluster with downward propagation
"ptup="<< ptup <<
"ptlow="<< ptlow <<
"\n";

For (debuglevel & 2)==1, debug info in AliTPCCosmicUtils::FitKernel saved

Efficiency

For 2011 Feb. cosmic data nch=2 events, the kfit and status look like:

kfit,status ( 0, 1): 68939 / 2611959 = 2.639% //kFailGetTPCseeds
kfit,status ( 0, 2): 14886 / 2611959 = 0.570% //not both tracks have ncl > AliTPCCosmicUtils::fgkNclsMin
kfit,status ( 0, 3): 53185 / 2611959 = 2.036% //clusters in two tracks should be clearly separated in y, i.e. lowest cluster of upper track higher than highest cluster of lower track; otherwise fail
kfit,status ( 0, 4): 39841 / 2611959 = 1.525% //fLeverArm<fgkCutLeverArm
kfit,status ( 0, 6): 12933 / 2611959 = 0.495% //fail in propagation of at least one cluster
kfit,status ( 0, 7): 19994 / 2611959 = 0.765% //chi2/nfit > fgkMaxChi2
kfit,status ( 1, 0): 2402181 / 2611959 = 91.969% //i.e. 92% of nch=2 events are successfully fitted.

Resolution

For muon momentum small than 20 GeV, energy loss in muon filter is visable when compaing fTrackparUp and fTrackparLow; energy loss estimated as 5 MeV/cm. Particle traversing muon filter can be rejected by requiring fInnerClusterUp.fZ > -40 && fInnerClusterLow.fZ > -40 Momentum resolution is estimated by comparing the trackfit result by upward propagation through odd pad rows and that by downward propagation through even pad rows. Number of clusters used in this case is only half of that in normal usage. RMS of log10 p = 0.01 at 10 GeV/c, 0.1 at 100 GeV/c, 0.5 at 1 TeV/c. Muon filter deteriorates momentum resolution by about +0.01 (absolute value).

Author
Xianguo Lu lu@ph.nosp@m.ysi..nosp@m.uni-h.nosp@m.eide.nosp@m.lberg.nosp@m..de

Definition at line 100 of file AliTPCCombinedTrackfit.h.

Member Enumeration Documentation

Enumerator
kFailGetTPCseeds 
kFailNclsMin 
kFailSwapSeeds 
kFailLeverArm 
kFailMakeSeed 
kFailPropagation 
kFailChi2 

Definition at line 130 of file AliTPCCombinedTrackfit.h.

Constructor & Destructor Documentation

AliTPCCombinedTrackfit::AliTPCCombinedTrackfit ( const Int_t  dlev = 0,
const TString  tag = "test" 
)

Constructor

Definition at line 38 of file AliTPCCombinedTrackfit.cxx.

AliTPCCombinedTrackfit::~AliTPCCombinedTrackfit ( )

Destructor

Definition at line 54 of file AliTPCCombinedTrackfit.cxx.

AliTPCCombinedTrackfit::AliTPCCombinedTrackfit ( const AliTPCCombinedTrackfit p)
private

Member Function Documentation

Bool_t AliTPCCombinedTrackfit::AnaSeeds ( Bool_t &  kswap)
private

swap seeds (if necessary) so that (y of fSeedUp) > (y of fSeedLow)

Definition at line 244 of file AliTPCCombinedTrackfit.cxx.

Referenced by CombineTPCseeds().

Bool_t AliTPCCombinedTrackfit::CheckLeverArm ( )
private

if lever arm is too short, no need to use combined track fit. On the other hand, short lever arm from two tracks mostly means they are fake pairs. lever arm extents over one quadrant, e.g. (0,250)-(250,0): 250*sqrt(2)~350

Definition at line 230 of file AliTPCCombinedTrackfit.cxx.

Referenced by CombineTPCseeds().

Bool_t AliTPCCombinedTrackfit::CheckNcls ( )
private

check number of clusters in TPCseed, for too small number MakeSeed will fail

Definition at line 324 of file AliTPCCombinedTrackfit.cxx.

Referenced by CombineTPCseeds().

Bool_t AliTPCCombinedTrackfit::CombineESDtracks ( AliESDtrack *&  trk0,
AliESDtrack *&  trk1 
)

Get TPCseeds from the 2 ESDtracks, swap TPCseeds and ESDTracks (if necessary) according to y (0:upper 1:lower), perform trackfit using TPCseeds if fStatus==0, i.e. combine is successful, swap of the ESDtracks is kept since pointer *& is used

Definition at line 64 of file AliTPCCombinedTrackfit.cxx.

Bool_t AliTPCCombinedTrackfit::CombineTPCseeds ( AliTPCseed *&  seed0,
AliTPCseed *&  seed1 
)

same as AliTPCCombinedTrackfit::CombineESDtracks, except that the seeds are passed in from outside, which can be still unordered if fStatus==0, i.e. combine is successful, swap of the TPCseeds is kept since pointer *& is used

Definition at line 90 of file AliTPCCombinedTrackfit.cxx.

Referenced by CombineESDtracks().

void AliTPCCombinedTrackfit::CombineTPCseeds ( Bool_t &  kswap)
private

do combined trackfit using TPCseeds

Definition at line 159 of file AliTPCCombinedTrackfit.cxx.

Double_t AliTPCCombinedTrackfit::GetChi2PerCluster ( ) const
inline

Definition at line 115 of file AliTPCCombinedTrackfit.h.

Int_t AliTPCCombinedTrackfit::GetFitNcls ( ) const
inline

Definition at line 113 of file AliTPCCombinedTrackfit.h.

TVector3 AliTPCCombinedTrackfit::GetInnerClusterLow ( ) const
inline

Definition at line 118 of file AliTPCCombinedTrackfit.h.

TVector3 AliTPCCombinedTrackfit::GetInnerClusterUp ( ) const
inline

Definition at line 117 of file AliTPCCombinedTrackfit.h.

Double_t AliTPCCombinedTrackfit::GetLeverArm ( ) const
inline

Definition at line 116 of file AliTPCCombinedTrackfit.h.

Int_t AliTPCCombinedTrackfit::GetMissNcls ( ) const
inline

Definition at line 114 of file AliTPCCombinedTrackfit.h.

Int_t AliTPCCombinedTrackfit::GetStatus ( ) const
inline

Definition at line 112 of file AliTPCCombinedTrackfit.h.

TTreeSRedirector* AliTPCCombinedTrackfit::GetStreamer ( ) const
inline

Definition at line 127 of file AliTPCCombinedTrackfit.h.

AliTPCseed* AliTPCCombinedTrackfit::GetTPCseedLow ( ) const
inline

Definition at line 125 of file AliTPCCombinedTrackfit.h.

Bool_t AliTPCCombinedTrackfit::GetTPCseeds ( const AliESDtrack *  trk0,
const AliESDtrack *  trk1 
)
private

Get TPC seeds from ESDfriendTrack

Definition at line 336 of file AliTPCCombinedTrackfit.cxx.

Referenced by CombineESDtracks().

AliTPCseed* AliTPCCombinedTrackfit::GetTPCseedUp ( ) const
inline

Definition at line 124 of file AliTPCCombinedTrackfit.h.

AliExternalTrackParam* AliTPCCombinedTrackfit::GetTrackParamLow ( ) const
inline

Definition at line 123 of file AliTPCCombinedTrackfit.h.

AliExternalTrackParam* AliTPCCombinedTrackfit::GetTrackParamUp ( ) const
inline

Definition at line 122 of file AliTPCCombinedTrackfit.h.

Double_t AliTPCCombinedTrackfit::ImpactParameter ( ) const

calculate the impactparameter from (0,0,0)

Definition at line 122 of file AliTPCCombinedTrackfit.cxx.

void AliTPCCombinedTrackfit::IniCombineESDtracks ( )
private

initialization, for reuse of the same AliTPCCombinedTrackfit instance

Definition at line 145 of file AliTPCCombinedTrackfit.cxx.

Referenced by CombineESDtracks(), and CombineTPCseeds().

Double_t AliTPCCombinedTrackfit::MinPhi ( ) const

the smaller phi of the two tracks w.r.t. horizon

Definition at line 135 of file AliTPCCombinedTrackfit.cxx.

AliTPCCombinedTrackfit& AliTPCCombinedTrackfit::operator= ( const AliTPCCombinedTrackfit p)
private
void AliTPCCombinedTrackfit::Print ( ) const

print out variable values

Definition at line 115 of file AliTPCCombinedTrackfit.cxx.

void AliTPCCombinedTrackfit::Update ( )
private

Update variables depending on the fit result

Definition at line 192 of file AliTPCCombinedTrackfit.cxx.

Referenced by CombineTPCseeds().

Member Data Documentation

Int_t AliTPCCombinedTrackfit::fDebugLevel
private

debug level

Definition at line 153 of file AliTPCCombinedTrackfit.h.

Referenced by AliTPCCombinedTrackfit(), CombineTPCseeds(), and Update().

Int_t AliTPCCombinedTrackfit::fFitNcls
private

number of TPC clusters successful in propagation (mean of the two propagation: upwards and downwards)

Definition at line 166 of file AliTPCCombinedTrackfit.h.

Referenced by CombineTPCseeds(), GetFitNcls(), and Update().

const Double_t AliTPCCombinedTrackfit::fgkCutLeverArm = 350
staticprivate

minimum lever arm 350 ~ 250 * sqrt(2)

Definition at line 170 of file AliTPCCombinedTrackfit.h.

Referenced by CheckLeverArm().

const Double_t AliTPCCombinedTrackfit::fgkMaxChi2 = 10
staticprivate

max. chi2/ncls

Definition at line 171 of file AliTPCCombinedTrackfit.h.

Referenced by Update().

TVector3 AliTPCCombinedTrackfit::fInnerClusterLow
private

xyz of the inner most TPC trackpoint of the Lower track

Definition at line 163 of file AliTPCCombinedTrackfit.h.

Referenced by AliTPCCombinedTrackfit(), AnaSeeds(), GetInnerClusterLow(), ImpactParameter(), Print(), and Update().

TVector3 AliTPCCombinedTrackfit::fInnerClusterUp
private

xyz of the inner most TPC trackpoint of the Upper track

Definition at line 162 of file AliTPCCombinedTrackfit.h.

Referenced by AliTPCCombinedTrackfit(), AnaSeeds(), GetInnerClusterUp(), ImpactParameter(), Print(), and Update().

Double_t AliTPCCombinedTrackfit::fLeverArm
private

transverse difference between upper most and lower most clusters

Definition at line 164 of file AliTPCCombinedTrackfit.h.

Referenced by AnaSeeds(), CheckLeverArm(), GetLeverArm(), Print(), and Update().

Int_t AliTPCCombinedTrackfit::fMissNcls
private

number of TPC clusters fail in propagation (sum of the two propagation)

Definition at line 167 of file AliTPCCombinedTrackfit.h.

Referenced by CombineTPCseeds(), GetMissNcls(), and Update().

Double_t AliTPCCombinedTrackfit::fPreChi2
private

Predicted chi2/nfit over the two propagation.

Definition at line 168 of file AliTPCCombinedTrackfit.h.

Referenced by CombineTPCseeds(), GetChi2PerCluster(), and Update().

AliTPCseed* AliTPCCombinedTrackfit::fSeedLow
private

TPC seed of lower track.

Definition at line 156 of file AliTPCCombinedTrackfit.h.

Referenced by AnaSeeds(), CheckNcls(), CombineTPCseeds(), GetTPCseedLow(), GetTPCseeds(), IniCombineESDtracks(), and Print().

AliTPCseed* AliTPCCombinedTrackfit::fSeedUp
private

TPC seed of upper track.

Definition at line 155 of file AliTPCCombinedTrackfit.h.

Referenced by AnaSeeds(), CheckNcls(), CombineTPCseeds(), GetTPCseeds(), GetTPCseedUp(), IniCombineESDtracks(), and Print().

Int_t AliTPCCombinedTrackfit::fStatus
private

status for CombineESDtracks/CombineTPCseeds: 0-successful, otherwise fail

Definition at line 160 of file AliTPCCombinedTrackfit.h.

Referenced by AnaSeeds(), CheckLeverArm(), CheckNcls(), CombineESDtracks(), CombineTPCseeds(), GetStatus(), GetTPCseeds(), IniCombineESDtracks(), Print(), and Update().

TTreeSRedirector* AliTPCCombinedTrackfit::fStreamer
private

! debug streamer

Definition at line 152 of file AliTPCCombinedTrackfit.h.

Referenced by AliTPCCombinedTrackfit(), CombineTPCseeds(), GetStreamer(), and ~AliTPCCombinedTrackfit().

AliExternalTrackParam* AliTPCCombinedTrackfit::fTrackparLow
private

track param of lower track

Definition at line 158 of file AliTPCCombinedTrackfit.h.

Referenced by CombineTPCseeds(), GetTrackParamLow(), IniCombineESDtracks(), MinPhi(), Update(), and ~AliTPCCombinedTrackfit().

AliExternalTrackParam* AliTPCCombinedTrackfit::fTrackparUp
private

track param of upper track

Definition at line 157 of file AliTPCCombinedTrackfit.h.

Referenced by CombineTPCseeds(), GetTrackParamUp(), IniCombineESDtracks(), MinPhi(), Update(), and ~AliTPCCombinedTrackfit().


The documentation for this class was generated from the following files: