Belle II Software  release-05-01-25
GeoARICHBtestCreator Class Reference

The creator for the PXD geometry of the Belle II detector. More...

#include <GeoARICHBtestCreator.h>

Inheritance diagram for GeoARICHBtestCreator:
Collaboration diagram for GeoARICHBtestCreator:

Public Member Functions

 GeoARICHBtestCreator ()
 Constructor of the GeoPXDCreator class.
 
virtual ~GeoARICHBtestCreator ()
 The destructor of the GeoPXDCreator class.
 
virtual void create (const GearDir &content, G4LogicalVolume &topVolume, geometry::GeometryTypes type)
 Creates the ROOT Objects for the ARICH Beamtest 2011 geometry. More...
 
 BELLE2_DEFINE_EXCEPTION (DBNotImplemented, "Cannot create geometry from Database.")
 Exception that will be thrown in createFromDB if member is not yet implemented by creator.
 
virtual void createFromDB (const std::string &name, G4LogicalVolume &topVolume, GeometryTypes type)
 Function to create the geometry from the Database. More...
 
virtual void createPayloads (const GearDir &content, const IntervalOfValidity &iov)
 Function to create the geometry database. More...
 

Protected Member Functions

void createBtestGeometry (const GearDir &content, G4LogicalVolume &topVolume)
 Creation of the beamtest geometry.
 
G4LogicalVolume * buildModule (GearDir Module)
 Build the module.
 
double getAvgRINDEX (G4Material *material)
 Get the average refractive index if the material.
 
G4Material * createAerogel (const char *aeroname, double rind, double trl)
 create aerogel material
 

Protected Attributes

SensitiveDetectorm_sensitive
 pointer to the sensitive detector
 
SensitiveAerom_sensitiveAero
 pointer to the sesnitive aerogel
 

Private Attributes

int m_runno
 Beamtest Run number.
 
std::string m_author
 Beamtest runlog record author.
 
int m_neve
 Number of event in the beamtest run.
 
std::string m_runtype
 Type of the beamtest run.
 
std::string m_hapdID
 ID of the HAPD configuration setup.
 
std::string m_aerogelID
 ID of the aerogel configuration setup.
 
std::string m_mirrorID
 ID of the mirror configuration setup.
 
double m_rotation
 rotation angle of the setup
 
double m_rx
 x shift of the prototype ARICH frame
 
double m_ry
 y shift of the prototype ARICH frame
 
std::string m_mytype
 type of the run
 
std::string m_daqqa
 classification of the run
 
std::string m_comment
 comment in the runlog
 
std::string m_datum
 datum of the runlog
 
int m_aerosupport
 Type of aerogel support - not used at the moment.
 
double m_aerogeldx
 shift of the aerogel center
 
double m_framedx
 shift of the frame
 
double m_rotation1
 rotation angle of the frame
 
int m_configuration
 configuration number of the HAPD
 
std::string m_comment1
 tbc
 
std::vector< double > m_agelrefind
 vector of aerogel refractive indices
 
std::vector< double > m_agelthickness
 vector of aerogel thicknesses
 
std::vector< double > m_ageltrlen
 vector of aerogel transmission lengths
 

Detailed Description

The creator for the PXD geometry of the Belle II detector.


Definition at line 34 of file GeoARICHBtestCreator.h.

Member Function Documentation

◆ create()

void create ( const GearDir content,
G4LogicalVolume &  topVolume,
geometry::GeometryTypes  type 
)
virtual

Creates the ROOT Objects for the ARICH Beamtest 2011 geometry.

Parameters
contentA reference to the content part of the parameter description, which should to be used to create the ROOT objects.

Implements CreatorBase.

Definition at line 91 of file GeoARICHBtestCreator.cc.

