Belle II Software development
VXDGlobalParamInterface Class Reference

Very tentative interface for VXD. More...

#include <GlobalParam.h>

Inheritance diagram for VXDGlobalParamInterface:
IGlobalParamInterface

Public Types

enum  E_VXDHierarchyType {
  c_None = 0 ,
  c_Flat = 1 ,
  c_HalfShells = 2 ,
  c_Full = 3
}
 Type of VXD hierarchy. More...
 

Public Member Functions

virtual void setupAlignmentHierarchy (GlobalDerivativesHierarchy &hierarchy) override final
 Very tentative function: not yet used.
 
virtual void readFromResult (std::vector< std::tuple< unsigned short, unsigned short, unsigned short, double > > &, GlobalParamVector &)
 Implement this to be called after Millepede finishes and all global parameters are filled in DB objects (which allow this) in GlobalParam.
 

Static Public Attributes

static E_VXDHierarchyType s_hierarchyType
 What type of hierarchy to use for VXD?
 
static bool s_enablePXD = true
 Enable PXD in hierarchy?
 
static bool s_enableSVD = true
 Enable SVD in hierarchy?
 

Detailed Description

Very tentative interface for VXD.

Definition at line 73 of file GlobalParam.h.

Member Enumeration Documentation

◆ E_VXDHierarchyType

Type of VXD hierarchy.

Definition at line 76 of file GlobalParam.h.

76 {
77 c_None = 0,
78 c_Flat = 1,
79 c_HalfShells = 2,
80 c_Full = 3
81 };

Member Function Documentation

◆ readFromResult()

virtual void readFromResult ( std::vector< std::tuple< unsigned short, unsigned short, unsigned short, double > > &  ,
GlobalParamVector  
)
inlinevirtualinherited

Implement this to be called after Millepede finishes and all global parameters are filled in DB objects (which allow this) in GlobalParam.

The function takes two parameters, both of which are unused thus no name is given First parameter: Vector with a tuple representing <unique id, element, param, value> per result Second parameter: The GlobalParamVector which you have to update, extend or just read jsu after it is filled automatically (for DB objects which support it) and before its DBObjects are stored back into DB.

Definition at line 60 of file GlobalParam.h.

61 {};

◆ setupAlignmentHierarchy()

void setupAlignmentHierarchy ( GlobalDerivativesHierarchy hierarchy)
finaloverridevirtual

Very tentative function: not yet used.

This simpler hierarchy is as follows: Belle 2 / | | \ Ying Yang Pat Mat ... other sub-detectors / / | / | | \ | \ \ ......... sensors ........

So the hierarchy is as follows: Belle 2 / | | \ Ying Yang Pat Mat ... other sub-detectors / | / | | \ | \ ...... ladders ...... / / | / | | \ | \ \ ......... sensors ........

Reimplemented from IGlobalParamInterface.

Definition at line 164 of file GlobalParam.cc.

