]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Improving stepmanager and reponse function of the chambers: gain and saturation ...
authormartinez <martinez@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 24 Oct 2003 08:35:00 +0000 (08:35 +0000)
committermartinez <martinez@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 24 Oct 2003 08:35:00 +0000 (08:35 +0000)
MUON/AliMUONFactory.cxx
MUON/AliMUONResponseV0.cxx
MUON/AliMUONv1.cxx

index c4c156bac5e9e09276dd4174e95607a2caf0ee93..268bec1444b10d3da1d133ae68a883a4af2256bd 100644 (file)
@@ -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);
        
         //--------------------------------------------------------
index 496f7061360087113f132395639a2aba724ee203..7fe479cc2cea6245b6c53eb08c2ceed9a0a9c2b6 100644 (file)
@@ -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;
 }
 
index 1898696ac19ebe3a21d856b6b675f2755babb8f9..68ff9a40f899e8998a6cb5ecc95e4553c8e1b448 100644 (file)
@@ -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;