]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/UPGRADE/AliITSUTrackHyp.cxx
reco update: methods for smoothing, track hypotheses container added
[u/mrichter/AliRoot.git] / ITS / UPGRADE / AliITSUTrackHyp.cxx
1 #include "AliITSUTrackHyp.h"
2
3 ClassImp(AliITSUTrackHyp)
4
5
6
7 //__________________________________________________________________
8 AliITSUTrackHyp::AliITSUTrackHyp(Int_t nlr) 
9 : fNLayers(nlr)
10   ,fESDSeed(0)
11   ,fLayerSeeds(0)
12 {
13   // def. c-tor
14   if (fNLayers>0) fLayerSeeds = new TObjArray[fNLayers];
15 }
16
17 //__________________________________________________________________
18 AliITSUTrackHyp::~AliITSUTrackHyp() 
19 {
20   // d-tor
21   delete[] fLayerSeeds;
22 }
23
24 //__________________________________________________________________
25 AliITSUTrackHyp::AliITSUTrackHyp(const AliITSUTrackHyp &src)
26   : TObject(src)
27   , fNLayers(src.fNLayers)
28   , fESDSeed(src.fESDSeed)
29   , fLayerSeeds(0)
30 {
31   // copy c-tor
32   if (fNLayers>0) {
33     fLayerSeeds = new TObjArray[fNLayers];
34     for (int ilr=fNLayers;ilr--;) {
35       int ns = src.GetNSeeds(ilr);
36       for (int isd=0;isd<ns;isd++) {
37         AliITSUSeed* sd = src.GetSeed(ilr,isd);
38         if (sd->IsKilled()) continue;
39         AddSeed(sd,ilr);
40       }      
41     }
42   }
43   //
44 }
45
46 //__________________________________________________________________
47 AliITSUTrackHyp &AliITSUTrackHyp::operator=(const AliITSUTrackHyp &src)
48 {
49   // copy 
50   if (this == &src) return *this;
51   this->~AliITSUTrackHyp();
52   new(this) AliITSUTrackHyp(src);
53   return *this;
54   //
55 }
56
57 //__________________________________________________________________
58 void AliITSUTrackHyp::Print(Option_t* ) const
59 {
60   printf("Track Hyp.#%4d. NSeeds:",GetUniqueID());
61   for (int i=0;i<fNLayers;i++) printf(" (%d) %3d",i,GetNSeeds(i)); printf("\n");
62 }