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.2 2006/02/13 17:22:26 arcelli
21 Revision 1.1 2006/02/13 16:10:48 arcelli
22 Add classes for TOF Calibration (C.Zampolli)
24 author: Chiara Zampolli, zampolli@bo.infn.it
27 ///////////////////////////////////////////////////////////////////////////////
29 // class for TOF calibration : array of AliTOFChannels //
31 ///////////////////////////////////////////////////////////////////////////////
38 #include "AliTOFGeometryV5.h"
39 #include "AliTOFCalSector.h"
40 #include "AliTOFCal.h"
41 #include "AliTOFChannel.h"
47 //________________________________________________________________
49 AliTOFCal::AliTOFCal():TObject(){
60 gROOT->GetListOfBrowsables()->Add(this);
62 //________________________________________________________________
64 AliTOFCal::AliTOFCal(AliTOFGeometry *geom):TObject(){
66 fNSector = fGeom->NSectors();
67 fNPlate = fGeom->NPlates();
68 fNStripA = fGeom->NStripA();
69 fNStripB = fGeom->NStripB();
70 fNStripC = fGeom->NStripC();
71 fNpadZ = fGeom->NpadZ();
72 fNpadX = fGeom->NpadX();
73 fnpad = fNSector*(2*(fNStripC+fNStripB)+fNStripA)*fNpadZ*fNpadX;
75 gROOT->GetListOfBrowsables()->Add(this);
77 //________________________________________________________________
79 AliTOFCal::AliTOFCal(const AliTOFCal& cal):
82 fNSector = cal.fNSector;
83 fNPlate = cal.fNPlate;
84 fNStripA = cal.fNStripA;
85 fNStripB = cal.fNStripB;
86 fNStripC = cal.fNStripC;
90 for (Int_t i = 0; i<fnpad; i++){
91 fPads[i]=cal.fPads[i];
93 gROOT->GetListOfBrowsables()->Add(this);
95 //____________________________________________________________________________
96 AliTOFCal::~AliTOFCal()
98 gROOT->GetListOfBrowsables()->Remove(this);
101 //________________________________________________________________
103 void AliTOFCal::Browse(TBrowser *b)
106 for(Int_t i=0; i<fNSector; ++i) {
107 snprintf(name,sizeof(name),"Sector %2.2d",i);
108 b->Add(new AliTOFCalSector(&fPads[i*fnpad/fNSector]),name);
111 //________________________________________________________________
113 void AliTOFCal::CreateArray(){
115 AliInfo("V5 TOF Geometry is taken as a default");
116 AliTOFGeometry *geom= new AliTOFGeometryV5();
117 fNSector = geom->NSectors();
118 fNPlate = geom->NPlates();
119 fNStripA = geom->NStripA();
120 fNStripB = geom->NStripB();
121 fNStripC = geom->NStripC();
122 fNpadZ = geom->NpadZ();
123 fNpadX = geom->NpadX();
124 fnpad = fNSector*(2*(fNStripC+fNStripB)+fNStripA)*fNpadZ*fNpadX;
127 fPads= new AliTOFChannel[fnpad];