Skip to content
Snippets Groups Projects
Commit 912263b5 authored by Frank Gaede's avatar Frank Gaede
Browse files

- updated exampleN04 to now use

   the standard Sds that come with it
   -> see SDWrapper.cc
   (exampleN04 now works)
parent 42e71b57
No related branches found
No related tags found
No related merge requests found
......@@ -21,12 +21,4 @@
- vis attribute drawingStyle="wireframe" does not seem to work (w/ geoDisplay )
- definition of rotations not intuitive - need clear documentation:
Rotation rot( 0, 0 , phi )
behaves differently from RotationZ(phi) !!??
- original G4VSensitiveDetector classes are not yet used in DD4hep port
=> need to change DDG4/Geant4SensitiveDetector ....
-> exampleN04 does not yet work (crashes due to missing SDs)
......@@ -3,19 +3,19 @@
<sensitive_detectors>
<sd name="TrackerN04"
type="Geant4Tracker"
type="DD4hepExN04TrackerSD"
ecut="1.0*keV"
verbose="true"
hit_aggregation="position">
</sd>
<sd name="CalorimeterN04"
type="Geant4Calorimeter"
type="DD4hepExN04CalorimeterSD"
ecut="0.5*keV"
verbose="true"
hit_aggregation="position">
</sd>
<sd name="MuonN04"
type="Geant4Calorimeter"
<sd name="MuonN04"
type="DD4hepExN04MuonSD"
ecut="0.5*keV"
verbose="true"
hit_aggregation="position">
......
......@@ -10,7 +10,7 @@
#
/run/verbose 0
/event/verbose 0
/tracking/verbose 1
/tracking/verbose 0
#
# muon 300 MeV to the direction (1.,0.,0.)
# 3 events
......
#include "DDG4/Factories.h"
#include "DDG4/G4SDFactory.h"
#include "DD4hep/LCDD.h"
#include "ExN04CalorimeterSD.hh"
#include "ExN04CalorimeterROGeometry.hh"
#include "ExN04MuonSD.hh"
#include "ExN04TrackerSD.hh"
namespace DD4hep { namespace Simulation {
/** Factory class to create an instance of ExN04CalorimeterSD
*/
class DD4hepExN04CalorimeterSD : public DD4hep::Simulation::G4SDFactory {
public:
virtual G4VSensitiveDetector* createSD(const std::string& name, Geometry::LCDD& lcdd){
G4String calorimeterSDname = "/mydet/calorimeter";
ExN04CalorimeterSD * calorimeterSD = new ExN04CalorimeterSD(calorimeterSDname);
G4String ROgeometryName = "CalorimeterROGeom";
G4VReadOutGeometry* calRO = new ExN04CalorimeterROGeometry(ROgeometryName);
calRO->BuildROGeometry();
calRO->SetName(ROgeometryName);
calorimeterSD->SetROgeometry(calRO);
return calorimeterSD ;
}
} ;
/** Factory class to create an instance of ExN04TrackerSD
*/
class DD4hepExN04TrackerSD : public DD4hep::Simulation::G4SDFactory{
public:
virtual G4VSensitiveDetector* createSD(const std::string& name, Geometry::LCDD& lcdd){
G4String trackerSDname = "/mydet/tracker";
return new ExN04TrackerSD(trackerSDname);
}
} ;
/** Factory class to create an instance of ExN04MuonSD
*/
class DD4hepExN04MuonSD : public DD4hep::Simulation::G4SDFactory{
public:
virtual G4VSensitiveDetector* createSD(const std::string& name, Geometry::LCDD& lcdd){
G4String muonSDname = "/mydet/muon";
return new ExN04MuonSD(muonSDname);
}
} ;
}
} // End namespace DD4hep::Simulation
DECLARE_G4SDFACTORY(DD4hepExN04CalorimeterSD)
DECLARE_G4SDFACTORY(DD4hepExN04MuonSD)
DECLARE_G4SDFACTORY(DD4hepExN04TrackerSD)
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