Belle II Software  release-08-01-10
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.
 
 GeoARICHBtestCreator (const GeoARICHBtestCreator &)=delete
 Copy constructor (disabled).
 
virtual ~GeoARICHBtestCreator ()
 The destructor of the GeoPXDCreator class.
 
GeoARICHBtestCreatoroperator= (const GeoARICHBtestCreator &)=delete
 Operator = (disabled).
 
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 32 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 89 of file GeoARICHBtestCreator.cc.

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

◆ 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 GeoVXDServiceCreator, GeoHeavyMetalShieldCreator, GeoTOPCreator, GeoSVDCreator, GeoSTRCreator, GeoServiceMaterialCreator, GeoCOILCreator, GeoPXDCreator, GeoKLMCreator, GeoEKLMCreator, GeoBKLMCreator, GeoFarBeamLineCreator, GeoCryostatCreator, GeoBeamPipeCreator, MyDBCreator, GeoECLCreator, GeoCDCCreatorReducedCDC, GeoCDCCreator, BeamabortCreator, GeoARICHCreator, and GeoMagneticField.

Definition at line 17 of file CreatorBase.cc.

18  {
19  //Do nothing but raise exception that we don't do anything
20  throw DBNotImplemented();
21  }

◆ 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 GeoVXDServiceCreator, GeoHeavyMetalShieldCreator, GeoTOPCreator, GeoSVDCreator, GeoSTRCreator, GeoServiceMaterialCreator, GeoCOILCreator, GeoPXDCreator, GeoKLMCreator, GeoEKLMCreator, GeoBKLMCreator, GeoFarBeamLineCreator, GeoCryostatCreator, GeoBeamPipeCreator, MyDBCreator, GeoMagneticField, GeoECLCreator, GeoCDCCreatorReducedCDC, GeoCDCCreator, BeamabortCreator, and GeoARICHCreator.

Definition at line 24 of file CreatorBase.cc.


The documentation for this class was generated from the following files: