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 /// Standard constructor
50 AliDebug(1,Form("ctor this=%p",this));
53 //__________________________________________________________________________
54 AliMUONResponseFactory::AliMUONResponseFactory()
59 /// Default constructor
61 AliDebug(1,Form("default (empty) ctor this=%p",this));
64 //__________________________________________________________________________
66 AliMUONResponseFactory::~AliMUONResponseFactory()
69 AliDebug(1,Form("dtor this=%p",this));
73 //__________________________________________________________________________
74 void AliMUONResponseFactory::BuildCommon()
76 /// Construct the default response.
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);
91 //__________________________________________________________________________
92 void AliMUONResponseFactory::BuildStation1()
94 /// Configuration for Chamber TC1/2 (Station 1) ----------
96 // Response for 4 mm of gas (station 1)
97 // automatic consistency with width of sensitive medium in CreateGeometry ????
98 AliMUONResponseV0 responseSt1;
99 // Mathieson parameters from L.Kharmandarian's thesis, page 190
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.);
104 // ChargeSlope larger to compensate for the smaller anode-cathode distance
105 // and keep the same most probable ADC channel for mip's
106 responseSt1.SetChargeSlope(62.5);
107 // assumed proportionality to anode-cathode distance for ChargeSpread
108 responseSt1.SetChargeSpread(0.144, 0.144);
109 responseSt1.SetMaxAdc(4096);
110 responseSt1.SetSaturation(3000);
111 responseSt1.SetZeroSuppression(6);
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
119 //__________________________________________________________________________
120 void AliMUONResponseFactory::BuildStation2()
122 /// Configuration for Chamber TC3/4 (Station 2) -----------
124 for (Int_t chamber = 2; chamber < 4; chamber++) {
125 fMUON->SetResponseModel(chamber, *fResponse0); // normal response
126 fMUON->Chamber(chamber).SetChargeCorrel(0.11); // 11% charge spread
130 //__________________________________________________________________________
131 void AliMUONResponseFactory::BuildStation3()
133 /// Configuration for Chamber TC5/6 (Station 3) ----------
135 for (Int_t chamber = 4; chamber < 6; chamber++) {
136 fMUON->SetResponseModel(chamber, *fResponse0); // normal response
137 fMUON->Chamber(chamber).SetChargeCorrel(0.11); // 11% charge spread
141 //__________________________________________________________________________
142 void AliMUONResponseFactory::BuildStation4()
144 /// Configuration for Chamber TC7/8 (Station 4) ----------
146 for (Int_t chamber = 6; chamber < 8; chamber++) {
147 fMUON->SetResponseModel(chamber, *fResponse0); // normal response
148 fMUON->Chamber(chamber).SetChargeCorrel(0.11); // 11% charge spread
152 //__________________________________________________________________________
153 void AliMUONResponseFactory::BuildStation5()
155 /// Configuration for Chamber TC9/10 (Station 5) ---------
157 for (Int_t chamber = 8; chamber < 10; chamber++) {
158 fMUON->SetResponseModel(chamber, *fResponse0); // normal response
159 fMUON->Chamber(chamber).SetChargeCorrel(0.11); // 11% charge spread
163 //__________________________________________________________________________
164 void AliMUONResponseFactory::BuildStation6()
166 /// Configuration for Trigger Chambers (Station 6,7) ---------
168 Bool_t resTrigV1 = fMUON->GetTriggerResponseV1();
170 for (Int_t chamber = 10; chamber < 14; chamber++)
172 AliMUONResponse* response;
175 response = new AliMUONResponseTrigger;
179 response = new AliMUONResponseTriggerV1;
181 fMUON->SetResponseModel(chamber,*response);
182 fMUON->Chamber(chamber).SetChargeCorrel(0); // same charge on both cathodes
187 //__________________________________________________________________________
188 void AliMUONResponseFactory::Build(AliMUON* where)
190 /// Construct MUON responses
194 // Set default parameters
196 fMUON->SetMaxStepGas(0.1);
197 fMUON->SetMaxStepAlu(0.1);
209 //__________________________________________________________________________
210 void AliMUONResponseFactory::BuildStation(AliMUON* where, Int_t stationNumber)
212 /// Construct MUON responses for given station
215 if (!fResponse0) BuildCommon();
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;
225 default: AliFatal("Wrong station number");