Belle II Software  release-08-01-10
GeoECLCreator.h
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 
9 #pragma once
10 
11 #include <geometry/CreatorBase.h>
12 
13 #include <framework/gearbox/GearDir.h>
14 #include <simulation/kernel/SensitiveDetectorBase.h>
15 
16 class G4LogicalVolume;
17 
18 namespace Belle2 {
23  class ECLCrystalsShapeAndPosition;
24  namespace ECL {
25 
26  struct shape_t;
27 
28 
29 
31 
35 
36  public:
37 
39  GeoECLCreator();
40 
43 
50  virtual void create(const GearDir& content, G4LogicalVolume& topVolume, geometry::GeometryTypes type) override;
51 
58  virtual void createFromDB(const std::string& name, G4LogicalVolume& topVolume, geometry::GeometryTypes type) override;
59 
65  virtual void createPayloads(const GearDir& content, const IntervalOfValidity& iov) override;
66 
67  private:
68 
70  void barrel(G4LogicalVolume&);
72  void backward(G4LogicalVolume&);
74  void forward(G4LogicalVolume&);
76  G4LogicalVolume* wrapped_crystal(const shape_t* s, const std::string& endcap, double wrapthickness);
77 
79  void defineVisAttributes();
80 
84  const G4VisAttributes* att(const std::string& n) const;
86  G4LogicalVolume* get_preamp() const ;
88  double get_pa_box_height() const {return 2;}
89 
92 
98  std::map<std::string, G4VisAttributes*> m_atts;
101  };
102 
103  } // end of ecl namespace
105 } // end of Belle2 namespace
106 
The GeoECLCreator class.
Definition: GeoECLCreator.h:34
void barrel(G4LogicalVolume &)
Make the ECL barrel and then place elements inside it.
Definition: barrel.cc:63
void defineVisAttributes()
Define visual attributes.
Simulation::SensitiveDetectorBase * m_sensediode
Sensitive diode.
Definition: GeoECLCreator.h:96
double get_pa_box_height() const
Getter for preamplifier box height (hard-coded to be 2)
Definition: GeoECLCreator.h:88
const G4VisAttributes * att(const std::string &n) const
Define visual attributes.
virtual void createFromDB(const std::string &name, G4LogicalVolume &topVolume, geometry::GeometryTypes type) override
Function to create the geometry from the Database.
virtual void createPayloads(const GearDir &content, const IntervalOfValidity &iov) override
Function to create the geometry database.
void backward(G4LogicalVolume &)
Place elements inside the backward endcap.
Definition: backward.cc:42
~GeoECLCreator()
The destructor of the GeoECLCreator class.
const ECLCrystalsShapeAndPosition * m_sap
pointer to a storage with crystal shapes and positions
Definition: GeoECLCreator.h:91
std::map< std::string, G4VisAttributes * > m_atts
Vector of background-Sensitive detectors.
Definition: GeoECLCreator.h:98
Simulation::SensitiveDetectorBase * m_sensitive
Sensitive detector.
Definition: GeoECLCreator.h:94
G4LogicalVolume * get_preamp() const
Get Logical volume of preamplifier.
G4LogicalVolume * wrapped_crystal(const shape_t *s, const std::string &endcap, double wrapthickness)
Wrapped crystal.
void forward(G4LogicalVolume &)
Place elements inside the forward endcap.
Definition: forward.cc:44
GeoECLCreator()
Constructor of the GeoECLCreator class.
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.
GearDir is the basic class used for accessing the parameter store.
Definition: GearDir.h:31
A class that describes the interval of experiments/runs for which an object in the database is valid.
Base class for all Sensitive Detectors to create hits during simulation.
Pure virtual base class for all geometry creators.
Definition: CreatorBase.h:28
GeometryTypes
Flag indiciating the type of geometry to be used.
Abstract base class for different kinds of events.