Belle II Software  release-05-02-19
CDCAlignment.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2016 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Tadeas Bilka (original) *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 #include <calibration/DBObjCalibrationConstMapBase.h>
14 #include <cdc/dataobjects/WireID.h>
15 
16 namespace Belle2 {
22  // N.B. The original was CDCCalibration.h by Tadeas; copied here and removed
24  // calibration-related part. This is tentative for code development; to be
25  // moved to an appropriate directory later.
26  class CDCAlignment: public DBObjCalibrationConstMapBase {
27 
28  public:
29  // Alignment of wires ------------------------------------------------
31  static const baseType wireBwdX = 0;
33  static const baseType wireBwdY = 1;
35  static const baseType wireBwdZ = 2;
37  static const baseType wireFwdX = 4;
39  static const baseType wireFwdY = 5;
41  static const baseType wireFwdZ = 6;
42 
43  // Tension and additional wire shape parametrization ---------------
45  static const baseType wireTension = 21;
46 
47  // Alignment of layers ------------------------------------------------
48  //Numbering taken from Claus ... no need to change, good idea :-)
49  //(1: X(bwd), 2: Y(bwd), 6: Phi(bwd), 11: X(fwd-bwd), 12: Y(fwd-bwd), 16: Phi(fwd-bwd)
50 
52  static const baseType layerX = 1;
54  static const baseType layerY = 2;
56  static const baseType layerPhi = 6;
57 
59  static const baseType layerDx = 11;
61  static const baseType layerDy = 12;
63  static const baseType layerDPhi = 16;
64 
67 
69  double getBwdWireShiftX(int ICLayer, int ILayer) const
70  {
71  return get(WireID(ICLayer, ILayer), wireBwdX);
72  }
74  double getBwdWireShiftY(int ICLayer, int ILayer) const
75  {
76  return get(WireID(ICLayer, ILayer), wireBwdY);
77  }
79  double getBwdWireShiftZ(int ICLayer, int ILayer) const
80  {
81  return get(WireID(ICLayer, ILayer), wireBwdZ);
82  }
83 
85  double getFwdWireShiftX(int ICLayer, int ILayer) const
86  {
87  return get(WireID(ICLayer, ILayer), wireFwdX);
88  }
90  double getFwdWireShiftY(int ICLayer, int ILayer) const
91  {
92  return get(WireID(ICLayer, ILayer), wireFwdY);
93  }
95  double getFwdWireShiftZ(int ICLayer, int ILayer) const
96  {
97  return get(WireID(ICLayer, ILayer), wireFwdZ);
98  }
99 
101  double getWireTension(int ICLayer, int ILayer) const
102  {
103  return get(WireID(ICLayer, ILayer), wireTension);
104  }
105 
107  ~CDCAlignment() {}
108 
109  // ------------- Interface to global Millepede calibration ----------------
111  static unsigned short getGlobalUniqueID() {return 27;}
113  double getGlobalParam(unsigned short element, unsigned short param) const
114  {
115  return get(element, param);
116  }
118  void setGlobalParam(double value, unsigned short element, unsigned short param)
119  {
120  set(element, param, value);
121  }
123  std::vector<std::pair<unsigned short, unsigned short>> listGlobalParams()
124  {
125  return {};
126  }
127  // ------------------------------------------------------------------------
128 
129  private:
130 
133  };
134 
136 } // end namespace Belle2
137 
Belle2::CDCAlignment::wireBwdX
static const baseType wireBwdX
Wire X position w.r.t. nominal on backward endplate.
Definition: CDCAlignment.h:39
Belle2::WireID
Class to identify a wire inside the CDC.
Definition: WireID.h:44
Belle2::DBObjCalibrationConstMapBase::set
virtual void set(baseType id, baseType param, double value)
Set parameter correction for given WireID and parameter number.
Definition: DBObjCalibrationConstMapBase.cc:31
Belle2::CDCAlignment::~CDCAlignment
~CDCAlignment()
Destructor.
Definition: CDCAlignment.h:115
Belle2::CDCAlignment::getBwdWireShiftX
double getBwdWireShiftX(int ICLayer, int ILayer) const
Getter to X shift of bwd wire.
Definition: CDCAlignment.h:77
Belle2::CDCAlignment::layerPhi
static const baseType layerPhi
Layer rotation in global X-Y plane (gamma) at backward endplate.
Definition: CDCAlignment.h:64
Belle2::CDCAlignment::getFwdWireShiftY
double getFwdWireShiftY(int ICLayer, int ILayer) const
Getter to Y shift of fwd wire.
Definition: CDCAlignment.h:98
Belle2::CDCAlignment::getFwdWireShiftX
double getFwdWireShiftX(int ICLayer, int ILayer) const
Getter to X shift of fwd wire.
Definition: CDCAlignment.h:93
Belle2::CDCAlignment::wireFwdX
static const baseType wireFwdX
Wire X position w.r.t. nominal on forward endplate.
Definition: CDCAlignment.h:45
Belle2::CDCAlignment::getBwdWireShiftZ
double getBwdWireShiftZ(int ICLayer, int ILayer) const
Getter to Z shift of bwd wire.
Definition: CDCAlignment.h:87
Belle2::CDCAlignment::ClassDef
ClassDef(CDCAlignment, 2)
Storage for CDC alignment constants (mainly now for Millepede)
Belle2::CDCAlignment::setGlobalParam
void setGlobalParam(double value, unsigned short element, unsigned short param)
Set global parameter.
Definition: CDCAlignment.h:126
Belle2::DBObjCalibrationConstMapBase
Base for calibration or alignment parameters identified by two unsigned shorts Typically first is som...
Definition: DBObjCalibrationConstMapBase.h:46
Belle2::CDCAlignment::getFwdWireShiftZ
double getFwdWireShiftZ(int ICLayer, int ILayer) const
Getter to Z shift of fwd wire.
Definition: CDCAlignment.h:103
Belle2::CDCAlignment::wireBwdY
static const baseType wireBwdY
Wire Y position w.r.t. nominal on backward endplate.
Definition: CDCAlignment.h:41
Belle2::CDCAlignment::wireFwdZ
static const baseType wireFwdZ
Wire Z position w.r.t. nominal on forward endplate.
Definition: CDCAlignment.h:49
Belle2::CDCAlignment::CDCAlignment
CDCAlignment()
Constructor.
Definition: CDCAlignment.h:74
Belle2::CDCAlignment::getWireTension
double getWireTension(int ICLayer, int ILayer) const
Getter to wire tension.
Definition: CDCAlignment.h:109
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::CDCAlignment::wireTension
static const baseType wireTension
Wire tension w.r.t. nominal (=50. ?)
Definition: CDCAlignment.h:53
Belle2::CDCAlignment::getGlobalUniqueID
static unsigned short getGlobalUniqueID()
Get global unique id.
Definition: CDCAlignment.h:119
Belle2::DBObjCalibrationConstMapBase::baseType
int baseType
The underlying element type (also for param id)
Definition: DBObjCalibrationConstMapBase.h:51
Belle2::CDCAlignment::layerY
static const baseType layerY
Layer shift in global Y at backward endplate.
Definition: CDCAlignment.h:62
Belle2::CDCAlignment::layerDy
static const baseType layerDy
Layer shift in global Y dY = foward - backward endplate.
Definition: CDCAlignment.h:69
Belle2::CDCAlignment::getBwdWireShiftY
double getBwdWireShiftY(int ICLayer, int ILayer) const
Getter to Y shift of bwd wire.
Definition: CDCAlignment.h:82
Belle2::CDCAlignment::getGlobalParam
double getGlobalParam(unsigned short element, unsigned short param) const
Get global parameter.
Definition: CDCAlignment.h:121
Belle2::CDCAlignment::layerDx
static const baseType layerDx
Layer shift in global X dX = foward - backward endplate.
Definition: CDCAlignment.h:67
Belle2::CDCAlignment::wireBwdZ
static const baseType wireBwdZ
Wire Z position w.r.t. nominal on backward endplate.
Definition: CDCAlignment.h:43
Belle2::CDCAlignment::wireFwdY
static const baseType wireFwdY
Wire Y position w.r.t. nominal on forward endplate.
Definition: CDCAlignment.h:47
Belle2::CDCAlignment::layerX
static const baseType layerX
Layer shift in global X at backward endplate.
Definition: CDCAlignment.h:60
Belle2::CDCAlignment::listGlobalParams
std::vector< std::pair< unsigned short, unsigned short > > listGlobalParams()
list stored global parameters TODO FIXME CDC not ready
Definition: CDCAlignment.h:131
Belle2::CDCAlignment::layerDPhi
static const baseType layerDPhi
Layer rotation in global X-Y plane (gamma) dPhi = foward - backward endplate.
Definition: CDCAlignment.h:71
Belle2::DBObjCalibrationConstMapBase::get
virtual double get(baseType id, baseType param) const
Get parameter value for given element and parameter number.
Definition: DBObjCalibrationConstMapBase.cc:20
Belle2::CDCAlignment
CDC alignment constants.
Definition: CDCAlignment.h:34