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.4 2006/04/05 08:35:38 hristov
19 Coding conventions (S.Arcelli, C.Zampolli)
21 Revision 1.3 2006/03/28 14:58:16 arcelli
22 updates to handle new V5 geometry & some re-arrangements
24 Revision 1.2 2006/02/13 16:53:00 decaro
27 Revision 1.1 2006/02/13 16:10:48 arcelli
28 Add classes for TOF Calibration (C.Zampolli)
30 author: Chiara Zampolli, zampolli@bo.infn.it
33 ///////////////////////////////////////////////////////////////////////////////
35 // class for TOF calibration : Sectors //
37 ///////////////////////////////////////////////////////////////////////////////
44 #include "AliTOFGeometryV5.h"
45 #include "AliTOFCalPlateA.h"
46 #include "AliTOFCalPlateB.h"
47 #include "AliTOFCalPlateC.h"
48 #include "AliTOFCalSector.h"
49 #include "AliTOFChannel.h"
53 ClassImp(AliTOFCalSector)
55 //________________________________________________________________
57 AliTOFCalSector::AliTOFCalSector(){
67 gROOT->GetListOfBrowsables()->Add(this);
70 //________________________________________________________________
72 AliTOFCalSector::AliTOFCalSector(AliTOFChannel *ch):
83 gROOT->GetListOfBrowsables()->Add(this);
85 //________________________________________________________________
87 AliTOFCalSector::AliTOFCalSector(AliTOFGeometry *geom){
91 fNPlate = fGeom->NPlates();
92 fNStripA = fGeom->NStripA();
93 fNStripB = fGeom->NStripB();
94 fNStripC = fGeom->NStripC();
95 fNpadZ = fGeom->NpadZ();
96 fNpadX = fGeom->NpadX();
97 gROOT->GetListOfBrowsables()->Add(this);
100 //________________________________________________________________
102 AliTOFCalSector::AliTOFCalSector(AliTOFGeometry *geom,AliTOFChannel *ch):
105 // ctor with channel and geom
107 fNPlate = fGeom->NPlates();
108 fNStripA = fGeom->NStripA();
109 fNStripB = fGeom->NStripB();
110 fNStripC = fGeom->NStripC();
111 fNpadZ = fGeom->NpadZ();
112 fNpadX = fGeom->NpadX();
113 gROOT->GetListOfBrowsables()->Add(this);
115 //________________________________________________________________
117 AliTOFCalSector::AliTOFCalSector(const AliTOFCalSector& sec):
122 fNPlate = sec.fNPlate;
123 fNStripA = sec.fNStripA;
124 fNStripB = sec.fNStripB;
125 fNStripC = sec.fNStripC;
128 gROOT->GetListOfBrowsables()->Add(this);
130 //________________________________________________________________
132 AliTOFCalSector& AliTOFCalSector::operator=(const AliTOFCalSector& sec)
134 //assignment operator
136 this->fNPlate = sec.fNPlate;
137 this->fNStripA = sec.fNStripA;
138 this->fNStripB = sec.fNStripB;
139 this->fNStripC = sec.fNStripC;
140 this->fNpadZ = sec.fNpadZ;
141 this->fNpadX = sec.fNpadX;
142 gROOT->GetListOfBrowsables()->Add(this);
146 //________________________________________________________________
148 AliTOFCalSector::~AliTOFCalSector()
151 gROOT->GetListOfBrowsables()->Remove(this);
155 //________________________________________________________________
157 void AliTOFCalSector::Browse(TBrowser *b){
158 //add cal obj to list of browsables
160 AliTOFGeometry *geom= new AliTOFGeometryV5();
161 AliInfo("V5 TOF Geometry is taken as the default");
162 fNPlate = geom->NPlates();
163 fNStripA = geom->NStripA();
164 fNStripB = geom->NStripB();
165 fNStripC = geom->NStripC();
166 fNpadZ = geom->NpadZ();
167 fNpadX = geom->NpadX();
170 b->Add(new AliTOFCalPlateC(fCh), "Plate0");
171 b->Add(new AliTOFCalPlateB(&fCh[fNStripC*96]),"Plate1");
172 b->Add(new AliTOFCalPlateA(&fCh[(fNStripC+fNStripB)*fNpadZ*fNpadX]),"Plate2");
173 b->Add(new AliTOFCalPlateB(&fCh[(fNStripC+2*fNStripB)*fNpadZ*fNpadX]),"Plate3");
174 b->Add(new AliTOFCalPlateC(&fCh[2*(fNStripC+fNStripB)*fNpadZ*fNpadX]),"Plate4");