Belle II Software  release-08-01-10
KLMDisplacementGenerator.h
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 
9 #pragma once
10 
11 /* KLM headers. */
12 #include <klm/dataobjects/eklm/EKLMElementNumbers.h>
13 #include <klm/dataobjects/KLMElementNumbers.h>
14 #include <klm/dbobjects/eklm/EKLMAlignment.h>
15 #include <klm/dbobjects/eklm/EKLMSegmentAlignment.h>
16 #include <klm/eklm/geometry/GeometryData.h>
17 
18 /* ROOT headers. */
19 #include <TFile.h>
20 
21 namespace Belle2 {
31 
32  public:
33 
38 
43 
49  void fillZeroDisplacements(EKLMAlignment* alignment,
50  EKLMSegmentAlignment* segmentAlignment);
51 
58  void generateFixedModuleDisplacement(double deltaU, double deltaV,
59  double deltaGamma);
60 
89  EKLMAlignment* alignment, EKLMSegmentAlignment* segmentAlignment,
90  bool displaceModule, bool displaceSegment,
91  bool moduleSameDisplacement = false, bool moduleZeroDeltaU = false,
92  bool moduleZeroDeltaV = false, bool moduleZeroDeltaGamma = false);
93 
101  EKLMSegmentAlignment* segmentAlignment,
102  const char* inputFile);
103 
109  void studyModuleAlignmentLimits(TFile* f);
110 
116  void studySegmentAlignmentLimits(TFile* f);
117 
123  void studyAlignmentLimits(const char* outputFile);
124 
131  void saveDisplacement(EKLMAlignment* alignment,
132  EKLMSegmentAlignment* segmentAlignment,
133  const char* outputFile);
134 
135  private:
136 
139 
142 
145 
146  };
147 
149 }
Class to store EKLM alignment data in the database.
Definition: EKLMAlignment.h:30
EKLM element numbers.
Class to store EKLM alignment data in the database.
EKLM geometry data.
Definition: GeometryData.h:38
Module for generation of KLM displacement or alignment data.
const EKLM::GeometryData * m_GeoDat
Geometry data.
void studyAlignmentLimits(const char *outputFile)
Generate random displacements and check if they are correct (no overlaps).
void readDisplacementFromROOTFile(EKLMAlignment *alignment, EKLMSegmentAlignment *segmentAlignment, const char *inputFile)
Read displacement from ROOT file.
void studyModuleAlignmentLimits(TFile *f)
Generate random module displacements and check if they are correct (no overlaps).
const KLMElementNumbers * m_ElementNumbers
Element numbers.
const EKLMElementNumbers * m_eklmElementNumbers
EKLM element numbers.
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.
void fillZeroDisplacements(EKLMAlignment *alignment, EKLMSegmentAlignment *segmentAlignment)
Fill EKLMAlignment with zero displacements.
void saveDisplacement(EKLMAlignment *alignment, EKLMSegmentAlignment *segmentAlignment, const char *outputFile)
Save displacements to a ROOT file.
void generateFixedModuleDisplacement(double deltaU, double deltaV, double deltaGamma)
Generation of fixed module displacements.
void studySegmentAlignmentLimits(TFile *f)
Generate random segment displacements and check if they are correct (no overlaps).
KLM element numbers.
Abstract base class for different kinds of events.