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