92  {
93 
94  B2INFO("GeoARICHBtestCreator::create");
95  StoreObjPtr<EventMetaData> eventMetaDataPtr;
96 
97  int run = 68;
98  PyObject* m = PyImport_AddModule(strdup("__main__"));
99  if (m) {
100  PyObject* v = PyObject_GetAttrString(m, strdup("runno"));
101  if (v) {
102  run = PyLong_AsLong(v);
103  Py_DECREF(v);
104  }
105  B2INFO("GeoARICHBtestCreator::create runno = " << run);
106  }
107 
108  B2INFO("eventMetaDataPtr run:" << run);
109  // eventMetaDataPtr->setEndOfData();
110 
111 
112 
113 
114  string Type = content.getString("@type", "");
115 
116  char nodestr[100];
117  sprintf(nodestr, "run[runno=%d]", run);
118  if (Type == "beamtest") {
119  BOOST_FOREACH(const GearDir & runparam, content.getNodes(nodestr)) {
120  m_runno = runparam.getInt("runno", -1);
121  m_author = runparam.getString("author", "");
122  m_neve = runparam.getInt("neve", -1);
123  m_runtype = runparam.getString("calibration", "pion");
124  m_hapdID = runparam.getString("setup1", "unknown");
125  m_aerogelID = runparam.getString("aerogel1", "unknown");
126  m_mirrorID = runparam.getString("mirror", "unknown");
127  m_rotation = runparam.getDouble("rotation", 0);
128  m_rx = runparam.getDouble("positionx", 0);
129  m_ry = runparam.getDouble("positiony", 0);
130  m_mytype = runparam.getString("type1", "unknown");
131  m_daqqa = runparam.getString("daqqa1", "unknown");
132  m_comment = runparam.getString("comment1", "unknown");
133  m_datum = runparam.getString("datum", "unknown");
134 
135 
136  B2INFO("runno : " << m_runno);
137  B2INFO("author : " << m_author);
138  B2INFO("neve : " << m_neve);
139  B2INFO("runtype : " << m_runtype);
140  B2INFO("hapdID : " << m_hapdID);
141  B2INFO("aerogelID: " << m_aerogelID);
142  B2INFO("mirrorID : " << m_mirrorID);
143  B2INFO("rotation : " << m_rotation);
144  B2INFO("rx : " << m_rx);
145  B2INFO("ry : " << m_ry);
146  B2INFO("runtype : " << m_mytype);
147  B2INFO("daqqa : " << m_daqqa);
148  B2INFO("comment : " << m_comment);
149  B2INFO("datum : " << m_datum);
150 
151 
152  }
153  string aerogelname;
154  sprintf(nodestr, "setup/aerogel/row[@id=\"%s\"]", m_aerogelID.c_str());
155 
156  GearDir runparam(content, nodestr);
157  B2INFO("id : " << runparam.getString("@id", ""));
158  BOOST_FOREACH(const GearDir & aeroparam, runparam.getNodes("aerogel")) {
159  aerogelname = aeroparam.getString(".", "");
160  string stype = aeroparam.getString("@type", "");
161  B2INFO(stype << " aerogelname : " << aerogelname);
162  sprintf(nodestr, "setup/aerogelinfo/row[@id=\"%s\"]", aerogelname.c_str());
163  GearDir infoparam(content, nodestr);
164 
165  double agelrefind = infoparam.getDouble("refind", 1);
166  double ageltrlen = infoparam.getLength("trlen", 0);
167  double agelthickness = infoparam.getLength("thickness", 0);
168  if (stype != string("left")) {
169  m_ageltrlen.push_back(ageltrlen);
170  m_agelrefind.push_back(agelrefind);
171  m_agelthickness.push_back(agelthickness);
172  }
173  B2INFO("refind : " << agelrefind);
174  B2INFO("trlen : " << ageltrlen / Unit::mm);
175  B2INFO("thickness : " << agelthickness / Unit::mm);
176 
177  }
178  int size = m_hapdID.size();
179 
180  m_aerosupport = 0;
181  if (size > 0) {
182  char agelsupport = m_hapdID.at(size - 1);
183  if (agelsupport == 'a') m_aerosupport = 1;
184  if (agelsupport == 'b') m_aerosupport = 2;
185  }
186 
187  if (m_aerosupport) size--;
188  sprintf(nodestr, "setup/hapd/row[@id=\"%s\"]", m_hapdID.substr(0, size).c_str());
189  B2INFO("nodestr : " << nodestr);
190  B2INFO("aerogelsupport : " << m_aerosupport);
191  GearDir hapdparam(content, nodestr);
192  //BOOST_FOREACH(const GearDir & runparam, content.getNodes(nodestr)) {
193  m_aerogeldx = hapdparam.getLength("aerogeldx", 0);
194  m_framedx = hapdparam.getLength("framedx", 0) * CLHEP::mm / Unit::mm ;
195  m_rotation1 = hapdparam.getDouble("rotation", 0);
196  m_configuration = hapdparam.getInt("setup", 0);
197  m_comment1 = hapdparam.getString("comment", "");
198 
199 
200  B2INFO("aerogeldx : " << m_aerogeldx);
201  B2INFO("framedx : " << m_framedx);
202  B2INFO("rotation : " << m_rotation1);
203  B2INFO("configuration : " << m_configuration);
204  B2INFO("comment : " << m_comment);
205  //}
206 
207  GearDir setup(content, "setup");
208 
209  createBtestGeometry(setup, topVolume);
210  }
211  }

