Belle II Software
release-08-01-10
|
The Class for CDC Geometry Parameters. More...
#include <CDCGeometryPar.h>
Public Types | |
enum | EWirePosition { c_Base = 0 , c_Misaligned , c_Aligned } |
Wire position set. | |
Public Member Functions | |
virtual | ~CDCGeometryPar () |
Destructor. | |
void | clear () |
Clears. | |
void | Print () const |
Print some debug information. | |
void | readFromDB (const CDCGeometry &) |
Gets geometry parameters from database. | |
void | readWirePositionParams (EWirePosition set, const CDCGeometry *geom) |
Read displacement or (mis)alignment params from text file. More... | |
void | setWirPosAlignParams () |
Set wire alignment params. More... | |
void | setWirPosMisalignParams () |
Set wire misalignment params. More... | |
void | readXT (const GearDir &gbxParams, int mode=0) |
Read XT-relation table. More... | |
void | newReadXT (const GearDir &gbxParams, int mode=0) |
Read XT-relation table in new format. More... | |
void | setXT () |
Set XT-relation table (from DB). | |
void | setXtRel () |
Set XT-relation table (from DB) (new). | |
void | readSigma (const GearDir &gbxParams, int mode=0) |
Read spatial resolution table. More... | |
void | newReadSigma (const GearDir &gbxParams, int mode=0) |
Read spatial resolution table in new format. More... | |
void | readFFactor (const GearDir &gbxParams, int mode=0) |
Read fudge factors. More... | |
void | setSResol () |
Set spatial resolution (from DB). | |
void | setFFactor () |
Set fudge factors (from DB). | |
void | readPropSpeed (const GearDir &gbxParams, int mode=0) |
Read the propagation speed along the sense wire. More... | |
void | setPropSpeed () |
Set prop. More... | |
void | readT0 (const GearDir &gbxParams, int mode=0) |
Read t0 parameters (from a file). More... | |
void | setT0 () |
Set t0 parameters (from DB) | |
void | calcMeanT0 (double minT0=3800, double maxT0=5800, int maxIt=10, double nStdv=3, double epsi=0.1) |
Calculate mean t0 in ns (over all good wires) More... | |
void | setBadWire () |
Set bad-wires (from DB) | |
void | readChMap () |
Read channel map between wire-id and electronics-id. | |
void | setChMap () |
Set channel map (from DB) | |
void | readTW (const GearDir &gbxParams, int mode=0) |
Read time-walk parameter. More... | |
void | readEDepToADC (const GearDir &gbxParams, int mode=0) |
Read spatial edep-to-adc conv. More... | |
void | setTW () |
Set time-walk parameters. | |
void | setEDepToADCConversions () |
Set edep-to-ADC conversion params. More... | |
double | getEDepToADCConvFactor (unsigned short layer, unsigned short cell, double edep, double dx, double costh) |
Return edep-to-ADC conversion factor. More... | |
double | getEDepToADCMainFactor (unsigned short layer, unsigned short cell, double costh=0) |
Return edep-to-ADC conversion main factor (in count/keV) More... | |
double | getEDepToADCSigma (unsigned short layer, unsigned short cell) |
Return sigma for extra smearing of edep to ADC conversion. More... | |
void | generateXML (const std::string &of) |
Generate an xml file used in gearbox. More... | |
std::string | version () const |
Returns the version of cdc geometry parameters. More... | |
double | motherInnerR () const |
The method to get cdc mother volume inner R. More... | |
double | motherOuterR () const |
The method to get cdc mother volume outer R. More... | |
double | motherLength () const |
The method to get cdc mother volume length. More... | |
int | momBound () const |
to get the number of boundary position of the CDC mother volume More... | |
double | momZ (int iBound) const |
Returns boundary position in Z axis of the CDC mother volume. More... | |
double | momRmin (int iBound) const |
Returns inner radius of the CDC mother volume. More... | |
unsigned | cellId (unsigned layerId, const B2Vector3D &position) const |
The method to get cell id based on given layer id and the position. More... | |
double | innerRadiusOuterWall () const |
Returns the inner radius of the outer wall. More... | |
double | outerRadiusOuterWall () const |
Returns the outer radius of the outer wall. More... | |
double | zOuterWall () const |
Returns the length of the outer wall in Z. More... | |
double | zOffsetOuterWall () const |
Returns the offset of the outer wall in z direction. More... | |
double | innerRadiusInnerWall () const |
Returns the inner radius of the inner wall. More... | |
double | outerRadiusInnerWall () const |
Returns the outer radius of the inner wall. More... | |
double | zInnerWall () const |
Returns the length of the inner wall in Z. More... | |
double | zOffsetInnerWall () const |
Returns the offset of the outer wall in z direction. More... | |
double | senseWireDiameter () const |
Returns diameter of the sense wire. More... | |
double | fieldWireDiameter () const |
Returns diameter of the field wire. More... | |
unsigned | nWireLayers () const |
Returns a number of wire layers. More... | |
unsigned | nWiresInLayer (int layerId) const |
Returns wire numbers in a layer. More... | |
const double * | innerRadiusWireLayer () const |
Returns an array of inner radius of wire layers. More... | |
const double * | outerRadiusWireLayer () const |
Returns an array of outer radius of wire layers. More... | |
const double * | zForwardWireLayer () const |
Returns an array of forward z of wire layers. More... | |
const double * | zBackwardWireLayer () const |
Returns an array of backward z of wire layers. More... | |
double | zOffsetWireLayer (unsigned i) const |
Returns the offset of z of the wire layer i. More... | |
double | getMeanT0 () const |
Returns the mean t0 over all wires. More... | |
const B2Vector3D | wireForwardPosition (uint layerId, int cellId, EWirePosition set=c_Base) const |
Returns the forward position of the input sense wire. More... | |
const B2Vector3D | wireForwardPosition (const WireID &wireID, EWirePosition set=c_Base) const |
The same function but in a different input format. | |
const B2Vector3D | wireForwardPosition (uint layerId, int cellId, double z, EWirePosition set=c_Base) const |
Returns a virtual forward position corresp. to a tangent to the wire at the input z-position. More... | |
const B2Vector3D | wireForwardPosition (const WireID &wireID, double z, EWirePosition set=c_Base) const |
The same function but in a different input format. | |
const B2Vector3D | wireBackwardPosition (uint layerId, int cellId, EWirePosition set=c_Base) const |
Returns the backward position of the input sense wire. More... | |
const B2Vector3D | wireBackwardPosition (const WireID &wireID, EWirePosition set=c_Base) const |
The same function but in a different input format. | |
const B2Vector3D | wireBackwardPosition (uint layerId, int cellId, double z, EWirePosition set=c_Base) const |
Returns a virtual backward position corresp. to a tangent to the wire at the input z-position. More... | |
const B2Vector3D | wireBackwardPosition (const WireID &wireID, double z, EWirePosition set=c_Base) const |
The same function but in a different input format. | |
double | getWireSagCoef (EWirePosition set, uint layerId, int cellId) const |
Returns coefficient for the sense wire sag. More... | |
double | getThresholdEnerguDeposit () const |
Returns threshold for energy deposit in one G4 step. More... | |
double | getMinTrackLength () const |
Returns the minimum track length required in one G4 step (only secondary particles which pass this criterion are to be saved in MCParticle) More... | |
bool | isWireSagOn () const |
Returns on/off for sense wire sag in FullSim. | |
bool | isModifiedLeftRightFlagOn () const |
Returns on/off for modified left/right calculation in FullSim. | |
float | getT0 (const WireID &wireID) const |
Returns t0 parameter of the specified sense wire. More... | |
unsigned short | getBoardID (const WireID &wID) const |
Returns frontend board id. corresponding to the wire id. More... | |
unsigned short | getChannelID (const WireID &wID) const |
Returns frontend channel id. corresponding to the wire id. More... | |
const WireID | getWireID (unsigned short bd, unsigned short ch) const |
Returns wire id. corresponding to the board-and-cannel ids. More... | |
double | getTimeWalk (const WireID &wID, unsigned short adcCount) const |
Returns time-walk. More... | |
void | setShiftInSuperLayer () |
Calculates and saves shifts in super-layers (to be used in searching hits in neighboring cells) | |
signed short | getShiftInSuperLayer (unsigned short iSuperLayer, unsigned short iLayer) const |
Returns shift in the super-layer. More... | |
double | senseWireR (int layerId) const |
Returns radius of sense wire in each layer. More... | |
double | senseWireFZ (int layerId) const |
Returns forward z position of sense wire in each layer. More... | |
double | senseWireBZ (int layerId) const |
Returns backward z position of sense wire in each layer. More... | |
double | fieldWireR (int layerId) const |
Returns radius of field wire in each layer. More... | |
double | fieldWireFZ (int layerId) const |
Returns forward z position of field wire in each layer. More... | |
double | fieldWireBZ (int layerId) const |
Returns backward z position of field wire in each layer. More... | |
int | nShifts (int layerId) const |
Returns number shift. More... | |
double | offset (int layerID) const |
Return wire offset in phi direction at endplate. More... | |
void | setSenseWireR (int layerId, double r) |
Set radius of sense wire in each layer. More... | |
void | setSenseWireFZ (int layerId, double fz) |
Set forward z position of sense wires. More... | |
void | setSenseWireBZ (int layerId, double bz) |
set backward z position of sense wires. More... | |
unsigned short | getTdcOffset () const |
Return TDC offset value (default = 0 ch). | |
double | getTdcBinWidth () const |
Return TDC bin width (nsec). | |
double | getNominalDriftV () const |
Return the nominal drift velocity of He-ethane gas (default: 4.0x10^-3 cm/nsec). | |
double | getNominalPropSpeed () const |
Return the nominal propagation speed of the sense wire (default: 27.25 cm/nsec). | |
double | getNominalSpaceResol () const |
Return the nominal spacial resolution. More... | |
int | getMaterialDefinitionMode () const |
Return mode for material definition. More... | |
int | getSenseWireZposMode () const |
Return mode for sense wire z position. More... | |
double | getBwdDeltaZ (unsigned short layerID) const |
Return backward 'deltaZ'. More... | |
double | getFwdDeltaZ (unsigned short layerID) const |
Return forward 'deltaZ'. More... | |
void | setNominalSpaceResol (double resol) |
Set the nominal spacial resolution in the unit of um. More... | |
double | getPropSpeedInv (const unsigned int layerID) const |
Get the inversel of propagation speed in the sense wire. More... | |
bool | isBadWire (const WireID &wid) |
Inquire if the wire is totally-dead. | |
bool | isDeadWire (const WireID &wid, double &eff) |
Inquire if the wire is dead. | |
bool | isHotWire (const WireID &wid) |
Inquire if the wire is hot. | |
void | getWireSagEffect (EWirePosition set, unsigned layerID, unsigned cellID, double zw, double &ywb_sag, double &ywf_sag) const |
Compute effects of the sense wire sag. More... | |
double | getDriftV (double dt, unsigned short layer, unsigned short lr, double alpha=0., double theta=0.5 *M_PI) const |
Get the realistic drift velocity. More... | |
double | getDriftLength (double dt, unsigned short layer, unsigned short lr, double alpha=0., double theta=0.5 *M_PI, bool calculateMinTime=true, double minTime=0.) const |
Return the drift dength to the sense wire. More... | |
double | getDriftLength0 (double dt, unsigned short layer, unsigned short lr, double alpha=0., double theta=0.5 *M_PI) const |
Return the drift dength to the sense wire; tentative ver. More... | |
double | getMinDriftTime (unsigned short layer, unsigned short lr, double alpha=0., double theta=0.5 *M_PI) const |
Return the min. More... | |
double | getDriftTime (double dist, unsigned short layer, unsigned short lr, double alpha, double theta) const |
Return the drift time to the sense wire. More... | |
double | getSigma (double dist, unsigned short layer, unsigned short lr, double alpha=0., double theta=0.5 *M_PI) const |
Return the basic resolution of drift length (cm). More... | |
double | getFudgeFactorForSigma (unsigned short target) const |
Return the fuge factor for space resol. More... | |
unsigned short | getOldLeftRight (const B2Vector3D &posOnWire, const B2Vector3D &posOnTrack, const B2Vector3D &momentum) const |
Returns old left/right. More... | |
unsigned short | getNewLeftRightRaw (const B2Vector3D &posOnWire, const B2Vector3D &posOnTrack, const B2Vector3D &momentum) const |
Returns new left/right_raw. More... | |
double | getAlpha (const B2Vector3D &posOnWire, const B2Vector3D &momentum) const |
Returns track incident angle in rphi plane (alpha in rad.). More... | |
double | getTheta (const B2Vector3D &momentum) const |
Returns track incident angle (theta in rad.). More... | |
unsigned short | getOutgoingLR (const unsigned short lr, const double alpha) const |
Converts incoming-lr to outgoing-lr. More... | |
double | getOutgoingAlpha (const double alpha) const |
Converts incoming- to outgoing-alpha. More... | |
double | getOutgoingTheta (const double alpha, const double theta) const |
Converts incoming- to outgoing-theta. More... | |
void | getClosestAlphaPoints (const double alpha, double &wal, unsigned short points[2], unsigned short lrs[2]) const |
Returns the two closest alpha points for the input track incident angle (alpha). | |
void | getClosestAlphaPoints4Sgm (const double alpha, double &wal, unsigned short points[2], unsigned short lrs[2]) const |
Returns the two closest alpha points for sigma for the input track incident angle (alpha). More... | |
void | getClosestThetaPoints (const double alpha, const double theta, double &wth, unsigned short points[2]) const |
Returns the two closest theta points for the input track incident angle (theta). | |
void | getClosestThetaPoints4Sgm (const double alpha, const double theta, double &wth, unsigned short points[2]) const |
Returns the two closest theta points for sigma for the input track incident angle (theta). | |
void | setDesignWirParam (unsigned layerID, unsigned cellID) |
Set the desizend wire parameters. More... | |
void | outputDesignWirParam (unsigned layerID, unsigned cellID) const |
Write the designed wire parameters to the alignment.dat (default). More... | |
void | setDisplacement () |
Set displacement of sense wire. | |
ushort | getNumberOfSenseWires () const |
Get the number of sense wires. | |
ushort | getNumberOfFieldWires () const |
Get the number of field wires. | |
ushort | getNumberOfSenseLayers () const |
Get the number of sense layers. | |
ushort | getNumberOfFieldLayers () const |
Get the number of field layers. | |
ushort | getMaxNumberOfSuperLayers () const |
Get the maximum number of super layers. | |
ushort | getOffsetOfFirstLayer () const |
Get the offset of the first layer. | |
ushort | getOffsetOfFirstSuperLayer () const |
Get the offset of the first super layer. | |
ushort | getMaxNumberOfCellsPerLayer () const |
Get the maximum number of cells in one layer. | |
Static Public Member Functions | |
static CDCGeometryPar & | Instance (const CDCGeometry *=nullptr) |
Static method to get a reference to the CDCGeometryPar instance. More... | |
Private Member Functions | |
CDCGeometryPar (const CDCGeometry *=nullptr) | |
Singleton class. | |
CDCGeometryPar (const CDCGeometryPar &) | |
Singleton class. | |
CDCGeometryPar & | operator= (const CDCGeometryPar &) |
Singleton class. | |
Private Attributes | |
bool | m_debug |
Switch for debug printing. | |
bool | m_linearInterpolationOfXT |
Switch for linear interpolation of xt. | |
bool | m_linearInterpolationOfSgm |
Switch for linear interpolation of sigma. | |
bool | m_XTetc |
Switch for reading x-t etc. More... | |
bool | m_displacement |
Switch for displacement. | |
bool | m_misalignment |
Switch for misalignment. | |
bool | m_alignment |
Switch for alignment. | |
bool | m_XTetc4Recon |
Switch for selecting xt etc. | |
bool | m_wireSag |
Switch for sense wire sag. | |
bool | m_modLeftRightFlag |
Switch for modified left/right flag. | |
std::string | m_version |
The version of geometry parameters. | |
int | m_materialDefinitionMode |
Control switch for gas and wire material definition. | |
int | m_senseWireZposMode |
Mode for sense wire z position corr. | |
int | m_xtFileFormat |
Format of xt input file. | |
int | m_xtParamMode |
Mode for xt parameterization. | |
int | m_sigmaFileFormat |
Format of sigma input file. | |
int | m_sigmaParamMode |
Mode for sigma parameterization. | |
int | m_twParamMode |
Mode for tw parameterization. | |
int | m_nSLayer |
The number of sense wire layer. | |
int | m_nFLayer |
The number of field wire layer. | |
unsigned short | m_nAlphaPoints |
No. More... | |
unsigned short | m_nThetaPoints |
No. More... | |
unsigned short | m_nAlphaPoints4Sgm |
No. More... | |
unsigned short | m_nThetaPoints4Sgm |
No. More... | |
signed short | m_shiftInSuperLayer [c_nSuperLayers][8] |
shift in phi-direction wrt the 1st layer in each super layer | |
double | m_rWall [4] |
The array to store radius of inner wall and outer wall. | |
double | m_zWall [4][2] |
The array to store z position of inner wall and outer wall. | |
double | m_rSLayer [c_maxNSenseLayers] |
The array to store radius of sense wire layers. | |
double | m_zSForwardLayer [c_maxNSenseLayers] |
The array to store forward z position of sense wire layers. | |
double | m_dzSForwardLayer [c_maxNSenseLayers] |
Corrections for forward z position of sense wire layers. | |
double | m_zSBackwardLayer [c_maxNSenseLayers] |
The array to store backward z position of sense wire layers. | |
double | m_dzSBackwardLayer [c_maxNSenseLayers] |
Corrections for backward z position of sense wire layers. | |
double | m_rFLayer [c_maxNFieldLayers] |
The array to store radius of field wire layers. | |
double | m_zFForwardLayer [c_maxNFieldLayers] |
The array to store forward z position of field wire layers. | |
double | m_zFBackwardLayer [c_maxNFieldLayers] |
The array to store backward z position of field wire layers. | |
double | m_offSet [c_maxNSenseLayers] |
The array to store z offset of sense wire layers. | |
double | m_cellSize [c_maxNSenseLayers] |
The array to store cell size in each sense wire layer. | |
int | m_nShifts [c_maxNSenseLayers] |
The array to store shifted cell number in each sense wire layer. | |
unsigned | m_nWires [c_maxNSenseLayers] |
The array to store the wire number in each sense wire layre. | |
double | m_senseWireDiameter |
The diameter of sense wires. | |
double | m_senseWireTension |
The tension of sense wires. | |
double | m_senseWireDensity |
The density of sense wires. | |
double | m_fieldWireDiameter |
The diameter of field wires. | |
double | m_globalPhiRotation |
Global ratation in phi (rad.); only for sence wires now. | |
double | m_momZ [7] |
Z-cordinates of the cdc mother volume (7 segments). | |
double | m_momRmin [7] |
R_min of the cdc mother volume (7 segments). More... | |
double | m_thresholdEnergyDeposit |
Energy thresh. More... | |
double | m_minTrackLength |
Minimum track length for G4 step. | |
float | m_FWirPos [c_maxNSenseLayers][c_maxNDriftCells][3] |
Wire position incl. More... | |
float | m_BWirPos [c_maxNSenseLayers][c_maxNDriftCells][3] |
Wire position incl. More... | |
float | m_WireSagCoef [c_maxNSenseLayers][c_maxNDriftCells] |
Wire sag coefficient for each cell; ibid. | |
float | m_FWirPosMisalign [c_maxNSenseLayers][c_maxNDriftCells][3] |
Wire position incl. More... | |
float | m_BWirPosMisalign [c_maxNSenseLayers][c_maxNDriftCells][3] |
Wire position incl. More... | |
float | m_WireSagCoefMisalign [c_maxNSenseLayers][c_maxNDriftCells] |
Wire sag coefficient incl. More... | |
float | m_FWirPosAlign [c_maxNSenseLayers][c_maxNDriftCells][3] |
Wire position incl. More... | |
float | m_BWirPosAlign [c_maxNSenseLayers][c_maxNDriftCells][3] |
Wire position incl. More... | |
float | m_WireSagCoefAlign [c_maxNSenseLayers][c_maxNDriftCells] |
Wire sag coefficient incl. More... | |
float | m_eDepToADCParams [c_maxNSenseLayers][c_maxNDriftCells][7] = {} |
edep-to-ADC conv. More... | |
float | m_alphaPoints [c_maxNAlphaPoints] |
alpha sampling points for xt (rad) | |
float | m_thetaPoints [c_maxNThetaPoints] |
theta sampling points for xt (rad) | |
float | m_alphaPoints4Sgm [c_maxNAlphaPoints] |
alpha sampling points for sigma (rad) | |
float | m_thetaPoints4Sgm [c_maxNThetaPoints] |
theta sampling points for sigma (rad) | |
float | m_XT [c_maxNSenseLayers][2][c_maxNAlphaPoints][c_maxNThetaPoints][c_nXTParams] |
XT-relation coefficients for each layer, Left/Right, entrance angle and polar angle. More... | |
float | m_Sigma [c_maxNSenseLayers][2][c_maxNAlphaPoints][c_maxNThetaPoints][c_nSigmaParams] |
position resulution for each layer. | |
float | m_propSpeedInv [c_maxNSenseLayers] |
Inverse of propagation speed of the sense wire. | |
float | m_t0 [c_maxNSenseLayers][c_maxNDriftCells] = {} |
t0 for each sense-wire (in nsec). | |
float | m_timeWalkCoef [c_nBoards][2] |
coefficients for time walk. | |
double | m_meanT0 |
mean t0 over all wires; should be double. | |
std::map< WireID, unsigned short > | m_wireToBoard |
map relating wire-id and board-id. | |
std::map< WireID, unsigned short > | m_wireToChannel |
map relating wire-id and channel-id. | |
unsigned short | m_boardAndChannelToWire [c_nBoards][48] |
array relating board-channel-id and wire-id. | |
unsigned short | m_tdcOffset |
Not used; to be removed later. | |
double | m_clockFreq4TDC |
Clock frequency used for TDC (GHz). | |
double | m_tdcBinWidth |
TDC bin width (nsec/bin). | |
double | m_nominalDriftV |
Nominal drift velocity (4.0x10^-3 cm/nsec). | |
double | m_nominalDriftVInv |
Inverse of the nominal drift velocity. | |
double | m_nominalPropSpeed |
Nominal propagation speed of the sense wire (27.25 cm/nsec). | |
double | m_nominalSpaceResol |
Nominal spacial resolution (0.0130 cm). | |
double | m_maxSpaceResol |
max space resolution allowed (cm). | |
double | m_fudgeFactorForSigma [3] |
Fuge factor for space resol. | |
DBObjPtr< CDCTimeZeros > * | m_t0FromDB |
t0s retrieved from DB. | |
DBObjPtr< CDCBadWires > * | m_badWireFromDB |
bad-wires retrieved from DB. | |
DBObjPtr< CDCPropSpeeds > * | m_propSpeedFromDB |
prop. More... | |
DBObjPtr< CDCTimeWalks > * | m_timeWalkFromDB |
time-walk coeffs. More... | |
DBObjPtr< CDCXtRelations > * | m_xtRelFromDB |
xt params. More... | |
DBObjPtr< CDCSpaceResols > * | m_sResolFromDB |
sigma params. More... | |
DBObjPtr< CDCFudgeFactorsForSigma > * | m_fFactorFromDB |
fudge factors retrieved from DB. | |
DBArray< CDCChannelMap > * | m_chMapFromDB |
channel map retrieved from DB. | |
DBArray< CDCDisplacement > * | m_displacementFromDB |
displacement params. More... | |
DBObjPtr< CDCAlignment > * | m_alignmentFromDB |
alignment params. More... | |
DBObjPtr< CDCMisalignment > * | m_misalignmentFromDB |
misalignment params. More... | |
DBObjPtr< CDCEDepToADCConversions > * | m_eDepToADCConversionsFromDB |
Pointer to edep-to-ADC conv. More... | |
DBObjPtr< HardwareClockSettings > | m_clockSettings |
hardware clock settings | |
ushort | m_nSenseWires = c_nSenseWires |
Maximum number of Sense Wires. | |
ushort | m_nFieldWires = c_nFieldWires |
Maximum number of Field Wires. | |
ushort | m_maxNSenseLayers = c_maxNSenseLayers |
Maximum number of Sense Wire Layers. | |
ushort | m_maxNFieldLayers = c_maxNFieldLayers |
Maximum number of Field Wire Layers. | |
ushort | m_maxNSuperLayers = c_nSuperLayers |
Maximum number of Super Layers. | |
ushort | m_firstLayerOffset = 0 |
Offset of the first layer (for reduced CDC studies) | |
ushort | m_firstSuperLayerOffset = 0 |
Offset of the first super layer (for reduced CDC studies) | |
ushort | m_maxNCellsPerLayer = c_maxNDriftCells |
Maximum number wires within a layer. | |
Static Private Attributes | |
static CDCGeometryPar * | m_B4CDCGeometryParDB = 0 |
Pointer that saves the instance of this class. | |
The Class for CDC Geometry Parameters.
This class provides CDC gemetry paramters for simulation, reconstruction and so on. These parameters are gotten from gearbox.
Definition at line 51 of file CDCGeometryPar.h.
void calcMeanT0 | ( | double | minT0 = 3800 , |
double | maxT0 = 5800 , |
||
int | maxIt = 10 , |
||
double | nStdv = 3 , |
||
double | epsi = 0.1 |
||
) |
Calculate mean t0 in ns (over all good wires)
minT0 | min. of t0 window (ns) |
maxT0 | max. of t0 window (ns) |
maxIt | max. no. of iterations |
nStdv | standard-deviation cut applied for next iteration |
epsi | criterion for iteration stop (ns) |
Definition at line 1394 of file CDCGeometryPar.cc.
unsigned cellId | ( | unsigned | layerId, |
const B2Vector3D & | position | ||
) | const |
The method to get cell id based on given layer id and the position.
layerId | The given layer id. |
position | The given position to calculate cell id. |
Definition at line 1838 of file CDCGeometryPar.cc.
|
inline |
Returns backward z position of field wire in each layer.
layerId | The layer id of field wires. |
Definition at line 1295 of file CDCGeometryPar.h.
|
inline |
Returns diameter of the field wire.
Definition at line 1345 of file CDCGeometryPar.h.
|
inline |
Returns forward z position of field wire in each layer.
layerId | The layer id of field wires. |
Definition at line 1290 of file CDCGeometryPar.h.
|
inline |
Returns radius of field wire in each layer.
layerId | The layer id of field wires. |
Definition at line 1285 of file CDCGeometryPar.h.
void generateXML | ( | const std::string & | of | ) |
Generate an xml file used in gearbox.
of | The file name. |
Definition at line 1886 of file CDCGeometryPar.cc.
double getAlpha | ( | const B2Vector3D & | posOnWire, |
const B2Vector3D & | momentum | ||
) | const |
Returns track incident angle in rphi plane (alpha in rad.).
posOnWire | Position on the wire at the closest point. |
momentum | Track momentum at the closest point. |
Definition at line 2802 of file CDCGeometryPar.cc.
|
inline |
Returns frontend board id. corresponding to the wire id.
wID | wire id. |
Definition at line 566 of file CDCGeometryPar.h.
|
inline |
Return backward 'deltaZ'.
[in] | layerID | (0-55) |
Definition at line 790 of file CDCGeometryPar.h.
|
inline |
Returns frontend channel id. corresponding to the wire id.
wID | wire id. |
Definition at line 578 of file CDCGeometryPar.h.
void getClosestAlphaPoints4Sgm | ( | const double | alpha, |
double & | wal, | ||
unsigned short | points[2], | ||
unsigned short | lrs[2] | ||
) | const |
Returns the two closest alpha points for sigma for the input track incident angle (alpha).
TODO: unify the two getClosestAlphaPoints().
Definition at line 2883 of file CDCGeometryPar.cc.
double getDriftLength | ( | double | dt, |
unsigned short | layer, | ||
unsigned short | lr, | ||
double | alpha = 0. , |
||
double | theta = 0.5 * M_PI , |
||
bool | calculateMinTime = true , |
||
double | minTime = 0. |
||
) | const |
Return the drift dength to the sense wire.
[in] | dt | Drift time (ns). |
[in] | layer | Layer ID. |
[in] | lr | Left/Right |
[in] | alpha | incident angle (in rphi plane) w.r.t. the cell (rad). |
[in] | theta | incident angle (polar angle) (rad). |
calculateMinTime | calculate min. drift time inside this function (=true) or feed as input (=false). | |
minTime | input min. drift time when calculateMinTime=false. |
Definition at line 2293 of file CDCGeometryPar.cc.
double getDriftLength0 | ( | double | dt, |
unsigned short | layer, | ||
unsigned short | lr, | ||
double | alpha = 0. , |
||
double | theta = 0.5 * M_PI |
||
) | const |
Return the drift dength to the sense wire; tentative ver.
[in] | dt | Drift time (ns). |
[in] | layer | Layer ID. |
[in] | lr | Left/Right |
[in] | alpha | incident angle (in rphi plane) w.r.t. the cell (rad). |
[in] | theta | incident angle (polar angle) (rad). |
Definition at line 2211 of file CDCGeometryPar.cc.
double getDriftTime | ( | double | dist, |
unsigned short | layer, | ||
unsigned short | lr, | ||
double | alpha, | ||
double | theta | ||
) | const |
Return the drift time to the sense wire.
dist | Drift length (cm). |
layer | Layer ID. |
lr | Left/Right |
alpha | incident angle (in rphi plane) w.r.t. the cell (rad). |
theta | incident angle (polar angle) (rad). |
Definition at line 2590 of file CDCGeometryPar.cc.
double getDriftV | ( | double | dt, |
unsigned short | layer, | ||
unsigned short | lr, | ||
double | alpha = 0. , |
||
double | theta = 0.5 * M_PI |
||
) | const |
Get the realistic drift velocity.
[in] | dt | Drift time (ns). |
[in] | layer | Layer ID. |
[in] | lr | Left/Right |
[in] | alpha | incident angle (in rphi plane) w.r.t. the cell (rad). |
[in] | theta | incident angle (polar angle) (rad). |
Definition at line 2123 of file CDCGeometryPar.cc.
double getEDepToADCConvFactor | ( | unsigned short | layer, |
unsigned short | cell, | ||
double | edep, | ||
double | dx, | ||
double | costh | ||
) |
Return edep-to-ADC conversion factor.
layer | no. (0-55) |
cell | no. (0-) |
edep | energy-deposit in the cell(keV). |
dx | path length (cm) of the track in the cell. |
costh | cos(theta) of track. |
Definition at line 1657 of file CDCGeometryPar.cc.
|
inline |
Return edep-to-ADC conversion main factor (in count/keV)
layer | no. (0-55) |
cell | no. (0-) |
costh | cosine of incident angle (theta) of particle |
Definition at line 262 of file CDCGeometryPar.h.
|
inline |
Return sigma for extra smearing of edep to ADC conversion.
layer | no. (0-55) |
cell | no. (0-) |
Definition at line 271 of file CDCGeometryPar.h.
|
inline |
Return the fuge factor for space resol.
target | target sigma: =0: for sigma in data reconstruction; =1: for sigma in MC recon.; =2: for sigma in digitization in MC |
Definition at line 943 of file CDCGeometryPar.h.
|
inline |
Return forward 'deltaZ'.
[in] | layerID | (0-55) |
Definition at line 800 of file CDCGeometryPar.h.
|
inline |
Return mode for material definition.
Return value = 0: define a mixture of gases and wires in the entire tracking volume; =1: define two different mixtures: one for the inner volume (small cell), and the other for the outer volume (normal cell).
Definition at line 767 of file CDCGeometryPar.h.
|
inline |
Returns the mean t0 over all wires.
Definition at line 1370 of file CDCGeometryPar.h.
double getMinDriftTime | ( | unsigned short | layer, |
unsigned short | lr, | ||
double | alpha = 0. , |
||
double | theta = 0.5 * M_PI |
||
) | const |
Return the min.
drift time (ns).
[in] | layer | Layer ID. |
[in] | lr | Left/Right |
[in] | alpha | incident angle (in rphi plane) w.r.t. the cell (rad). |
[in] | theta | incident angle (polar angle) (rad). |
Definition at line 2396 of file CDCGeometryPar.cc.
|
inline |
Returns the minimum track length required in one G4 step (only secondary particles which pass this criterion are to be saved in MCParticle)
Definition at line 528 of file CDCGeometryPar.h.
unsigned short getNewLeftRightRaw | ( | const B2Vector3D & | posOnWire, |
const B2Vector3D & | posOnTrack, | ||
const B2Vector3D & | momentum | ||
) | const |
Returns new left/right_raw.
posOnWire | Position on the wire at the closest point. |
posOnTrack | Position on the track at the closest point. |
momentum | Track 3-momentum. |
Definition at line 2793 of file CDCGeometryPar.cc.
|
inline |
Return the nominal spacial resolution.
(default: 130 um defined in CDC.xml).
Definition at line 752 of file CDCGeometryPar.h.
unsigned short getOldLeftRight | ( | const B2Vector3D & | posOnWire, |
const B2Vector3D & | posOnTrack, | ||
const B2Vector3D & | momentum | ||
) | const |
Returns old left/right.
posOnWire | Position on the wire at the closest point. |
posOnTrack | Position on the track at the closest point. |
momentum | Track 3-momentum. |
Definition at line 2758 of file CDCGeometryPar.cc.
double getOutgoingAlpha | ( | const double | alpha | ) | const |
Converts incoming- to outgoing-alpha.
alpha | in rad. |
Definition at line 2828 of file CDCGeometryPar.cc.
unsigned short getOutgoingLR | ( | const unsigned short | lr, |
const double | alpha | ||
) | const |
Converts incoming-lr to outgoing-lr.
lr | Left/Right flag. |
alpha | Track incident angle in rphi-plane (rad). |
Definition at line 2821 of file CDCGeometryPar.cc.
double getOutgoingTheta | ( | const double | alpha, |
const double | theta | ||
) | const |
Converts incoming- to outgoing-theta.
alpha | in rad. |
theta | in rad. |
Definition at line 2841 of file CDCGeometryPar.cc.
|
inline |
Get the inversel of propagation speed in the sense wire.
[in] | layerID | layer ID (0-55) |
Definition at line 822 of file CDCGeometryPar.h.
|
inline |
Return mode for sense wire z position.
Return value =0: define at the end-plate (gas side) with old design; =1: define at the bush inside the feedthrough with correction for the diff. betw. final- and old-design.
Definition at line 780 of file CDCGeometryPar.h.
signed short getShiftInSuperLayer | ( | unsigned short | iSuperLayer, |
unsigned short | iLayer | ||
) | const |
Returns shift in the super-layer.
iSuperLayer | The super-layer id. |
iLayer | The layer id. in the super-layer |
Definition at line 3031 of file CDCGeometryPar.cc.
double getSigma | ( | double | dist, |
unsigned short | layer, | ||
unsigned short | lr, | ||
double | alpha = 0. , |
||
double | theta = 0.5 * M_PI |
||
) | const |
Return the basic resolution of drift length (cm).
N.B. A fudge factor may be multiplied at the place where this is called; be careful.
dist | Drift length (cm); negative dist is treated as |dist|. |
layer | Layer id. |
lr | Left/Right. |
alpha | incident angle (in rphi plane) w.r.t. the cell (rad). |
theta | incident angle (polar angle) (rad). |
Definition at line 2646 of file CDCGeometryPar.cc.
|
inline |
Returns t0 parameter of the specified sense wire.
wireID | Wire id. |
Definition at line 555 of file CDCGeometryPar.h.
double getTheta | ( | const B2Vector3D & | momentum | ) | const |
Returns track incident angle (theta in rad.).
momentum | Track momentum at the closest point. |
Definition at line 2815 of file CDCGeometryPar.cc.
|
inline |
Returns threshold for energy deposit in one G4 step.
Definition at line 519 of file CDCGeometryPar.h.
|
inline |
Returns time-walk.
wID | wire id |
adcCount | ADC count |
Definition at line 602 of file CDCGeometryPar.h.
|
inline |
Returns wire id. corresponding to the board-and-cannel ids.
bd | board id. (1-300) |
ch | channel id. (0-47) |
Definition at line 591 of file CDCGeometryPar.h.
double getWireSagCoef | ( | EWirePosition | set, |
uint | layerId, | ||
int | cellId | ||
) | const |
Returns coefficient for the sense wire sag.
set | Wire position set; =c_Base, c_Misaligned or c_Aligned |
layerId | The layer id. |
cellId | The cell id. |
Definition at line 1803 of file CDCGeometryPar.cc.
void getWireSagEffect | ( | EWirePosition | set, |
unsigned | layerID, | ||
unsigned | cellID, | ||
double | zw, | ||
double & | ywb_sag, | ||
double & | ywf_sag | ||
) | const |
Compute effects of the sense wire sag.
[in] | set | Wire position set; =c_Base, c_Misaligned or c_Aligned |
[in] | layerID | Layer ID |
[in] | cellID | Cell ID in the layer |
[in] | zw | Z-coord. (cm) at which the sense wire sag is computed |
[out] | ywb_sag | Y-corrd. (cm) of intersection between a tangent and the backward endplate. |
[out] | ywf_sag | Y-corrd. (cm) of intersection between a tangent and the forward endplate. |
Definition at line 1967 of file CDCGeometryPar.cc.
|
inline |
Returns the inner radius of the inner wall.
Definition at line 1315 of file CDCGeometryPar.h.
|
inline |
Returns the inner radius of the outer wall.
Definition at line 1300 of file CDCGeometryPar.h.
const double * innerRadiusWireLayer | ( | ) | const |
Returns an array of inner radius of wire layers.
Definition at line 1814 of file CDCGeometryPar.cc.
|
static |
Static method to get a reference to the CDCGeometryPar instance.
Definition at line 39 of file CDCGeometryPar.cc.
int momBound | ( | ) | const |
|
inline |
Returns inner radius of the CDC mother volume.
iBound | : The boundary id. |
Definition at line 1235 of file CDCGeometryPar.h.
|
inline |
Returns boundary position in Z axis of the CDC mother volume.
iBound | : The boundary id. |
Definition at line 1230 of file CDCGeometryPar.h.
double motherInnerR | ( | ) | const |
The method to get cdc mother volume inner R.
double motherLength | ( | ) | const |
The method to get cdc mother volume length.
double motherOuterR | ( | ) | const |
The method to get cdc mother volume outer R.
void newReadSigma | ( | const GearDir & | gbxParams, |
int | mode = 0 |
||
) |
Read spatial resolution table in new format.
gbxParams | Gear Dir. |
mode | 0: read simulation file, 1: read reconstruction file. |
Definition at line 964 of file CDCGeometryPar.cc.
void newReadXT | ( | const GearDir & | gbxParams, |
int | mode = 0 |
||
) |
Read XT-relation table in new format.
[in] | gbxParams | Gear Dir. |
[in] | mode | 0: read simulation file, 1: read reconstruction file. |
Definition at line 818 of file CDCGeometryPar.cc.
|
inline |
Returns number shift.
layerId | The layer id of sense wires. |
Definition at line 1240 of file CDCGeometryPar.h.
|
inline |
Returns a number of wire layers.
Definition at line 1350 of file CDCGeometryPar.h.
|
inline |
Returns wire numbers in a layer.
layerId | The layer id. |
Definition at line 1250 of file CDCGeometryPar.h.
|
inline |
Return wire offset in phi direction at endplate.
layerID | layerID(0-55). |
Definition at line 1245 of file CDCGeometryPar.h.
|
inline |
Returns the outer radius of the inner wall.
Definition at line 1320 of file CDCGeometryPar.h.
|
inline |
Returns the outer radius of the outer wall.
Definition at line 1305 of file CDCGeometryPar.h.
const double * outerRadiusWireLayer | ( | ) | const |
Returns an array of outer radius of wire layers.
Definition at line 1826 of file CDCGeometryPar.cc.
void outputDesignWirParam | ( | unsigned | layerID, |
unsigned | cellID | ||
) | const |
Write the designed wire parameters to the alignment.dat (default).
[in] | layerID | Layer ID |
[in] | cellID | Cell ID |
Definition at line 2097 of file CDCGeometryPar.cc.
void readEDepToADC | ( | const GearDir & | gbxParams, |
int | mode = 0 |
||
) |
Read spatial edep-to-adc conv.
factors.
gbxParams | Gear Dir. |
mode | dummy now.. |
Definition at line 1308 of file CDCGeometryPar.cc.
void readFFactor | ( | const GearDir & | gbxParams, |
int | mode = 0 |
||
) |
Read fudge factors.
gbxParams | Gear Dir. |
mode | dummy now. |
Definition at line 1076 of file CDCGeometryPar.cc.
void readPropSpeed | ( | const GearDir & | gbxParams, |
int | mode = 0 |
||
) |
Read the propagation speed along the sense wire.
gbxParams | Gear Dir. |
mode | 0: read simulation file, 1: read reconstruction file. |
Definition at line 1088 of file CDCGeometryPar.cc.
void readSigma | ( | const GearDir & | gbxParams, |
int | mode = 0 |
||
) |
Read spatial resolution table.
gbxParams | Gear Dir. |
mode | 0: read simulation file, 1: read reconstruction file. |
Definition at line 955 of file CDCGeometryPar.cc.
void readT0 | ( | const GearDir & | gbxParams, |
int | mode = 0 |
||
) |
Read t0 parameters (from a file).
gbxParams | Gear Dir. |
mode | 0: read simulation file, 1: read reconstruction file. |
Definition at line 1156 of file CDCGeometryPar.cc.
void readTW | ( | const GearDir & | gbxParams, |
int | mode = 0 |
||
) |
Read time-walk parameter.
gbxParams | Gear Dir. |
mode | 0: read simulation file, 1: read reconstruction file. |
Definition at line 1237 of file CDCGeometryPar.cc.
void readWirePositionParams | ( | EWirePosition | set, |
const CDCGeometry * | geom | ||
) |
Read displacement or (mis)alignment params from text file.
[in] | set | Wire position set, i.e. c_Base, c_Misaliged or c_Aligned. |
[in] | geom | Pointer to DB CDCGeometry db object. |
Definition at line 579 of file CDCGeometryPar.cc.
void readXT | ( | const GearDir & | gbxParams, |
int | mode = 0 |
||
) |
Read XT-relation table.
[in] | gbxParams | Gear Dir. |
[in] | mode | 0: read simulation file, 1: read reconstruction file. |
Definition at line 807 of file CDCGeometryPar.cc.
|
inline |
Returns backward z position of sense wire in each layer.
layerId | The layer id. |
Definition at line 1280 of file CDCGeometryPar.h.
|
inline |
Returns diameter of the sense wire.
Definition at line 1340 of file CDCGeometryPar.h.
|
inline |
Returns forward z position of sense wire in each layer.
layerId | The layer id. |
Definition at line 1275 of file CDCGeometryPar.h.
|
inline |
Returns radius of sense wire in each layer.
layerId | The layer id. |
Definition at line 1270 of file CDCGeometryPar.h.
void setDesignWirParam | ( | unsigned | layerID, |
unsigned | cellID | ||
) |
Set the desizend wire parameters.
[in] | layerID | Layer ID |
[in] | cellID | Cell ID |
Definition at line 2060 of file CDCGeometryPar.cc.
void setEDepToADCConversions | ( | ) |
|
inline |
Set the nominal spacial resolution in the unit of um.
[in] | resol | spacial resolution (um) |
Definition at line 811 of file CDCGeometryPar.h.
void setPropSpeed | ( | ) |
|
inline |
set backward z position of sense wires.
layerId | The layer id of sense wire. |
bz | The backward position of sense wires in layer layerId. |
Definition at line 1265 of file CDCGeometryPar.h.
|
inline |
Set forward z position of sense wires.
layerId | The layer id of sense wire. |
fz | The forward position of sense wires in layer layerId. |
Definition at line 1260 of file CDCGeometryPar.h.
|
inline |
Set radius of sense wire in each layer.
layerId | The layer id of sense wires. |
r | The radius of sense wires in layer layerId. |
Definition at line 1255 of file CDCGeometryPar.h.
void setWirPosAlignParams | ( | ) |
void setWirPosMisalignParams | ( | ) |
|
inline |
Returns the version of cdc geometry parameters.
Definition at line 1225 of file CDCGeometryPar.h.
const B2Vector3D wireBackwardPosition | ( | uint | layerId, |
int | cellId, | ||
double | z, | ||
EWirePosition | set = c_Base |
||
) | const |
Returns a virtual backward position corresp. to a tangent to the wire at the input z-position.
layerId | The layer id. of the wire |
cellId | The wire id. of the wire |
z | z-position |
set | Wire position set; =c_Base, c_Misaligned or c_Aligned |
Definition at line 1779 of file CDCGeometryPar.cc.
const B2Vector3D wireBackwardPosition | ( | uint | layerId, |
int | cellId, | ||
EWirePosition | set = c_Base |
||
) | const |
Returns the backward position of the input sense wire.
layerId | The layer id. of the wire |
cellId | The wire id. of the wire |
set | Wire position set; =c_Base, c_Misaligned or c_Aligned |
Definition at line 1755 of file CDCGeometryPar.cc.
const B2Vector3D wireForwardPosition | ( | uint | layerId, |
int | cellId, | ||
double | z, | ||
EWirePosition | set = c_Base |
||
) | const |
Returns a virtual forward position corresp. to a tangent to the wire at the input z-position.
layerId | The layer id. of the wire |
cellId | The wire id. of the wire |
z | z-position |
set | Wire position set; =c_Base, c_Misaligned or c_Aligned |
Definition at line 1731 of file CDCGeometryPar.cc.
const B2Vector3D wireForwardPosition | ( | uint | layerId, |
int | cellId, | ||
EWirePosition | set = c_Base |
||
) | const |
Returns the forward position of the input sense wire.
layerId | The layer id. of the wire |
cellId | The wire id. of the wire |
set | Wire position set; =c_Base, c_Misaligned or c_Aligned |
Definition at line 1706 of file CDCGeometryPar.cc.
|
inline |
Returns an array of backward z of wire layers.
Definition at line 1360 of file CDCGeometryPar.h.
|
inline |
Returns an array of forward z of wire layers.
Definition at line 1355 of file CDCGeometryPar.h.
|
inline |
Returns the length of the inner wall in Z.
Definition at line 1325 of file CDCGeometryPar.h.
|
inline |
Returns the offset of the outer wall in z direction.
Definition at line 1335 of file CDCGeometryPar.h.
|
inline |
Returns the offset of the outer wall in z direction.
Definition at line 1330 of file CDCGeometryPar.h.
|
inline |
Returns the offset of z of the wire layer i.
i | The layer id. |
Definition at line 1365 of file CDCGeometryPar.h.
|
inline |
Returns the length of the outer wall in Z.
Definition at line 1310 of file CDCGeometryPar.h.
|
private |
|
private |
Wire position incl.
displacement at the backward endplate for each cell; ibid.
Definition at line 1152 of file CDCGeometryPar.h.
|
private |
Wire position incl.
alignment at the backward endplate for each cell; ibid.
Definition at line 1160 of file CDCGeometryPar.h.
|
private |
Wire position incl.
misalignment at the backward endplate for each cell; ibid.
Definition at line 1156 of file CDCGeometryPar.h.
|
private |
|
private |
|
private |
|
private |
Wire position incl.
displacement at the forward endplate for each cell; to be implemented in a smarter way.
Definition at line 1151 of file CDCGeometryPar.h.
|
private |
Wire position incl.
alignment at the forward endplate for each cell; ibid.
Definition at line 1159 of file CDCGeometryPar.h.
|
private |
Wire position incl.
misalignment at the forward endplate for each cell; ibid.
Definition at line 1155 of file CDCGeometryPar.h.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Wire sag coefficient incl.
alignment for each cell; ibid.
Definition at line 1161 of file CDCGeometryPar.h.
|
private |
Wire sag coefficient incl.
misalignment for each cell; ibid.
Definition at line 1157 of file CDCGeometryPar.h.
|
private |
XT-relation coefficients for each layer, Left/Right, entrance angle and polar angle.
Definition at line 1169 of file CDCGeometryPar.h.
|
private |
|
private |