#include "AliMUONResponseFactory.h"
#include "AliRun.h"
#include "AliLog.h"
#include "AliMpPlaneType.h"
#include "AliMUON.h"
#include "AliMUONConstants.h"
#include "AliMUONChamber.h"
#include "AliMUONResponseV0.h"
#include "AliMUONResponseTrigger.h"
#include "AliMUONResponseTriggerV1.h"
using std::endl;
ClassImp(AliMUONResponseFactory)
AliMUONResponseFactory::AliMUONResponseFactory(const char* name,
Bool_t isTailEffect)
: TNamed(name, ""),
fMUON(0),
fResponse0(0),
fIsTailEffect(isTailEffect)
{
AliDebug(1,Form("ctor this=%p",this));
}
AliMUONResponseFactory::AliMUONResponseFactory()
: TNamed(),
fMUON(0),
fResponse0(0),
fIsTailEffect(kTRUE)
{
AliDebug(1,Form("default (empty) ctor this=%p",this));
}
AliMUONResponseFactory::~AliMUONResponseFactory()
{
AliDebug(1,Form("dtor this=%p",this));
delete fResponse0;
}
void AliMUONResponseFactory::BuildCommon()
{
fResponse0 = new AliMUONResponseV0;
fResponse0->SetSqrtKx3AndDeriveKx2Kx4(0.7131);
fResponse0->SetSqrtKy3AndDeriveKy2Ky4(0.7642);
fResponse0->SetPitch(AliMUONConstants::Pitch());
fResponse0->SetSigmaIntegration(10.);
fResponse0->SetChargeSlope(10);
fResponse0->SetChargeSpread(0.18, 0.18);
fResponse0->SetMaxAdc(4096);
fResponse0->SetSaturation(3000);
fResponse0->SetZeroSuppression(6);
fResponse0->SetTailEffect(fIsTailEffect);
}
void AliMUONResponseFactory::BuildStation1()
{
AliMUONResponseV0 responseSt1;
responseSt1.SetSqrtKx3AndDeriveKx2Kx4(0.7000);
responseSt1.SetSqrtKy3AndDeriveKy2Ky4(0.7550);
responseSt1.SetPitch(AliMUONConstants::PitchSt1());
responseSt1.SetSigmaIntegration(10.);
responseSt1.SetChargeSlope(25);
responseSt1.SetChargeSpread(0.144, 0.144);
responseSt1.SetMaxAdc(4096);
responseSt1.SetSaturation(3000);
responseSt1.SetZeroSuppression(6);
responseSt1.SetTailEffect(fIsTailEffect);
for (Int_t chamber = 0; chamber < 2; chamber++) {
fMUON->SetResponseModel(chamber, responseSt1);
fMUON->Chamber(chamber).SetChargeCorrel(0.11);
}
}
void AliMUONResponseFactory::BuildStation2()
{
for (Int_t chamber = 2; chamber < 4; chamber++) {
fMUON->SetResponseModel(chamber, *fResponse0);
fMUON->Chamber(chamber).SetChargeCorrel(0.11);
}
}
void AliMUONResponseFactory::BuildStation3()
{
for (Int_t chamber = 4; chamber < 6; chamber++) {
fMUON->SetResponseModel(chamber, *fResponse0);
fMUON->Chamber(chamber).SetChargeCorrel(0.11);
}
}
void AliMUONResponseFactory::BuildStation4()
{
for (Int_t chamber = 6; chamber < 8; chamber++) {
fMUON->SetResponseModel(chamber, *fResponse0);
fMUON->Chamber(chamber).SetChargeCorrel(0.11);
}
}
void AliMUONResponseFactory::BuildStation5()
{
for (Int_t chamber = 8; chamber < 10; chamber++) {
fMUON->SetResponseModel(chamber, *fResponse0);
fMUON->Chamber(chamber).SetChargeCorrel(0.11);
}
}
void AliMUONResponseFactory::BuildStation6()
{
Int_t resTrigV1 = fMUON->GetTriggerResponseV1();
for (Int_t chamber = 10; chamber < 14; chamber++)
{
AliMUONResponse* response;
if(resTrigV1==1 || resTrigV1==2)
{
response = new AliMUONResponseTriggerV1(resTrigV1);
}
else
{
response = new AliMUONResponseTrigger;
}
fMUON->SetResponseModel(chamber,*response);
fMUON->Chamber(chamber).SetChargeCorrel(0);
delete response;
}
}
void AliMUONResponseFactory::Build(AliMUON* where)
{
AliDebugStream(1) << "Tail effect: " << fIsTailEffect << endl;
fMUON = where;
fMUON->SetIshunt(0);
fMUON->SetMaxStepGas(0.1);
fMUON->SetMaxStepAlu(0.1);
BuildCommon();
BuildStation1();
BuildStation2();
BuildStation3();
BuildStation4();
BuildStation5();
BuildStation6();
}
void AliMUONResponseFactory::BuildStation(AliMUON* where, Int_t stationNumber)
{
fMUON = where;
if (!fResponse0) BuildCommon();
switch (stationNumber) {
case 1: BuildStation1(); break;
case 2: BuildStation2(); break;
case 3: BuildStation3(); break;
case 4: BuildStation4(); break;
case 5: BuildStation5(); break;
case 6: BuildStation6(); break;
default: AliFatal("Wrong station number");
}
}
AliMUONResponseFactory.cxx:1 AliMUONResponseFactory.cxx:2 AliMUONResponseFactory.cxx:3 AliMUONResponseFactory.cxx:4 AliMUONResponseFactory.cxx:5 AliMUONResponseFactory.cxx:6 AliMUONResponseFactory.cxx:7 AliMUONResponseFactory.cxx:8 AliMUONResponseFactory.cxx:9 AliMUONResponseFactory.cxx:10 AliMUONResponseFactory.cxx:11 AliMUONResponseFactory.cxx:12 AliMUONResponseFactory.cxx:13 AliMUONResponseFactory.cxx:14 AliMUONResponseFactory.cxx:15 AliMUONResponseFactory.cxx:16 AliMUONResponseFactory.cxx:17 AliMUONResponseFactory.cxx:18 AliMUONResponseFactory.cxx:19 AliMUONResponseFactory.cxx:20 AliMUONResponseFactory.cxx:21 AliMUONResponseFactory.cxx:22 AliMUONResponseFactory.cxx:23 AliMUONResponseFactory.cxx:24 AliMUONResponseFactory.cxx:25 AliMUONResponseFactory.cxx:26 AliMUONResponseFactory.cxx:27 AliMUONResponseFactory.cxx:28 AliMUONResponseFactory.cxx:29 AliMUONResponseFactory.cxx:30 AliMUONResponseFactory.cxx:31 AliMUONResponseFactory.cxx:32 AliMUONResponseFactory.cxx:33 AliMUONResponseFactory.cxx:34 AliMUONResponseFactory.cxx:35 AliMUONResponseFactory.cxx:36 AliMUONResponseFactory.cxx:37 AliMUONResponseFactory.cxx:38 AliMUONResponseFactory.cxx:39 AliMUONResponseFactory.cxx:40 AliMUONResponseFactory.cxx:41 AliMUONResponseFactory.cxx:42 AliMUONResponseFactory.cxx:43 AliMUONResponseFactory.cxx:44 AliMUONResponseFactory.cxx:45 AliMUONResponseFactory.cxx:46 AliMUONResponseFactory.cxx:47 AliMUONResponseFactory.cxx:48 AliMUONResponseFactory.cxx:49 AliMUONResponseFactory.cxx:50 AliMUONResponseFactory.cxx:51 AliMUONResponseFactory.cxx:52 AliMUONResponseFactory.cxx:53 AliMUONResponseFactory.cxx:54 AliMUONResponseFactory.cxx:55 AliMUONResponseFactory.cxx:56 AliMUONResponseFactory.cxx:57 AliMUONResponseFactory.cxx:58 AliMUONResponseFactory.cxx:59 AliMUONResponseFactory.cxx:60 AliMUONResponseFactory.cxx:61 AliMUONResponseFactory.cxx:62 AliMUONResponseFactory.cxx:63 AliMUONResponseFactory.cxx:64 AliMUONResponseFactory.cxx:65 AliMUONResponseFactory.cxx:66 AliMUONResponseFactory.cxx:67 AliMUONResponseFactory.cxx:68 AliMUONResponseFactory.cxx:69 AliMUONResponseFactory.cxx:70 AliMUONResponseFactory.cxx:71 AliMUONResponseFactory.cxx:72 AliMUONResponseFactory.cxx:73 AliMUONResponseFactory.cxx:74 AliMUONResponseFactory.cxx:75 AliMUONResponseFactory.cxx:76 AliMUONResponseFactory.cxx:77 AliMUONResponseFactory.cxx:78 AliMUONResponseFactory.cxx:79 AliMUONResponseFactory.cxx:80 AliMUONResponseFactory.cxx:81 AliMUONResponseFactory.cxx:82 AliMUONResponseFactory.cxx:83 AliMUONResponseFactory.cxx:84 AliMUONResponseFactory.cxx:85 AliMUONResponseFactory.cxx:86 AliMUONResponseFactory.cxx:87 AliMUONResponseFactory.cxx:88 AliMUONResponseFactory.cxx:89 AliMUONResponseFactory.cxx:90 AliMUONResponseFactory.cxx:91 AliMUONResponseFactory.cxx:92 AliMUONResponseFactory.cxx:93 AliMUONResponseFactory.cxx:94 AliMUONResponseFactory.cxx:95 AliMUONResponseFactory.cxx:96 AliMUONResponseFactory.cxx:97 AliMUONResponseFactory.cxx:98 AliMUONResponseFactory.cxx:99 AliMUONResponseFactory.cxx:100 AliMUONResponseFactory.cxx:101 AliMUONResponseFactory.cxx:102 AliMUONResponseFactory.cxx:103 AliMUONResponseFactory.cxx:104 AliMUONResponseFactory.cxx:105 AliMUONResponseFactory.cxx:106 AliMUONResponseFactory.cxx:107 AliMUONResponseFactory.cxx:108 AliMUONResponseFactory.cxx:109 AliMUONResponseFactory.cxx:110 AliMUONResponseFactory.cxx:111 AliMUONResponseFactory.cxx:112 AliMUONResponseFactory.cxx:113 AliMUONResponseFactory.cxx:114 AliMUONResponseFactory.cxx:115 AliMUONResponseFactory.cxx:116 AliMUONResponseFactory.cxx:117 AliMUONResponseFactory.cxx:118 AliMUONResponseFactory.cxx:119 AliMUONResponseFactory.cxx:120 AliMUONResponseFactory.cxx:121 AliMUONResponseFactory.cxx:122 AliMUONResponseFactory.cxx:123 AliMUONResponseFactory.cxx:124 AliMUONResponseFactory.cxx:125 AliMUONResponseFactory.cxx:126 AliMUONResponseFactory.cxx:127 AliMUONResponseFactory.cxx:128 AliMUONResponseFactory.cxx:129 AliMUONResponseFactory.cxx:130 AliMUONResponseFactory.cxx:131 AliMUONResponseFactory.cxx:132 AliMUONResponseFactory.cxx:133 AliMUONResponseFactory.cxx:134 AliMUONResponseFactory.cxx:135 AliMUONResponseFactory.cxx:136 AliMUONResponseFactory.cxx:137 AliMUONResponseFactory.cxx:138 AliMUONResponseFactory.cxx:139 AliMUONResponseFactory.cxx:140 AliMUONResponseFactory.cxx:141 AliMUONResponseFactory.cxx:142 AliMUONResponseFactory.cxx:143 AliMUONResponseFactory.cxx:144 AliMUONResponseFactory.cxx:145 AliMUONResponseFactory.cxx:146 AliMUONResponseFactory.cxx:147 AliMUONResponseFactory.cxx:148 AliMUONResponseFactory.cxx:149 AliMUONResponseFactory.cxx:150 AliMUONResponseFactory.cxx:151 AliMUONResponseFactory.cxx:152 AliMUONResponseFactory.cxx:153 AliMUONResponseFactory.cxx:154 AliMUONResponseFactory.cxx:155 AliMUONResponseFactory.cxx:156 AliMUONResponseFactory.cxx:157 AliMUONResponseFactory.cxx:158 AliMUONResponseFactory.cxx:159 AliMUONResponseFactory.cxx:160 AliMUONResponseFactory.cxx:161 AliMUONResponseFactory.cxx:162 AliMUONResponseFactory.cxx:163 AliMUONResponseFactory.cxx:164 AliMUONResponseFactory.cxx:165 AliMUONResponseFactory.cxx:166 AliMUONResponseFactory.cxx:167 AliMUONResponseFactory.cxx:168 AliMUONResponseFactory.cxx:169 AliMUONResponseFactory.cxx:170 AliMUONResponseFactory.cxx:171 AliMUONResponseFactory.cxx:172 AliMUONResponseFactory.cxx:173 AliMUONResponseFactory.cxx:174 AliMUONResponseFactory.cxx:175 AliMUONResponseFactory.cxx:176 AliMUONResponseFactory.cxx:177 AliMUONResponseFactory.cxx:178 AliMUONResponseFactory.cxx:179 AliMUONResponseFactory.cxx:180 AliMUONResponseFactory.cxx:181 AliMUONResponseFactory.cxx:182 AliMUONResponseFactory.cxx:183 AliMUONResponseFactory.cxx:184 AliMUONResponseFactory.cxx:185 AliMUONResponseFactory.cxx:186 AliMUONResponseFactory.cxx:187 AliMUONResponseFactory.cxx:188 AliMUONResponseFactory.cxx:189 AliMUONResponseFactory.cxx:190 AliMUONResponseFactory.cxx:191 AliMUONResponseFactory.cxx:192 AliMUONResponseFactory.cxx:193 AliMUONResponseFactory.cxx:194 AliMUONResponseFactory.cxx:195 AliMUONResponseFactory.cxx:196 AliMUONResponseFactory.cxx:197 AliMUONResponseFactory.cxx:198 AliMUONResponseFactory.cxx:199 AliMUONResponseFactory.cxx:200 AliMUONResponseFactory.cxx:201 AliMUONResponseFactory.cxx:202 AliMUONResponseFactory.cxx:203 AliMUONResponseFactory.cxx:204 AliMUONResponseFactory.cxx:205 AliMUONResponseFactory.cxx:206 AliMUONResponseFactory.cxx:207 AliMUONResponseFactory.cxx:208 AliMUONResponseFactory.cxx:209 AliMUONResponseFactory.cxx:210 AliMUONResponseFactory.cxx:211 AliMUONResponseFactory.cxx:212 AliMUONResponseFactory.cxx:213 AliMUONResponseFactory.cxx:214 AliMUONResponseFactory.cxx:215 AliMUONResponseFactory.cxx:216 AliMUONResponseFactory.cxx:217 AliMUONResponseFactory.cxx:218 AliMUONResponseFactory.cxx:219 AliMUONResponseFactory.cxx:220 AliMUONResponseFactory.cxx:221 AliMUONResponseFactory.cxx:222 AliMUONResponseFactory.cxx:223 AliMUONResponseFactory.cxx:224 AliMUONResponseFactory.cxx:225 AliMUONResponseFactory.cxx:226 AliMUONResponseFactory.cxx:227 AliMUONResponseFactory.cxx:228 AliMUONResponseFactory.cxx:229 AliMUONResponseFactory.cxx:230 AliMUONResponseFactory.cxx:231 AliMUONResponseFactory.cxx:232 AliMUONResponseFactory.cxx:233 AliMUONResponseFactory.cxx:234 AliMUONResponseFactory.cxx:235 AliMUONResponseFactory.cxx:236 AliMUONResponseFactory.cxx:237