87 lines
2.5 KiB
C++
87 lines
2.5 KiB
C++
/*//////////////////////////////////////////////////////////////////////////////
|
|
// CMT Cosmic Muon Tomography project //////////////////////////////////////////
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
Copyright (c) 2014, Universita' degli Studi di Padova, INFN sez. di Padova
|
|
All rights reserved
|
|
|
|
Authors: Andrea Rigoni Garola < andrea.rigoni@pd.infn.it >
|
|
|
|
------------------------------------------------------------------
|
|
This library is free software; you can redistribute it and/or
|
|
modify it under the terms of the GNU Lesser General Public
|
|
License as published by the Free Software Foundation; either
|
|
version 3.0 of the License, or (at your option) any later version.
|
|
|
|
This library is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Lesser General Public License for more details.
|
|
|
|
You should have received a copy of the GNU Lesser General Public
|
|
License along with this library.
|
|
|
|
//////////////////////////////////////////////////////////////////////////////*/
|
|
|
|
#ifndef SCENE_H
|
|
#define SCENE_H
|
|
|
|
|
|
|
|
#include "Core/Object.h"
|
|
#include "Core/Vector.h"
|
|
#include "Solid.h"
|
|
#include "GeantEvent.h"
|
|
#include "HEP/Detectors/MuonEvent.h"
|
|
|
|
class G4VPhysicalVolume;
|
|
|
|
namespace uLib {
|
|
namespace Geant {
|
|
|
|
class EmitterPrimary;
|
|
|
|
class Scene : public Object {
|
|
public:
|
|
uLibTypeMacro(Scene, Object)
|
|
|
|
Scene();
|
|
~Scene();
|
|
|
|
void AddSolid(Solid *solid, Solid *parent = nullptr);
|
|
|
|
void ConstructWorldBox(const Vector3f &size, const char *material);
|
|
|
|
/// Get the world box
|
|
const Solid* GetWorld() const;
|
|
|
|
ContainerBox* GetWorldBox() const;
|
|
|
|
/// Get the list of solids in the scene
|
|
const Vector<Solid*>& GetSolids() const;
|
|
|
|
/// Set the primary generator (emitter) for the simulation.
|
|
/// The Scene does NOT take ownership of the emitter.
|
|
void SetEmitter(EmitterPrimary *emitter);
|
|
|
|
/// Initialize the Geant4 run manager with detector, physics, and action.
|
|
void Initialize();
|
|
|
|
/// Set the verbosity level for console output (default 0)
|
|
void SetVerbosity(int level);
|
|
|
|
/// Run the simulation for nEvents muons.
|
|
/// Results are appended to the provided vector.
|
|
void RunSimulation(int nEvents, Vector<GeantEvent> &results);
|
|
|
|
/// Specialized detector simulation trackingMuonEvent line crossings.
|
|
void RunDetectorSimulation(int nEvents, Vector<MuonEvent> &results);
|
|
|
|
private:
|
|
class SceneImpl *d;
|
|
};
|
|
|
|
} // namespace Geant
|
|
} // namespace uLib
|
|
#endif // SCENE_H
|