Skip to content

Commit

Permalink
Backport of 8191acda7 as requested in ALIROOT-6439
Browse files Browse the repository at this point in the history
Move call of AliEMCALEMCGeometry::DefineSamplingFraction from
AliEMCALEMCGeometry::Init() to AliEMCALv0::CreateGeometry(); change AliDebug to
AliInfo to check the sampling factor set in DefineSamplingFraction;
Modifications needed for Geant4.

Compared to 8191acda7 files were in a different location.
  • Loading branch information
ktf committed Mar 18, 2016
1 parent 885749d commit 220b2e3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 3 additions & 3 deletions EMCAL/AliEMCALEMCGeometry.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,8 @@ void AliEMCALEMCGeometry::Init(const Text_t* mcname, const Text_t* mctitle){
if(fNumberOfSuperModules == 12) {fEMCALPhiMax = fArm1PhiMax ;}

//called after setting of scintillator and lead layer parameters
DefineSamplingFraction(mcname,mctitle);
// called now in AliEMCALv0::CreateGeometry() - 18/03/16
// DefineSamplingFraction(mcname,mctitle);


// TRU parameters - Apr 29,08 by PAI.
Expand Down Expand Up @@ -732,9 +733,8 @@ void AliEMCALEMCGeometry::DefineSamplingFraction(const Text_t* mcname, const Tex
else samplingFactorTranportModel = 0.86 ; // 1.15 (CHIPS), 1.149 (BERT), 1.147 (BERT_CHIPS)
}

AliDebug(2,Form("MC modeler <%s>, Title <%s>: Sampling %f, model fraction with respect to G3 %f, final sampling %f \n",
AliInfo(Form("MC modeler <%s>, Title <%s>: Sampling %2.3f, model fraction with respect to G3 %2.3f, final sampling %2.3f",
mcName.Data(),mcTitle.Data(),fSampling,samplingFactorTranportModel,fSampling*samplingFactorTranportModel));


fSampling*=samplingFactorTranportModel;

Expand Down
4 changes: 4 additions & 0 deletions EMCAL/AliEMCALv0.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,10 @@ void AliEMCALv0::CreateGeometry()
fCalFrame = new AliEMCALSpaceFrame();
fCalFrame->CreateGeometry();
}

// Set the sampling fraction used at creation hit level
// Previously called in AliEMCALEMCGeometry::Init(), put it here for proper initialization by Geant3/4
geom->GetEMCGeometry()->DefineSamplingFraction(TVirtualMC::GetMC()->GetName(),TVirtualMC::GetMC()->GetTitle());
}

//______________________________________________________________________
Expand Down

0 comments on commit 220b2e3

Please sign in to comment.