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.5 2006/04/16 22:29:05 hristov
19 Coding conventions (Annalisa)
21 Revision 1.4 2006/04/05 08:35:38 hristov
22 Coding conventions (S.Arcelli, C.Zampolli)
24 Revision 1.3 2006/03/28 14:58:16 arcelli
25 updates to handle new V5 geometry & some re-arrangements
27 Revision 1.2 2006/02/13 16:53:00 decaro
30 Revision 1.1 2006/02/13 16:10:48 arcelli
31 Add classes for TOF Calibration (C.Zampolli)
33 author: Chiara Zampolli, zampolli@bo.infn.it
36 ///////////////////////////////////////////////////////////////////////////////
38 // class for TOF calibration : Sectors //
40 ///////////////////////////////////////////////////////////////////////////////
47 #include "AliTOFCalPlateA.h"
48 #include "AliTOFCalPlateB.h"
49 #include "AliTOFCalPlateC.h"
50 #include "AliTOFCalSector.h"
51 #include "AliTOFChannel.h"
52 #include "AliTOFGeometryV5.h"
56 ClassImp(AliTOFCalSector)
58 //________________________________________________________________
60 AliTOFCalSector::AliTOFCalSector(){
70 gROOT->GetListOfBrowsables()->Add(this);
73 //________________________________________________________________
75 AliTOFCalSector::AliTOFCalSector(AliTOFChannel *ch):
86 gROOT->GetListOfBrowsables()->Add(this);
88 //________________________________________________________________
90 AliTOFCalSector::AliTOFCalSector(AliTOFGeometry *geom){
94 fNPlate = fGeom->NPlates();
95 fNStripA = fGeom->NStripA();
96 fNStripB = fGeom->NStripB();
97 fNStripC = fGeom->NStripC();
98 fNpadZ = fGeom->NpadZ();
99 fNpadX = fGeom->NpadX();
100 gROOT->GetListOfBrowsables()->Add(this);
103 //________________________________________________________________
105 AliTOFCalSector::AliTOFCalSector(AliTOFGeometry *geom,AliTOFChannel *ch):
108 // ctor with channel and geom
110 fNPlate = fGeom->NPlates();
111 fNStripA = fGeom->NStripA();
112 fNStripB = fGeom->NStripB();
113 fNStripC = fGeom->NStripC();
114 fNpadZ = fGeom->NpadZ();
115 fNpadX = fGeom->NpadX();
116 gROOT->GetListOfBrowsables()->Add(this);
118 //________________________________________________________________
120 AliTOFCalSector::AliTOFCalSector(const AliTOFCalSector& sec):
125 fNPlate = sec.fNPlate;
126 fNStripA = sec.fNStripA;
127 fNStripB = sec.fNStripB;
128 fNStripC = sec.fNStripC;
131 gROOT->GetListOfBrowsables()->Add(this);
133 //________________________________________________________________
135 AliTOFCalSector& AliTOFCalSector::operator=(const AliTOFCalSector& sec)
137 //assignment operator
139 this->fNPlate = sec.fNPlate;
140 this->fNStripA = sec.fNStripA;
141 this->fNStripB = sec.fNStripB;
142 this->fNStripC = sec.fNStripC;
143 this->fNpadZ = sec.fNpadZ;
144 this->fNpadX = sec.fNpadX;
145 gROOT->GetListOfBrowsables()->Add(this);
149 //________________________________________________________________
151 AliTOFCalSector::~AliTOFCalSector()
154 gROOT->GetListOfBrowsables()->Remove(this);
158 //________________________________________________________________
160 void AliTOFCalSector::Browse(TBrowser *b){
161 //add cal obj to list of browsables
163 AliTOFGeometry *geom= new AliTOFGeometryV5();
164 AliInfo("V5 TOF Geometry is taken as the default");
165 fNPlate = geom->NPlates();
166 fNStripA = geom->NStripA();
167 fNStripB = geom->NStripB();
168 fNStripC = geom->NStripC();
169 fNpadZ = geom->NpadZ();
170 fNpadX = geom->NpadX();
173 b->Add(new AliTOFCalPlateC(fCh), "Plate0");
174 b->Add(new AliTOFCalPlateB(&fCh[fNStripC*96]),"Plate1");
175 b->Add(new AliTOFCalPlateA(&fCh[(fNStripC+fNStripB)*fNpadZ*fNpadX]),"Plate2");
176 b->Add(new AliTOFCalPlateB(&fCh[(fNStripC+2*fNStripB)*fNpadZ*fNpadX]),"Plate3");
177 b->Add(new AliTOFCalPlateC(&fCh[2*(fNStripC+fNStripB)*fNpadZ*fNpadX]),"Plate4");