]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Add flag to ignore SetMaxStep for FLUKA simulations (Andreas)
authorcblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 27 May 2010 19:13:58 +0000 (19:13 +0000)
committercblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 27 May 2010 19:13:58 +0000 (19:13 +0000)
TRD/AliTRD.cxx
TRD/AliTRD.h
TRD/AliTRDv1.cxx

index fb8bc0f6427b5b1047a79029a944c1edad07e588..a2591e88c473b174697734ed82787356f1e31fe7 100644 (file)
@@ -48,6 +48,7 @@ AliTRD::AliTRD()
   ,fGasDensity(0)
   ,fFoilDensity(0)
   ,fGasNobleFraction(0)
+  ,fPrimaryIonisation(0)
 {
   //
   // Default constructor
@@ -62,6 +63,7 @@ AliTRD::AliTRD(const char *name, const char *title)
   ,fGasDensity(0)
   ,fFoilDensity(0)
   ,fGasNobleFraction(0)
+  ,fPrimaryIonisation(0)
 {
   //
   // Standard constructor for the TRD
index 08bebf579771c6ed8c886c3f7b67bf99eb9fb16e..cf24d9a89772197ef6de1d56ef15a89a62952e54 100644 (file)
@@ -59,7 +59,7 @@ class AliTRD : public AliDetector {
   virtual AliDigitizer       *CreateDigitizer(AliRunDigitizer *manager) const; 
   virtual AliLoader          *MakeLoader(const char* topfoldername);
   virtual AliTriggerDetector *CreateTriggerDetector() const { return new AliTRDTrigger(); }
-
+  void    SetPrimaryIonisation(Bool_t flag = kTRUE) {fPrimaryIonisation = flag;}  
  protected:
 
   AliTRDgeometry       *fGeometry;             //  The TRD geometry
@@ -67,7 +67,7 @@ class AliTRD : public AliDetector {
   Float_t               fGasDensity;           //  The density of the drift gas
   Float_t               fFoilDensity;          //  The density of the entrance window foil
   Float_t               fGasNobleFraction;     //  The fraction of noble gas in the mixture
-
+  Bool_t                fPrimaryIonisation;    //  switch between Fluka(true) and geant3(false)
  private:
 
   AliTRD(const AliTRD &trd);
index 6caf081ca93ded8eeff857055c35184a6940730b..3669e67034a2d8a24bf43193d73b48ce48ff5137 100644 (file)
@@ -415,7 +415,7 @@ void AliTRDv1::StepManager()
 
   // Set the maximum step size to a very large number for all 
   // neutral particles and those outside the driftvolume
-  gMC->SetMaxStep(kBig); 
+  if (!fPrimaryIonisation) gMC->SetMaxStep(kBig); 
 
   // If not charged track or already stopped or disappeared, just return.
   if ((!gMC->TrackCharge()) || 
@@ -512,6 +512,6 @@ void AliTRDv1::StepManager()
   if ((gMC->Etot() - gMC->TrackMass()) < kEkinMinStep) {
     return;
   }
-  gMC->SetMaxStep(fStepSize);
+  if (!fPrimaryIonisation) gMC->SetMaxStep(fStepSize);
 
 }