AliRoot Core  d69033e (d69033e)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliMUONResponseFactory.cxx
Go to the documentation of this file.
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"
37 #include <iostream>
38 
39 using std::endl;
43 
44 //__________________________________________________________________________
46  Bool_t isTailEffect)
47  : TNamed(name, ""),
48  fMUON(0),
49  fResponse0(0),
50  fIsTailEffect(isTailEffect)
51 {
53 
54  AliDebug(1,Form("ctor this=%p",this));
55 }
56 
57 //__________________________________________________________________________
59  : TNamed(),
60  fMUON(0),
61  fResponse0(0),
62  fIsTailEffect(kTRUE)
63 {
65 
66  AliDebug(1,Form("default (empty) ctor this=%p",this));
67 }
68 
69 //__________________________________________________________________________
70 
72 {
74  AliDebug(1,Form("dtor this=%p",this));
75  delete fResponse0;
76 }
77 
78 //__________________________________________________________________________
80 {
82 
83  // Default response: 5 mm of gas
85  fResponse0->SetSqrtKx3AndDeriveKx2Kx4(0.7131); // sqrt(0.5085)
86  fResponse0->SetSqrtKy3AndDeriveKy2Ky4(0.7642); // sqrt(0.5840)
87  fResponse0->SetPitch(AliMUONConstants::Pitch()); // anode-cathode distance
90  fResponse0->SetChargeSpread(0.18, 0.18);
91  fResponse0->SetMaxAdc(4096);
95 }
96 
97 //__________________________________________________________________________
99 {
101 
102  // Response for 4 mm of gas (station 1)
103  // automatic consistency with width of sensitive medium in CreateGeometry ????
104  AliMUONResponseV0 responseSt1;
105  // Mathieson parameters from L.Kharmandarian's thesis, page 190
106  responseSt1.SetSqrtKx3AndDeriveKx2Kx4(0.7000); // sqrt(0.4900)
107  responseSt1.SetSqrtKy3AndDeriveKy2Ky4(0.7550); // sqrt(0.5700)
108  responseSt1.SetPitch(AliMUONConstants::PitchSt1()); // anode-cathode distance
109  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  responseSt1.SetChargeSlope(25); // SP & JC ajusted to match 2010 real data was 62.5
113  // assumed proportionality to anode-cathode distance for ChargeSpread
114  responseSt1.SetChargeSpread(0.144, 0.144);
115  responseSt1.SetMaxAdc(4096);
116  responseSt1.SetSaturation(3000);
117  responseSt1.SetZeroSuppression(6);
118  responseSt1.SetTailEffect(fIsTailEffect);
119 
120  for (Int_t chamber = 0; chamber < 2; chamber++) {
121  fMUON->SetResponseModel(chamber, responseSt1); // special response
122  fMUON->Chamber(chamber).SetChargeCorrel(0.11); // 11% charge spread
123  }
124 }
125 
126 //__________________________________________________________________________
128 {
130 
131  for (Int_t chamber = 2; chamber < 4; chamber++) {
132  fMUON->SetResponseModel(chamber, *fResponse0); // normal response
133  fMUON->Chamber(chamber).SetChargeCorrel(0.11); // 11% charge spread
134  }
135 }
136 
137 //__________________________________________________________________________
139 {
141 
142  for (Int_t chamber = 4; chamber < 6; chamber++) {
143  fMUON->SetResponseModel(chamber, *fResponse0); // normal response
144  fMUON->Chamber(chamber).SetChargeCorrel(0.11); // 11% charge spread
145  }
146 }
147 
148 //__________________________________________________________________________
150 {
152 
153  for (Int_t chamber = 6; chamber < 8; chamber++) {
154  fMUON->SetResponseModel(chamber, *fResponse0); // normal response
155  fMUON->Chamber(chamber).SetChargeCorrel(0.11); // 11% charge spread
156  }
157 }
158 
159 //__________________________________________________________________________
161 {
163 
164  for (Int_t chamber = 8; chamber < 10; chamber++) {
165  fMUON->SetResponseModel(chamber, *fResponse0); // normal response
166  fMUON->Chamber(chamber).SetChargeCorrel(0.11); // 11% charge spread
167  }
168 }
169 
170 //__________________________________________________________________________
172 {
174 
175  Int_t resTrigV1 = fMUON->GetTriggerResponseV1();
176 
177  for (Int_t chamber = 10; chamber < 14; chamber++)
178  {
179  AliMUONResponse* response;
180  if(resTrigV1==1 || resTrigV1==2) //cluster size ON
181  {
182  response = new AliMUONResponseTriggerV1(resTrigV1); //1=STREAMER - 2=AVALANCHE
183  }
184 
185  else // default: clustrer size OFF
186  {
187  response = new AliMUONResponseTrigger;
188  }
189 
190  fMUON->SetResponseModel(chamber,*response);
191  fMUON->Chamber(chamber).SetChargeCorrel(0); // same charge on both cathodes
192  delete response;
193  }
194 }
195 
196 //__________________________________________________________________________
198 {
200 
201  AliDebugStream(1) << "Tail effect: " << fIsTailEffect << endl;
202 
203  fMUON = where;
204 
205  // Set default parameters
206  fMUON->SetIshunt(0);
207  fMUON->SetMaxStepGas(0.1);
208  fMUON->SetMaxStepAlu(0.1);
209 
210  // Build stations
211  BuildCommon();
212  BuildStation1();
213  BuildStation2();
214  BuildStation3();
215  BuildStation4();
216  BuildStation5();
217  BuildStation6();
218 }
219 
220 //__________________________________________________________________________
221 void AliMUONResponseFactory::BuildStation(AliMUON* where, Int_t stationNumber)
222 {
224 
225  fMUON = where;
226  if (!fResponse0) BuildCommon();
227 
228  switch (stationNumber) {
229  case 1: BuildStation1(); break;
230  case 2: BuildStation2(); break;
231  case 3: BuildStation3(); break;
232  case 4: BuildStation4(); break;
233  case 5: BuildStation5(); break;
234  case 6: BuildStation6(); break;
235 
236  default: AliFatal("Wrong station number");
237  }
238 }
static Float_t Pitch()
Return wire pitch.
virtual void SetTailEffect(Bool_t isTail)
Parametrised tail effect in resolution histogram.
virtual AliMUONChamber & Chamber(Int_t id)
Return reference to Chamber id.
Definition: AliMUON.h:135
AliDetector class for MUON subsystem providing simulation data management.
Definition: AliMUON.h:37
virtual void SetSqrtKy3AndDeriveKy2Ky4(Float_t SqrtKy3)
Mathieson sqrt{Ky3} and derived Ky2 and Ky4.
virtual void SetPitch(Float_t p1)
Get anode cathode Pitch.
static Float_t PitchSt1()
Return wire pitch for Station 1 & 2.
Bool_t fIsTailEffect
switch to turn on/off the tail effect
virtual void SetMaxStepGas(Float_t p1)
Definition: AliMUON.cxx:358
ClassImp(TPCGenInfo)
Definition: AliTPCCmpNG.C:254
Factory for muon response.
virtual void SetResponseModel(Int_t id, const AliMUONResponse &response)
Definition: AliMUON.cxx:435
AliMUONResponseV0 * fResponse0
default response
virtual void SetZeroSuppression(Int_t p1)
Set zero suppression threshold.
virtual void SetSigmaIntegration(Float_t p1)
Set number of sigmas over which cluster didintegration is performed.
Implementation of RPC response.
AliMUON * fMUON
MUON detector.
Implementation of RPC response.
virtual void SetMaxAdc(Int_t p1)
Set maximum Adc-count value.
virtual Int_t GetTriggerResponseV1() const
Definition: AliMUON.cxx:611
virtual void SetChargeCorrel(Float_t correl)
Set charge correlation.
Implementation of Mathieson response.
virtual void SetChargeSlope(Float_t p1)
Set single electron pulse height (ADCcounts/e)
void BuildStation(AliMUON *where, Int_t stationNumber)
virtual void SetSqrtKx3AndDeriveKx2Kx4(Float_t SqrtKx3)
Chamber response base class.
virtual void SetMaxStepAlu(Float_t p1)
Definition: AliMUON.cxx:365
virtual void SetSaturation(Int_t p1)
Set saturation value.
virtual void SetChargeSpread(Float_t p1, Float_t p2)
Set sigmas of the charge spread function.