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.3 2006/03/28 14:56:48 arcelli
19 updates to handle new V5 geometry & some re-arrangements
21 Revision 1.2 2006/02/13 17:22:26 arcelli
24 Revision 1.1 2006/02/13 16:10:48 arcelli
25 Add classes for TOF Calibration (C.Zampolli)
27 author: Chiara Zampolli, zampolli@bo.infn.it
30 ///////////////////////////////////////////////////////////////////////////////
32 // class for TOF calibration : array of AliTOFChannels //
34 ///////////////////////////////////////////////////////////////////////////////
41 #include "AliTOFGeometryV5.h"
42 #include "AliTOFCalSector.h"
43 #include "AliTOFCal.h"
44 #include "AliTOFChannel.h"
50 //________________________________________________________________
52 AliTOFCal::AliTOFCal():TObject(){
64 gROOT->GetListOfBrowsables()->Add(this);
66 //________________________________________________________________
68 AliTOFCal::AliTOFCal(AliTOFGeometry *geom):TObject(){
71 fNSector = fGeom->NSectors();
72 fNPlate = fGeom->NPlates();
73 fNStripA = fGeom->NStripA();
74 fNStripB = fGeom->NStripB();
75 fNStripC = fGeom->NStripC();
76 fNpadZ = fGeom->NpadZ();
77 fNpadX = fGeom->NpadX();
78 fnpad = fNSector*(2*(fNStripC+fNStripB)+fNStripA)*fNpadZ*fNpadX;
80 gROOT->GetListOfBrowsables()->Add(this);
82 //________________________________________________________________
84 AliTOFCal::AliTOFCal(const AliTOFCal& cal):
88 fNSector = cal.fNSector;
89 fNPlate = cal.fNPlate;
90 fNStripA = cal.fNStripA;
91 fNStripB = cal.fNStripB;
92 fNStripC = cal.fNStripC;
96 for (Int_t i = 0; i<fnpad; i++){
97 fPads[i]=cal.fPads[i];
99 gROOT->GetListOfBrowsables()->Add(this);
101 //____________________________________________________________________________
102 AliTOFCal::~AliTOFCal()
105 gROOT->GetListOfBrowsables()->Remove(this);
108 //________________________________________________________________
110 void AliTOFCal::Browse(TBrowser *b)
112 //add cal obj to list of browsables
114 for(Int_t i=0; i<fNSector; ++i) {
115 snprintf(name,sizeof(name),"Sector %2.2d",i);
116 b->Add(new AliTOFCalSector(&fPads[i*fnpad/fNSector]),name);
119 //________________________________________________________________
121 void AliTOFCal::CreateArray(){
122 //create cal channel array
124 AliInfo("V5 TOF Geometry is taken as a default");
125 AliTOFGeometry *geom= new AliTOFGeometryV5();
126 fNSector = geom->NSectors();
127 fNPlate = geom->NPlates();
128 fNStripA = geom->NStripA();
129 fNStripB = geom->NStripB();
130 fNStripC = geom->NStripC();
131 fNpadZ = geom->NpadZ();
132 fNpadX = geom->NpadX();
133 fnpad = fNSector*(2*(fNStripC+fNStripB)+fNStripA)*fNpadZ*fNpadX;
136 fPads= new AliTOFChannel[fnpad];