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