From 674812e4653cafd824c6cbb07b7207fdf2a46a58 Mon Sep 17 00:00:00 2001 From: cblume Date: Thu, 27 May 2010 19:13:58 +0000 Subject: [PATCH] Add flag to ignore SetMaxStep for FLUKA simulations (Andreas) --- TRD/AliTRD.cxx | 2 ++ TRD/AliTRD.h | 4 ++-- TRD/AliTRDv1.cxx | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/TRD/AliTRD.cxx b/TRD/AliTRD.cxx index fb8bc0f6427..a2591e88c47 100644 --- a/TRD/AliTRD.cxx +++ b/TRD/AliTRD.cxx @@ -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 diff --git a/TRD/AliTRD.h b/TRD/AliTRD.h index 08bebf57977..cf24d9a8977 100644 --- a/TRD/AliTRD.h +++ b/TRD/AliTRD.h @@ -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); diff --git a/TRD/AliTRDv1.cxx b/TRD/AliTRDv1.cxx index 6caf081ca93..3669e67034a 100644 --- a/TRD/AliTRDv1.cxx +++ b/TRD/AliTRDv1.cxx @@ -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); } -- 2.43.0