Belle II Software  release-08-01-10
KLMDisplacementGenerator Class Reference

Module for generation of KLM displacement or alignment data. More...

#include <KLMDisplacementGenerator.h>

Collaboration diagram for KLMDisplacementGenerator:

Public Member Functions

 KLMDisplacementGenerator ()
 Constructor.
 
 ~KLMDisplacementGenerator ()
 Destructor.
 
void fillZeroDisplacements (EKLMAlignment *alignment, EKLMSegmentAlignment *segmentAlignment)
 Fill EKLMAlignment with zero displacements. More...
 
void generateFixedModuleDisplacement (double deltaU, double deltaV, double deltaGamma)
 Generation of fixed module displacements. More...
 
void generateRandomDisplacement (EKLMAlignment *alignment, EKLMSegmentAlignment *segmentAlignment, bool displaceModule, bool displaceSegment, bool moduleSameDisplacement=false, bool moduleZeroDeltaU=false, bool moduleZeroDeltaV=false, bool moduleZeroDeltaGamma=false)
 Generation of random displacements. More...
 
void readDisplacementFromROOTFile (EKLMAlignment *alignment, EKLMSegmentAlignment *segmentAlignment, const char *inputFile)
 Read displacement from ROOT file. More...
 
void studyModuleAlignmentLimits (TFile *f)
 Generate random module displacements and check if they are correct (no overlaps). More...
 
void studySegmentAlignmentLimits (TFile *f)
 Generate random segment displacements and check if they are correct (no overlaps). More...
 
void studyAlignmentLimits (const char *outputFile)
 Generate random displacements and check if they are correct (no overlaps). More...
 
void saveDisplacement (EKLMAlignment *alignment, EKLMSegmentAlignment *segmentAlignment, const char *outputFile)
 Save displacements to a ROOT file. More...
 

Private Attributes

const EKLM::GeometryDatam_GeoDat
 Geometry data.
 
const KLMElementNumbersm_ElementNumbers
 Element numbers.
 
const EKLMElementNumbersm_eklmElementNumbers
 EKLM element numbers.
 

Detailed Description

Module for generation of KLM displacement or alignment data.

Definition at line 30 of file KLMDisplacementGenerator.h.

Member Function Documentation

◆ fillZeroDisplacements()

void fillZeroDisplacements ( EKLMAlignment alignment,
EKLMSegmentAlignment segmentAlignment 
)

Fill EKLMAlignment with zero displacements.

Parameters
[out]alignmentDisplacements.
[out]segmentAlignmentSegment displacements.

Definition at line 37 of file KLMDisplacementGenerator.cc.

39 {
40  KLMAlignmentData alignmentData(0, 0, 0, 0, 0, 0);
41  int iSection, iLayer, iSector, iPlane, iSegment, segment;
42  for (iSection = 1; iSection <= m_GeoDat->getNSections(); iSection++) {
43  for (iLayer = 1; iLayer <= m_GeoDat->getNDetectorLayers(iSection);
44  iLayer++) {
45  for (iSector = 1; iSector <= m_GeoDat->getNSectors(); iSector++) {
46  int module = m_ElementNumbers->moduleNumberEKLM(iSection, iSector, iLayer);
47  alignment->setModuleAlignment(module, &alignmentData);
48  for (iPlane = 1; iPlane <= m_GeoDat->getNPlanes(); iPlane++) {
49  for (iSegment = 1; iSegment <= m_GeoDat->getNSegments(); iSegment++) {
51  iSection, iLayer, iSector, iPlane, iSegment);
52  segmentAlignment->setSegmentAlignment(segment, &alignmentData);
53  }
54  }
55  }
56  }
57  }
58 }
int segmentNumber(int section, int layer, int sector, int plane, int segment) const
Get segment number.
int getNPlanes() const
Get number of planes.
int getNSections() const
Get number of sections.
int getNDetectorLayers(int section) const
Get number of detector layers.
int getNSegments() const
Get number of segments.
int getNSectors() const
Get number of sectors.
void setSegmentAlignment(EKLMSegmentNumber segment, KLMAlignmentData *dat)
Set segment alignment data.
KLM Alignment data.
const EKLM::GeometryData * m_GeoDat
Geometry data.
const KLMElementNumbers * m_ElementNumbers
Element numbers.
const EKLMElementNumbers * m_eklmElementNumbers
EKLM element numbers.
KLMModuleNumber moduleNumberEKLM(int section, int sector, int layer) const
Get module number for EKLM.

◆ generateFixedModuleDisplacement()

void generateFixedModuleDisplacement ( double  deltaU,
double  deltaV,
double  deltaGamma 
)

Generation of fixed module displacements.

Parameters
[in]deltaUShift in U.
[in]deltaVShift in V.
[in]deltaGammaRotation in Gamma.

Definition at line 60 of file KLMDisplacementGenerator.cc.

◆ generateRandomDisplacement()

void generateRandomDisplacement ( EKLMAlignment alignment,
EKLMSegmentAlignment segmentAlignment,
bool  displaceModule,
bool  displaceSegment,
bool  moduleSameDisplacement = false,
bool  moduleZeroDeltaU = false,
bool  moduleZeroDeltaV = false,
bool  moduleZeroDeltaGamma = false 
)

Generation of random displacements.

Parameters
[out]alignmentDisplacements.
[out]segmentAlignmentSegment displacements.
[in]displaceModuleWhether modules should be displaced.
[in]displaceSegmentWhether segments should be displaced.
[in]moduleSameDisplacementIf the displacement should be the same for all modules.
[in]moduleZeroDeltaUFix module deltaU at 0.
[in]moduleZeroDeltaVFix module deltaV at 0.
[in]moduleZeroDeltaGammaFix module deltaGamma at 0.

Definition at line 79 of file KLMDisplacementGenerator.cc.

◆ readDisplacementFromROOTFile()

void readDisplacementFromROOTFile ( EKLMAlignment alignment,
EKLMSegmentAlignment segmentAlignment,
const char *  inputFile 
)

Read displacement from ROOT file.

Parameters
[out]alignmentDisplacements.
[out]segmentAlignmentSegment displacements.
[in]inputFileInput file.

Definition at line 185 of file KLMDisplacementGenerator.cc.

◆ saveDisplacement()

void saveDisplacement ( EKLMAlignment alignment,
EKLMSegmentAlignment segmentAlignment,
const char *  outputFile 
)

Save displacements to a ROOT file.

Parameters
[in]alignmentDisplacements.
[in]segmentAlignmentSegment displacements.
[in]outputFileOutput file.

Definition at line 363 of file KLMDisplacementGenerator.cc.

◆ studyAlignmentLimits()

void studyAlignmentLimits ( const char *  outputFile)

Generate random displacements and check if they are correct (no overlaps).

Parameters
[in]outputFileOutput file.

Definition at line 354 of file KLMDisplacementGenerator.cc.

◆ studyModuleAlignmentLimits()

void studyModuleAlignmentLimits ( TFile *  f)

Generate random module displacements and check if they are correct (no overlaps).

Parameters
[in]fOutput file.

Definition at line 247 of file KLMDisplacementGenerator.cc.

◆ studySegmentAlignmentLimits()

void studySegmentAlignmentLimits ( TFile *  f)

Generate random segment displacements and check if they are correct (no overlaps).

Parameters
[in]fOutput file.

Definition at line 295 of file KLMDisplacementGenerator.cc.


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