◆ createFromDB()

void createFromDB ( const std::string &  name,
G4LogicalVolume &  topVolume,
GeometryTypes  type 
)
virtualinherited

Function to create the geometry from the Database.

Parameters
namename of the component in the database, could be used to disambiguate multiple components created with the same creator
topVolumeTop volume in which the geometry has to be placed
typeType of geometry to be build

Reimplemented in GeoEKLMCreator, GeoFarBeamLineCreator, GeoCryostatCreator, MyDBCreator, GeoARICHCreator, GeoBeamPipeCreator, GeoServiceMaterialCreator, GeoBKLMCreator, GeoPXDCreator, GeoSVDCreator, GeoTOPCreator, GeoSTRCreator, GeoHeavyMetalShieldCreator, GeoCDCCreator, GeoCOILCreator, GeoVXDServiceCreator, GeoKLMCreator, GeoECLCreator, and GeoMagneticField.

Definition at line 27 of file CreatorBase.cc.

◆ createPayloads()

void createPayloads ( const GearDir content,
const IntervalOfValidity iov 
)
virtualinherited

Function to create the geometry database.

This function should be implemented to convert Gearbox parameters to one ore more database payloads

Parameters
contentGearDir pointing to the parameters which should be used for construction
iovinterval of validity to use when generating payloads

Reimplemented in GeoEKLMCreator, GeoFarBeamLineCreator, GeoCryostatCreator, MyDBCreator, GeoARICHCreator, GeoTOPCreator, GeoCDCCreator, GeoBeamPipeCreator, GeoServiceMaterialCreator, GeoMagneticField, GeoBKLMCreator, GeoKLMCreator, GeoECLCreator, GeoPXDCreator, GeoSVDCreator, GeoSTRCreator, GeoCOILCreator, GeoHeavyMetalShieldCreator, and GeoVXDServiceCreator.

Definition at line 34 of file CreatorBase.cc.


