]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TOF/AliTOFCalSector.cxx
Changes for TOF Reconstruction using TGeo
[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$
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
5bab6312 22*/
6dc9348d 23
24///////////////////////////////////////////////////////////////////////////////
25// //
26// class for TOF calibration : Sectors //
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 "AliTOFCalPlateA.h"
36#include "AliTOFCalPlateB.h"
37#include "AliTOFCalPlateC.h"
38#include "AliTOFCalSector.h"
39#include "AliTOFChannel.h"
40
41extern TROOT *gROOT;
42
43ClassImp(AliTOFCalSector)
44
45//________________________________________________________________
46
47AliTOFCalSector::AliTOFCalSector(){
48 fCh = 0;
49 fNSector = AliTOFGeometryV4::NSectors();
50 fNPlate = AliTOFGeometryV4::NPlates();
51 fNStripA = AliTOFGeometryV4::NStripA();
52 fNStripB = AliTOFGeometryV4::NStripB();
53 fNStripC = 20;
54 // fNStripC = AliTOFGeometryV4::NStripC();
55 fNpadZ = AliTOFGeometryV4::NpadZ();
56 fNpadX = AliTOFGeometryV4::NpadX();
57 gROOT->GetListOfBrowsables()->Add(this);
58
59}
60//________________________________________________________________
61
62AliTOFCalSector::AliTOFCalSector(AliTOFChannel *ch):
63 fCh(ch)
64{
65 fNSector = AliTOFGeometryV4::NSectors();
66 fNPlate = AliTOFGeometryV4::NPlates();
67 fNStripA = AliTOFGeometryV4::NStripA();
68 fNStripB = AliTOFGeometryV4::NStripB();
69 fNStripC = 20;
70 // fNStripC = AliTOFGeometryV4::NStripC();
71 fNpadZ = AliTOFGeometryV4::NpadZ();
72 fNpadX = AliTOFGeometryV4::NpadX();
73}
74//________________________________________________________________
75
76AliTOFCalSector::AliTOFCalSector(const AliTOFCalSector& sec):
77 TObject(sec)
78 {
79 fCh = sec.fCh;
80 fNSector = sec.fNSector;
81 fNPlate = sec.fNPlate;
82 fNStripA = sec.fNStripA;
83 fNStripB = sec.fNStripB;
84 fNStripC = sec.fNStripC;
85 fNpadZ = sec.fNpadZ;
86 fNpadX = sec.fNpadX;
87 gROOT->GetListOfBrowsables()->Add(this);
88 }
89//________________________________________________________________
90
91AliTOFCalSector::~AliTOFCalSector()
92{
93 delete[] fCh;
94}
95
96//________________________________________________________________
97
98void AliTOFCalSector::Browse(TBrowser *b){
99
100 b->Add(new AliTOFCalPlateC(fCh), "Plate0");
101 b->Add(new AliTOFCalPlateB(&fCh[fNStripC*96]),"Plate1");
102 b->Add(new AliTOFCalPlateA(&fCh[(fNStripC+fNStripB)*fNpadZ*fNpadX]),"Plate2");
103 b->Add(new AliTOFCalPlateB(&fCh[(fNStripC+2*fNStripB)*fNpadZ*fNpadX]),"Plate3");
104 b->Add(new AliTOFCalPlateC(&fCh[2*(fNStripC+fNStripB)*fNpadZ*fNpadX]),"Plate4");
105}
106