Belle II Software  release-05-01-25
GeoECLCreator.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Poyuan Chen *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #ifndef GEOECLCREATOR_H
12 #define GEOECLCREATOR_H
13 
14 #include <geometry/CreatorBase.h>
15 
16 #include <framework/gearbox/GearDir.h>
17 #include <simulation/kernel/SensitiveDetectorBase.h>
18 
19 class G4LogicalVolume;
20 
21 namespace Belle2 {
26  class ECLCrystalsShapeAndPosition;
27  namespace ECL {
28 
29  struct shape_t;
30 
31 
32 
34 
38 
39  public:
40 
42  GeoECLCreator();
43 
46 
53  virtual void create(const GearDir& content, G4LogicalVolume& topVolume, geometry::GeometryTypes type) override;
54 
61  virtual void createFromDB(const std::string& name, G4LogicalVolume& topVolume, geometry::GeometryTypes type) override;
62 
68  virtual void createPayloads(const GearDir& content, const IntervalOfValidity& iov) override;
69 
70  private:
71 
73  void barrel(G4LogicalVolume&);
75  void backward(G4LogicalVolume&);
77  void forward(G4LogicalVolume&);
79  G4LogicalVolume* wrapped_crystal(const shape_t* s, const std::string& endcap, double wrapthickness);
80 
82  void defineVisAttributes();
83 
87  const G4VisAttributes* att(const std::string& n) const;
88  G4LogicalVolume* get_preamp() const ;
89  double get_pa_box_height() const {return 2;}
90 
93 
99  std::map<std::string, G4VisAttributes*> m_atts;
102  };
103 
104  } // end of ecl namespace
106 } // end of Belle2 namespace
107 
108 #endif /* GEOECLCREATOR_H */
Belle2::IntervalOfValidity
A class that describes the interval of experiments/runs for which an object in the database is valid.
Definition: IntervalOfValidity.h:35
Belle2::ECL::GeoECLCreator::m_sensediode
Simulation::SensitiveDetectorBase * m_sensediode
Sensitive diode.
Definition: GeoECLCreator.h:97
Belle2::ECL::GeoECLCreator::m_sap
const ECLCrystalsShapeAndPosition * m_sap
pointer to a storage with crystal shapes and positions
Definition: GeoECLCreator.h:92
Belle2::ECL::GeoECLCreator::create
virtual void create(const GearDir &content, G4LogicalVolume &topVolume, geometry::GeometryTypes type) override
Function to actually create the geometry, has to be overridden by derived classes.
Definition: GeoECLCreator.cc:79
Belle2::ECL::GeoECLCreator::forward
void forward(G4LogicalVolume &)
Place elements inside the forward endcap.
Definition: forward.cc:29
Belle2::ECL::GeoECLCreator::wrapped_crystal
G4LogicalVolume * wrapped_crystal(const shape_t *s, const std::string &endcap, double wrapthickness)
Wrapped crystal.
Definition: GeoECLCreator.cc:92
Belle2::ECL::GeoECLCreator::GeoECLCreator
GeoECLCreator()
Constructor of the GeoECLCreator class.
Definition: GeoECLCreator.cc:45
Belle2::ECL::shape_t
Definition: shapes.h:39
Belle2::ECL::GeoECLCreator::~GeoECLCreator
~GeoECLCreator()
The destructor of the GeoECLCreator class.
Definition: GeoECLCreator.cc:54
Belle2::Simulation::SensitiveDetectorBase
Base class for all Sensitive Detectors to create hits during simulation.
Definition: SensitiveDetectorBase.h:32
Belle2::ECL::GeoECLCreator::backward
void backward(G4LogicalVolume &)
Place elements inside the backward endcap.
Definition: backward.cc:24
Belle2::ECL::GeoECLCreator::createFromDB
virtual void createFromDB(const std::string &name, G4LogicalVolume &topVolume, geometry::GeometryTypes type) override
Function to create the geometry from the Database.
Definition: GeoECLCreator.cc:59
Belle2::ECL::GeoECLCreator::m_overlap
int m_overlap
overlap
Definition: GeoECLCreator.h:101
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::ECL::GeoECLCreator::barrel
void barrel(G4LogicalVolume &)
Make the ECL barrel and then place elements inside it.
Definition: barrel.cc:56
Belle2::GearDir
GearDir is the basic class used for accessing the parameter store.
Definition: GearDir.h:41
Belle2::ECL::GeoECLCreator::att
const G4VisAttributes * att(const std::string &n) const
Define visual attributes.
Definition: GeoECLCreator.cc:139
Belle2::ECL::GeoECLCreator::m_sensitive
Simulation::SensitiveDetectorBase * m_sensitive
Sensitive detector.
Definition: GeoECLCreator.h:95
Belle2::ECL::GeoECLCreator::m_atts
std::map< std::string, G4VisAttributes * > m_atts
Vector of background-Sensitive detectors.
Definition: GeoECLCreator.h:99
Belle2::geometry::CreatorBase
Pure virtual base class for all geometry creators.
Definition: CreatorBase.h:31
Belle2::ECL::GeoECLCreator
The GeoECLCreator class.
Definition: GeoECLCreator.h:37
Belle2::ECL::GeoECLCreator::defineVisAttributes
void defineVisAttributes()
Define visual attributes.
Definition: GeoECLCreator.cc:121
Belle2::ECLCrystalsShapeAndPosition
Crystal shapes and positions.
Definition: ECLCrystalsShapeAndPosition.h:37
Belle2::ECL::GeoECLCreator::createPayloads
virtual void createPayloads(const GearDir &content, const IntervalOfValidity &iov) override
Function to create the geometry database.
Definition: GeoECLCreator.cc:73
Belle2::geometry::GeometryTypes
GeometryTypes
Flag indiciating the type of geometry to be used.
Definition: GeometryManager.h:39