Belle II Software development
CDCAlignment.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#include <calibration/DBObjCalibrationConstMapBase.h>
12#include <cdc/dataobjects/WireID.h>
13
14namespace Belle2 {
21 // N.B. The original was CDCCalibration.h by Tadeas; copied here and removed
22 // calibration-related part. This is tentative for code development; to be
23 // moved to an appropriate directory later.
25
26 public:
27 // Alignment of wires ------------------------------------------------
29 static const baseType wireBwdX = 0;
31 static const baseType wireBwdY = 1;
33 static const baseType wireBwdZ = 2;
35 static const baseType wireFwdX = 4;
37 static const baseType wireFwdY = 5;
39 static const baseType wireFwdZ = 6;
40
41 // Tension and additional wire shape parametrization ---------------
43 static const baseType wireTension = 21;
44
45 // Alignment of layers ------------------------------------------------
46 //Numbering taken from Claus ... no need to change, good idea :-)
47 //(1: X(bwd), 2: Y(bwd), 6: Phi(bwd), 11: X(fwd-bwd), 12: Y(fwd-bwd), 16: Phi(fwd-bwd)
48
50 static const baseType layerX = 1;
52 static const baseType layerY = 2;
54 static const baseType layerPhi = 6;
55
57 static const baseType layerDx = 11;
59 static const baseType layerDy = 12;
61 static const baseType layerDPhi = 16;
62
65
67 double getBwdWireShiftX(int ICLayer, int ILayer) const
68 {
69 return get(WireID(ICLayer, ILayer), wireBwdX);
70 }
72 double getBwdWireShiftY(int ICLayer, int ILayer) const
73 {
74 return get(WireID(ICLayer, ILayer), wireBwdY);
75 }
77 double getBwdWireShiftZ(int ICLayer, int ILayer) const
78 {
79 return get(WireID(ICLayer, ILayer), wireBwdZ);
80 }
81
83 double getFwdWireShiftX(int ICLayer, int ILayer) const
84 {
85 return get(WireID(ICLayer, ILayer), wireFwdX);
86 }
88 double getFwdWireShiftY(int ICLayer, int ILayer) const
89 {
90 return get(WireID(ICLayer, ILayer), wireFwdY);
91 }
93 double getFwdWireShiftZ(int ICLayer, int ILayer) const
94 {
95 return get(WireID(ICLayer, ILayer), wireFwdZ);
96 }
97
99 double getWireTension(int ICLayer, int ILayer) const
100 {
101 return get(WireID(ICLayer, ILayer), wireTension);
102 }
103
106
107 // ------------- Interface to global Millepede calibration ----------------
109 static unsigned short getGlobalUniqueID() {return 27;}
111 double getGlobalParam(unsigned short element, unsigned short param) const
112 {
113 return get(element, param);
114 }
116 void setGlobalParam(double value, unsigned short element, unsigned short param)
117 {
118 set(element, param, value);
119 }
121 std::vector<std::pair<unsigned short, unsigned short>> listGlobalParams()
122 {
123 return {};
124 }
125 // ------------------------------------------------------------------------
126
127 private:
128
131 };
132
134} // end namespace Belle2
135
CDC alignment constants.
Definition: CDCAlignment.h:24
~CDCAlignment()
Destructor.
Definition: CDCAlignment.h:105
std::vector< std::pair< unsigned short, unsigned short > > listGlobalParams()
list stored global parameters TODO FIXME CDC not ready
Definition: CDCAlignment.h:121
static unsigned short getGlobalUniqueID()
Get global unique id.
Definition: CDCAlignment.h:109
static const baseType layerDPhi
Layer rotation in global X-Y plane (gamma) dPhi = foward - backward endplate.
Definition: CDCAlignment.h:61
double getGlobalParam(unsigned short element, unsigned short param) const
Get global parameter.
Definition: CDCAlignment.h:111
double getFwdWireShiftX(int ICLayer, int ILayer) const
Getter to X shift of fwd wire.
Definition: CDCAlignment.h:83
double getBwdWireShiftY(int ICLayer, int ILayer) const
Getter to Y shift of bwd wire.
Definition: CDCAlignment.h:72
static const baseType layerDy
Layer shift in global Y dY = foward - backward endplate.
Definition: CDCAlignment.h:59
static const baseType wireBwdZ
Wire Z position w.r.t. nominal on backward endplate.
Definition: CDCAlignment.h:33
ClassDef(CDCAlignment, 2)
Storage for CDC alignment constants (mainly now for Millepede)
double getWireTension(int ICLayer, int ILayer) const
Getter to wire tension.
Definition: CDCAlignment.h:99
double getFwdWireShiftZ(int ICLayer, int ILayer) const
Getter to Z shift of fwd wire.
Definition: CDCAlignment.h:93
double getBwdWireShiftZ(int ICLayer, int ILayer) const
Getter to Z shift of bwd wire.
Definition: CDCAlignment.h:77
static const baseType layerDx
Layer shift in global X dX = foward - backward endplate.
Definition: CDCAlignment.h:57
CDCAlignment()
Constructor.
Definition: CDCAlignment.h:64
static const baseType wireBwdY
Wire Y position w.r.t. nominal on backward endplate.
Definition: CDCAlignment.h:31
static const baseType wireFwdZ
Wire Z position w.r.t. nominal on forward endplate.
Definition: CDCAlignment.h:39
static const baseType wireFwdY
Wire Y position w.r.t. nominal on forward endplate.
Definition: CDCAlignment.h:37
void setGlobalParam(double value, unsigned short element, unsigned short param)
Set global parameter.
Definition: CDCAlignment.h:116
static const baseType wireFwdX
Wire X position w.r.t. nominal on forward endplate.
Definition: CDCAlignment.h:35
static const baseType wireBwdX
Wire X position w.r.t. nominal on backward endplate.
Definition: CDCAlignment.h:29
static const baseType layerY
Layer shift in global Y at backward endplate.
Definition: CDCAlignment.h:52
static const baseType layerX
Layer shift in global X at backward endplate.
Definition: CDCAlignment.h:50
double getFwdWireShiftY(int ICLayer, int ILayer) const
Getter to Y shift of fwd wire.
Definition: CDCAlignment.h:88
double getBwdWireShiftX(int ICLayer, int ILayer) const
Getter to X shift of bwd wire.
Definition: CDCAlignment.h:67
static const baseType layerPhi
Layer rotation in global X-Y plane (gamma) at backward endplate.
Definition: CDCAlignment.h:54
static const baseType wireTension
Wire tension w.r.t. nominal (=50. ?)
Definition: CDCAlignment.h:43
Base for calibration or alignment parameters identified by two unsigned shorts Typically first is som...
virtual void set(baseType id, baseType param, double value)
Set parameter correction for given WireID and parameter number.
int baseType
The underlying element type (also for param id)
virtual double get(baseType id, baseType param) const
Get parameter value for given element and parameter number.
Class to identify a wire inside the CDC.
Definition: WireID.h:34
Abstract base class for different kinds of events.