From 4ac9d21ee289d62c4b6a28da37690816dfa0e316 Mon Sep 17 00:00:00 2001 From: martinez Date: Fri, 24 Oct 2003 08:35:00 +0000 Subject: [PATCH] Improving stepmanager and reponse function of the chambers: gain and saturation (Khalil Boudjemline) --- MUON/AliMUONFactory.cxx | 4 +++- MUON/AliMUONResponseV0.cxx | 12 +++++++----- MUON/AliMUONv1.cxx | 14 +++++++------- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/MUON/AliMUONFactory.cxx b/MUON/AliMUONFactory.cxx index c4c156bac5e..268bec1444b 100644 --- a/MUON/AliMUONFactory.cxx +++ b/MUON/AliMUONFactory.cxx @@ -65,9 +65,10 @@ void AliMUONFactory::BuildCommon() fResponse0->SetSqrtKy3AndDeriveKy2Ky4(0.7642); // sqrt(0.5840) fResponse0->SetPitch(0.25); // anode-cathode distance fResponse0->SetSigmaIntegration(10.); - fResponse0->SetChargeSlope(50); + fResponse0->SetChargeSlope(10); fResponse0->SetChargeSpread(0.18, 0.18); fResponse0->SetMaxAdc(4096); + fResponse0->SetSaturation(3000); fResponse0->SetZeroSuppression(6); } @@ -92,6 +93,7 @@ void AliMUONFactory::BuildStation1() // assumed proportionality to anode-cathode distance for ChargeSpread responseSt1->SetChargeSpread(0.144, 0.144); responseSt1->SetMaxAdc(4096); + responseSt1->SetSaturation(3000); responseSt1->SetZeroSuppression(6); //-------------------------------------------------------- diff --git a/MUON/AliMUONResponseV0.cxx b/MUON/AliMUONResponseV0.cxx index 496f7061360..7fe479cc2ce 100644 --- a/MUON/AliMUONResponseV0.cxx +++ b/MUON/AliMUONResponseV0.cxx @@ -53,7 +53,7 @@ Float_t AliMUONResponseV0::IntPH(Float_t eloss) { // Calculate charge from given ionization energy loss Int_t nel; - nel= Int_t(eloss*1.e9/32.); + nel= Int_t(eloss*1.e9/27.4); Float_t charge=0; if (nel == 0) nel=1; for (Int_t i=1;i<=nel;i++) { @@ -98,11 +98,13 @@ Int_t AliMUONResponseV0::DigitResponse(Int_t digit, AliMUONTransientDigit* /*wh // Float_t meanNoise = gRandom->Gaus(1, 0.2); // correct noise for slat chambers; // one more field to add to AliMUONResponseV0 to allow different noises ???? - Float_t meanNoise = gRandom->Gaus(1.5, 0.2); - Float_t noise = gRandom->Gaus(0, meanNoise); + Float_t meanNoise = gRandom->Gaus(1., 0.2); + Float_t noise = gRandom->Gaus(0., meanNoise); digit+=(Int_t)noise; - if ( digit <= ZeroSuppression()) digit = 0; - if ( digit > MaxAdc()) digit=MaxAdc(); + if ( digit <= ZeroSuppression()) digit = 0.; + // if ( digit > MaxAdc()) digit=MaxAdc(); + if ( digit > Saturation()) digit=Saturation(); + return digit; } diff --git a/MUON/AliMUONv1.cxx b/MUON/AliMUONv1.cxx index 1898696ac19..68ff9a40f89 100644 --- a/MUON/AliMUONv1.cxx +++ b/MUON/AliMUONv1.cxx @@ -1672,8 +1672,8 @@ void AliMUONv1::StepManager() if( gMC->IsTrackEntering() ) { Float_t theta = fTrackMomentum.Theta(); - if ( (theta>=10) ) gMC->SetMaxStep(fStepMaxInActiveGas); - } + if ((TMath::Pi()-theta)*kRaddeg>=15.) gMC->SetMaxStep(fStepMaxInActiveGas); // We use Pi-theta because z is negative + } // if (GetDebug()) { // Float_t z = ( (AliMUONChamber*)(*fChambers)[idvol])->Z() ; @@ -1727,9 +1727,9 @@ void AliMUONv1::StepManager() Float_t SigmaEffect_thetadegrees; Float_t ELossParticle_ELossMip; Float_t YAngleEffect=0.; - Float_t theta_wires = TMath::Abs( TMath::ASin( TMath::Sin(theta) * TMath::Sin(phi) ) ); - - if ( (Beta_x_Gamma >3.2) && (theta_wires*kRaddeg<=10) ) { + Float_t theta_wires = TMath::Abs( TMath::ASin( TMath::Sin(TMath::Pi()-theta) * TMath::Sin(phi) ) );// We use Pi-theta because z is negative + + if ( (Beta_x_Gamma >3.2) && (theta_wires*kRaddeg<=15.) ) { Beta_x_Gamma=TMath::Log(Beta_x_Gamma); ELossParticle_ELossMip = fElossRatio->Eval(Beta_x_Gamma); // 10 degrees is a reference for a model (arbitrary) @@ -1737,7 +1737,7 @@ void AliMUONv1::StepManager() // Angle with respect to the wires assuming that chambers are perpendicular to the z axis. SigmaEffect_thetadegrees = SigmaEffect_10degrees/fAngleEffectNorma->Eval(theta_wires*kRaddeg); // For 5mm gap if ( (iChamber==1) || (iChamber==2) ) - SigmaEffect_thetadegrees/=(1.09833e+00+1.70000e-02*theta_wires*kRaddeg); // The gap is different (4mm) + SigmaEffect_thetadegrees/=(1.09833e+00+1.70000e-02*(theta_wires*kRaddeg)); // The gap is different (4mm) YAngleEffect=1.e-04*gRandom->Gaus(0,SigmaEffect_thetadegrees); // Error due to the angle effect in cm } @@ -1757,7 +1757,7 @@ void AliMUONv1::StepManager() } } -//___________________________________________ +//__________________________________________ void AliMUONv1::StepManagerOld() { Int_t copy, id; -- 2.43.0