VMC Examples Version 6.6
Loading...
Searching...
No Matches
Ex02ChamberParameterisation Class Reference

The chamber parameterisation. More...

#include <Ex02ChamberParameterisation.h>

Inheritance diagram for Ex02ChamberParameterisation:

Public Member Functions

 Ex02ChamberParameterisation (Int_t noChambers, Double_t startZ, Double_t spacingZ, Double_t widthChamber, Double_t lengthInitial, Double_t lengthFinal)
 
virtual ~Ex02ChamberParameterisation ()
 
void ComputeTransformation (Int_t copyNo, Double_t *position) const
 
void ComputeDimensions (Int_t copyNo, Double_t *dimension) const
 

Private Attributes

Int_t fNoChambers
 Number of chambers.
 
Double_t fStartZ
 The Z of the center of first chamber.
 
Double_t fHalfWidth
 The half-width of each tracker chamber.
 
Double_t fSpacing
 The distance between the chambers' centers.
 
Double_t fHalfLengthFirst
 The first half-length.
 
Double_t fHalfLengthIncr
 The Increment for the half-length.
 

Detailed Description

The chamber parameterisation.

A parameterisation that describes a series of boxes along Z The boxes have equal width, & their lengths are a linear equation.

Date
21/04/2002
Author
I. Hrivnacova; IPN, Orsay

Definition at line 34 of file Ex02ChamberParameterisation.h.

Constructor & Destructor Documentation

◆ Ex02ChamberParameterisation()

Ex02ChamberParameterisation::Ex02ChamberParameterisation ( Int_t noChambers,
Double_t startZ,
Double_t spacingZ,
Double_t widthChamber,
Double_t lengthInitial,
Double_t lengthFinal )

Standard constructor

Parameters
noChambersNumber of chambers
startZThe Z of the center of first chamber
spacingZThe distance between the chambers' centers
widthChamberThe width of each tracker chamber
lengthInitialThe first chamber length
lengthFinalThe last chamber length

Definition at line 29 of file Ex02ChamberParameterisation.cxx.

32 : TObject(),
33 fNoChambers(noChambers),
34 fStartZ(startZ),
35 fHalfWidth(widthChamber * 0.5),
36 fSpacing(spacingZ),
37 fHalfLengthFirst(lengthInitial * 0.5),
39{
40 /// Standard constructor
41 /// \param noChambers Number of chambers
42 /// \param startZ The Z of the center of first chamber
43 /// \param spacingZ The distance between the chambers' centers
44 /// \param widthChamber The width of each tracker chamber
45 /// \param lengthInitial The first chamber length
46 /// \param lengthFinal The last chamber length
47
48 if (noChambers > 0) {
49 fHalfLengthIncr = 0.5 * (lengthFinal - lengthInitial) / noChambers;
50 if (spacingZ < widthChamber) {
51 Fatal("Ex02ChamberParameterisation",
52 "Ex02ChamberParameterisation construction: Width>Spacing");
53 }
54 }
55}
Double_t fSpacing
The distance between the chambers' centers.
Double_t fStartZ
The Z of the center of first chamber.
Double_t fHalfLengthFirst
The first half-length.
Double_t fHalfLengthIncr
The Increment for the half-length.
Double_t fHalfWidth
The half-width of each tracker chamber.

◆ ~Ex02ChamberParameterisation()

Ex02ChamberParameterisation::~Ex02ChamberParameterisation ( )
virtual

Destructor

Definition at line 58 of file Ex02ChamberParameterisation.cxx.

59{
60 /// Destructor
61}

Member Function Documentation

◆ ComputeTransformation()

void Ex02ChamberParameterisation::ComputeTransformation ( Int_t copyNo,
Double_t * position ) const

Compute the chamber position

Parameters
copyNoThe chamber copy number
positionThe computed chamber position

Definition at line 64 of file Ex02ChamberParameterisation.cxx.

66{
67 /// Compute the chamber position
68 /// \param copyNo The chamber copy number
69 /// \param position The computed chamber position
70
71 position[0] = 0.;
72 position[1] = 0.;
73 position[2] = fStartZ + (copyNo + 1) * fSpacing;
74}

◆ ComputeDimensions()

void Ex02ChamberParameterisation::ComputeDimensions ( Int_t copyNo,
Double_t * dimension ) const

Compute the chamber dimensions

Parameters
copyNoThe chamber copy number
dimensionThe computed chamber dimensions

Definition at line 77 of file Ex02ChamberParameterisation.cxx.

79{
80
81 /// Compute the chamber dimensions
82 /// \param copyNo The chamber copy number
83 /// \param dimension The computed chamber dimensions
84
85 Double_t halfLength = fHalfLengthFirst + copyNo * fHalfLengthIncr;
86 dimension[0] = halfLength;
87 dimension[1] = halfLength;
88 dimension[2] = fHalfWidth;
89}

Member Data Documentation

◆ fNoChambers

Int_t Ex02ChamberParameterisation::fNoChambers
private

Number of chambers.

Definition at line 48 of file Ex02ChamberParameterisation.h.

◆ fStartZ

Double_t Ex02ChamberParameterisation::fStartZ
private

The Z of the center of first chamber.

Definition at line 49 of file Ex02ChamberParameterisation.h.

◆ fHalfWidth

Double_t Ex02ChamberParameterisation::fHalfWidth
private

The half-width of each tracker chamber.

Definition at line 50 of file Ex02ChamberParameterisation.h.

◆ fSpacing

Double_t Ex02ChamberParameterisation::fSpacing
private

The distance between the chambers' centers.

Definition at line 51 of file Ex02ChamberParameterisation.h.

◆ fHalfLengthFirst

Double_t Ex02ChamberParameterisation::fHalfLengthFirst
private

The first half-length.

Definition at line 52 of file Ex02ChamberParameterisation.h.

◆ fHalfLengthIncr

Double_t Ex02ChamberParameterisation::fHalfLengthIncr
private

The Increment for the half-length.

Definition at line 53 of file Ex02ChamberParameterisation.h.


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