1 #ifndef ALIITSUTRACKHYP_H
2 #define ALIITSUTRACKHYP_H
6 #include "AliKalmanTrack.h"
7 #include "AliITSUSeed.h"
11 // Container for track hypotheses
13 class AliITSUTrackHyp: public AliKalmanTrack
17 AliITSUTrackHyp(Int_t nlr=0);
18 AliITSUTrackHyp(const AliITSUTrackHyp& src);
19 AliITSUTrackHyp &operator=(const AliITSUTrackHyp &src);
20 virtual ~AliITSUTrackHyp();
22 void InitFrom(const AliITSUTrackHyp *src);
23 Int_t GetNLayers() const {return fNLayers;}
24 Int_t GetNSeeds(Int_t lr) const {return fLayerSeeds[lr].GetEntriesFast();}
25 AliITSUSeed* GetSeed(Int_t lr, Int_t id) const {return (AliITSUSeed*)fLayerSeeds[lr].UncheckedAt(id);}
26 AliITSUSeed* RemoveSeed(Int_t lr, Int_t id) const {return (AliITSUSeed*)fLayerSeeds[lr].RemoveAt(id);}
27 AliITSUSeed* GetWinner() const;
28 AliESDtrack* GetESDTrack() const {return fESDTrack;}
29 Int_t GetITSLabel() const {return fITSLabel;}
30 AliITSUSeed* DefineWinner(Int_t lr=0, Int_t id=0);
31 void SetWinner(AliITSUSeed* w) {fWinner = w;}
32 const TObjArray* GetLayerSeeds(Int_t lr) const {return lr<fNLayers ? &fLayerSeeds[lr] : 0;}
33 void AddSeed(AliITSUSeed* seed, Int_t lr);
34 void SetESDTrack(AliESDtrack* esdtr) {fESDTrack = esdtr;}
35 void SetITSLabel(Int_t lb) {fITSLabel=lb;}
36 Int_t FetchClusterInfo(Int_t* clIDarr) const;
38 void SetChi2(Double_t chi2) {fChi2 = chi2;}
39 Double_t Update(const AliCluster* c);
40 AliExternalTrackParam* GetTPCSeed() const {return fTPCSeed;}
41 void SetTPCSeed(AliExternalTrackParam* seed) {fTPCSeed = seed;}
43 virtual Double_t GetPredictedChi2(const AliCluster *c) const;
44 virtual Bool_t PropagateTo(Double_t xr, Double_t x0, Double_t rho);
45 virtual Bool_t Update(const AliCluster* c, Double_t chi2, Int_t index);
46 virtual Int_t GetNumberOfClusters() const;
47 virtual Int_t GetClusterIndex(Int_t ind) const;
48 // virtual Int_t GetTrackletIndex(Int_t) const { return -1;}
49 virtual Double_t GetPIDsignal() const { return 0;}
51 virtual void Print(Option_t* option = "") const;
53 Bool_t GetSkip() const {return TestBit(kSkip);}
54 void SetSkip(Bool_t v=kTRUE) {SetBit(kSkip,v);}
57 UChar_t fNLayers; // number of layers
58 Int_t fITSLabel; // ITS MC Label, the global one (wrt TPC) is fLab
59 AliESDtrack* fESDTrack; // reference esd track
60 AliITSUSeed* fWinner; // winner seed
61 AliExternalTrackParam* fTPCSeed; // kinematics of TPC track at outer radius
62 TObjArray* fLayerSeeds; // seeds of given layer
64 ClassDef(AliITSUTrackHyp,1)
67 //___________________________________________________________________
68 inline void AliITSUTrackHyp::AddSeed(AliITSUSeed* seed, Int_t lr)
70 // add seed to hypothesis
71 fLayerSeeds[lr].AddLast(seed);
72 AliITSUSeed* par = (AliITSUSeed*)seed->GetParent();
73 if (par) par->IncChildren();