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 };
@ c_Full
Full geometry converted from Geant4 (use this for non-standard Belle II setups!).
Definition EveGeometry.h:26

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 174 of file GlobalParam.cc.

175 {
176 try {
177 auto& rigidBodyHierarchy = dynamic_cast<RigidBodyHierarchy&>(hierarchy);
178 auto& geo = VXD::GeoCache::getInstance();
179 // Set-up hierarchy
180 DBObjPtr<VXDAlignment> vxdAlignments;
181 if (s_hierarchyType == c_None) {
182 // Nothing to be done
183 return;
184
185 } else if (s_hierarchyType == c_Flat) {
186 for (auto& sensor : geo.getListOfSensors()) {
187 //TODO: Don't we have better way to distinguish PXD and SVD?
188 // For PXD
189 if (sensor.getLayerNumber() <= 2 and !s_enablePXD)
190 continue;
191 // SVD layer > 2
192 if (sensor.getLayerNumber() > 2 and !s_enableSVD)
193 continue;
194
195 rigidBodyHierarchy.insertTGeoTransform<VXDAlignment, VXDAlignment>(sensor, VxdID(0, 0, 0, 1),
196 geo.getSensorInfo(sensor).getTransformation(true));
197 }
198 } else if (s_hierarchyType == c_HalfShells) {
207
208 for (auto& halfShellPlacement : geo.getHalfShellPlacements()) {
209 // For PXD
210 if (halfShellPlacement.first.getLayerNumber() <= 2 and !s_enablePXD)
211 continue;
212 // for SVD - layer > 2
213 if (halfShellPlacement.first.getLayerNumber() > 2 and !s_enableSVD)
214 continue;
215
216 TGeoHMatrix trafoHalfShell = halfShellPlacement.second;
217 trafoHalfShell *= geo.getTGeoFromRigidBodyParams(
218 vxdAlignments->get(halfShellPlacement.first, VXDAlignment::dU),
219 vxdAlignments->get(halfShellPlacement.first, VXDAlignment::dV),
220 vxdAlignments->get(halfShellPlacement.first, VXDAlignment::dW),
221 vxdAlignments->get(halfShellPlacement.first, VXDAlignment::dAlpha),
222 vxdAlignments->get(halfShellPlacement.first, VXDAlignment::dBeta),
223 vxdAlignments->get(halfShellPlacement.first, VXDAlignment::dGamma)
224 );
225 rigidBodyHierarchy.insertTGeoTransform<VXDAlignment, alignment::EmptyGlobalParamSet>(halfShellPlacement.first, 0, trafoHalfShell);
226
227 for (auto& ladderPlacement : geo.getLadderPlacements(halfShellPlacement.first)) {
228 // Updated trafo
229 TGeoHMatrix trafoLadder = ladderPlacement.second;
230 trafoLadder *= geo.getTGeoFromRigidBodyParams(
231 vxdAlignments->get(ladderPlacement.first, VXDAlignment::dU),
232 vxdAlignments->get(ladderPlacement.first, VXDAlignment::dV),
233 vxdAlignments->get(ladderPlacement.first, VXDAlignment::dW),
234 vxdAlignments->get(ladderPlacement.first, VXDAlignment::dAlpha),
235 vxdAlignments->get(ladderPlacement.first, VXDAlignment::dBeta),
236 vxdAlignments->get(ladderPlacement.first, VXDAlignment::dGamma)
237 );
238 // Do not insert ladder, but insert sensor directly into half-shells below, with the additional transformation from ladder
239 //rigidBodyHierarchy.insertTGeoTransform<VXDAlignment, VXDAlignment>(ladderPlacement.first, halfShellPlacement.first, trafoLadder);
240
241 for (auto& sensorPlacement : geo.getSensorPlacements(ladderPlacement.first)) {
242 // Updated trafo
243 TGeoHMatrix trafoSensor = sensorPlacement.second;
244 trafoSensor *= geo.getTGeoFromRigidBodyParams(
245 vxdAlignments->get(sensorPlacement.first, VXDAlignment::dU),
246 vxdAlignments->get(sensorPlacement.first, VXDAlignment::dV),
247 vxdAlignments->get(sensorPlacement.first, VXDAlignment::dW),
248 vxdAlignments->get(sensorPlacement.first, VXDAlignment::dAlpha),
249 vxdAlignments->get(sensorPlacement.first, VXDAlignment::dBeta),
250 vxdAlignments->get(sensorPlacement.first, VXDAlignment::dGamma)
251 );
252 rigidBodyHierarchy.insertTGeoTransform<VXDAlignment, VXDAlignment>(sensorPlacement.first, halfShellPlacement.first,
253 trafoLadder * trafoSensor);
254
255
256 }
257 }
258 }
259 } else if (s_hierarchyType == c_Full) {
270
271 for (auto& halfShellPlacement : geo.getHalfShellPlacements()) {
272 // For PXD
273 if (halfShellPlacement.first.getLayerNumber() <= 2 and !s_enablePXD)
274 continue;
275 // for SVD - layer > 2
276 if (halfShellPlacement.first.getLayerNumber() > 2 and !s_enableSVD)
277 continue;
278
279 TGeoHMatrix trafoHalfShell = halfShellPlacement.second;
280 trafoHalfShell *= geo.getTGeoFromRigidBodyParams(
281 vxdAlignments->get(halfShellPlacement.first, VXDAlignment::dU),
282 vxdAlignments->get(halfShellPlacement.first, VXDAlignment::dV),
283 vxdAlignments->get(halfShellPlacement.first, VXDAlignment::dW),
284 vxdAlignments->get(halfShellPlacement.first, VXDAlignment::dAlpha),
285 vxdAlignments->get(halfShellPlacement.first, VXDAlignment::dBeta),
286 vxdAlignments->get(halfShellPlacement.first, VXDAlignment::dGamma)
287 );
288 rigidBodyHierarchy.insertTGeoTransform<VXDAlignment, alignment::EmptyGlobalParamSet>(halfShellPlacement.first, 0, trafoHalfShell);
289
290 for (auto& ladderPlacement : geo.getLadderPlacements(halfShellPlacement.first)) {
291 // Updated trafo
292 TGeoHMatrix trafoLadder = ladderPlacement.second;
293 trafoLadder *= geo.getTGeoFromRigidBodyParams(
294 vxdAlignments->get(ladderPlacement.first, VXDAlignment::dU),
295 vxdAlignments->get(ladderPlacement.first, VXDAlignment::dV),
296 vxdAlignments->get(ladderPlacement.first, VXDAlignment::dW),
297 vxdAlignments->get(ladderPlacement.first, VXDAlignment::dAlpha),
298 vxdAlignments->get(ladderPlacement.first, VXDAlignment::dBeta),
299 vxdAlignments->get(ladderPlacement.first, VXDAlignment::dGamma)
300 );
301 rigidBodyHierarchy.insertTGeoTransform<VXDAlignment, VXDAlignment>(ladderPlacement.first, halfShellPlacement.first, trafoLadder);
302
303 for (auto& sensorPlacement : geo.getSensorPlacements(ladderPlacement.first)) {
304 // Updated trafo
305 TGeoHMatrix trafoSensor = sensorPlacement.second;
306 trafoSensor *= geo.getTGeoFromRigidBodyParams(
307 vxdAlignments->get(sensorPlacement.first, VXDAlignment::dU),
308 vxdAlignments->get(sensorPlacement.first, VXDAlignment::dV),
309 vxdAlignments->get(sensorPlacement.first, VXDAlignment::dW),
310 vxdAlignments->get(sensorPlacement.first, VXDAlignment::dAlpha),
311 vxdAlignments->get(sensorPlacement.first, VXDAlignment::dBeta),
312 vxdAlignments->get(sensorPlacement.first, VXDAlignment::dGamma)
313 );
314 rigidBodyHierarchy.insertTGeoTransform<VXDAlignment, VXDAlignment>(sensorPlacement.first, ladderPlacement.first, trafoSensor);
315
316
317 }
318 }
319 }
320 }
321 } catch (const std::bad_cast& e) {
322 // Bad cast
323 }
324 }

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: