]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/comp/AliL3ModelTrack.cxx
Example how to run script
[u/mrichter/AliRoot.git] / HLT / comp / AliL3ModelTrack.cxx
1 //$Id$
2
3 // Author: Anders Vestbo <mailto:vestbo$fi.uib.no>
4 //*-- Copyright &copy ASV
5
6 #include <stream.h>
7 #include <string.h>
8
9 #include "AliL3ModelTrack.h"
10 #include "AliL3Defs.h"
11
12 ClassImp(AliL3ModelTrack)
13
14 AliL3ModelTrack::AliL3ModelTrack()
15 {
16   fNClusters = 0;
17   fClusters = 0;
18   fOverlap = -1;
19   fPad=0;
20   fTime=0;
21   fClusterCharge=0;
22 }
23
24
25 AliL3ModelTrack::~AliL3ModelTrack()
26 {
27   if(fClusters)
28     delete [] fClusters;
29   if(fPad)
30     delete [] fPad;
31   if(fTime)
32     delete [] fTime;
33 }
34
35 void AliL3ModelTrack::Init(Int_t slice,Int_t patch)
36 {
37   fNClusters = 0;
38   Int_t nrows = NumRows[patch];
39   fClusters = new ClusterComp[nrows];
40   memset((void*)fClusters,0,nrows*sizeof(ClusterComp));
41   
42   fPad = new Float_t[NRowsSlice];
43   fTime = new Float_t[NRowsSlice];
44   
45   fClusterCharge = 100;
46   
47 }
48
49
50 void AliL3ModelTrack::SetCluster(Float_t fpad,Float_t ftime,Float_t charge,Float_t sigmaY2,Float_t sigmaZ2)
51 {
52   ClusterComp *cl = &fClusters[fNClusters];
53   if(!charge)
54     cl->fEmpty = kTRUE;
55   else
56     {
57       cl->fEmpty = kFALSE;
58       cl->fDTime = ftime - GetTimeHit(fNClusters);
59       cl->fDPad = fpad - GetPadHit(fNClusters);
60       cl->fDCharge = charge - fClusterCharge;
61     }
62   cout<<"DPad "<<fpad<<" dtime "<<ftime<<" charge "<<charge<<" sigmaY2 "<<sigmaY2<<" sigmaZ2 "<<sigmaZ2<<endl;
63   fNClusters++;
64 }
65