6 #include "gearcga/CGAGearPointProperties.h"
7 #include "gearcga/CGAGeometryInitializer.h"
12 CGAGearPointProperties::CGAGearPointProperties(std::string steer,
13 std::string model, std::string setup, std::string host,
14 std::string user, std::string password) {
16 CGAGeometryInitializer::GetCGAGeometryInitializer(steer, model,
17 setup, host, user, password);
31 cell_ids cellIDs = CGAGetCellId(x, y, z, flag, 0.0, 0.0, 1.0);
34 sprintf(text,
"CGAGearPointProperties::getCellID: Point (%f, %f, %f) ",
38 " is outside of world volume." );
42 " is outside of sensitive volume");
46 " is in guard-ring. Returning CellID of nearest cell."
52 unsigned long long MASK_A_64 = 0x00000000FFFFFFFFLL;
53 unsigned long long MASK_B_64 = 0xFFFFFFFF00000000LL;
55 long64 result = (
unsigned long long) (
56 ((((
unsigned long long)(cellIDs.id0))<<SHIFT_A_64)&MASK_A_64)|
57 ((((
unsigned long long)(cellIDs.id1))<<SHIFT_B_64)&MASK_B_64)
68 static std::string matName(
"unknown");
75 matName = CGAGetMaterialName(position);
89 return CGAGetDensity(position);
100 position[0] = pos[0];
101 position[1] = pos[1];
102 position[2] = pos[2];
104 return CGAGetTemperature(position);
112 position[0] = pos[0];
113 position[1] = pos[1];
114 position[2] = pos[2];
116 return CGAGetPressure(position);
125 position[0] = pos[0];
126 position[1] = pos[1];
127 position[2] = pos[2];
129 return CGAGetRadLen(position);
137 position[0] = pos[0];
138 position[1] = pos[1];
139 position[2] = pos[2];
141 return CGAGetIntLen(position);
149 position[0] = pos[0];
150 position[1] = pos[1];
151 position[2] = pos[2];
153 std::vector<double> result = CGAGetLocalPosition(position);
155 return Vector3D(result[0], result[1], result[2]);
163 position[0] = pos[0];
164 position[1] = pos[1];
165 position[2] = pos[2];
167 std::vector<double> result = CGAGetB(position);
169 return Vector3D(result[0], result[1], result[2]);
178 position[0] = pos[0];
179 position[1] = pos[1];
180 position[2] = pos[2];
182 std::vector<double> result = CGAGetE(position);
184 return Vector3D(result[0], result[1], result[2]);
192 position[0] = pos[0];
193 position[1] = pos[1];
194 position[2] = pos[2];
196 return CGAGetListOfLogicalVolumes(position);
203 position[0] = pos[0];
204 position[1] = pos[1];
205 position[2] = pos[2];
207 return CGAGetListOfPhysicalVolumes(position);
215 position[0] = pos[0];
216 position[1] = pos[1];
217 position[2] = pos[2];
219 return CGAGetRegionName(position);
227 position[0] = pos[0];
228 position[1] = pos[1];
229 position[2] = pos[2];
231 return CGAIsTracker(position);
239 position[0] = pos[0];
240 position[1] = pos[1];
241 position[2] = pos[2];
243 return CGAIsCalorimeter(position);
virtual double getPressure(const Vector3D &pos) const
Pressure in P at pos.
virtual Vector3D getB(const Vector3D &pos) const
The magnetic field vector at pos in [Tesla].
virtual std::vector< std::string > getListOfPhysicalVolumes(const Vector3D &pos) const
Names of (geant4) physical volumes in heirarchy starting at given pos ending with the world volume...
Base exception class for GEAR - all other exceptions extend this.
virtual double getDensity(const Vector3D &pos) const
Density in kg/m^3 at pos.
virtual Vector3D getLocalPosition(const Vector3D &pos) const
Position in local coordinate.
NotImplementedException used for features that are not implemented.
Simple three dimensional vector providing the components for cartesian, cylindrical and spherical coo...
long long long64
64 bit integer,e.g.to be used for cellids
virtual bool isTracker(const Vector3D &pos) const
True if region that contains pos is defined as a tracker.
virtual long64 getCellID(const Vector3D &pos) const
The cellID of the the sensitive detector at pos.
virtual bool isCalorimeter(const Vector3D &pos) const
True if region that contains pos is defined as a calorimeter.
virtual Vector3D getE(const Vector3D &pos) const
The electric field vector at pos in [V/m].
virtual std::string getRegion(const Vector3D &pos) const
Names of (geant4) region that contains the given pos.
virtual std::vector< std::string > getListOfLogicalVolumes(const Vector3D &pos) const
Names of (geant4) logical volumes in heirarchy starting at given pos ending with the world volume...
virtual const std::string & getMaterialName(const Vector3D &pos) const
Name of material at pos.
virtual double getIntlen(const Vector3D &pos) const
Interaction length of material in mm at pos.
virtual double getTemperature(const Vector3D &pos) const
Name of material at pos.
virtual double getRadlen(const Vector3D &pos) const
Radiation length of material in mm at pos.