Belle II Software  release-05-02-19
constraints.py
1 '''
2 @author: Claus Kleinwort (DESY), Tadeas Bilka
3 '''
4 import basf2 as b2
5 from ROOT import Belle2
6 
7 import os
8 import math
9 
10 
11 class Constraint():
12  """
13  Class representing a linear constraint for global parameters
14  """
15 
16  def __init__(self, comment="", value=0.):
17  """
18  Initialize constraint
19 
20  comment : str
21  TODO: Not yet used
22  value : float
23  The constant term of the constraint: sum(c_i * par_i) = value
24  """
25 
26  self.value = value
27 
28  self.comment = comment
29 
30  self.data = []
31 
32  def add(self, label, coeff):
33  """
34  Add coefficient for a global parameter
35 
36  Parameters
37  ----------
38  label : int
39  global parameter id (GlobalLabel::label())
40  coeff : float
41  coefficent of the parameter in constraint
42  """
43  entry = (label, coeff)
44  self.data.append(entry)
45 
46  def get_checksum(self):
47  """Get a checksum to distinguish constraints quickly (computed only from labels)
48  """
49  labels_only = [label for (label, coeff) in self.data]
50  checksum = hash(str(labels_only))
51  return checksum
52 
53 
54 class Constraints():
55  """
56  Base class representing a "generator" for file with set of constraints
57 
58  Can be used directly if you already have a file with constraints.
59  """
60 
61  def __init__(self, filename):
62  """
63  filename : str
64  Desired filename for the constraint file
65  """
66 
67  self.filename = filename
68 
69  def generate(self):
70  """
71  Should be overriden by the deriving classes and actually
72  fill the dictionary with the constraints (this runs withing a basf2 module
73  event function - so you have geometry available)
74  """
75  consts = []
76  return consts
77 
78  def configure_collector(self, collector):
79  """
80  Can be overriden be child classes to pass additional configuration to the
81  MillepedeCollector (activated by the use of the constraints)
82  """
83 
84 
85 def generate_constraints(constraint_sets, timedep, global_tags, init_event):
86  """
87  Run the constraints generation and return file names
88 
89  Parameters
90  ----------
91  constraint_sets : list (alignment.Constraints)
92  List of sets of constraints
93  timedep_config : list(tuple(list(int), list(tuple(int, int, int))))
94  Time-depence configuration.
95  Each list item is 2-tuple with list of parameter numbers (use alignment.parameters to get them) and
96  the (event, run, exp) numbers at which values of these parameters can change.
97  global_tags : list (str)
98  List of global tag names and/or (absolute) file paths to local databases
99  init_event : tuple( int, int, int)
100  Event (event, run, exp) at which to initialize time-INdependent constraints
101  """
102  files = []
103  for filename in [consts.filename for consts in constraint_sets]:
104  files.append(os.path.abspath(filename))
105 
106  from alignment.constraints_generator import save_config
107  ccfn = save_config(constraint_sets, timedep, global_tags, init_event)
108  os.system('basf2 {} {}'.format(b2.find_file('alignment/scripts/alignment/constraints_generator.py'), ccfn))
109 
110  return files
111 
112 # ----------------------------- Sub-detector specific constraint classes -----------------------------------------------
113 
114 
116  """
117  Constraints for VXD hierarchy
118 
119  They come in 3 types:
120 
121  0 : no hierarchy, just sensors aligned in their local system
122  1 : sensors -> half-shells (no ladders)
123  2 : sensors -> ladders ->half-shells (aka full hierarchy)
124 
125  and additionaly can use them for PXD, SVD or both (default) (setting pxd/svd to False
126  will disble the hierarchy for that sub-detector)
127 
128  NOTE: the filename cannot be currently changed, it is hard-coded in the collector module
129  as these constraints are actually generated by C++ code and not by python modules as others.
130  """
131 
132  def __init__(self, type=2, pxd=True, svd=True):
133  """ Initialize
134  type : int
135  Type of constraints (0 - no, 1 - half-shells, 2 -full)
136  pxd : bool
137  Use constraints for PXD?
138  svd : bool
139  Use constraints for SVD?
140  """
141 
142  # TODO: cannot currently change the filename in collector, so fixed here
143  super(VXDHierarchyConstraints, self).__init__("constraints.txt")
144 
145  self.type = type
146 
147  self.pxd = pxd
148 
149  self.svd = svd
150 
151  def configure_collector(self, collector):
152  """
153  Propagate the hierarchy configuration to the collector
154  """
155  collector.param('hierarchyType', self.type)
156  collector.param('enablePXDHierarchy', self.pxd)
157  collector.param('enableSVDHierarchy', self.svd)
158 
159  def generate(self):
160  """
161  Generate the constraints - does nothing. The collector will make the job
162  """
163  print("Generating constraints for VXD (no-op, file created by collector) ...")
164  return []
165 
166 
168  """
169  Various constraints for CDC layers
170 
171  (Code from Claus Kleinwort)
172 
173  """
174 
175  cdc = [['A1', 8, 160, 16.80, 23.80, 0., -35.9, 67.9],
176  ['U2', 6, 160, 25.70, 34.80, 0.068, -51.4, 98.6],
177  ['A3', 6, 192, 36.52, 45.57, 0., -57.5, 132.9],
178  ['V4', 6, 224, 47.69, 56.69, -0.060, -59.6, 144.7],
179  ['A5', 6, 256, 58.41, 67.41, 0., -61.8, 146.8],
180  ['U6', 6, 288, 69.53, 78.53, 0.064, -63.9, 148.9],
181  ['A7', 6, 320, 80.25, 89.25, 0., -66.0, 151.0],
182  ['V8', 6, 352, 91.37, 100.37, -0.072, -68.2, 153.2],
183  ['A9', 6, 384, 102.00, 111.14, 0., -70.2, 155.3]]
184 
185 
186  parameter = [(1, 'x-offset bwd'), (2, 'y-offset bwd'), (6, 'z-rotation bwd'),
187  (11, 'x-offset fwd-bwd'), (12, 'y-offset fwd-bwd'), (16, 'z-rotation fwd-bwd')]
188 
189  def __init__(self, filename='cdc-constraints.txt', rigid=True, z_offset=False, r_scale=False, z_scale=False):
190  """
191  filename : str
192  Filename with constraints (probably generated later)
193  rigid : bool
194  6D CDC constraints
195  z_offset : bool
196  Constraint for Z-offset
197  r_scale : bool
198  Constraint for R-scale
199  z_scale : bool
200  Constraint for Z-scale
201  """
202  super(CDCLayerConstraints, self).__init__(filename)
203 
204  self.rigid = rigid
205 
206  self.z_offset = z_offset
207 
208  self.r_scale = r_scale
209 
210  self.z_scale = z_scale
211 
212  def generate(self):
213  """Generate constraints from CDC geometry
214  """
215  print("Generating constraints for CDC layers...")
216 
217  def cdc_layer_label(layer, param):
218  wire = 511
219  wireid = Belle2.WireID(layer, wire).getEWire()
220  label = Belle2.GlobalLabel()
221  label.construct(Belle2.CDCAlignment.getGlobalUniqueID(), wireid, param)
222  return label.label()
223 
224  def cmp(a, b):
225  return (a > b) - (a < b)
226 
227  consts = []
228 
229  for par in self.parameter:
230  nTot = 0
231  for sl in self.cdc:
232  nlyr = sl[1]
233  for lyr in range(nlyr):
234  nTot += nlyr
235  nLayer = nTot
236 
237  if self.rigid:
238  # all layers
239  for par in self.parameter:
240  # f.write("Constraint 0. ! %s \n" % (par[1]))
241  const = Constraint()
242 
243  nTot = 0
244  for sl in self.cdc:
245  nlyr = sl[1]
246  for lyr in range(nlyr):
247  label = cdc_layer_label(nTot + lyr, par[0])
248  # f.write(" %10i 1.0\n" % (label))
249  const.add(label, 1.0)
250  nTot += nlyr
251 
252  # f.write('\n')
253  consts.append(const)
254 
255  if self.z_offset:
256  # stereo layers (Z offset)
257  par = self.parameter[2]
258  # f.write("Constraint 0. ! %s (Z offset)\n" % (par[1]))
259  const = Constraint()
260 
261  nTot = 0
262  for sl in self.cdc:
263  nlyr = sl[1]
264  rInner = sl[3]
265  rOuter = sl[4]
266  stereo = sl[5]
267  if stereo != 0.:
268  dr = (rOuter - rInner) / (nlyr - 1)
269  rWire = rInner
270  for lyr in range(nlyr):
271  label = cdc_layer_label(nTot + lyr, par[0])
272  # f.write(" %10i %f\n" % (label, stereo * rWire))
273  const.add(label, stereo * rWire)
274  rWire += dr
275  nTot += nlyr
276 
277  # f.write('\n')
278  consts.append(const)
279 
280  if self.r_scale:
281  # all layers 2nd
282  for par in self.parameter[:2]:
283  # f.write("Constraint 0. ! %s (2nd, radial scale)\n" % (par[1]))
284  const = Constraint()
285 
286  nTot = 0
287  for sl in self.cdc:
288  nlyr = sl[1]
289  for lyr in range(nlyr):
290  label = cdc_layer_label(nTot + lyr, par[0])
291  der = cmp(2.*float(nTot + lyr) + 0.5, float(nLayer))
292  # f.write(" %10i %3.1f\n" % (label, der))
293  const.add(label, der)
294  nTot += nlyr
295 
296  # f.write('\n')
297  consts.append(const)
298 
299  if self.z_scale:
300  # stereo layers (Z -scale)
301  par = self.parameter[5]
302  # f.write("Constraint 0. ! %s (Z scale)\n" % (par[1]))
303  const = Constraint()
304  nTot = 0
305  for sl in self.cdc:
306  nlyr = sl[1]
307  stereo = sl[5]
308  if stereo != 0.:
309  for lyr in range(nlyr):
310  label = cdc_layer_label(nTot + lyr, par[0])
311  # f.write(" %10i %f\n" % (label, stereo))
312  const.add(label, stereo)
313  nTot += nlyr
314 
315  # f.write('\n')
316  consts.append(const)
317 
318  return consts
319 
320 
322  """
323  Constraint to fix sum of corrections to CDC T0's (per wire) to zero
324  """
325 
326 
327  wires_in_layer = [
328  160, 160, 160, 160, 160, 160, 160, 160,
329  160, 160, 160, 160, 160, 160,
330  192, 192, 192, 192, 192, 192,
331  224, 224, 224, 224, 224, 224,
332  256, 256, 256, 256, 256, 256,
333  288, 288, 288, 288, 288, 288,
334  320, 320, 320, 320, 320, 320,
335  352, 352, 352, 352, 352, 352,
336  384, 384, 384, 384, 384, 384]
337 
338  def __init__(self, filename='cdc-T0-constraints.txt'):
339  """ Initialize
340  filename : str
341  Can use different filename
342  """
343  super(CDCTimeZerosConstraint, self).__init__(filename)
344 
345  def generate(self):
346  """
347  Generate the constraints
348  """
349  print("Generating constraints for CDC T0's ...")
350  consts = []
351  const = Constraint()
352 
353  for layer in range(0, 56):
354  for wire in range(0, self.wires_in_layer[layer]):
355  label = Belle2.GlobalLabel()
356  label.construct(Belle2.CDCTimeZeros.getGlobalUniqueID(), Belle2.WireID(layer, wire).getEWire(), 0)
357  const.add(label.label(), 1.0)
358 
359  consts.append(const)
360  return consts
361 
362 
364  """
365  Various constraints for CDC wires (w.r.t. layers)
366  """
367 
368 
369  wires_in_layer = [
370  160, 160, 160, 160, 160, 160, 160, 160,
371  160, 160, 160, 160, 160, 160,
372  192, 192, 192, 192, 192, 192,
373  224, 224, 224, 224, 224, 224,
374  256, 256, 256, 256, 256, 256,
375  288, 288, 288, 288, 288, 288,
376  320, 320, 320, 320, 320, 320,
377  352, 352, 352, 352, 352, 352,
378  384, 384, 384, 384, 384, 384]
379 
380  def __init__(self, filename='cdc-wire-constraints.txt', layers=None, layer_rigid=True, layer_radius=False, cdc_radius=False):
381  """Initialize constraint
382 
383  Parameters
384  ----------
385  filename : str
386  Can override the default file name
387  layers : list (int)
388  List of layer numbers for which to generate the constraints (default is 0..55)
389  layer_rigid : bool
390  6 constraints - fix sum of shifts of wire ends in x/y/rotation at fwd/bwd end-plate
391  layer_radius : bool
392  2 constraints to fix average change of layer radius (wires in layer moving away from origin)
393  cdc_radius : bool
394  1 constraint - fix average change in CDC radius from all wires
395 
396  """
397 
398  super(CDCWireConstraints, self).__init__(filename)
399 
400  if layers is None:
401  layers = [lst for lst in range(0, 56)]
402  self.layers = layers
403 
407  self.layer_rigid = layer_rigid
408 
410  self.layer_radius = layer_radius
411 
413  self.cdc_radius = cdc_radius
414 
415  def configure_collector(self, collector):
416  """Enables wire-by-wire derivatives in collector
417  """
418  b2.B2WARNING("Adding CDC wire constraints -> enabling wire-by-wire alignment derivatives")
419  collector.param('enableWireByWireAlignment', True)
420 
421  def get_label(self, layer, wire, parameter):
422  """Return GlobalLabel for wire parameter"""
423 
424  wireid = Belle2.WireID(layer, wire).getEWire()
425  label = Belle2.GlobalLabel()
426  label.construct(Belle2.CDCAlignment.getGlobalUniqueID(), wireid, parameter)
427  return label.label()
428 
429  def generate(self):
430  """Generate constraints """
431  print("Generating constraints for CDC wires...")
432  consts = []
433 
434  layers = self.layers
435 
436  if self.layer_rigid:
437  for layer in layers:
438  const = Constraint()
439  # sum of wire X (BWD) in layer
440  for wire in range(0, self.wires_in_layer[layer]):
441  const.add(self.get_label(layer, wire, Belle2.CDCAlignment.wireBwdX), 1.)
442  consts.append(const)
443 
444  for layer in layers:
445  const = Constraint()
446  # sum of wire Y (BWD) in layer
447  for wire in range(0, self.wires_in_layer[layer]):
448  const.add(self.get_label(layer, wire, Belle2.CDCAlignment.wireBwdY), 1.)
449  consts.append(const)
450 
451  for layer in layers:
452  const = Constraint()
453  # sum of wire rotations (BWD) in layer
454  for wire in range(0, self.wires_in_layer[layer]):
455 
456  wirePhi = Belle2.TrackFindingCDC.CDCWire.getInstance(Belle2.WireID(layer, wire)).getBackwardPos3D().phi()
457 
458  const.add(self.get_label(layer, wire, Belle2.CDCAlignment.wireBwdX), -math.sin(wirePhi))
459  const.add(self.get_label(layer, wire, Belle2.CDCAlignment.wireBwdY), +math.cos(wirePhi))
460  consts.append(const)
461 
462  for layer in layers:
463  const = Constraint()
464  # sum of wire X (FWD) in layer
465  for wire in range(0, self.wires_in_layer[layer]):
466  const.add(self.get_label(layer, wire, Belle2.CDCAlignment.wireFwdX), 1.)
467  consts.append(const)
468 
469  for layer in layers:
470  const = Constraint()
471  # sum of wire Y (FWD) in layer
472  for wire in range(0, self.wires_in_layer[layer]):
473  const.add(self.get_label(layer, wire, Belle2.CDCAlignment.wireFwdY), 1.)
474  consts.append(const)
475 
476  for layer in layers:
477  const = Constraint()
478  # sum of wire rotations (FWD) in layer
479  for wire in range(0, self.wires_in_layer[layer]):
480 
481  wirePhi = Belle2.TrackFindingCDC.CDCWire.getInstance(Belle2.WireID(layer, wire)).getForwardPos3D().phi()
482 
483  const.add(self.get_label(layer, wire, Belle2.CDCAlignment.wireFwdX), -math.sin(wirePhi))
484  const.add(self.get_label(layer, wire, Belle2.CDCAlignment.wireFwdY), +math.cos(wirePhi))
485  consts.append(const)
486 
487  if self.layer_radius:
488  for layer in layers:
489  const = Constraint()
490  # sum of wire rotations (BWD) in layer
491  for wire in range(0, self.wires_in_layer[layer]):
492 
493  wirePhi = Belle2.TrackFindingCDC.CDCWire.getInstance(Belle2.WireID(layer, wire)).getBackwardPos3D().phi()
494 
495  const.add(self.get_label(layer, wire, Belle2.CDCAlignment.wireBwdX), +math.cos(wirePhi))
496  const.add(self.get_label(layer, wire, Belle2.CDCAlignment.wireBwdY), +math.sin(wirePhi))
497  const.add(self.get_label(layer, 0, 0), 0.)
498  consts.append(const)
499 
500  for layer in layers:
501  const = Constraint()
502  # sum of wire rotations (FWD) in layer
503  for wire in range(0, self.wires_in_layer[layer]):
504 
505  wirePhi = Belle2.TrackFindingCDC.CDCWire.getInstance(Belle2.WireID(layer, wire)).getForwardPos3D().phi()
506 
507  const.add(self.get_label(layer, wire, Belle2.CDCAlignment.wireFwdX), +math.cos(wirePhi))
508  const.add(self.get_label(layer, wire, Belle2.CDCAlignment.wireFwdY), +math.sin(wirePhi))
509  const.add(self.get_label(layer, 0, 0), 0.)
510  consts.append(const)
511 
512  if self.cdc_radius:
513  const = Constraint()
514  for layer in layers:
515  # sum of wire rotations (BWD) in layer
516  for wire in range(0, self.wires_in_layer[layer]):
517  wirePhi = Belle2.TrackFindingCDC.CDCWire.getInstance(Belle2.WireID(layer, wire)).getBackwardPos3D().phi()
518  const.add(self.get_label(layer, wire, Belle2.CDCAlignment.wireBwdX), +math.cos(wirePhi))
519  const.add(self.get_label(layer, wire, Belle2.CDCAlignment.wireBwdY), +math.sin(wirePhi))
520  consts.append(const)
521 
522  const = Constraint()
523  for layer in layers:
524  # sum of wire rotations (FWD) in layer
525  for wire in range(0, self.wires_in_layer[layer]):
526  wirePhi = Belle2.TrackFindingCDC.CDCWire.getInstance(Belle2.WireID(layer, wire)).getForwardPos3D().phi()
527  const.add(self.get_label(layer, wire, Belle2.CDCAlignment.wireFwdX), +math.cos(wirePhi))
528  const.add(self.get_label(layer, wire, Belle2.CDCAlignment.wireFwdY), +math.sin(wirePhi))
529  consts.append(const)
530 
531  return consts
532 
533 
534 # ------------ Main: Generate some constraint files with default config (no time-dependence, default global tags) ------
535 
536 if __name__ == '__main__':
537 
538  consts6 = CDCLayerConstraints('cdc-layer-constraints-6D.txt', rigid=True, z_offset=False, r_scale=False, z_scale=False)
539 
540  consts7 = CDCLayerConstraints('cdc-layer-constraints-7D.txt', rigid=True, z_offset=True, r_scale=False, z_scale=False)
541 
542  consts10 = CDCLayerConstraints('cdc-layer-constraints-10D.txt', rigid=True, z_offset=True, r_scale=True, z_scale=True)
543 
545 
546  cdcWires = CDCWireConstraints()
547 
548  # phase 2
549  # timedep = [([], [(0, 0, 1002)])]
550  # early phase 3
551  # timedep = [([], [(0, 0, 1003)])]
552 
553  # final detector (phase 3)
554 
555  timedep = [] # [([], [(0, 0, 0)])]
556 
557  init_event = (0, 0, 0)
558 
560  [
561  consts6,
562  consts7,
563  consts10,
564  cdcT0,
565  cdcWires,
566  VXDHierarchyConstraints(type=1, pxd=False),
567  Constraints("my_file.txt")],
568 
569  timedep=timedep,
570  global_tags=None,
571  init_event=init_event)
alignment.constraints.Constraints.configure_collector
def configure_collector(self, collector)
Definition: constraints.py:78
alignment.constraints.CDCLayerConstraints.z_scale
z_scale
Constraint for z-scale.
Definition: constraints.py:210
alignment.constraints.CDCTimeZerosConstraint.generate
def generate(self)
Definition: constraints.py:345
Belle2::WireID
Class to identify a wire inside the CDC.
Definition: WireID.h:44
alignment.constraints.VXDHierarchyConstraints.type
type
Constraint type.
Definition: constraints.py:145
alignment.constraints_generator
Definition: constraints_generator.py:1
alignment.constraints.VXDHierarchyConstraints.__init__
def __init__(self, type=2, pxd=True, svd=True)
Definition: constraints.py:132
alignment.constraints.Constraint
Definition: constraints.py:11
alignment.constraints.CDCWireConstraints.__init__
def __init__(self, filename='cdc-wire-constraints.txt', layers=None, layer_rigid=True, layer_radius=False, cdc_radius=False)
Definition: constraints.py:380
alignment.constraints.CDCLayerConstraints
Definition: constraints.py:167
alignment.constraints.CDCWireConstraints.layers
layers
List of layers for whose wires to generate the constraints.
Definition: constraints.py:402
Belle2::GlobalLabel
Class to convert to/from global labels for Millepede II to/from detector & parameter identificators.
Definition: GlobalLabel.h:51
alignment.constraints.Constraint.add
def add(self, label, coeff)
Definition: constraints.py:32
alignment.constraints.Constraints.__init__
def __init__(self, filename)
Definition: constraints.py:61
alignment.constraints.CDCTimeZerosConstraint.wires_in_layer
list wires_in_layer
CDC layer/wire configuration.
Definition: constraints.py:327
alignment.constraints.Constraints
Definition: constraints.py:54
alignment.constraints.Constraint.data
data
Data.
Definition: constraints.py:30
alignment.constraints.CDCTimeZerosConstraint
Definition: constraints.py:321
alignment.constraints.VXDHierarchyConstraints.svd
svd
Flag for SVD.
Definition: constraints.py:149
alignment.constraints.VXDHierarchyConstraints
Definition: constraints.py:115
alignment.constraints.CDCTimeZerosConstraint.__init__
def __init__(self, filename='cdc-T0-constraints.txt')
Definition: constraints.py:338
alignment.constraints.Constraint.value
value
Value.
Definition: constraints.py:26
alignment.constraints.CDCWireConstraints.get_label
def get_label(self, layer, wire, parameter)
Definition: constraints.py:421
alignment.constraints.VXDHierarchyConstraints.generate
def generate(self)
Definition: constraints.py:159
alignment.constraints.CDCLayerConstraints.r_scale
r_scale
Constraint for r-scale.
Definition: constraints.py:208
alignment.constraints.CDCLayerConstraints.cdc
list cdc
CDC geometry hard-code -> TODO.
Definition: constraints.py:175
alignment.constraints.Constraint.get_checksum
def get_checksum(self)
Definition: constraints.py:46
Belle2::CDCAlignment::getGlobalUniqueID
static unsigned short getGlobalUniqueID()
Get global unique id.
Definition: CDCAlignment.h:119
Belle2::TrackFindingCDC::CDCWire::getInstance
static const CDCWire * getInstance(const WireID &wireID)
Getter from the wireID convinience object. Does not construct a new object.
Definition: CDCWire.cc:26
Belle2::CDCTimeZeros::getGlobalUniqueID
static unsigned short getGlobalUniqueID()
Get global unique id.
Definition: CDCTimeZeros.h:150
alignment.constraints.Constraint.comment
comment
Comment.
Definition: constraints.py:28
alignment.constraints.VXDHierarchyConstraints.pxd
pxd
Flag for PXD.
Definition: constraints.py:147
alignment.constraints.CDCWireConstraints.configure_collector
def configure_collector(self, collector)
Definition: constraints.py:415
alignment.constraints.CDCLayerConstraints.__init__
def __init__(self, filename='cdc-constraints.txt', rigid=True, z_offset=False, r_scale=False, z_scale=False)
Definition: constraints.py:189
alignment.constraints.Constraints.filename
filename
File name.
Definition: constraints.py:67
alignment.constraints.CDCLayerConstraints.z_offset
z_offset
Constraint for z-offset.
Definition: constraints.py:206
alignment.constraints.CDCWireConstraints.generate
def generate(self)
Definition: constraints.py:429
alignment.constraints.CDCWireConstraints.cdc_radius
cdc_radius
2 Constraints: Sum(dr)=0 for all wires in CDC at each end-plate -> "average CDC radius" kept same by ...
Definition: constraints.py:413
alignment.constraints.CDCLayerConstraints.rigid
rigid
6D CDC constraints
Definition: constraints.py:204
alignment.constraints.CDCLayerConstraints.parameter
list parameter
layer parameters
Definition: constraints.py:186
alignment.constraints.CDCWireConstraints.layer_radius
layer_radius
2 x 56 constraints: Sum(dr)=0 for all wires in each layer at each end-plate -> layer radius kept same...
Definition: constraints.py:410
alignment.constraints.generate_constraints
def generate_constraints(constraint_sets, timedep, global_tags, init_event)
Definition: constraints.py:85
alignment.constraints.Constraint.__init__
def __init__(self, comment="", value=0.)
Definition: constraints.py:16
alignment.constraints.CDCLayerConstraints.generate
def generate(self)
Definition: constraints.py:212
alignment.constraints.VXDHierarchyConstraints.configure_collector
def configure_collector(self, collector)
Definition: constraints.py:151
alignment.constraints.CDCWireConstraints
Definition: constraints.py:363
alignment.constraints.Constraints.generate
def generate(self)
Definition: constraints.py:69
alignment.constraints.CDCWireConstraints.wires_in_layer
list wires_in_layer
CDC layer/wire configuration.
Definition: constraints.py:369
alignment.constraints.CDCWireConstraints.layer_rigid
layer_rigid
6 x 56 (6/layer) constraints.
Definition: constraints.py:407