]>
Commit | Line | Data |
---|---|---|
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 | ||
762446e0 | 16 | /* |
17 | $Log$ | |
340693af | 18 | Revision 1.3 2006/03/28 14:57:56 arcelli |
19 | updates to handle new V5 geometry & some re-arrangements | |
20 | ||
d4ad0d6b | 21 | Revision 1.2 2006/02/13 17:22:26 arcelli |
22 | just Fixing Log info | |
23 | ||
762446e0 | 24 | Revision 1.1 2006/02/13 16:10:48 arcelli |
25 | Add classes for TOF Calibration (C.Zampolli) | |
26 | ||
6dc9348d | 27 | author: Chiara Zampolli, zampolli@bo.infn.it |
762446e0 | 28 | */ |
6dc9348d | 29 | |
30 | /////////////////////////////////////////////////////////////////////////////// | |
31 | // // | |
32 | // class for TOF calibration : PlateC // | |
33 | // // | |
34 | /////////////////////////////////////////////////////////////////////////////// | |
35 | ||
36 | #include "TObject.h" | |
37 | #include "TROOT.h" | |
38 | #include "TBrowser.h" | |
39 | #include "TClass.h" | |
d4ad0d6b | 40 | #include "AliLog.h" |
41 | #include "AliTOFGeometryV5.h" | |
6dc9348d | 42 | #include "AliTOFCalStrip.h" |
43 | #include "AliTOFCalPlateC.h" | |
44 | #include "AliTOFChannel.h" | |
6dc9348d | 45 | |
46 | ClassImp(AliTOFCalPlateC) | |
47 | ||
48 | //________________________________________________________________ | |
49 | ||
50 | AliTOFCalPlateC::AliTOFCalPlateC(){ | |
340693af | 51 | //main ctor |
6dc9348d | 52 | fCh = 0; |
d4ad0d6b | 53 | fGeom= 0x0; |
54 | fNStripC = 0; | |
55 | fNpadZ = 0; | |
56 | fNpadX = 0; | |
6dc9348d | 57 | } |
58 | //________________________________________________________________ | |
59 | ||
d4ad0d6b | 60 | AliTOFCalPlateC::AliTOFCalPlateC(AliTOFChannel *ch) : fCh(ch) |
61 | { | |
340693af | 62 | //ctor with channel |
d4ad0d6b | 63 | fGeom= 0x0; |
64 | fNStripC = 0; | |
65 | fNpadZ = 0; | |
66 | fNpadX = 0; | |
67 | } | |
68 | //________________________________________________________________ | |
69 | ||
70 | AliTOFCalPlateC::AliTOFCalPlateC(AliTOFGeometry *geom){ | |
340693af | 71 | //ctor with geom |
d4ad0d6b | 72 | fCh = 0; |
73 | fGeom = geom; | |
74 | fNStripC = fGeom->NStripC(); | |
75 | fNpadZ = fGeom->NpadZ(); | |
76 | fNpadX = fGeom->NpadX(); | |
77 | } | |
78 | //________________________________________________________________ | |
6dc9348d | 79 | |
d4ad0d6b | 80 | AliTOFCalPlateC::AliTOFCalPlateC(AliTOFGeometry *geom, AliTOFChannel *ch): fCh(ch) |
81 | { | |
340693af | 82 | //ctor with channel and geom |
d4ad0d6b | 83 | fGeom = geom; |
84 | fNStripC = fGeom->NStripC(); | |
85 | fNpadZ = fGeom->NpadZ(); | |
86 | fNpadX = fGeom->NpadX(); | |
6dc9348d | 87 | } |
d4ad0d6b | 88 | |
6dc9348d | 89 | //________________________________________________________________ |
90 | ||
91 | AliTOFCalPlateC::~AliTOFCalPlateC() | |
92 | { | |
340693af | 93 | //dtor |
6dc9348d | 94 | delete[] fCh; |
95 | } | |
96 | ||
97 | //________________________________________________________________ | |
98 | ||
99 | AliTOFCalPlateC::AliTOFCalPlateC(const AliTOFCalPlateC& pl): | |
100 | TObject(pl) | |
6dc9348d | 101 | { |
340693af | 102 | //copy ctor |
6dc9348d | 103 | fCh = pl.fCh; |
6dc9348d | 104 | fNStripC = pl.fNStripC; |
105 | fNpadZ = pl.fNpadZ; | |
106 | fNpadX = pl.fNpadX; | |
d4ad0d6b | 107 | fGeom = pl.fGeom; |
6dc9348d | 108 | |
109 | } | |
110 | //________________________________________________________________ | |
111 | ||
112 | void AliTOFCalPlateC::Browse(TBrowser *b){ | |
340693af | 113 | //add cal obj to list of browsables |
6dc9348d | 114 | |
d4ad0d6b | 115 | if(fGeom==0x0){ |
116 | AliTOFGeometry *geom = new AliTOFGeometryV5(); | |
117 | AliInfo("V5 TOF Geometry is taken as the default"); | |
118 | fNStripC = geom->NStripC(); | |
119 | fNpadZ = geom->NpadZ(); | |
120 | fNpadX = geom->NpadX(); | |
121 | delete geom; | |
122 | } | |
6dc9348d | 123 | char name[10]; |
124 | for(Int_t i=0; i<fNStripC; ++i) { | |
125 | snprintf(name,sizeof(name),"Strip %2.2d",i); | |
126 | b->Add(new AliTOFCalStrip(&fCh[i*fNpadZ*fNpadX]),name); | |
127 | } | |
128 | } |