165 {
166 try {
167 auto& rigidBodyHierarchy = dynamic_cast<RigidBodyHierarchy&>(hierarchy);
168 auto& geo = VXD::GeoCache::getInstance();
169 // Set-up hierarchy
170 DBObjPtr<VXDAlignment> vxdAlignments;
171 if (s_hierarchyType == c_None) {
172 // Nothing to be done
173 return;
174
175 } else if (s_hierarchyType == c_Flat) {
176 for (auto& sensor : geo.getListOfSensors()) {
177 //TODO: Don't we have better way to distinguish PXD and SVD?
178 // For PXD
179 if (sensor.getLayerNumber() <= 2 and !s_enablePXD)
180 continue;
181 // SVD layer > 2
182 if (sensor.getLayerNumber() > 2 and !s_enableSVD)
183 continue;
184
185 rigidBodyHierarchy.insertTGeoTransform<VXDAlignment, VXDAlignment>(sensor, VxdID(0, 0, 0, 1),
186 geo.getSensorInfo(sensor).getTransformation(true));
187 }
188 } else if (s_hierarchyType == c_HalfShells) {
198 for (auto& halfShellPlacement : geo.getHalfShellPlacements()) {
199 // For PXD
200 if (halfShellPlacement.first.getLayerNumber() <= 2 and !s_enablePXD)
201 continue;
202 // for SVD - layer > 2
203 if (halfShellPlacement.first.getLayerNumber() > 2 and !s_enableSVD)
204 continue;
205
206 TGeoHMatrix trafoHalfShell = halfShellPlacement.second;
207 trafoHalfShell *= geo.getTGeoFromRigidBodyParams(
208 vxdAlignments->get(halfShellPlacement.first, VXDAlignment::dU),
209 vxdAlignments->get(halfShellPlacement.first, VXDAlignment::dV),
210 vxdAlignments->get(halfShellPlacement.first, VXDAlignment::dW),
211 vxdAlignments->get(halfShellPlacement.first, VXDAlignment::dAlpha),
212 vxdAlignments->get(halfShellPlacement.first, VXDAlignment::dBeta),
213 vxdAlignments->get(halfShellPlacement.first, VXDAlignment::dGamma)
214 );
215 rigidBodyHierarchy.insertTGeoTransform<VXDAlignment, alignment::EmptyGlobalParamSet>(halfShellPlacement.first, 0, trafoHalfShell);
216
217 for (auto& ladderPlacement : geo.getLadderPlacements(halfShellPlacement.first)) {
218 // Updated trafo
219 TGeoHMatrix trafoLadder = ladderPlacement.second;
220 trafoLadder *= geo.getTGeoFromRigidBodyParams(
221 vxdAlignments->get(ladderPlacement.first, VXDAlignment::dU),
222 vxdAlignments->get(ladderPlacement.first, VXDAlignment::dV),
223 vxdAlignments->get(ladderPlacement.first, VXDAlignment::dW),
224 vxdAlignments->get(ladderPlacement.first, VXDAlignment::dAlpha),
225 vxdAlignments->get(ladderPlacement.first, VXDAlignment::dBeta),
226 vxdAlignments->get(ladderPlacement.first, VXDAlignment::dGamma)
227 );
228 // Do not insert ladder, but insert sensor directly into half-shells below, with the additional transformation from ladder
229 //rigidBodyHierarchy.insertTGeoTransform<VXDAlignment, VXDAlignment>(ladderPlacement.first, halfShellPlacement.first, trafoLadder);
230
231 for (auto& sensorPlacement : geo.getSensorPlacements(ladderPlacement.first)) {
232 // Updated trafo
233 TGeoHMatrix trafoSensor = sensorPlacement.second;
234 trafoSensor *= geo.getTGeoFromRigidBodyParams(
235 vxdAlignments->get(sensorPlacement.first, VXDAlignment::dU),
236 vxdAlignments->get(sensorPlacement.first, VXDAlignment::dV),
237 vxdAlignments->get(sensorPlacement.first, VXDAlignment::dW),
238 vxdAlignments->get(sensorPlacement.first, VXDAlignment::dAlpha),
239 vxdAlignments->get(sensorPlacement.first, VXDAlignment::dBeta),
240 vxdAlignments->get(sensorPlacement.first, VXDAlignment::dGamma)
241 );
242 rigidBodyHierarchy.insertTGeoTransform<VXDAlignment, VXDAlignment>(sensorPlacement.first, halfShellPlacement.first,
243 trafoLadder * trafoSensor);
244
245
246 }
247 }
248 }
249 } else if (s_hierarchyType == c_Full) {
261 for (auto& halfShellPlacement : geo.getHalfShellPlacements()) {
262 // For PXD
263 if (halfShellPlacement.first.getLayerNumber() <= 2 and !s_enablePXD)
264 continue;
265 // for SVD - layer > 2
266 if (halfShellPlacement.first.getLayerNumber() > 2 and !s_enableSVD)
267 continue;
268
269 TGeoHMatrix trafoHalfShell = halfShellPlacement.second;
270 trafoHalfShell *= geo.getTGeoFromRigidBodyParams(
271 vxdAlignments->get(halfShellPlacement.first, VXDAlignment::dU),
272 vxdAlignments->get(halfShellPlacement.first, VXDAlignment::dV),
273 vxdAlignments->get(halfShellPlacement.first, VXDAlignment::dW),
274 vxdAlignments->get(halfShellPlacement.first, VXDAlignment::dAlpha),
275 vxdAlignments->get(halfShellPlacement.first, VXDAlignment::dBeta),
276 vxdAlignments->get(halfShellPlacement.first, VXDAlignment::dGamma)
277 );
278 rigidBodyHierarchy.insertTGeoTransform<VXDAlignment, alignment::EmptyGlobalParamSet>(halfShellPlacement.first, 0, trafoHalfShell);
279
280 for (auto& ladderPlacement : geo.getLadderPlacements(halfShellPlacement.first)) {
281 // Updated trafo
282 TGeoHMatrix trafoLadder = ladderPlacement.second;
283 trafoLadder *= geo.getTGeoFromRigidBodyParams(
284 vxdAlignments->get(ladderPlacement.first, VXDAlignment::dU),
285 vxdAlignments->get(ladderPlacement.first, VXDAlignment::dV),
286 vxdAlignments->get(ladderPlacement.first, VXDAlignment::dW),
287 vxdAlignments->get(ladderPlacement.first, VXDAlignment::dAlpha),
288 vxdAlignments->get(ladderPlacement.first, VXDAlignment::dBeta),
289 vxdAlignments->get(ladderPlacement.first, VXDAlignment::dGamma)
290 );
291 rigidBodyHierarchy.insertTGeoTransform<VXDAlignment, VXDAlignment>(ladderPlacement.first, halfShellPlacement.first, trafoLadder);
292
293 for (auto& sensorPlacement : geo.getSensorPlacements(ladderPlacement.first)) {
294 // Updated trafo
295 TGeoHMatrix trafoSensor = sensorPlacement.second;
296 trafoSensor *= geo.getTGeoFromRigidBodyParams(
297 vxdAlignments->get(sensorPlacement.first, VXDAlignment::dU),
298 vxdAlignments->get(sensorPlacement.first, VXDAlignment::dV),
299 vxdAlignments->get(sensorPlacement.first, VXDAlignment::dW),
300 vxdAlignments->get(sensorPlacement.first, VXDAlignment::dAlpha),
301 vxdAlignments->get(sensorPlacement.first, VXDAlignment::dBeta),
302 vxdAlignments->get(sensorPlacement.first, VXDAlignment::dGamma)
303 );
304 rigidBodyHierarchy.insertTGeoTransform<VXDAlignment, VXDAlignment>(sensorPlacement.first, ladderPlacement.first, trafoSensor);
305
306
307 }
308 }
309 }
310 }
311 } catch (const std::bad_cast& e) {
312 // Bad cast
313 }
314 }
static const baseType dAlpha
Sensor/layer/ladder alignment in local alpha.
Definition: VXDAlignment.h:29
static const baseType dGamma
Sensor/layer/ladder alignment in local gamma.
Definition: VXDAlignment.h:33
static const baseType dW
Sensor/layer/ladder alignment in local w.
Definition: VXDAlignment.h:27
static const baseType dBeta
Sensor/layer/ladder alignment in local beta.
Definition: VXDAlignment.h:31
static const baseType dU
Sensor/layer/ladder alignment in local u.
Definition: VXDAlignment.h:23
static const baseType dV
Sensor/layer/ladder alignment in local v.
Definition: VXDAlignment.h:25
static GeoCache & getInstance()
Return a reference to the singleton instance.
Definition: GeoCache.cc:214
static bool s_enablePXD
Enable PXD in hierarchy?
Definition: GlobalParam.h:85
static bool s_enableSVD
Enable SVD in hierarchy?
Definition: GlobalParam.h:87
static E_VXDHierarchyType s_hierarchyType
What type of hierarchy to use for VXD?
Definition: GlobalParam.h:83

Member Data Documentation

◆ s_enablePXD

bool s_enablePXD = true
static

Enable PXD in hierarchy?

Definition at line 85 of file GlobalParam.h.

◆ s_enableSVD

bool s_enableSVD = true
static

Enable SVD in hierarchy?

Definition at line 87 of file GlobalParam.h.

◆ s_hierarchyType

Initial value:
=
VXDGlobalParamInterface::E_VXDHierarchyType::c_Full

What type of hierarchy to use for VXD?

Definition at line 83 of file GlobalParam.h.


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