]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TOF/AliTOFCal.cxx
input data to simulate time slewing, from TB
[u/mrichter/AliRoot.git] / TOF / AliTOFCal.cxx
CommitLineData
6dc9348d 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
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 **************************************************************************/
15
762446e0 16/*
17$Log$
18Revision 1.1 2006/02/13 16:10:48 arcelli
19Add classes for TOF Calibration (C.Zampolli)
20
6dc9348d 21author: Chiara Zampolli, zampolli@bo.infn.it
762446e0 22*/
6dc9348d 23
24///////////////////////////////////////////////////////////////////////////////
25// //
26// class for TOF calibration : array of AliTOFChannels //
27// //
28///////////////////////////////////////////////////////////////////////////////
29
30#include "TObject.h"
31#include "TROOT.h"
32#include "TBrowser.h"
33#include "TClass.h"
34#include "AliTOFGeometryV4.h"
35#include "AliTOFCalSector.h"
36#include "AliTOFCal.h"
37#include "AliTOFChannel.h"
38
39extern TROOT *gROOT;
40
41ClassImp(AliTOFCal)
42
43//________________________________________________________________
44
45AliTOFCal::AliTOFCal():TObject(){
46 // fCalp = 0;
47 fNSector = AliTOFGeometryV4::NSectors();
48 fNPlate = AliTOFGeometryV4::NPlates();
49 fNStripA = AliTOFGeometryV4::NStripA();
50 fNStripB = AliTOFGeometryV4::NStripB();
51 // fNStripC = AliTOFGeometryV4::NStripC();
52 fNStripC = 20;
53 fNpadZ = AliTOFGeometryV4::NpadZ();
54 fNpadX = AliTOFGeometryV4::NpadX();
55 fnpad = 0;
56 fPads = 0x0;
57 gROOT->GetListOfBrowsables()->Add(this);
58}
59//________________________________________________________________
60
61AliTOFCal::AliTOFCal(const AliTOFCal& cal):
62 TObject(cal)
63 {
64 fNSector = cal.fNSector;
65 fNPlate = cal.fNPlate;
66 fNStripA = cal.fNStripA;
67 fNStripB = cal.fNStripB;
68 fNStripC = cal.fNStripC;
69 fNpadZ = cal.fNpadZ;
70 fNpadX = cal.fNpadX;
71 fnpad = cal.fnpad;
72 for (Int_t i = 0; i<fnpad; i++){
73 fPads[i]=cal.fPads[i];
74 }
75 gROOT->GetListOfBrowsables()->Add(this);
76 }
77//____________________________________________________________________________
78AliTOFCal::~AliTOFCal()
79{
80 delete [] fPads;
81}
82//________________________________________________________________
83
84void AliTOFCal::Browse(TBrowser *b)
85{
86 char name[10];
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);
90 }
91}
92//________________________________________________________________
93
94void AliTOFCal::CreateArray(){
95 fnpad = AliTOFGeometryV4::NSectors()*(2*(20+AliTOFGeometryV4::NStripB())+AliTOFGeometryV4::NStripA())*AliTOFGeometryV4::NpadZ()*AliTOFGeometryV4::NpadX();
96 fPads= new AliTOFChannel[fnpad];
97}