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.1 2006/02/13 16:10:48 arcelli
19 Add classes for TOF Calibration (C.Zampolli)
21 author: Chiara Zampolli, zampolli@bo.infn.it
24 ///////////////////////////////////////////////////////////////////////////////
26 // class for TOF calibration : array of AliTOFChannels //
28 ///////////////////////////////////////////////////////////////////////////////
34 #include "AliTOFGeometryV4.h"
35 #include "AliTOFCalSector.h"
36 #include "AliTOFCal.h"
37 #include "AliTOFChannel.h"
43 //________________________________________________________________
45 AliTOFCal::AliTOFCal():TObject(){
47 fNSector = AliTOFGeometryV4::NSectors();
48 fNPlate = AliTOFGeometryV4::NPlates();
49 fNStripA = AliTOFGeometryV4::NStripA();
50 fNStripB = AliTOFGeometryV4::NStripB();
51 // fNStripC = AliTOFGeometryV4::NStripC();
53 fNpadZ = AliTOFGeometryV4::NpadZ();
54 fNpadX = AliTOFGeometryV4::NpadX();
57 gROOT->GetListOfBrowsables()->Add(this);
59 //________________________________________________________________
61 AliTOFCal::AliTOFCal(const AliTOFCal& cal):
64 fNSector = cal.fNSector;
65 fNPlate = cal.fNPlate;
66 fNStripA = cal.fNStripA;
67 fNStripB = cal.fNStripB;
68 fNStripC = cal.fNStripC;
72 for (Int_t i = 0; i<fnpad; i++){
73 fPads[i]=cal.fPads[i];
75 gROOT->GetListOfBrowsables()->Add(this);
77 //____________________________________________________________________________
78 AliTOFCal::~AliTOFCal()
82 //________________________________________________________________
84 void AliTOFCal::Browse(TBrowser *b)
87 for(Int_t i=0; i<fNSector; ++i) {
88 snprintf(name,sizeof(name),"Sector %2.2d",i);
89 b->Add(new AliTOFCalSector(&fPads[i*fnpad/fNSector]),name);
92 //________________________________________________________________
94 void AliTOFCal::CreateArray(){
95 fnpad = AliTOFGeometryV4::NSectors()*(2*(20+AliTOFGeometryV4::NStripB())+AliTOFGeometryV4::NStripA())*AliTOFGeometryV4::NpadZ()*AliTOFGeometryV4::NpadX();
96 fPads= new AliTOFChannel[fnpad];