1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
18 Revision 1.6 2006/04/20 22:30:49 hristov
19 Coding conventions (Annalisa)
21 Revision 1.5 2006/04/16 22:29:05 hristov
22 Coding conventions (Annalisa)
24 Revision 1.4 2006/04/05 08:35:38 hristov
25 Coding conventions (S.Arcelli, C.Zampolli)
27 Revision 1.3 2006/03/28 14:56:48 arcelli
28 updates to handle new V5 geometry & some re-arrangements
30 Revision 1.2 2006/02/13 17:22:26 arcelli
33 Revision 1.1 2006/02/13 16:10:48 arcelli
34 Add classes for TOF Calibration (C.Zampolli)
36 author: Chiara Zampolli, zampolli@bo.infn.it
39 ///////////////////////////////////////////////////////////////////////////////
41 // class for TOF calibration : array of AliTOFChannels //
43 ///////////////////////////////////////////////////////////////////////////////
50 #include "AliTOFCalSector.h"
51 #include "AliTOFCal.h"
52 #include "AliTOFGeometryV5.h"
58 //________________________________________________________________
60 AliTOFCal::AliTOFCal():
74 gROOT->GetListOfBrowsables()->Add(this);
76 //________________________________________________________________
78 AliTOFCal::AliTOFCal(AliTOFGeometry *geom):
92 fNSector = fGeom->NSectors();
93 fNPlate = fGeom->NPlates();
94 fNStripA = fGeom->NStripA();
95 fNStripB = fGeom->NStripB();
96 fNStripC = fGeom->NStripC();
97 fNpadZ = fGeom->NpadZ();
98 fNpadX = fGeom->NpadX();
99 fnpad = fNSector*(2*(fNStripC+fNStripB)+fNStripA)*fNpadZ*fNpadX;
100 gROOT->GetListOfBrowsables()->Add(this);
102 //________________________________________________________________
104 AliTOFCal::AliTOFCal(const AliTOFCal& cal):
118 fNSector = cal.fNSector;
119 fNPlate = cal.fNPlate;
120 fNStripA = cal.fNStripA;
121 fNStripB = cal.fNStripB;
122 fNStripC = cal.fNStripC;
126 for (Int_t i = 0; i<fnpad; i++){
127 fPads[i]=cal.fPads[i];
129 gROOT->GetListOfBrowsables()->Add(this);
131 //____________________________________________________________________________
132 AliTOFCal& AliTOFCal::operator=(const AliTOFCal& cal)
134 //assignment operator
135 this->fNSector = cal.fNSector;
136 this->fNPlate = cal.fNPlate;
137 this->fNStripA = cal.fNStripA;
138 this->fNStripB = cal.fNStripB;
139 this->fNStripC = cal.fNStripC;
140 this->fNpadZ = cal.fNpadZ;
141 this->fNpadX = cal.fNpadX;
142 this->fnpad = cal.fnpad;
143 for (Int_t i = 0; i<fnpad; i++){
144 this->fPads[i]=cal.fPads[i];
149 //____________________________________________________________________________
150 AliTOFCal::~AliTOFCal()
153 gROOT->GetListOfBrowsables()->Remove(this);
156 //________________________________________________________________
158 void AliTOFCal::Browse(TBrowser *b)
160 //add cal obj to list of browsables
162 for(Int_t i=0; i<fNSector; ++i) {
163 snprintf(name,sizeof(name),"Sector %2.2d",i);
164 b->Add(new AliTOFCalSector(&fPads[i*fnpad/fNSector]),name);
167 //________________________________________________________________
169 void AliTOFCal::CreateArray(){
170 //create cal channel array
172 AliInfo("V5 TOF Geometry is taken as a default");
173 AliTOFGeometry *geom= new AliTOFGeometryV5();
174 fNSector = geom->NSectors();
175 fNPlate = geom->NPlates();
176 fNStripA = geom->NStripA();
177 fNStripB = geom->NStripB();
178 fNStripC = geom->NStripC();
179 fNpadZ = geom->NpadZ();
180 fNpadX = geom->NpadX();
181 fnpad = fNSector*(2*(fNStripC+fNStripB)+fNStripA)*fNpadZ*fNpadX;
184 fPads= new AliTOFChannel[fnpad];