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:58:16 arcelli
28 updates to handle new V5 geometry & some re-arrangements
30 Revision 1.2 2006/02/13 16:53:00 decaro
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 : Sectors //
43 ///////////////////////////////////////////////////////////////////////////////
50 #include "AliTOFCalPlateA.h"
51 #include "AliTOFCalPlateB.h"
52 #include "AliTOFCalPlateC.h"
53 #include "AliTOFCalSector.h"
54 #include "AliTOFChannel.h"
55 #include "AliTOFGeometryV5.h"
59 ClassImp(AliTOFCalSector)
61 //________________________________________________________________
63 AliTOFCalSector::AliTOFCalSector():
74 gROOT->GetListOfBrowsables()->Add(this);
77 //________________________________________________________________
79 AliTOFCalSector::AliTOFCalSector(AliTOFChannel *ch):
90 gROOT->GetListOfBrowsables()->Add(this);
92 //________________________________________________________________
94 AliTOFCalSector::AliTOFCalSector(AliTOFGeometry *geom):
105 fNPlate = fGeom->NPlates();
106 fNStripA = fGeom->NStripA();
107 fNStripB = fGeom->NStripB();
108 fNStripC = fGeom->NStripC();
109 fNpadZ = fGeom->NpadZ();
110 fNpadX = fGeom->NpadX();
111 gROOT->GetListOfBrowsables()->Add(this);
114 //________________________________________________________________
116 AliTOFCalSector::AliTOFCalSector(AliTOFGeometry *geom,AliTOFChannel *ch):
126 // ctor with channel and geom
127 fNPlate = fGeom->NPlates();
128 fNStripA = fGeom->NStripA();
129 fNStripB = fGeom->NStripB();
130 fNStripC = fGeom->NStripC();
131 fNpadZ = fGeom->NpadZ();
132 fNpadX = fGeom->NpadX();
133 gROOT->GetListOfBrowsables()->Add(this);
135 //________________________________________________________________
137 AliTOFCalSector::AliTOFCalSector(const AliTOFCalSector& sec):
150 fNPlate = sec.fNPlate;
151 fNStripA = sec.fNStripA;
152 fNStripB = sec.fNStripB;
153 fNStripC = sec.fNStripC;
156 gROOT->GetListOfBrowsables()->Add(this);
158 //________________________________________________________________
160 AliTOFCalSector& AliTOFCalSector::operator=(const AliTOFCalSector& sec)
162 //assignment operator
164 this->fNPlate = sec.fNPlate;
165 this->fNStripA = sec.fNStripA;
166 this->fNStripB = sec.fNStripB;
167 this->fNStripC = sec.fNStripC;
168 this->fNpadZ = sec.fNpadZ;
169 this->fNpadX = sec.fNpadX;
170 gROOT->GetListOfBrowsables()->Add(this);
174 //________________________________________________________________
176 AliTOFCalSector::~AliTOFCalSector()
179 gROOT->GetListOfBrowsables()->Remove(this);
183 //________________________________________________________________
185 void AliTOFCalSector::Browse(TBrowser *b){
186 //add cal obj to list of browsables
188 AliTOFGeometry *geom= new AliTOFGeometryV5();
189 AliInfo("V5 TOF Geometry is taken as the default");
190 fNPlate = geom->NPlates();
191 fNStripA = geom->NStripA();
192 fNStripB = geom->NStripB();
193 fNStripC = geom->NStripC();
194 fNpadZ = geom->NpadZ();
195 fNpadX = geom->NpadX();
198 b->Add(new AliTOFCalPlateC(fCh), "Plate0");
199 b->Add(new AliTOFCalPlateB(&fCh[fNStripC*96]),"Plate1");
200 b->Add(new AliTOFCalPlateA(&fCh[(fNStripC+fNStripB)*fNpadZ*fNpadX]),"Plate2");
201 b->Add(new AliTOFCalPlateB(&fCh[(fNStripC+2*fNStripB)*fNpadZ*fNpadX]),"Plate3");
202 b->Add(new AliTOFCalPlateC(&fCh[2*(fNStripC+fNStripB)*fNpadZ*fNpadX]),"Plate4");