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