]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TOF/AliTOFCalSector.cxx
Removing wrong inline from the implementation file
[u/mrichter/AliRoot.git] / TOF / AliTOFCalSector.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
5bab6312 16/*
17$Log$
340693af 18Revision 1.3 2006/03/28 14:58:16 arcelli
19updates to handle new V5 geometry & some re-arrangements
20
d4ad0d6b 21Revision 1.2 2006/02/13 16:53:00 decaro
22just Fixing Log info
23
5bab6312 24Revision 1.1 2006/02/13 16:10:48 arcelli
25Add classes for TOF Calibration (C.Zampolli)
26
6dc9348d 27author: Chiara Zampolli, zampolli@bo.infn.it
5bab6312 28*/
6dc9348d 29
30///////////////////////////////////////////////////////////////////////////////
31// //
32// class for TOF calibration : Sectors //
33// //
34///////////////////////////////////////////////////////////////////////////////
35
36#include "TObject.h"
37#include "TROOT.h"
38#include "TBrowser.h"
39#include "TClass.h"
d4ad0d6b 40#include "AliLog.h"
41#include "AliTOFGeometryV5.h"
6dc9348d 42#include "AliTOFCalPlateA.h"
43#include "AliTOFCalPlateB.h"
44#include "AliTOFCalPlateC.h"
45#include "AliTOFCalSector.h"
46#include "AliTOFChannel.h"
47
48extern TROOT *gROOT;
49
50ClassImp(AliTOFCalSector)
51
52//________________________________________________________________
53
54AliTOFCalSector::AliTOFCalSector(){
340693af 55 //main ctor
6dc9348d 56 fCh = 0;
d4ad0d6b 57 fGeom=0x0;
58 fNPlate=0;
59 fNStripA=0;
60 fNStripB=0;
61 fNStripC=0;
62 fNpadZ=0;
63 fNpadX=0;
6dc9348d 64 gROOT->GetListOfBrowsables()->Add(this);
65
66}
67//________________________________________________________________
68
69AliTOFCalSector::AliTOFCalSector(AliTOFChannel *ch):
70 fCh(ch)
71{
340693af 72 //ctor with channel
d4ad0d6b 73 fGeom=0x0;
74 fNPlate=0;
75 fNStripA=0;
76 fNStripB=0;
77 fNStripC=0;
78 fNpadZ=0;
79 fNpadX=0;
80 gROOT->GetListOfBrowsables()->Add(this);
81}
82//________________________________________________________________
83
84AliTOFCalSector::AliTOFCalSector(AliTOFGeometry *geom){
340693af 85 //ctor with geom
d4ad0d6b 86 fCh = 0;
87 fGeom= geom;
88 fNPlate = fGeom->NPlates();
89 fNStripA = fGeom->NStripA();
90 fNStripB = fGeom->NStripB();
91 fNStripC = fGeom->NStripC();
92 fNpadZ = fGeom->NpadZ();
93 fNpadX = fGeom->NpadX();
94 gROOT->GetListOfBrowsables()->Add(this);
95
96}
97//________________________________________________________________
98
99AliTOFCalSector::AliTOFCalSector(AliTOFGeometry *geom,AliTOFChannel *ch):
100 fCh(ch)
101{
340693af 102 // ctor with channel and geom
d4ad0d6b 103 fGeom= geom;
104 fNPlate = fGeom->NPlates();
105 fNStripA = fGeom->NStripA();
106 fNStripB = fGeom->NStripB();
107 fNStripC = fGeom->NStripC();
108 fNpadZ = fGeom->NpadZ();
109 fNpadX = fGeom->NpadX();
110 gROOT->GetListOfBrowsables()->Add(this);
6dc9348d 111}
112//________________________________________________________________
113
114AliTOFCalSector::AliTOFCalSector(const AliTOFCalSector& sec):
115 TObject(sec)
116 {
340693af 117 //copy ctor
6dc9348d 118 fCh = sec.fCh;
6dc9348d 119 fNPlate = sec.fNPlate;
120 fNStripA = sec.fNStripA;
121 fNStripB = sec.fNStripB;
122 fNStripC = sec.fNStripC;
123 fNpadZ = sec.fNpadZ;
124 fNpadX = sec.fNpadX;
125 gROOT->GetListOfBrowsables()->Add(this);
126 }
127//________________________________________________________________
128
129AliTOFCalSector::~AliTOFCalSector()
130{
340693af 131 //dtor
d4ad0d6b 132 gROOT->GetListOfBrowsables()->Remove(this);
6dc9348d 133 delete[] fCh;
134}
135
136//________________________________________________________________
137
138void AliTOFCalSector::Browse(TBrowser *b){
340693af 139 //add cal obj to list of browsables
d4ad0d6b 140 if(fGeom==0x0){
141 AliTOFGeometry *geom= new AliTOFGeometryV5();
142 AliInfo("V5 TOF Geometry is taken as the default");
143 fNPlate = geom->NPlates();
144 fNStripA = geom->NStripA();
145 fNStripB = geom->NStripB();
146 fNStripC = geom->NStripC();
147 fNpadZ = geom->NpadZ();
148 fNpadX = geom->NpadX();
149 delete geom;
150 }
6dc9348d 151 b->Add(new AliTOFCalPlateC(fCh), "Plate0");
152 b->Add(new AliTOFCalPlateB(&fCh[fNStripC*96]),"Plate1");
153 b->Add(new AliTOFCalPlateA(&fCh[(fNStripC+fNStripB)*fNpadZ*fNpadX]),"Plate2");
154 b->Add(new AliTOFCalPlateB(&fCh[(fNStripC+2*fNStripB)*fNpadZ*fNpadX]),"Plate3");
155 b->Add(new AliTOFCalPlateC(&fCh[2*(fNStripC+fNStripB)*fNpadZ*fNpadX]),"Plate4");
156}
157