1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
17 ///////////////////////////////////////////////////////////////////////////////
19 // Geometry class for a single ROC //
22 ///////////////////////////////////////////////////////////////////////////////
23 #include "AliTPCROC.h"
29 AliTPCROC* AliTPCROC::fgInstance = 0;
34 //_ singleton implementation __________________________________________________
35 AliTPCROC* AliTPCROC::Instance()
38 // Singleton implementation
39 // Returns an instance of this class, it is created if neccessary
42 fgInstance = new AliTPCROC();
51 void AliTPCROC::Init(){
53 // initialize static variables
55 if (AliTPCROC::fNSectorsAll>0) return;
63 // number of pads in padrow
64 fNPads[0] = new UInt_t[fNRows[0]];
65 fNPads[1] = new UInt_t[fNRows[1]];
67 // padrow index in array
69 fRowPosIndex[0] = new UInt_t[fNRows[0]];
70 fRowPosIndex[1] = new UInt_t[fNRows[1]];
75 for (UInt_t irow=0; irow<fNRows[0];irow++){
76 UInt_t npads = (irow==0) ? 68 : 2 *Int_t(Double_t(irow)/3. +33.67);
77 fNPads[0][irow] = npads;
78 fRowPosIndex[0][irow] = index;
81 fNChannels[0] = index;
84 Double_t k1 = 10.*TMath::Tan(10*TMath::DegToRad())/6.;
85 Double_t k2 = 15.*TMath::Tan(10*TMath::DegToRad())/6.;
86 for (UInt_t irow=0; irow<fNRows[1];irow++){
87 UInt_t npads = (irow<64) ?
88 2*Int_t(k1*Double_t(irow)+37.75):
89 2*Int_t(k2*Double_t(irow-64)+56.66);
90 fNPads[1][irow] = npads;
91 fRowPosIndex[1][irow] = index;
94 fNChannels[1] = index;
101 void AliTPCROC::SetGeometry()
104 //set ROC geometry parameters
106 const Float_t kInnerRadiusLow = 83.65;
107 const Float_t kInnerRadiusUp = 133.3;
108 const Float_t kOuterRadiusLow = 133.5;
109 const Float_t kOuterRadiusUp = 247.7;
110 const Float_t kInnerFrameSpace = 1.5;
111 const Float_t kOuterFrameSpace = 1.5;
112 const Float_t kInnerWireMount = 1.2;
113 const Float_t kOuterWireMount = 1.4;
114 const Float_t kZLength =250.;
115 const UInt_t kNRowLow = 63;
116 const UInt_t kNRowUp1 = 64;
117 const UInt_t kNRowUp2 = 32;
118 const UInt_t kNRowUp = 96;
119 const Float_t kInnerAngle = 20; // 20 degrees
120 const Float_t kOuterAngle = 20; // 20 degrees
124 const Float_t kInnerPadPitchLength = 0.75;
125 const Float_t kInnerPadPitchWidth = 0.40;
126 const Float_t kInnerPadLength = 0.75;
127 const Float_t kInnerPadWidth = 0.40;
128 const Float_t kOuter1PadPitchLength = 1.0;
129 const Float_t kOuterPadPitchWidth = 0.6;
130 const Float_t kOuter1PadLength = 1.0;
131 const Float_t kOuterPadWidth = 0.6;
132 const Float_t kOuter2PadPitchLength = 1.5;
133 const Float_t kOuter2PadLength = 1.5;
136 //wires default parameters
138 // const UInt_t kNInnerWiresPerPad = 3;
139 // const UInt_t kInnerDummyWire = 2;
140 // const Float_t kInnerWWPitch = 0.25;
141 // const Float_t kRInnerFirstWire = 84.475;
142 // const Float_t kRInnerLastWire = 132.475;
143 // const Float_t kInnerOffWire = 0.5;
144 // const UInt_t kNOuter1WiresPerPad = 4;
145 // const UInt_t kNOuter2WiresPerPad = 6;
146 // const Float_t kOuterWWPitch = 0.25;
147 // const Float_t kROuterFirstWire = 134.225;
148 // const Float_t kROuterLastWire = 246.975;
149 // const UInt_t kOuterDummyWire = 2;
150 // const Float_t kOuterOffWire = 0.5;
152 //set sector parameters
154 fInnerRadiusLow = kInnerRadiusLow;
155 fOuterRadiusLow = kOuterRadiusLow;
156 fInnerRadiusUp = kInnerRadiusUp;
157 fOuterRadiusUp = kOuterRadiusUp;
158 fInnerFrameSpace = kInnerFrameSpace;
159 fOuterFrameSpace = kOuterFrameSpace;
160 fInnerWireMount = kInnerWireMount;
161 fOuterWireMount = kOuterWireMount;
163 fInnerAngle = TMath::DegToRad()*kInnerAngle;
164 fOuterAngle = TMath::DegToRad()*kOuterAngle;
173 fInnerPadPitchLength = kInnerPadPitchLength;
174 fInnerPadPitchWidth = kInnerPadPitchWidth;
175 fInnerPadLength = kInnerPadLength;
176 fInnerPadWidth = kInnerPadWidth;
177 fOuter1PadPitchLength = kOuter1PadPitchLength;
178 fOuter2PadPitchLength = kOuter2PadPitchLength;
179 fOuterPadPitchWidth = kOuterPadPitchWidth;
180 fOuter1PadLength = kOuter1PadLength;
181 fOuter2PadLength = kOuter2PadLength;
182 fOuterPadWidth = kOuterPadWidth;
185 //set wire parameters
187 // SetInnerNWires(kNInnerWiresPerPad);
188 // SetInnerDummyWire(kInnerDummyWire);
189 // SetInnerOffWire(kInnerOffWire);
190 // SetOuter1NWires(kNOuter1WiresPerPad);
191 // SetOuter2NWire(kNOuter2WiresPerPad);
192 // SetOuterDummyWire(kOuterDummyWire);
193 // SetOuterOffWire(kOuterOffWire);
194 // SetInnerWWPitch(kInnerWWPitch);
195 // SetRInnerFirstWire(kRInnerFirstWire);
196 // SetRInnerLastWire(kRInnerLastWire);
197 // SetOuterWWPitch(kOuterWWPitch);
198 // SetROuterFirstWire(kROuterFirstWire);
199 // SetROuterLastWire(kROuterLastWire);
205 //_____________________________________________________________________________
206 AliTPCROC::AliTPCROC():TObject(), fNSectorsAll(0)
209 // Default constructor
210 for (UInt_t i=0;i<2;i++){
220 //_____________________________________________________________________________
221 AliTPCROC::AliTPCROC(const AliTPCROC &roc):TObject(roc)
224 // AliTPCROC copy constructor
226 fNSectorsAll = roc.fNSectorsAll;
227 fNSectors[0] = roc.fNSectors[0];
228 fNSectors[1] = roc.fNSectors[1];
229 fNRows[0] = roc.fNRows[0];
230 fNRows[1] = roc.fNRows[1];
231 fNChannels[0]= roc.fNChannels[0];
232 fNChannels[1]= roc.fNChannels[1];
234 // number of pads in padrow
235 fNPads[0] = new UInt_t[fNRows[0]];
236 fNPads[1] = new UInt_t[fNRows[1]];
238 // padrow index in array
240 fRowPosIndex[0] = new UInt_t[fNRows[0]];
241 fRowPosIndex[1] = new UInt_t[fNRows[1]];
243 for (UInt_t irow =0; irow<fNRows[0];irow++){
244 fNPads[0][irow] = roc.fNPads[0][irow];
245 fRowPosIndex[0][irow] = roc.fRowPosIndex[0][irow];
247 for (UInt_t irow =0; irow<fNRows[1];irow++){
248 fNPads[1][irow] = roc.fNPads[1][irow];
249 fRowPosIndex[1][irow] = roc.fRowPosIndex[1][irow];
253 //_____________________________________________________________________________
254 AliTPCROC::~AliTPCROC()
257 // AliTPCROC destructor
261 delete [] fRowPosIndex[0];
262 delete [] fRowPosIndex[1];