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 **************************************************************************/
16 // -----------------------------
17 // Class AliMUONResponseFactory
18 // -----------------------------
19 // Factory for muon response
20 // Class separated from AliMUONFactoryV4
24 #include "AliMUONResponseFactory.h"
28 #include "AliMpPlaneType.h"
31 #include "AliMUONConstants.h"
32 #include "AliMUONChamber.h"
33 #include "AliMUONResponseV0.h"
34 #include "AliMUONResponseTrigger.h"
35 #include "AliMUONResponseTriggerV1.h"
38 ClassImp(AliMUONResponseFactory)
41 //__________________________________________________________________________
42 AliMUONResponseFactory::AliMUONResponseFactory(const char* name)
47 /// Standard constructor
49 AliDebug(1,Form("ctor this=%p",this));
52 //__________________________________________________________________________
53 AliMUONResponseFactory::AliMUONResponseFactory()
58 /// Default constructor
60 AliDebug(1,Form("default (empty) ctor this=%p",this));
63 //__________________________________________________________________________
65 AliMUONResponseFactory::~AliMUONResponseFactory()
68 AliDebug(1,Form("dtor this=%p",this));
72 //__________________________________________________________________________
73 void AliMUONResponseFactory::BuildCommon()
75 /// Construct the default response.
77 // Default response: 5 mm of gas
78 fResponse0 = new AliMUONResponseV0;
79 fResponse0->SetSqrtKx3AndDeriveKx2Kx4(0.7131); // sqrt(0.5085)
80 fResponse0->SetSqrtKy3AndDeriveKy2Ky4(0.7642); // sqrt(0.5840)
81 fResponse0->SetPitch(AliMUONConstants::Pitch()); // anode-cathode distance
82 fResponse0->SetSigmaIntegration(10.);
83 fResponse0->SetChargeSlope(10);
84 fResponse0->SetChargeSpread(0.18, 0.18);
85 fResponse0->SetMaxAdc(4096);
86 fResponse0->SetSaturation(3000);
87 fResponse0->SetZeroSuppression(6);
90 //__________________________________________________________________________
91 void AliMUONResponseFactory::BuildStation1()
93 /// Configuration for Chamber TC1/2 (Station 1) ----------
95 // Response for 4 mm of gas (station 1)
96 // automatic consistency with width of sensitive medium in CreateGeometry ????
97 AliMUONResponseV0 responseSt1;
98 // Mathieson parameters from L.Kharmandarian's thesis, page 190
99 responseSt1.SetSqrtKx3AndDeriveKx2Kx4(0.7000); // sqrt(0.4900)
100 responseSt1.SetSqrtKy3AndDeriveKy2Ky4(0.7550); // sqrt(0.5700)
101 responseSt1.SetPitch(AliMUONConstants::PitchSt1()); // anode-cathode distance
102 responseSt1.SetSigmaIntegration(10.);
103 // ChargeSlope larger to compensate for the smaller anode-cathode distance
104 // and keep the same most probable ADC channel for mip's
105 responseSt1.SetChargeSlope(62.5);
106 // assumed proportionality to anode-cathode distance for ChargeSpread
107 responseSt1.SetChargeSpread(0.144, 0.144);
108 responseSt1.SetMaxAdc(4096);
109 responseSt1.SetSaturation(3000);
110 responseSt1.SetZeroSuppression(6);
112 for (Int_t chamber = 0; chamber < 2; chamber++) {
113 fMUON->SetResponseModel(chamber, responseSt1); // special response
114 fMUON->Chamber(chamber).SetChargeCorrel(0.11); // 11% charge spread
118 //__________________________________________________________________________
119 void AliMUONResponseFactory::BuildStation2()
121 /// Configuration for Chamber TC3/4 (Station 2) -----------
123 for (Int_t chamber = 2; chamber < 4; chamber++) {
124 fMUON->SetResponseModel(chamber, *fResponse0); // normal response
125 fMUON->Chamber(chamber).SetChargeCorrel(0.11); // 11% charge spread
129 //__________________________________________________________________________
130 void AliMUONResponseFactory::BuildStation3()
132 /// Configuration for Chamber TC5/6 (Station 3) ----------
134 for (Int_t chamber = 4; chamber < 6; chamber++) {
135 fMUON->SetResponseModel(chamber, *fResponse0); // normal response
136 fMUON->Chamber(chamber).SetChargeCorrel(0.11); // 11% charge spread
140 //__________________________________________________________________________
141 void AliMUONResponseFactory::BuildStation4()
143 /// Configuration for Chamber TC7/8 (Station 4) ----------
145 for (Int_t chamber = 6; chamber < 8; chamber++) {
146 fMUON->SetResponseModel(chamber, *fResponse0); // normal response
147 fMUON->Chamber(chamber).SetChargeCorrel(0.11); // 11% charge spread
151 //__________________________________________________________________________
152 void AliMUONResponseFactory::BuildStation5()
154 /// Configuration for Chamber TC9/10 (Station 5) ---------
156 for (Int_t chamber = 8; chamber < 10; chamber++) {
157 fMUON->SetResponseModel(chamber, *fResponse0); // normal response
158 fMUON->Chamber(chamber).SetChargeCorrel(0.11); // 11% charge spread
162 //__________________________________________________________________________
163 void AliMUONResponseFactory::BuildStation6()
165 /// Configuration for Trigger Chambers (Station 6,7) ---------
167 Bool_t resTrigV1 = fMUON->GetTriggerResponseV1();
169 for (Int_t chamber = 10; chamber < 14; chamber++)
171 AliMUONResponse* response;
174 response = new AliMUONResponseTrigger;
178 response = new AliMUONResponseTriggerV1;
180 fMUON->SetResponseModel(chamber,*response);
181 fMUON->Chamber(chamber).SetChargeCorrel(0); // same charge on both cathodes
186 //__________________________________________________________________________
187 void AliMUONResponseFactory::Build(AliMUON* where)
189 /// Construct MUON responses
193 // Set default parameters
195 fMUON->SetMaxStepGas(0.1);
196 fMUON->SetMaxStepAlu(0.1);
208 //__________________________________________________________________________
209 void AliMUONResponseFactory::BuildStation(AliMUON* where, Int_t stationNumber)
211 /// Construct MUON responses for given station
214 if (!fResponse0) BuildCommon();
216 switch (stationNumber) {
217 case 1: BuildStation1(); break;
218 case 2: BuildStation2(); break;
219 case 3: BuildStation3(); break;
220 case 4: BuildStation4(); break;
221 case 5: BuildStation5(); break;
222 case 6: BuildStation6(); break;
224 default: AliFatal("Wrong station number");