The documentation for this class was generated from the following files:
setup
Belle2::arich::GeoARICHBtestCreator::m_configuration
int m_configuration
configuration number of the HAPD
Definition: GeoARICHBtestCreator.h:109
Belle2::arich::GeoARICHBtestCreator::m_comment
std::string m_comment
comment in the runlog
Definition: GeoARICHBtestCreator.h:96
Belle2::arich::GeoARICHBtestCreator::createBtestGeometry
void createBtestGeometry(const GearDir &content, G4LogicalVolume &topVolume)
Creation of the beamtest geometry.
Definition: GeoARICHBtestCreator.cc:358
Belle2::arich::GeoARICHBtestCreator::m_rotation1
double m_rotation1
rotation angle of the frame
Definition: GeoARICHBtestCreator.h:107
Belle2::arich::GeoARICHBtestCreator::m_comment1
std::string m_comment1
tbc
Definition: GeoARICHBtestCreator.h:111
Belle2::arich::GeoARICHBtestCreator::m_datum
std::string m_datum
datum of the runlog
Definition: GeoARICHBtestCreator.h:98
Belle2::arich::GeoARICHBtestCreator::m_agelrefind
std::vector< double > m_agelrefind
vector of aerogel refractive indices
Definition: GeoARICHBtestCreator.h:114
Belle2::arich::GeoARICHBtestCreator::m_ageltrlen
std::vector< double > m_ageltrlen
vector of aerogel transmission lengths
Definition: GeoARICHBtestCreator.h:118
Belle2::arich::GeoARICHBtestCreator::m_ry
double m_ry
y shift of the prototype ARICH frame
Definition: GeoARICHBtestCreator.h:90
Belle2::arich::GeoARICHBtestCreator::m_aerosupport
int m_aerosupport
Type of aerogel support - not used at the moment.
Definition: GeoARICHBtestCreator.h:101
Belle2::arich::GeoARICHBtestCreator::m_rotation
double m_rotation
rotation angle of the setup
Definition: GeoARICHBtestCreator.h:86
Belle2::arich::GeoARICHBtestCreator::m_agelthickness
std::vector< double > m_agelthickness
vector of aerogel thicknesses
Definition: GeoARICHBtestCreator.h:116
Belle2::arich::GeoARICHBtestCreator::m_rx
double m_rx
x shift of the prototype ARICH frame
Definition: GeoARICHBtestCreator.h:88
Belle2::arich::GeoARICHBtestCreator::m_hapdID
std::string m_hapdID
ID of the HAPD configuration setup.
Definition: GeoARICHBtestCreator.h:80
Belle2::arich::GeoARICHBtestCreator::m_daqqa
std::string m_daqqa
classification of the run
Definition: GeoARICHBtestCreator.h:94
Belle2::arich::GeoARICHBtestCreator::m_framedx
double m_framedx
shift of the frame
Definition: GeoARICHBtestCreator.h:105
Belle2::arich::GeoARICHBtestCreator::m_neve
int m_neve
Number of event in the beamtest run.
Definition: GeoARICHBtestCreator.h:76
Belle2::Unit::mm
static const double mm
[millimeters]
Definition: Unit.h:80
Belle2::arich::GeoARICHBtestCreator::m_runno
int m_runno
Beamtest Run number.
Definition: GeoARICHBtestCreator.h:72
Belle2::arich::GeoARICHBtestCreator::m_aerogeldx
double m_aerogeldx
shift of the aerogel center
Definition: GeoARICHBtestCreator.h:103
Belle2::arich::GeoARICHBtestCreator::m_mytype
std::string m_mytype
type of the run
Definition: GeoARICHBtestCreator.h:92
Belle2::arich::GeoARICHBtestCreator::m_author
std::string m_author
Beamtest runlog record author.
Definition: GeoARICHBtestCreator.h:74
Belle2::arich::GeoARICHBtestCreator::m_runtype
std::string m_runtype
Type of the beamtest run.
Definition: GeoARICHBtestCreator.h:78
Belle2::arich::GeoARICHBtestCreator::m_mirrorID
std::string m_mirrorID
ID of the mirror configuration setup.
Definition: GeoARICHBtestCreator.h:84
Belle2::arich::GeoARICHBtestCreator::m_aerogelID
std::string m_aerogelID
ID of the aerogel configuration setup.
Definition: GeoARICHBtestCreator.h:82