]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TOF/AliTOFCalPlateC.cxx
Possibility to calculate the DCA between two ESD track. The V0 and cascade vertexes...
[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.2  2006/02/13 17:22:26  arcelli
19 just Fixing Log info
20
21 Revision 1.1  2006/02/13 16:10:48  arcelli
22 Add classes for TOF Calibration (C.Zampolli)
23
24 author: Chiara Zampolli, zampolli@bo.infn.it
25 */  
26
27 ///////////////////////////////////////////////////////////////////////////////
28 //                                                                           //
29 // class for TOF calibration : PlateC                                        //
30 //                                                                           //
31 ///////////////////////////////////////////////////////////////////////////////
32
33 #include "TObject.h"
34 #include "TROOT.h"
35 #include "TBrowser.h"
36 #include "TClass.h"
37 #include "AliLog.h"
38 #include "AliTOFGeometryV5.h"
39 #include "AliTOFCalStrip.h"
40 #include "AliTOFCalPlateC.h"
41 #include "AliTOFChannel.h"
42
43 ClassImp(AliTOFCalPlateC)
44
45 //________________________________________________________________
46
47 AliTOFCalPlateC::AliTOFCalPlateC(){
48   fCh = 0;
49   fGeom= 0x0; 
50   fNStripC = 0;
51   fNpadZ = 0;
52   fNpadX = 0;
53 }
54 //________________________________________________________________
55
56 AliTOFCalPlateC::AliTOFCalPlateC(AliTOFChannel *ch) : fCh(ch)
57 {
58   fGeom= 0x0; 
59   fNStripC = 0;
60   fNpadZ = 0;
61   fNpadX = 0;
62 }
63 //________________________________________________________________
64
65 AliTOFCalPlateC::AliTOFCalPlateC(AliTOFGeometry *geom){
66   fCh = 0;
67   fGeom = geom;  
68   fNStripC = fGeom->NStripC();
69   fNpadZ = fGeom->NpadZ();
70   fNpadX = fGeom->NpadX();
71 }
72 //________________________________________________________________
73
74 AliTOFCalPlateC::AliTOFCalPlateC(AliTOFGeometry *geom, AliTOFChannel *ch): fCh(ch)
75 {
76   fGeom = geom;  
77   fNStripC = fGeom->NStripC();
78   fNpadZ = fGeom->NpadZ();
79   fNpadX = fGeom->NpadX();
80 }
81
82 //________________________________________________________________
83
84 AliTOFCalPlateC::~AliTOFCalPlateC()
85 {
86   delete[] fCh;
87 }
88
89 //________________________________________________________________
90
91 AliTOFCalPlateC::AliTOFCalPlateC(const AliTOFCalPlateC& pl):
92   TObject(pl)
93   {
94     fCh = pl.fCh;
95     fNStripC = pl.fNStripC;
96     fNpadZ = pl.fNpadZ;
97     fNpadX = pl.fNpadX;
98     fGeom = pl.fGeom;
99
100   }
101 //________________________________________________________________
102
103 void AliTOFCalPlateC::Browse(TBrowser *b){
104
105   if(fGeom==0x0){
106     AliTOFGeometry *geom = new AliTOFGeometryV5(); 
107     AliInfo("V5 TOF Geometry is taken as the default");
108     fNStripC = geom->NStripC();
109     fNpadZ = geom->NpadZ();
110     fNpadX = geom->NpadX();
111     delete geom;
112   }
113   char name[10];
114   for(Int_t i=0; i<fNStripC; ++i) {
115     snprintf(name,sizeof(name),"Strip %2.2d",i);
116     b->Add(new AliTOFCalStrip(&fCh[i*fNpadZ*fNpadX]),name);
117   }
118 }