]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TOF/AliTOFCalPlateA.cxx
New file to be read during reconstruction
[u/mrichter/AliRoot.git] / TOF / AliTOFCalPlateA.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$
655e379f 18Revision 1.6 2006/04/20 22:30:49 hristov
19Coding conventions (Annalisa)
20
0e46b9ae 21Revision 1.5 2006/04/16 22:29:05 hristov
22Coding conventions (Annalisa)
23
7aeeaf38 24Revision 1.4 2006/04/05 08:35:38 hristov
25Coding conventions (S.Arcelli, C.Zampolli)
26
340693af 27Revision 1.3 2006/03/28 14:57:40 arcelli
28updates to handle new V5 geometry & some re-arrangements
29
d4ad0d6b 30Revision 1.2 2006/02/13 17:22:26 arcelli
31just Fixing Log info
32
762446e0 33Revision 1.1 2006/02/13 16:10:48 arcelli
34Add classes for TOF Calibration (C.Zampolli)
35
6dc9348d 36author: Chiara Zampolli, zampolli@bo.infn.it
762446e0 37*/
6dc9348d 38
39///////////////////////////////////////////////////////////////////////////////
40// //
41// class for TOF calibration : PlateA //
42// //
43///////////////////////////////////////////////////////////////////////////////
44
6dc9348d 45#include "TBrowser.h"
0e46b9ae 46
d4ad0d6b 47#include "AliLog.h"
0e46b9ae 48
6dc9348d 49#include "AliTOFCalPlateA.h"
0e46b9ae 50#include "AliTOFCalStrip.h"
6dc9348d 51#include "AliTOFChannel.h"
0e46b9ae 52#include "AliTOFGeometryV5.h"
6dc9348d 53
54ClassImp(AliTOFCalPlateA)
55
56//________________________________________________________________
57
655e379f 58AliTOFCalPlateA::AliTOFCalPlateA():
59 fNStripA(0),
60 fNpadZ(0),
61 fNpadX(0),
62 fGeom(0x0),
63 fCh(0x0)
64{
340693af 65 //main ctor
6dc9348d 66}
67//________________________________________________________________
68
655e379f 69AliTOFCalPlateA::AliTOFCalPlateA(AliTOFChannel *ch) :
70 fNStripA(0),
71 fNpadZ(0),
72 fNpadX(0),
73 fGeom(0x0),
74 fCh(ch)
6dc9348d 75{
340693af 76 //ctor with channel
d4ad0d6b 77}
78//________________________________________________________________
79
655e379f 80AliTOFCalPlateA::AliTOFCalPlateA(AliTOFGeometry *geom):
81 fNStripA(0),
82 fNpadZ(0),
83 fNpadX(0),
84 fGeom(geom),
85 fCh(0x0)
86{
340693af 87 //ctor with geom
d4ad0d6b 88 fNStripA = fGeom->NStripA();
89 fNpadZ = fGeom->NpadZ();
90 fNpadX = fGeom->NpadX();
91}
92//________________________________________________________________
93
655e379f 94AliTOFCalPlateA::AliTOFCalPlateA(AliTOFGeometry *geom, AliTOFChannel *ch):
95 fNStripA(0),
96 fNpadZ(0),
97 fNpadX(0),
98 fGeom(geom),
99 fCh(ch)
d4ad0d6b 100{
340693af 101 //ctor with geom and channel
d4ad0d6b 102 fNStripA = fGeom->NStripA();
103 fNpadZ = fGeom->NpadZ();
104 fNpadX = fGeom->NpadX();
6dc9348d 105}
106//________________________________________________________________
107
108AliTOFCalPlateA::~AliTOFCalPlateA()
109{
340693af 110 //dtor
6dc9348d 111 delete[] fCh;
112}
113
114//________________________________________________________________
115
116AliTOFCalPlateA::AliTOFCalPlateA(const AliTOFCalPlateA& pl):
655e379f 117 TObject(pl),
118 fNStripA(0),
119 fNpadZ(0),
120 fNpadX(0),
121 fGeom(0x0),
122 fCh(0x0)
6dc9348d 123 {
340693af 124 //copy ctor
6dc9348d 125 fCh = pl.fCh;
6dc9348d 126 fNStripA = pl.fNStripA;
6dc9348d 127 fNpadZ = pl.fNpadZ;
128 fNpadX = pl.fNpadX;
d4ad0d6b 129 fGeom = pl.fGeom;
6dc9348d 130
131 }
132//________________________________________________________________
133
7aeeaf38 134AliTOFCalPlateA& AliTOFCalPlateA::operator=(const AliTOFCalPlateA& pl)
135 {
136 //assignment operator
137 this->fCh = pl.fCh;
138 this->fNStripA = pl.fNStripA;
139 this->fNpadZ = pl.fNpadZ;
140 this->fNpadX = pl.fNpadX;
141 this->fGeom = pl.fGeom;
142 return *this;
143
144 }
145//________________________________________________________________
146
6dc9348d 147void AliTOFCalPlateA::Browse(TBrowser *b){
340693af 148 //add cal obj to list of browsables
6dc9348d 149
d4ad0d6b 150 if(fGeom==0x0){
151 AliTOFGeometry *geom = new AliTOFGeometryV5();
152 AliInfo("V5 TOF Geometry is taken as the default");
153 fNStripA = geom->NStripA();
154 fNpadZ = geom->NpadZ();
155 fNpadX = geom->NpadX();
156 delete geom;
157 }
6dc9348d 158 char name[10];
159 for(Int_t i=0; i<fNStripA; ++i) {
160 snprintf(name,sizeof(name),"Strip %2.2d",i);
161 b->Add(new AliTOFCalStrip(&fCh[i*fNpadZ*fNpadX]),name);
162 }
163}