Add classes for TOF Calibration (C.Zampolli)
[u/mrichter/AliRoot.git] / TOF / AliTOFCalPlateB.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 : PlateB //
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 "AliTOFCalStrip.h"
32#include "AliTOFCalPlateB.h"
33#include "AliTOFChannel.h"
34
35ClassImp(AliTOFCalPlateB)
36
37//________________________________________________________________
38
39AliTOFCalPlateB::AliTOFCalPlateB(){
40 fCh = 0;
41 fNSector = AliTOFGeometryV4::NSectors();
42 fNPlate = AliTOFGeometryV4::NPlates();
43 fNStripA = AliTOFGeometryV4::NStripA();
44 fNStripB = AliTOFGeometryV4::NStripB();
45 fNStripC = 20;
46 // fNStripC = AliTOFGeometryV4::NStripC();
47 fNpadZ = AliTOFGeometryV4::NpadZ();
48 fNpadX = AliTOFGeometryV4::NpadX();
49
50}
51//________________________________________________________________
52
53AliTOFCalPlateB::AliTOFCalPlateB(AliTOFChannel *ch):
54 fCh(ch)
55{
56 fNSector = AliTOFGeometryV4::NSectors();
57 fNPlate = AliTOFGeometryV4::NPlates();
58 fNStripA = AliTOFGeometryV4::NStripA();
59 fNStripB = AliTOFGeometryV4::NStripB();
60 fNStripC = 20;
61 // fNStripC = AliTOFGeometryV4::NStripC();
62 fNpadZ = AliTOFGeometryV4::NpadZ();
63 fNpadX = AliTOFGeometryV4::NpadX();
64}
65//________________________________________________________________
66
67AliTOFCalPlateB::~AliTOFCalPlateB()
68{
69 delete[] fCh;
70}
71
72//________________________________________________________________
73
74AliTOFCalPlateB::AliTOFCalPlateB(const AliTOFCalPlateB& pl):
75 TObject(pl)
76 {
77 fCh = pl.fCh;
78 fCh = pl.fCh;
79 fCh = pl.fCh;
80 fNSector = pl.fNSector;
81 fNPlate = pl.fNPlate;
82 fNStripA = pl.fNStripA;
83 fNStripB = pl.fNStripB;
84 fNStripC = pl.fNStripC;
85 fNpadZ = pl.fNpadZ;
86 fNpadX = pl.fNpadX;
87
88 }
89//________________________________________________________________
90
91void AliTOFCalPlateB::Browse(TBrowser *b){
92
93 char name[10];
94 for(Int_t i=0; i<fNStripB; ++i) {
95 snprintf(name,sizeof(name),"Strip %2.2d",i);
96 b->Add(new AliTOFCalStrip(&fCh[i*fNpadZ*fNpadX]),name);
97 }
98}