]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/ESD/AliESDFIT.cxx
changes for FIT
[u/mrichter/AliRoot.git] / STEER / ESD / AliESDFIT.cxx
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
4  * Author: The ALICE Off-line Project.                                    *
5  * Contributors are mentioned in the code where appropriate.              *
6  *                                                                        *
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  **************************************************************************/
15
16 //-------------------------------------------------------------------------
17 //                        Implemenation Class AliESDFIT
18 //   This is a class that summarizes the FIT data for the ESD   
19 //   Origin: Alla Maevskaya Alla.Maevskaya@cern.ch 
20 //-------------------------------------------------------------------------
21
22
23
24 #include "AliESDFIT.h"
25 #include "AliLog.h"
26
27
28 ClassImp(AliESDFIT)
29
30 //______________________________________________________________________________
31 AliESDFIT::AliESDFIT() :
32   TObject(),
33   fFITzVertex(0)
34 {
35   for(int i = 0; i<160; i++) {
36     fFITtime[i] = -99999;
37     fFITamplitude[i] = 0;
38   }
39   
40   for(int i = 0;i<3;i++) {
41     fT0[i] = -99999;
42     fT0best[i] = -99999;
43   }
44 }
45 //______________________________________________________________________________
46 AliESDFIT::AliESDFIT(const AliESDFIT &tzero ) :
47   TObject(tzero),  
48   fFITzVertex(tzero.fFITzVertex)
49  {
50   // copy constuctor
51   for(int i = 0;i<3;i++) {
52     fT0[i] = tzero.fT0[i];
53     fT0best[i] = tzero.fT0best[i];
54   }
55 }
56 //______________________________________________________________________________
57 AliESDFIT& AliESDFIT::operator=(const AliESDFIT& tzero){
58   // assigmnent operator
59   if(this!=&tzero) {
60     TObject::operator=(tzero);
61       fFITzVertex = tzero.fFITzVertex;
62      for(int i = 0;i<3;i++) {
63       fT0[i] = tzero.fT0[i];
64       fT0best[i] = tzero.fT0best[i];
65     }
66
67    for(int i=0; i<160; i++){
68       fFITtime[i] = tzero.fFITtime[i]; 
69       fFITamplitude[i] = tzero.fFITamplitude[i];
70      }
71    }
72    
73   return *this;
74 }
75 //______________________________________________________________________________
76 void AliESDFIT::Copy(TObject &obj) const {
77   
78   // this overwrites the virtual TOBject::Copy()
79   // to allow run time copying without casting
80   // in AliESDEvent
81
82   if(this==&obj)return;
83   AliESDFIT *robj = dynamic_cast<AliESDFIT*>(&obj);
84   if(!robj)return; // not an AliESDFIT
85   *robj = *this;
86
87 }
88
89
90 //______________________________________________________________________________
91 void AliESDFIT::Reset()
92 {
93   // reset contents
94   fFITzVertex = -9999;  
95   for(int i=0; i<160; i++) {
96     fFITtime[i] = fFITamplitude[i] =  0;
97   }
98   for(int i = 0;i<3;i++) {
99     fT0[i] = -9999;
100     fT0best[i] = -9999;
101   }
102 }
103
104 //______________________________________________________________________________
105 void AliESDFIT::Print(const Option_t *) const
106 {
107   // does noting fornow
108   AliInfo(Form(" Vertex %f  T0signal %f ns OrA %f ns OrC %f \n",fFITzVertex,  fT0[0],fT0[1],fT0[2]));
109
110 }