]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/AliTRDparameter.cxx
Adding protected copy constructor and assignment operator
[u/mrichter/AliRoot.git] / TRD / AliTRDparameter.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 /* $Id$ */
17
18 ///////////////////////////////////////////////////////////////////////////////
19 //                                                                           //
20 //  TRD parameter class                                                      //
21 //                                                                           //
22 ///////////////////////////////////////////////////////////////////////////////
23
24 // WARNING: This class is obsolete. As soon as all function calls are replaced, the class will be removed.
25
26 #include <iostream>
27
28 #include "AliRun.h"
29
30 #include "AliTRDparameter.h"
31
32 ClassImp(AliTRDparameter)
33
34 //_____________________________________________________________________________
35 AliTRDparameter::AliTRDparameter():TNamed()
36 {
37   //
38   // AliTRDparameter default constructor
39   //
40
41   fDriftVelocity      = 0.0;
42
43 }
44
45 //_____________________________________________________________________________
46 AliTRDparameter::AliTRDparameter(const Text_t *name, const Text_t *title)
47                 :TNamed(name,title)
48 {
49   //
50   // AliTRDparameter constructor
51   //
52
53   fDriftVelocity      = 0.0;
54   
55   Init();
56
57 }
58
59
60 //_____________________________________________________________________________
61 AliTRDparameter::AliTRDparameter(const AliTRDparameter &p):TNamed(p)
62 {
63   //
64   // AliTRDparameter copy constructor
65   //
66
67   ((AliTRDparameter &) p).Copy(*this);
68
69 }
70
71 ///_____________________________________________________________________________
72 AliTRDparameter::~AliTRDparameter()
73 {
74   //
75   // AliTRDparameter destructor
76   //
77 }
78
79 //_____________________________________________________________________________
80 AliTRDparameter &AliTRDparameter::operator=(const AliTRDparameter &p)
81 {
82   //
83   // Assignment operator
84   //
85
86   if (this != &p) ((AliTRDparameter &) p).Copy(*this);
87   return *this;
88
89 }
90
91 //_____________________________________________________________________________
92 void AliTRDparameter::Copy(TObject &p) const
93 {
94   //
95   // Copy function
96   //
97
98   /*((AliTRDparameter &) p).fDiffusionT         = fDiffusionT;
99   ((AliTRDparameter &) p).fDiffusionL         = fDiffusionL;*/
100   //((AliTRDparameter &) p).fOmegaTau           = fOmegaTau;
101   //((AliTRDparameter &) p).fLorentzFactor      = fLorentzFactor;
102   ((AliTRDparameter &) p).fDriftVelocity      = fDriftVelocity;
103
104
105   /*((AliTRDparameter &) p).fTimeStructOn       = fTimeStructOn;
106   if (((AliTRDparameter &) p).fTimeStruct1) 
107     delete [] ((AliTRDparameter &) p).fTimeStruct1;
108   ((AliTRDparameter &) p).fTimeStruct1 = new Float_t[38*11];
109   for (Int_t i = 0; i < 38*11; i++) {
110     ((AliTRDparameter &) p).fTimeStruct1[i] = fTimeStruct1[i];
111   }
112   if (((AliTRDparameter &) p).fTimeStruct2) 
113     delete [] ((AliTRDparameter &) p).fTimeStruct2;
114   ((AliTRDparameter &) p).fTimeStruct2 = new Float_t[38*11];
115   for (Int_t i = 0; i < 38*11; i++) {
116     ((AliTRDparameter &) p).fTimeStruct2[i] = fTimeStruct2[i];
117   }*/
118
119 }
120
121 //_____________________________________________________________________________
122 void AliTRDparameter::Init()
123 {
124   //
125   // Initializes the parameter
126   //
127
128
129
130   //
131   // ----------------------------------------------------------------------------
132   // The digitization parameters
133   // ----------------------------------------------------------------------------
134   //
135
136   // The drift velocity (in drift region) and the time structure of the
137   // drift cells. Default is 1.5 cm/mus
138   fDriftVelocity = 1.5;
139
140   // Additional time bins before and after the drift region.
141   // Default is to only sample the drift region
142   fTimeMax = 22;
143   SetExpandTimeBin(0,0);
144
145   //
146   // ----------------------------------------------------------------------------
147   // The clusterization parameter
148   // ----------------------------------------------------------------------------
149   //
150
151   ReInit();
152
153 }
154
155 //_____________________________________________________________________________
156 void AliTRDparameter::ReInit()
157 {
158   //
159   // Reinitializes the parameter class after a change
160   //
161 }
162
163
164 //_____________________________________________________________________________
165 void AliTRDparameter::PrintDriftVelocity()
166 {
167   //
168   // Prints the used drift velocity
169   //
170
171   printf("<AliTRDparameter::PrintDriftVelocity> Driftvelocity = %.3f\n"
172         ,fDriftVelocity);
173
174 }