]>
Commit | Line | Data |
---|---|---|
61b8353b | 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 | ||
3d1463c8 | 16 | /* $Id$ */ |
17 | ||
18 | //----------------------------------------------------------------------------- | |
d19b6003 | 19 | // Class AliMUONResponseFactory |
20 | // ----------------------------- | |
21 | // Factory for muon response | |
22 | // Class separated from AliMUONFactoryV4 | |
3d1463c8 | 23 | //----------------------------------------------------------------------------- |
61b8353b | 24 | |
25 | #include "AliMUONResponseFactory.h" | |
26 | #include "AliRun.h" | |
27 | #include "AliLog.h" | |
28 | ||
29 | #include "AliMpPlaneType.h" | |
30 | ||
31 | #include "AliMUON.h" | |
32 | #include "AliMUONConstants.h" | |
61b8353b | 33 | #include "AliMUONChamber.h" |
34 | #include "AliMUONResponseV0.h" | |
35 | #include "AliMUONResponseTrigger.h" | |
44b96781 | 36 | #include "AliMUONResponseTriggerV1.h" |
61b8353b | 37 | |
71a2d3aa | 38 | /// \cond CLASSIMP |
61b8353b | 39 | ClassImp(AliMUONResponseFactory) |
71a2d3aa | 40 | /// \endcond |
61b8353b | 41 | |
42 | //__________________________________________________________________________ | |
43 | AliMUONResponseFactory::AliMUONResponseFactory(const char* name) | |
44 | : TNamed(name, ""), | |
45 | fMUON(0), | |
46 | fResponse0(0) | |
d19b6003 | 47 | { |
48 | /// Standard constructor | |
49 | ||
61b8353b | 50 | AliDebug(1,Form("ctor this=%p",this)); |
51 | } | |
52 | ||
53 | //__________________________________________________________________________ | |
54 | AliMUONResponseFactory::AliMUONResponseFactory() | |
55 | : TNamed(), | |
56 | fMUON(0), | |
57 | fResponse0(0) | |
58 | { | |
d19b6003 | 59 | /// Default constructor |
60 | ||
61b8353b | 61 | AliDebug(1,Form("default (empty) ctor this=%p",this)); |
61b8353b | 62 | } |
63 | ||
61b8353b | 64 | //__________________________________________________________________________ |
65 | ||
66 | AliMUONResponseFactory::~AliMUONResponseFactory() | |
67 | { | |
d19b6003 | 68 | /// Destructor |
61b8353b | 69 | AliDebug(1,Form("dtor this=%p",this)); |
2a7d64a9 | 70 | delete fResponse0; |
61b8353b | 71 | } |
61b8353b | 72 | |
73 | //__________________________________________________________________________ | |
74 | void AliMUONResponseFactory::BuildCommon() | |
75 | { | |
d19b6003 | 76 | /// Construct the default response. |
61b8353b | 77 | |
78 | // Default response: 5 mm of gas | |
79 | fResponse0 = new AliMUONResponseV0; | |
80 | fResponse0->SetSqrtKx3AndDeriveKx2Kx4(0.7131); // sqrt(0.5085) | |
81 | fResponse0->SetSqrtKy3AndDeriveKy2Ky4(0.7642); // sqrt(0.5840) | |
82 | fResponse0->SetPitch(AliMUONConstants::Pitch()); // anode-cathode distance | |
83 | fResponse0->SetSigmaIntegration(10.); | |
84 | fResponse0->SetChargeSlope(10); | |
85 | fResponse0->SetChargeSpread(0.18, 0.18); | |
86 | fResponse0->SetMaxAdc(4096); | |
87 | fResponse0->SetSaturation(3000); | |
88 | fResponse0->SetZeroSuppression(6); | |
89 | } | |
90 | ||
91 | //__________________________________________________________________________ | |
92 | void AliMUONResponseFactory::BuildStation1() | |
93 | { | |
94 | /// Configuration for Chamber TC1/2 (Station 1) ---------- | |
95 | ||
96 | // Response for 4 mm of gas (station 1) | |
97 | // automatic consistency with width of sensitive medium in CreateGeometry ???? | |
2a7d64a9 | 98 | AliMUONResponseV0 responseSt1; |
61b8353b | 99 | // Mathieson parameters from L.Kharmandarian's thesis, page 190 |
2a7d64a9 | 100 | responseSt1.SetSqrtKx3AndDeriveKx2Kx4(0.7000); // sqrt(0.4900) |
101 | responseSt1.SetSqrtKy3AndDeriveKy2Ky4(0.7550); // sqrt(0.5700) | |
102 | responseSt1.SetPitch(AliMUONConstants::PitchSt1()); // anode-cathode distance | |
103 | responseSt1.SetSigmaIntegration(10.); | |
61b8353b | 104 | // ChargeSlope larger to compensate for the smaller anode-cathode distance |
105 | // and keep the same most probable ADC channel for mip's | |
2a7d64a9 | 106 | responseSt1.SetChargeSlope(62.5); |
61b8353b | 107 | // assumed proportionality to anode-cathode distance for ChargeSpread |
2a7d64a9 | 108 | responseSt1.SetChargeSpread(0.144, 0.144); |
109 | responseSt1.SetMaxAdc(4096); | |
110 | responseSt1.SetSaturation(3000); | |
111 | responseSt1.SetZeroSuppression(6); | |
61b8353b | 112 | |
113 | for (Int_t chamber = 0; chamber < 2; chamber++) { | |
114 | fMUON->SetResponseModel(chamber, responseSt1); // special response | |
115 | fMUON->Chamber(chamber).SetChargeCorrel(0.11); // 11% charge spread | |
116 | } | |
117 | } | |
118 | ||
119 | //__________________________________________________________________________ | |
120 | void AliMUONResponseFactory::BuildStation2() | |
121 | { | |
122 | /// Configuration for Chamber TC3/4 (Station 2) ----------- | |
123 | ||
124 | for (Int_t chamber = 2; chamber < 4; chamber++) { | |
2a7d64a9 | 125 | fMUON->SetResponseModel(chamber, *fResponse0); // normal response |
61b8353b | 126 | fMUON->Chamber(chamber).SetChargeCorrel(0.11); // 11% charge spread |
127 | } | |
128 | } | |
129 | ||
130 | //__________________________________________________________________________ | |
131 | void AliMUONResponseFactory::BuildStation3() | |
132 | { | |
133 | /// Configuration for Chamber TC5/6 (Station 3) ---------- | |
134 | ||
135 | for (Int_t chamber = 4; chamber < 6; chamber++) { | |
2a7d64a9 | 136 | fMUON->SetResponseModel(chamber, *fResponse0); // normal response |
61b8353b | 137 | fMUON->Chamber(chamber).SetChargeCorrel(0.11); // 11% charge spread |
138 | } | |
139 | } | |
140 | ||
141 | //__________________________________________________________________________ | |
142 | void AliMUONResponseFactory::BuildStation4() | |
143 | { | |
144 | /// Configuration for Chamber TC7/8 (Station 4) ---------- | |
145 | ||
146 | for (Int_t chamber = 6; chamber < 8; chamber++) { | |
2a7d64a9 | 147 | fMUON->SetResponseModel(chamber, *fResponse0); // normal response |
61b8353b | 148 | fMUON->Chamber(chamber).SetChargeCorrel(0.11); // 11% charge spread |
149 | } | |
150 | } | |
151 | ||
152 | //__________________________________________________________________________ | |
153 | void AliMUONResponseFactory::BuildStation5() | |
154 | { | |
155 | /// Configuration for Chamber TC9/10 (Station 5) --------- | |
156 | ||
157 | for (Int_t chamber = 8; chamber < 10; chamber++) { | |
2a7d64a9 | 158 | fMUON->SetResponseModel(chamber, *fResponse0); // normal response |
61b8353b | 159 | fMUON->Chamber(chamber).SetChargeCorrel(0.11); // 11% charge spread |
160 | } | |
161 | } | |
162 | ||
163 | //__________________________________________________________________________ | |
164 | void AliMUONResponseFactory::BuildStation6() | |
165 | { | |
166 | /// Configuration for Trigger Chambers (Station 6,7) --------- | |
167 | ||
44b96781 | 168 | Bool_t resTrigV1 = fMUON->GetTriggerResponseV1(); |
169 | ||
2a7d64a9 | 170 | for (Int_t chamber = 10; chamber < 14; chamber++) |
171 | { | |
172 | AliMUONResponse* response; | |
173 | if (!resTrigV1) | |
174 | { | |
175 | response = new AliMUONResponseTrigger; | |
176 | } | |
177 | else | |
178 | { | |
179 | response = new AliMUONResponseTriggerV1; | |
180 | } | |
181 | fMUON->SetResponseModel(chamber,*response); | |
182 | fMUON->Chamber(chamber).SetChargeCorrel(0); // same charge on both cathodes | |
183 | delete response; | |
184 | } | |
61b8353b | 185 | } |
186 | ||
187 | //__________________________________________________________________________ | |
188 | void AliMUONResponseFactory::Build(AliMUON* where) | |
189 | { | |
d19b6003 | 190 | /// Construct MUON responses |
61b8353b | 191 | |
192 | fMUON = where; | |
193 | ||
194 | // Set default parameters | |
195 | fMUON->SetIshunt(0); | |
196 | fMUON->SetMaxStepGas(0.1); | |
197 | fMUON->SetMaxStepAlu(0.1); | |
198 | ||
199 | // Build stations | |
200 | BuildCommon(); | |
201 | BuildStation1(); | |
202 | BuildStation2(); | |
203 | BuildStation3(); | |
204 | BuildStation4(); | |
205 | BuildStation5(); | |
206 | BuildStation6(); | |
207 | } | |
208 | ||
209 | //__________________________________________________________________________ | |
210 | void AliMUONResponseFactory::BuildStation(AliMUON* where, Int_t stationNumber) | |
211 | { | |
d19b6003 | 212 | /// Construct MUON responses for given station |
61b8353b | 213 | |
214 | fMUON = where; | |
215 | if (!fResponse0) BuildCommon(); | |
216 | ||
217 | switch (stationNumber) { | |
218 | case 1: BuildStation1(); break; | |
219 | case 2: BuildStation2(); break; | |
220 | case 3: BuildStation3(); break; | |
221 | case 4: BuildStation4(); break; | |
222 | case 5: BuildStation5(); break; | |
223 | case 6: BuildStation6(); break; | |
224 | ||
225 | default: AliFatal("Wrong station number"); | |
226 | } | |
227 | } |