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