Skip to content
Snippets Groups Projects
Commit 3e15b22c authored by Tadej Novak's avatar Tadej Novak
Browse files

Add CLHEP random engine to TFCSSimulationState

Former-commit-id: 249818c2862457eb93f142a30c044a94c750f6a1
parent 47f112be
No related branches found
No related tags found
No related merge requests found
......@@ -12,10 +12,18 @@
class CaloDetDescrElement;
namespace CLHEP
{
class HepRandomEngine;
}
class TFCSSimulationState:public TObject
{
public:
TFCSSimulationState();
TFCSSimulationState(CLHEP::HepRandomEngine* randomEngine = nullptr);
CLHEP::HepRandomEngine* randomEngine() { return m_randomEngine; }
void setRandomEngine(CLHEP::HepRandomEngine *engine) { m_randomEngine = engine; }
bool is_valid() const {return m_Ebin>=0;};
double E() const {return m_Etot;};
......@@ -41,6 +49,8 @@ class TFCSSimulationState:public TObject
void clear();
private:
CLHEP::HepRandomEngine* m_randomEngine;
int m_Ebin;
double m_Etot;
// TO BE CLEANED UP! SHOULD ONLY STORE EITHER E OR EFRAC!!!
......
......@@ -2,6 +2,8 @@
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#include "CLHEP/Random/RandomEngine.h"
#include "ISF_FastCaloSimEvent/TFCSSimulationState.h"
#include <iostream>
......@@ -9,7 +11,8 @@
//======= TFCSSimulationState =========
//=============================================
TFCSSimulationState::TFCSSimulationState()
TFCSSimulationState::TFCSSimulationState(CLHEP::HepRandomEngine* randomEngine)
: m_randomEngine(randomEngine)
{
clear();
}
......@@ -47,5 +50,3 @@ void TFCSSimulationState::Print(Option_t *) const
std::cout<<" E"<<i<<"("<<CaloSampling::getSamplingName(i)<<")="<<E(i)<<" E"<<i<<"/E="<<Efrac(i)<<std::endl;
}
}
......@@ -28,10 +28,6 @@
#include "StoreGate/StoreGateSvc.h"
#include "StoreGate/StoreGate.h"
#include "CLHEP/Random/RandFlat.h"
#include "CLHEP/Random/RandGauss.h"
#include "CaloEvent/CaloCellContainer.h"
#include "CaloDetDescr/CaloDetDescrElement.h"
#include "CaloDetDescr/CaloDetDescrManager.h"
......@@ -217,7 +213,7 @@ StatusCode ISF::FastCaloSimSvcV2::simulate(const ISF::ISFParticle& isfp)
TFCSExtrapolationState extrapol;
m_FastCaloSimCaloExtrapolation->extrapolate(extrapol,&truth);
TFCSSimulationState simulstate;
TFCSSimulationState simulstate(m_randomEngine);
FCSReturnCode status = m_param->simulate(simulstate, &truth, &extrapol);
if (status != FCSSuccess) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment