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 **************************************************************************/
18 //-----------------------------------------------------------------------------
19 // Class AliMUONResponseFactory
20 // -----------------------------
21 // Factory for muon response
22 // Class separated from AliMUONFactoryV4
23 //-----------------------------------------------------------------------------
25 #include "AliMUONResponseFactory.h"
29 #include "AliMpPlaneType.h"
32 #include "AliMUONConstants.h"
33 #include "AliMUONChamber.h"
34 #include "AliMUONResponseV0.h"
35 #include "AliMUONResponseTrigger.h"
36 #include "AliMUONResponseTriggerV1.h"
39 ClassImp(AliMUONResponseFactory)
42 //__________________________________________________________________________
43 AliMUONResponseFactory::AliMUONResponseFactory(const char* name,
48 fIsTailEffect(isTailEffect)
50 /// Standard constructor
52 AliDebug(1,Form("ctor this=%p",this));
55 //__________________________________________________________________________
56 AliMUONResponseFactory::AliMUONResponseFactory()
62 /// Default constructor
64 AliDebug(1,Form("default (empty) ctor this=%p",this));
67 //__________________________________________________________________________
69 AliMUONResponseFactory::~AliMUONResponseFactory()
72 AliDebug(1,Form("dtor this=%p",this));
76 //__________________________________________________________________________
77 void AliMUONResponseFactory::BuildCommon()
79 /// Construct the default response.
81 // Default response: 5 mm of gas
82 fResponse0 = new AliMUONResponseV0;
83 fResponse0->SetSqrtKx3AndDeriveKx2Kx4(0.7131); // sqrt(0.5085)
84 fResponse0->SetSqrtKy3AndDeriveKy2Ky4(0.7642); // sqrt(0.5840)
85 fResponse0->SetPitch(AliMUONConstants::Pitch()); // anode-cathode distance
86 fResponse0->SetSigmaIntegration(10.);
87 fResponse0->SetChargeSlope(10);
88 fResponse0->SetChargeSpread(0.18, 0.18);
89 fResponse0->SetMaxAdc(4096);
90 fResponse0->SetSaturation(3000);
91 fResponse0->SetZeroSuppression(6);
92 fResponse0->SetTailEffect(fIsTailEffect);
95 //__________________________________________________________________________
96 void AliMUONResponseFactory::BuildStation1()
98 /// Configuration for Chamber TC1/2 (Station 1) ----------
100 // Response for 4 mm of gas (station 1)
101 // automatic consistency with width of sensitive medium in CreateGeometry ????
102 AliMUONResponseV0 responseSt1;
103 // Mathieson parameters from L.Kharmandarian's thesis, page 190
104 responseSt1.SetSqrtKx3AndDeriveKx2Kx4(0.7000); // sqrt(0.4900)
105 responseSt1.SetSqrtKy3AndDeriveKy2Ky4(0.7550); // sqrt(0.5700)
106 responseSt1.SetPitch(AliMUONConstants::PitchSt1()); // anode-cathode distance
107 responseSt1.SetSigmaIntegration(10.);
108 // ChargeSlope larger to compensate for the smaller anode-cathode distance
109 // and keep the same most probable ADC channel for mip's
110 responseSt1.SetChargeSlope(62.5);
111 // assumed proportionality to anode-cathode distance for ChargeSpread
112 responseSt1.SetChargeSpread(0.144, 0.144);
113 responseSt1.SetMaxAdc(4096);
114 responseSt1.SetSaturation(3000);
115 responseSt1.SetZeroSuppression(6);
116 responseSt1.SetTailEffect(fIsTailEffect);
118 for (Int_t chamber = 0; chamber < 2; chamber++) {
119 fMUON->SetResponseModel(chamber, responseSt1); // special response
120 fMUON->Chamber(chamber).SetChargeCorrel(0.11); // 11% charge spread
124 //__________________________________________________________________________
125 void AliMUONResponseFactory::BuildStation2()
127 /// Configuration for Chamber TC3/4 (Station 2) -----------
129 for (Int_t chamber = 2; chamber < 4; chamber++) {
130 fMUON->SetResponseModel(chamber, *fResponse0); // normal response
131 fMUON->Chamber(chamber).SetChargeCorrel(0.11); // 11% charge spread
135 //__________________________________________________________________________
136 void AliMUONResponseFactory::BuildStation3()
138 /// Configuration for Chamber TC5/6 (Station 3) ----------
140 for (Int_t chamber = 4; chamber < 6; chamber++) {
141 fMUON->SetResponseModel(chamber, *fResponse0); // normal response
142 fMUON->Chamber(chamber).SetChargeCorrel(0.11); // 11% charge spread
146 //__________________________________________________________________________
147 void AliMUONResponseFactory::BuildStation4()
149 /// Configuration for Chamber TC7/8 (Station 4) ----------
151 for (Int_t chamber = 6; chamber < 8; chamber++) {
152 fMUON->SetResponseModel(chamber, *fResponse0); // normal response
153 fMUON->Chamber(chamber).SetChargeCorrel(0.11); // 11% charge spread
157 //__________________________________________________________________________
158 void AliMUONResponseFactory::BuildStation5()
160 /// Configuration for Chamber TC9/10 (Station 5) ---------
162 for (Int_t chamber = 8; chamber < 10; chamber++) {
163 fMUON->SetResponseModel(chamber, *fResponse0); // normal response
164 fMUON->Chamber(chamber).SetChargeCorrel(0.11); // 11% charge spread
168 //__________________________________________________________________________
169 void AliMUONResponseFactory::BuildStation6()
171 /// Configuration for Trigger Chambers (Station 6,7) ---------
173 Bool_t resTrigV1 = fMUON->GetTriggerResponseV1();
175 for (Int_t chamber = 10; chamber < 14; chamber++)
177 AliMUONResponse* response;
180 response = new AliMUONResponseTrigger;
184 response = new AliMUONResponseTriggerV1;
186 fMUON->SetResponseModel(chamber,*response);
187 fMUON->Chamber(chamber).SetChargeCorrel(0); // same charge on both cathodes
192 //__________________________________________________________________________
193 void AliMUONResponseFactory::Build(AliMUON* where)
195 /// Construct MUON responses
197 AliDebugStream(1) << "Tail effect: " << fIsTailEffect << endl;
201 // Set default parameters
203 fMUON->SetMaxStepGas(0.1);
204 fMUON->SetMaxStepAlu(0.1);
216 //__________________________________________________________________________
217 void AliMUONResponseFactory::BuildStation(AliMUON* where, Int_t stationNumber)
219 /// Construct MUON responses for given station
222 if (!fResponse0) BuildCommon();
224 switch (stationNumber) {
225 case 1: BuildStation1(); break;
226 case 2: BuildStation2(); break;
227 case 3: BuildStation3(); break;
228 case 4: BuildStation4(); break;
229 case 5: BuildStation5(); break;
230 case 6: BuildStation6(); break;
232 default: AliFatal("Wrong station number");