Belle II Software  release-08-01-10
CDCGeometryPar Class Reference

The Class for CDC Geometry Parameters. More...

#include <CDCGeometryPar.h>

Collaboration diagram for CDCGeometryPar:

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 CDCGeometryParInstance (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.
 
CDCGeometryParoperator= (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< HardwareClockSettingsm_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 CDCGeometryParm_B4CDCGeometryParDB = 0
 Pointer that saves the instance of this class.
 

Detailed Description

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.

Member Function Documentation

◆ calcMeanT0()

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)

Parameters
minT0min. of t0 window (ns)
maxT0max. of t0 window (ns)
maxItmax. no. of iterations
nStdvstandard-deviation cut applied for next iteration
epsicriterion for iteration stop (ns)

Definition at line 1394 of file CDCGeometryPar.cc.

1395 {
1396  double oldMeanT0 = 0;
1397  unsigned short it1 = 0;
1398  for (unsigned short it = 0; it < maxIt; ++it) {
1399  it1 = it;
1400  double effiSum = 0.;
1401  m_meanT0 = 0.;
1402  double stdvT0 = 0;
1403  for (unsigned short iCL = 0; iCL < c_maxNSenseLayers; ++iCL) {
1404  for (unsigned short iW = 0; iW < m_nWires[iCL]; ++iW) {
1405  if (m_t0[iCL][iW] < minT0 || m_t0[iCL][iW] > maxT0) continue;
1406  const WireID wid = WireID(iCL, iW);
1407  if (isHotWire(wid)) continue;
1408  if (isBadWire(wid)) continue;
1409  double effi = 1.;
1410  isDeadWire(wid, effi);
1411  effiSum += effi;
1412  m_meanT0 += (iCL < m_firstLayerOffset) ? 0. : effi * m_t0[iCL][iW];
1413  stdvT0 += (iCL < m_firstLayerOffset) ? 0. : effi * m_t0[iCL][iW] * m_t0[iCL][iW];
1414  }
1415  }
1416  if (effiSum > 0.) {
1417  m_meanT0 /= effiSum;
1418  stdvT0 /= effiSum;
1419  stdvT0 = sqrt(fabs(stdvT0 - m_meanT0 * m_meanT0));
1420  B2DEBUG(29, it << " " << effiSum << " " << m_meanT0 << " " << stdvT0);
1421  if (fabs(m_meanT0 - oldMeanT0) < epsi) break;
1422  oldMeanT0 = m_meanT0;
1423  minT0 = m_meanT0 - nStdv * stdvT0;
1424  maxT0 = m_meanT0 + nStdv * stdvT0;
1425  } else {
1426  B2FATAL("Wire efficiency sum <= 0!");
1427  }
1428  }
1429  if (it1 == maxIt - 1) B2WARNING("Max. iterations(=" << maxIt << ") needed to calculte the mean t0. Strange.");
1430 }
bool isDeadWire(const WireID &wid, double &eff)
Inquire if the wire is dead.
unsigned m_nWires[c_maxNSenseLayers]
The array to store the wire number in each sense wire layre.
bool isHotWire(const WireID &wid)
Inquire if the wire is hot.
double m_meanT0
mean t0 over all wires; should be double.
float m_t0[c_maxNSenseLayers][c_maxNDriftCells]
t0 for each sense-wire (in nsec).
bool isBadWire(const WireID &wid)
Inquire if the wire is totally-dead.
ushort m_firstLayerOffset
Offset of the first layer (for reduced CDC studies)
Class to identify a wire inside the CDC.
Definition: WireID.h:34
double sqrt(double a)
sqrt for double
Definition: beamHelpers.h:28

◆ cellId()

unsigned cellId ( unsigned  layerId,
const B2Vector3D position 
) const

The method to get cell id based on given layer id and the position.

Parameters
layerIdThe given layer id.
positionThe given position to calculate cell id.
Returns
Cell id.

Definition at line 1838 of file CDCGeometryPar.cc.

◆ fieldWireBZ()

double fieldWireBZ ( int  layerId) const
inline

Returns backward z position of field wire in each layer.

Parameters
layerIdThe layer id of field wires.
Returns
The backward z position of field wire in layer layerId.

Definition at line 1295 of file CDCGeometryPar.h.

1296  {
1297  return m_zFBackwardLayer[layerID];
1298  }
double m_zFBackwardLayer[c_maxNFieldLayers]
The array to store backward z position of field wire layers.

◆ fieldWireDiameter()

double fieldWireDiameter ( ) const
inline

Returns diameter of the field wire.

Returns
Diameter of the field wire.

Definition at line 1345 of file CDCGeometryPar.h.

◆ fieldWireFZ()

double fieldWireFZ ( int  layerId) const
inline

Returns forward z position of field wire in each layer.

Parameters
layerIdThe layer id of field wires.
Returns
The forward z position of field wire in layer layerId.

Definition at line 1290 of file CDCGeometryPar.h.

◆ fieldWireR()

double fieldWireR ( int  layerId) const
inline

Returns radius of field wire in each layer.

Parameters
layerIdThe layer id of field wires.
Returns
The radius of field wire in layer layerId.

Definition at line 1285 of file CDCGeometryPar.h.

◆ generateXML()

void generateXML ( const std::string &  of)

Generate an xml file used in gearbox.

Parameters
ofThe file name.

Definition at line 1886 of file CDCGeometryPar.cc.

◆ getAlpha()

double getAlpha ( const B2Vector3D posOnWire,
const B2Vector3D momentum 
) const

Returns track incident angle in rphi plane (alpha in rad.).

Parameters
posOnWirePosition on the wire at the closest point.
momentumTrack momentum at the closest point.

Definition at line 2802 of file CDCGeometryPar.cc.

◆ getBoardID()

unsigned short getBoardID ( const WireID wID) const
inline

Returns frontend board id. corresponding to the wire id.

Parameters
wIDwire id.
Returns
board id.

Definition at line 566 of file CDCGeometryPar.h.

◆ getBwdDeltaZ()

double getBwdDeltaZ ( unsigned short  layerID) const
inline

Return backward 'deltaZ'.

Parameters
[in]layerID(0-55)

Definition at line 790 of file CDCGeometryPar.h.

◆ getChannelID()

unsigned short getChannelID ( const WireID wID) const
inline

Returns frontend channel id. corresponding to the wire id.

Parameters
wIDwire id.
Returns
channel id. (0-47)

Definition at line 578 of file CDCGeometryPar.h.

◆ getClosestAlphaPoints4Sgm()

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.

◆ getDriftLength()

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.

Parameters
[in]dtDrift time (ns).
[in]layerLayer ID.
[in]lrLeft/Right
[in]alphaincident angle (in rphi plane) w.r.t. the cell (rad).
[in]thetaincident angle (polar angle) (rad).
calculateMinTimecalculate min. drift time inside this function (=true) or feed as input (=false).
minTimeinput min. drift time when calculateMinTime=false.

Definition at line 2293 of file CDCGeometryPar.cc.

◆ getDriftLength0()

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.

Parameters
[in]dtDrift time (ns).
[in]layerLayer ID.
[in]lrLeft/Right
[in]alphaincident angle (in rphi plane) w.r.t. the cell (rad).
[in]thetaincident angle (polar angle) (rad).

Definition at line 2211 of file CDCGeometryPar.cc.

◆ getDriftTime()

double getDriftTime ( double  dist,
unsigned short  layer,
unsigned short  lr,
double  alpha,
double  theta 
) const

Return the drift time to the sense wire.

Parameters
distDrift length (cm).
layerLayer ID.
lrLeft/Right
alphaincident angle (in rphi plane) w.r.t. the cell (rad).
thetaincident angle (polar angle) (rad).

Definition at line 2590 of file CDCGeometryPar.cc.

◆ getDriftV()

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.

Parameters
[in]dtDrift time (ns).
[in]layerLayer ID.
[in]lrLeft/Right
[in]alphaincident angle (in rphi plane) w.r.t. the cell (rad).
[in]thetaincident angle (polar angle) (rad).

Definition at line 2123 of file CDCGeometryPar.cc.

◆ getEDepToADCConvFactor()

double getEDepToADCConvFactor ( unsigned short  layer,
unsigned short  cell,
double  edep,
double  dx,
double  costh 
)

Return edep-to-ADC conversion factor.

Parameters
layerno. (0-55)
cellno. (0-)
edepenergy-deposit in the cell(keV).
dxpath length (cm) of the track in the cell.
costhcos(theta) of track.

Definition at line 1657 of file CDCGeometryPar.cc.

◆ getEDepToADCMainFactor()

double getEDepToADCMainFactor ( unsigned short  layer,
unsigned short  cell,
double  costh = 0 
)
inline

Return edep-to-ADC conversion main factor (in count/keV)

Parameters
layerno. (0-55)
cellno. (0-)
costhcosine of incident angle (theta) of particle

Definition at line 262 of file CDCGeometryPar.h.

◆ getEDepToADCSigma()

double getEDepToADCSigma ( unsigned short  layer,
unsigned short  cell 
)
inline

Return sigma for extra smearing of edep to ADC conversion.

Parameters
layerno. (0-55)
cellno. (0-)

Definition at line 271 of file CDCGeometryPar.h.

◆ getFudgeFactorForSigma()

double getFudgeFactorForSigma ( unsigned short  target) const
inline

Return the fuge factor for space resol.

Parameters
targettarget 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.

◆ getFwdDeltaZ()

double getFwdDeltaZ ( unsigned short  layerID) const
inline

Return forward 'deltaZ'.

Parameters
[in]layerID(0-55)

Definition at line 800 of file CDCGeometryPar.h.

◆ getMaterialDefinitionMode()

int getMaterialDefinitionMode ( ) const
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.

◆ getMeanT0()

double getMeanT0 ( ) const
inline

Returns the mean t0 over all wires.

Returns
mean t0.

Definition at line 1370 of file CDCGeometryPar.h.

◆ getMinDriftTime()

double getMinDriftTime ( unsigned short  layer,
unsigned short  lr,
double  alpha = 0.,
double  theta = 0.5 * M_PI 
) const

Return the min.

drift time (ns).

Parameters
[in]layerLayer ID.
[in]lrLeft/Right
[in]alphaincident angle (in rphi plane) w.r.t. the cell (rad).
[in]thetaincident angle (polar angle) (rad).

Definition at line 2396 of file CDCGeometryPar.cc.

◆ getMinTrackLength()

double getMinTrackLength ( ) const
inline

Returns the minimum track length required in one G4 step (only secondary particles which pass this criterion are to be saved in MCParticle)

Returns
length (cm)

Definition at line 528 of file CDCGeometryPar.h.

◆ getNewLeftRightRaw()

unsigned short getNewLeftRightRaw ( const B2Vector3D posOnWire,
const B2Vector3D posOnTrack,
const B2Vector3D momentum 
) const

Returns new left/right_raw.

Parameters
posOnWirePosition on the wire at the closest point.
posOnTrackPosition on the track at the closest point.
momentumTrack 3-momentum.

Definition at line 2793 of file CDCGeometryPar.cc.

◆ getNominalSpaceResol()

double getNominalSpaceResol ( ) const
inline

Return the nominal spacial resolution.

(default: 130 um defined in CDC.xml).

Definition at line 752 of file CDCGeometryPar.h.

◆ getOldLeftRight()

unsigned short getOldLeftRight ( const B2Vector3D posOnWire,
const B2Vector3D posOnTrack,
const B2Vector3D momentum 
) const

Returns old left/right.

Parameters
posOnWirePosition on the wire at the closest point.
posOnTrackPosition on the track at the closest point.
momentumTrack 3-momentum.

Definition at line 2758 of file CDCGeometryPar.cc.

◆ getOutgoingAlpha()

double getOutgoingAlpha ( const double  alpha) const

Converts incoming- to outgoing-alpha.

Parameters
alphain rad.

Definition at line 2828 of file CDCGeometryPar.cc.

◆ getOutgoingLR()

unsigned short getOutgoingLR ( const unsigned short  lr,
const double  alpha 
) const

Converts incoming-lr to outgoing-lr.

Parameters
lrLeft/Right flag.
alphaTrack incident angle in rphi-plane (rad).

Definition at line 2821 of file CDCGeometryPar.cc.

◆ getOutgoingTheta()

double getOutgoingTheta ( const double  alpha,
const double  theta 
) const

Converts incoming- to outgoing-theta.

Parameters
alphain rad.
thetain rad.

Definition at line 2841 of file CDCGeometryPar.cc.

◆ getPropSpeedInv()

double getPropSpeedInv ( const unsigned int  layerID) const
inline

Get the inversel of propagation speed in the sense wire.

Parameters
[in]layerIDlayer ID (0-55)

Definition at line 822 of file CDCGeometryPar.h.

◆ getSenseWireZposMode()

int getSenseWireZposMode ( ) const
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.

◆ getShiftInSuperLayer()

signed short getShiftInSuperLayer ( unsigned short  iSuperLayer,
unsigned short  iLayer 
) const

Returns shift in the super-layer.

Parameters
iSuperLayerThe super-layer id.
iLayerThe layer id. in the super-layer

Definition at line 3031 of file CDCGeometryPar.cc.

◆ getSigma()

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.

Parameters
distDrift length (cm); negative dist is treated as |dist|.
layerLayer id.
lrLeft/Right.
alphaincident angle (in rphi plane) w.r.t. the cell (rad).
thetaincident angle (polar angle) (rad).

Definition at line 2646 of file CDCGeometryPar.cc.

◆ getT0()

float getT0 ( const WireID wireID) const
inline

Returns t0 parameter of the specified sense wire.

Parameters
wireIDWire id.
Returns
t0.

Definition at line 555 of file CDCGeometryPar.h.

◆ getTheta()

double getTheta ( const B2Vector3D momentum) const

Returns track incident angle (theta in rad.).

Parameters
momentumTrack momentum at the closest point.

Definition at line 2815 of file CDCGeometryPar.cc.

◆ getThresholdEnerguDeposit()

double getThresholdEnerguDeposit ( ) const
inline

Returns threshold for energy deposit in one G4 step.

Returns
threshold (GeV)

Definition at line 519 of file CDCGeometryPar.h.

◆ getTimeWalk()

double getTimeWalk ( const WireID wID,
unsigned short  adcCount 
) const
inline

Returns time-walk.

Parameters
wIDwire id
adcCountADC count
Returns
time-walk (in ns)

Definition at line 602 of file CDCGeometryPar.h.

◆ getWireID()

const WireID getWireID ( unsigned short  bd,
unsigned short  ch 
) const
inline

Returns wire id. corresponding to the board-and-cannel ids.

Parameters
bdboard id. (1-300)
chchannel id. (0-47)
Returns
wire id.

Definition at line 591 of file CDCGeometryPar.h.

◆ getWireSagCoef()

double getWireSagCoef ( EWirePosition  set,
uint  layerId,
int  cellId 
) const

Returns coefficient for the sense wire sag.

Parameters
setWire position set; =c_Base, c_Misaligned or c_Aligned
layerIdThe layer id.
cellIdThe cell id.
Returns
Coefficient for the sense wire sag.

Definition at line 1803 of file CDCGeometryPar.cc.

◆ getWireSagEffect()

void getWireSagEffect ( EWirePosition  set,
unsigned  layerID,
unsigned  cellID,
double  zw,
double &  ywb_sag,
double &  ywf_sag 
) const

Compute effects of the sense wire sag.

Parameters
[in]setWire position set; =c_Base, c_Misaligned or c_Aligned
[in]layerIDLayer ID
[in]cellIDCell ID in the layer
[in]zwZ-coord. (cm) at which the sense wire sag is computed
[out]ywb_sagY-corrd. (cm) of intersection between a tangent and the backward endplate.
[out]ywf_sagY-corrd. (cm) of intersection between a tangent and the forward endplate.
Attention
The tangent is computed from the first derivative of a paraboric wire (due to gravity) defined at Z.

Definition at line 1967 of file CDCGeometryPar.cc.

◆ innerRadiusInnerWall()

double innerRadiusInnerWall ( ) const
inline

Returns the inner radius of the inner wall.

Returns
The inner radius of the inner wall.

Definition at line 1315 of file CDCGeometryPar.h.

◆ innerRadiusOuterWall()

double innerRadiusOuterWall ( ) const
inline

Returns the inner radius of the outer wall.

Returns
The inner radius of the outer wall.

Definition at line 1300 of file CDCGeometryPar.h.

◆ innerRadiusWireLayer()

const double * innerRadiusWireLayer ( ) const

Returns an array of inner radius of wire layers.

Returns
An array of inner radius of wire layers.

Definition at line 1814 of file CDCGeometryPar.cc.

◆ Instance()

CDCGeometryPar & Instance ( const CDCGeometry geom = nullptr)
static

Static method to get a reference to the CDCGeometryPar instance.

Returns
A reference to an instance of this class.

Definition at line 39 of file CDCGeometryPar.cc.

◆ momBound()

int momBound ( ) const

to get the number of boundary position of the CDC mother volume

Returns
The number of boundary position of the CDC mother volume.

◆ momRmin()

double momRmin ( int  iBound) const
inline

Returns inner radius of the CDC mother volume.

Parameters
iBound: The boundary id.
Returns
The inner radius of the specified baoundary position in the CDC mother volume

Definition at line 1235 of file CDCGeometryPar.h.

◆ momZ()

double momZ ( int  iBound) const
inline

Returns boundary position in Z axis of the CDC mother volume.

Parameters
iBound: The boundary id.
Returns
The z component of the specified baoundary position in the CDC mother volume

Definition at line 1230 of file CDCGeometryPar.h.

◆ motherInnerR()

double motherInnerR ( ) const

The method to get cdc mother volume inner R.

Returns
The inner radius of the cdc mother volume.

◆ motherLength()

double motherLength ( ) const

The method to get cdc mother volume length.

Returns
The length of the cdc mother volume.

◆ motherOuterR()

double motherOuterR ( ) const

The method to get cdc mother volume outer R.

Returns
The outer radius of the cdc mother volume.

◆ newReadSigma()

void newReadSigma ( const GearDir gbxParams,
int  mode = 0 
)

Read spatial resolution table in new format.

Parameters
gbxParamsGear Dir.
mode0: read simulation file, 1: read reconstruction file.

Definition at line 964 of file CDCGeometryPar.cc.

◆ newReadXT()

void newReadXT ( const GearDir gbxParams,
int  mode = 0 
)

Read XT-relation table in new format.

Parameters
[in]gbxParamsGear Dir.
[in]mode0: read simulation file, 1: read reconstruction file.

Definition at line 818 of file CDCGeometryPar.cc.

◆ nShifts()

int nShifts ( int  layerId) const
inline

Returns number shift.

Parameters
layerIdThe layer id of sense wires.
Returns
The shifted cell number in layer layerId.

Definition at line 1240 of file CDCGeometryPar.h.

◆ nWireLayers()

unsigned nWireLayers ( ) const
inline

Returns a number of wire layers.

Returns
The number of wire layers.

Definition at line 1350 of file CDCGeometryPar.h.

◆ nWiresInLayer()

unsigned nWiresInLayer ( int  layerId) const
inline

Returns wire numbers in a layer.

Parameters
layerIdThe layer id.
Returns
Wire number in layer layerId.

Definition at line 1250 of file CDCGeometryPar.h.

◆ offset()

double offset ( int  layerID) const
inline

Return wire offset in phi direction at endplate.

Parameters
layerIDlayerID(0-55).
Returns
offset value.

Definition at line 1245 of file CDCGeometryPar.h.

◆ outerRadiusInnerWall()

double outerRadiusInnerWall ( ) const
inline

Returns the outer radius of the inner wall.

Returns
The outer radius of the inner wall.

Definition at line 1320 of file CDCGeometryPar.h.

◆ outerRadiusOuterWall()

double outerRadiusOuterWall ( ) const
inline

Returns the outer radius of the outer wall.

Returns
The outer radius of the outer wall.

Definition at line 1305 of file CDCGeometryPar.h.

◆ outerRadiusWireLayer()

const double * outerRadiusWireLayer ( ) const

Returns an array of outer radius of wire layers.

Returns
A array of outer radius of wire layers.

Definition at line 1826 of file CDCGeometryPar.cc.

◆ outputDesignWirParam()

void outputDesignWirParam ( unsigned  layerID,
unsigned  cellID 
) const

Write the designed wire parameters to the alignment.dat (default).

Parameters
[in]layerIDLayer ID
[in]cellIDCell ID

Definition at line 2097 of file CDCGeometryPar.cc.

◆ readEDepToADC()

void readEDepToADC ( const GearDir gbxParams,
int  mode = 0 
)

Read spatial edep-to-adc conv.

factors.

Parameters
gbxParamsGear Dir.
modedummy now..

Definition at line 1308 of file CDCGeometryPar.cc.

◆ readFFactor()

void readFFactor ( const GearDir gbxParams,
int  mode = 0 
)

Read fudge factors.

Parameters
gbxParamsGear Dir.
modedummy now.

Definition at line 1076 of file CDCGeometryPar.cc.

◆ readPropSpeed()

void readPropSpeed ( const GearDir gbxParams,
int  mode = 0 
)

Read the propagation speed along the sense wire.

Parameters
gbxParamsGear Dir.
mode0: read simulation file, 1: read reconstruction file.

Definition at line 1088 of file CDCGeometryPar.cc.

◆ readSigma()

void readSigma ( const GearDir gbxParams,
int  mode = 0 
)

Read spatial resolution table.

Parameters
gbxParamsGear Dir.
mode0: read simulation file, 1: read reconstruction file.

Definition at line 955 of file CDCGeometryPar.cc.

◆ readT0()

void readT0 ( const GearDir gbxParams,
int  mode = 0 
)

Read t0 parameters (from a file).

Parameters
gbxParamsGear Dir.
mode0: read simulation file, 1: read reconstruction file.

Definition at line 1156 of file CDCGeometryPar.cc.

◆ readTW()

void readTW ( const GearDir gbxParams,
int  mode = 0 
)

Read time-walk parameter.

Parameters
gbxParamsGear Dir.
mode0: read simulation file, 1: read reconstruction file.

Definition at line 1237 of file CDCGeometryPar.cc.

◆ readWirePositionParams()

void readWirePositionParams ( EWirePosition  set,
const CDCGeometry geom 
)

Read displacement or (mis)alignment params from text file.

Parameters
[in]setWire position set, i.e. c_Base, c_Misaliged or c_Aligned.
[in]geomPointer to DB CDCGeometry db object.

Definition at line 579 of file CDCGeometryPar.cc.

◆ readXT()

void readXT ( const GearDir gbxParams,
int  mode = 0 
)

Read XT-relation table.

Parameters
[in]gbxParamsGear Dir.
[in]mode0: read simulation file, 1: read reconstruction file.

Definition at line 807 of file CDCGeometryPar.cc.

◆ senseWireBZ()

double senseWireBZ ( int  layerId) const
inline

Returns backward z position of sense wire in each layer.

Parameters
layerIdThe layer id.
Returns
The backward z position of sense wire in layer layerId.

Definition at line 1280 of file CDCGeometryPar.h.

◆ senseWireDiameter()

double senseWireDiameter ( ) const
inline

Returns diameter of the sense wire.

Returns
Diameter of the sense wire.

Definition at line 1340 of file CDCGeometryPar.h.

◆ senseWireFZ()

double senseWireFZ ( int  layerId) const
inline

Returns forward z position of sense wire in each layer.

Parameters
layerIdThe layer id.
Returns
The forward z position of sense wire in layer layerId.

Definition at line 1275 of file CDCGeometryPar.h.

◆ senseWireR()

double senseWireR ( int  layerId) const
inline

Returns radius of sense wire in each layer.

Parameters
layerIdThe layer id.
Returns
The radius of sense wire in layer layerId.

Definition at line 1270 of file CDCGeometryPar.h.

◆ setDesignWirParam()

void setDesignWirParam ( unsigned  layerID,
unsigned  cellID 
)

Set the desizend wire parameters.

Parameters
[in]layerIDLayer ID
[in]cellIDCell ID

Definition at line 2060 of file CDCGeometryPar.cc.

◆ setEDepToADCConversions()

void setEDepToADCConversions ( )

Set edep-to-ADC conversion params.

(from DB)

Definition at line 1612 of file CDCGeometryPar.cc.

◆ setNominalSpaceResol()

void setNominalSpaceResol ( double  resol)
inline

Set the nominal spacial resolution in the unit of um.

Parameters
[in]resolspacial resolution (um)

Definition at line 811 of file CDCGeometryPar.h.

◆ setPropSpeed()

void setPropSpeed ( )

Set prop.

-speeds (from DB).

Definition at line 1442 of file CDCGeometryPar.cc.

◆ setSenseWireBZ()

void setSenseWireBZ ( int  layerId,
double  bz 
)
inline

set backward z position of sense wires.

Parameters
layerIdThe layer id of sense wire.
bzThe backward position of sense wires in layer layerId.

Definition at line 1265 of file CDCGeometryPar.h.

◆ setSenseWireFZ()

void setSenseWireFZ ( int  layerId,
double  fz 
)
inline

Set forward z position of sense wires.

Parameters
layerIdThe layer id of sense wire.
fzThe forward position of sense wires in layer layerId.

Definition at line 1260 of file CDCGeometryPar.h.

◆ setSenseWireR()

void setSenseWireR ( int  layerId,
double  r 
)
inline

Set radius of sense wire in each layer.

Parameters
layerIdThe layer id of sense wires.
rThe radius of sense wires in layer layerId.

Definition at line 1255 of file CDCGeometryPar.h.

◆ setWirPosAlignParams()

void setWirPosAlignParams ( )

Set wire alignment params.

from DB.

Definition at line 683 of file CDCGeometryPar.cc.

◆ setWirPosMisalignParams()

void setWirPosMisalignParams ( )

Set wire misalignment params.

from DB.

Definition at line 767 of file CDCGeometryPar.cc.

◆ version()

std::string version ( ) const
inline

Returns the version of cdc geometry parameters.

Returns
The version of the cdc geometry parameters.

Definition at line 1225 of file CDCGeometryPar.h.

◆ wireBackwardPosition() [1/2]

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.

Parameters
layerIdThe layer id. of the wire
cellIdThe wire id. of the wire
zz-position
setWire position set; =c_Base, c_Misaligned or c_Aligned
Returns
The virtual backward position of the wire.

Definition at line 1779 of file CDCGeometryPar.cc.

◆ wireBackwardPosition() [2/2]

const B2Vector3D wireBackwardPosition ( uint  layerId,
int  cellId,
EWirePosition  set = c_Base 
) const

Returns the backward position of the input sense wire.

Parameters
layerIdThe layer id. of the wire
cellIdThe wire id. of the wire
setWire position set; =c_Base, c_Misaligned or c_Aligned
Returns
The backward position of the wire.

Definition at line 1755 of file CDCGeometryPar.cc.

◆ wireForwardPosition() [1/2]

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.

Parameters
layerIdThe layer id. of the wire
cellIdThe wire id. of the wire
zz-position
setWire position set; =c_Base, c_Misaligned or c_Aligned
Returns
The virtual forward position of the wire.

Definition at line 1731 of file CDCGeometryPar.cc.

◆ wireForwardPosition() [2/2]

const B2Vector3D wireForwardPosition ( uint  layerId,
int  cellId,
EWirePosition  set = c_Base 
) const

Returns the forward position of the input sense wire.

Parameters
layerIdThe layer id. of the wire
cellIdThe wire id. of the wire
setWire position set; =c_Base, c_Misaligned or c_Aligned
Returns
The forward position of the wire.

Definition at line 1706 of file CDCGeometryPar.cc.

◆ zBackwardWireLayer()

const double * zBackwardWireLayer ( ) const
inline

Returns an array of backward z of wire layers.

Returns
An array of backward z.

Definition at line 1360 of file CDCGeometryPar.h.

◆ zForwardWireLayer()

const double * zForwardWireLayer ( ) const
inline

Returns an array of forward z of wire layers.

Returns
An array of forward z.

Definition at line 1355 of file CDCGeometryPar.h.

◆ zInnerWall()

double zInnerWall ( ) const
inline

Returns the length of the inner wall in Z.

Returns
The length of the inner wall.

Definition at line 1325 of file CDCGeometryPar.h.

◆ zOffsetInnerWall()

double zOffsetInnerWall ( ) const
inline

Returns the offset of the outer wall in z direction.

Returns
The z offset of the outer wall.

Definition at line 1335 of file CDCGeometryPar.h.

◆ zOffsetOuterWall()

double zOffsetOuterWall ( ) const
inline

Returns the offset of the outer wall in z direction.

Returns
The z offset of the outer wall.

Definition at line 1330 of file CDCGeometryPar.h.

◆ zOffsetWireLayer()

double zOffsetWireLayer ( unsigned  i) const
inline

Returns the offset of z of the wire layer i.

Parameters
iThe layer id.
Returns
The z offset of wire layer i.

Definition at line 1365 of file CDCGeometryPar.h.

◆ zOuterWall()

double zOuterWall ( ) const
inline

Returns the length of the outer wall in Z.

Returns
The length of the outer wall.

Definition at line 1310 of file CDCGeometryPar.h.

Member Data Documentation

◆ m_alignmentFromDB

DBObjPtr<CDCAlignment>* m_alignmentFromDB
private

alignment params.

retrieved from DB.

Definition at line 1203 of file CDCGeometryPar.h.

◆ m_BWirPos

float m_BWirPos[c_maxNSenseLayers][c_maxNDriftCells][3]
private

Wire position incl.

displacement at the backward endplate for each cell; ibid.

Definition at line 1152 of file CDCGeometryPar.h.

◆ m_BWirPosAlign

float m_BWirPosAlign[c_maxNSenseLayers][c_maxNDriftCells][3]
private

Wire position incl.

alignment at the backward endplate for each cell; ibid.

Definition at line 1160 of file CDCGeometryPar.h.

◆ m_BWirPosMisalign

float m_BWirPosMisalign[c_maxNSenseLayers][c_maxNDriftCells][3]
private

Wire position incl.

misalignment at the backward endplate for each cell; ibid.

Definition at line 1156 of file CDCGeometryPar.h.

◆ m_displacementFromDB

DBArray<CDCDisplacement>* m_displacementFromDB
private

displacement params.

retrieved from DB.

Definition at line 1202 of file CDCGeometryPar.h.

◆ m_eDepToADCConversionsFromDB

DBObjPtr<CDCEDepToADCConversions>* m_eDepToADCConversionsFromDB
private

Pointer to edep-to-ADC conv.

params. from DB.

Definition at line 1205 of file CDCGeometryPar.h.

◆ m_eDepToADCParams

float m_eDepToADCParams[c_maxNSenseLayers][c_maxNDriftCells][7] = {}
private

edep-to-ADC conv.

params.

Definition at line 1162 of file CDCGeometryPar.h.

◆ m_FWirPos

float m_FWirPos[c_maxNSenseLayers][c_maxNDriftCells][3]
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.

◆ m_FWirPosAlign

float m_FWirPosAlign[c_maxNSenseLayers][c_maxNDriftCells][3]
private

Wire position incl.

alignment at the forward endplate for each cell; ibid.

Definition at line 1159 of file CDCGeometryPar.h.

◆ m_FWirPosMisalign

float m_FWirPosMisalign[c_maxNSenseLayers][c_maxNDriftCells][3]
private

Wire position incl.

misalignment at the forward endplate for each cell; ibid.

Definition at line 1155 of file CDCGeometryPar.h.

◆ m_misalignmentFromDB

DBObjPtr<CDCMisalignment>* m_misalignmentFromDB
private

misalignment params.

retrieved from DB.

Definition at line 1204 of file CDCGeometryPar.h.

◆ m_momRmin

double m_momRmin[7]
private

R_min of the cdc mother volume (7 segments).


Definition at line 1143 of file CDCGeometryPar.h.

◆ m_nAlphaPoints

unsigned short m_nAlphaPoints
private

No.

of alpha points for xt.

Definition at line 1113 of file CDCGeometryPar.h.

◆ m_nAlphaPoints4Sgm

unsigned short m_nAlphaPoints4Sgm
private

No.

of alpha points for sigma.

Definition at line 1115 of file CDCGeometryPar.h.

◆ m_nThetaPoints

unsigned short m_nThetaPoints
private

No.

of theta points for xt.

Definition at line 1114 of file CDCGeometryPar.h.

◆ m_nThetaPoints4Sgm

unsigned short m_nThetaPoints4Sgm
private

No.

of theta points for sigma.

Definition at line 1116 of file CDCGeometryPar.h.

◆ m_propSpeedFromDB

DBObjPtr<CDCPropSpeeds>* m_propSpeedFromDB
private

prop.

-speeds retrieved from DB.

Definition at line 1196 of file CDCGeometryPar.h.

◆ m_sResolFromDB

DBObjPtr<CDCSpaceResols>* m_sResolFromDB
private

sigma params.

retrieved from DB.

Definition at line 1199 of file CDCGeometryPar.h.

◆ m_thresholdEnergyDeposit

double m_thresholdEnergyDeposit
private

Energy thresh.

for G4 step

Definition at line 1148 of file CDCGeometryPar.h.

◆ m_timeWalkFromDB

DBObjPtr<CDCTimeWalks>* m_timeWalkFromDB
private

time-walk coeffs.

retrieved from DB.

Definition at line 1197 of file CDCGeometryPar.h.

◆ m_WireSagCoefAlign

float m_WireSagCoefAlign[c_maxNSenseLayers][c_maxNDriftCells]
private

Wire sag coefficient incl.

alignment for each cell; ibid.

Definition at line 1161 of file CDCGeometryPar.h.

◆ m_WireSagCoefMisalign

float m_WireSagCoefMisalign[c_maxNSenseLayers][c_maxNDriftCells]
private

Wire sag coefficient incl.

misalignment for each cell; ibid.

Definition at line 1157 of file CDCGeometryPar.h.

◆ m_XT

float m_XT[c_maxNSenseLayers][2][c_maxNAlphaPoints][c_maxNThetaPoints][c_nXTParams]
private

XT-relation coefficients for each layer, Left/Right, entrance angle and polar angle.


Definition at line 1169 of file CDCGeometryPar.h.

◆ m_XTetc

bool m_XTetc
private

Switch for reading x-t etc.

params..

Definition at line 1094 of file CDCGeometryPar.h.

◆ m_xtRelFromDB

DBObjPtr<CDCXtRelations>* m_xtRelFromDB
private

xt params.

retrieved from DB (new).

Definition at line 1198 of file CDCGeometryPar.h.


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