Belle II Software  release-06-00-14
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 TVector3 &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 TVector3 wireForwardPosition (int layerId, int cellId, EWirePosition set=c_Base) const
 Returns the forward position of the input sense wire. More...
 
const TVector3 wireForwardPosition (const WireID &wireID, EWirePosition set=c_Base) const
 The same function but in a different input format.
 
const TVector3 wireForwardPosition (int 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 TVector3 wireForwardPosition (const WireID &wireID, double z, EWirePosition set=c_Base) const
 The same function but in a different input format.
 
const TVector3 wireBackwardPosition (int layerId, int cellId, EWirePosition set=c_Base) const
 Returns the backward position of the input sense wire. More...
 
const TVector3 wireBackwardPosition (const WireID &wireID, EWirePosition set=c_Base) const
 The same function but in a different input format.
 
const TVector3 wireBackwardPosition (int 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 TVector3 wireBackwardPosition (const WireID &wireID, double z, EWirePosition set=c_Base) const
 The same function but in a different input format.
 
double getWireSagCoef (EWirePosition set, int 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 TVector3 &posOnWire, const TVector3 &posOnTrack, const TVector3 &momentum) const
 Returns old left/right. More...
 
unsigned short getNewLeftRightRaw (const TVector3 &posOnWire, const TVector3 &posOnTrack, const TVector3 &momentum) const
 Returns new left/right_raw. More...
 
double getAlpha (const TVector3 &posOnWire, const TVector3 &momentum) const
 Returns track incident angle in rphi plane (alpha in rad.). More...
 
double getTheta (const TVector3 &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.
 

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 [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 [MAX_N_SLAYERS]
 The array to store radius of sense wire layers.
 
double m_zSForwardLayer [MAX_N_SLAYERS]
 The array to store forward z position of sense wire layers.
 
double m_dzSForwardLayer [MAX_N_SLAYERS]
 Corrections for forward z position of sense wire layers.
 
double m_zSBackwardLayer [MAX_N_SLAYERS]
 The array to store backward z position of sense wire layers.
 
double m_dzSBackwardLayer [MAX_N_SLAYERS]
 Corrections for backward z position of sense wire layers.
 
double m_rFLayer [MAX_N_FLAYERS]
 The array to store radius of field wire layers.
 
double m_zFForwardLayer [MAX_N_FLAYERS]
 The array to store forward z position of field wire layers.
 
double m_zFBackwardLayer [MAX_N_FLAYERS]
 The array to store backward z position of field wire layers.
 
double m_offSet [MAX_N_SLAYERS]
 The array to store z offset of sense wire layers.
 
double m_cellSize [MAX_N_SLAYERS]
 The array to store cell size in each sense wire layer.
 
int m_nShifts [MAX_N_SLAYERS]
 The array to store shifted cell number in each sense wire layer.
 
unsigned m_nWires [MAX_N_SLAYERS]
 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 [MAX_N_SLAYERS][MAX_N_SCELLS][3]
 Wire position incl. More...
 
float m_BWirPos [MAX_N_SLAYERS][MAX_N_SCELLS][3]
 Wire position incl. More...
 
float m_WireSagCoef [MAX_N_SLAYERS][MAX_N_SCELLS]
 Wire sag coefficient for each cell; ibid.
 
float m_FWirPosMisalign [MAX_N_SLAYERS][MAX_N_SCELLS][3]
 Wire position incl. More...
 
float m_BWirPosMisalign [MAX_N_SLAYERS][MAX_N_SCELLS][3]
 Wire position incl. More...
 
float m_WireSagCoefMisalign [MAX_N_SLAYERS][MAX_N_SCELLS]
 Wire sag coefficient incl. More...
 
float m_FWirPosAlign [MAX_N_SLAYERS][MAX_N_SCELLS][3]
 Wire position incl. More...
 
float m_BWirPosAlign [MAX_N_SLAYERS][MAX_N_SCELLS][3]
 Wire position incl. More...
 
float m_WireSagCoefAlign [MAX_N_SLAYERS][MAX_N_SCELLS]
 Wire sag coefficient incl. More...
 
float m_eDepToADCParams [MAX_N_SLAYERS][MAX_N_SCELLS][7] = {0}
 edep-to-ADC conv. More...
 
float m_alphaPoints [maxNAlphaPoints]
 alpha sampling points for xt (rad)
 
float m_thetaPoints [maxNThetaPoints]
 theta sampling points for xt (rad)
 
float m_alphaPoints4Sgm [maxNAlphaPoints]
 alpha sampling points for sigma (rad)
 
float m_thetaPoints4Sgm [maxNThetaPoints]
 theta sampling points for sigma (rad)
 
float m_XT [MAX_N_SLAYERS][2][maxNAlphaPoints][maxNThetaPoints][nXTParams]
 XT-relation coefficients for each layer, Left/Right, entrance angle and polar angle. More...
 
float m_Sigma [MAX_N_SLAYERS][2][maxNAlphaPoints][maxNThetaPoints][nSigmaParams]
 position resulution for each layer.
 
float m_propSpeedInv [MAX_N_SLAYERS]
 Inverse of propagation speed of the sense wire.
 
float m_t0 [MAX_N_SLAYERS][MAX_N_SCELLS] = {0}
 t0 for each sense-wire (in nsec).
 
float m_timeWalkCoef [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 [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
 

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 73 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 1310 of file CDCGeometryPar.cc.

1311 {
1312  double oldMeanT0 = 0;
1313  unsigned short it1 = 0;
1314  for (unsigned short it = 0; it < maxIt; ++it) {
1315  it1 = it;
1316  double effiSum = 0.;
1317  m_meanT0 = 0.;
1318  double stdvT0 = 0;
1319  for (unsigned short iCL = 0; iCL < MAX_N_SLAYERS; ++iCL) {
1320  for (unsigned short iW = 0; iW < m_nWires[iCL]; ++iW) {
1321  if (m_t0[iCL][iW] < minT0 || m_t0[iCL][iW] > maxT0) continue;
1322  const WireID wid = WireID(iCL, iW);
1323  if (isHotWire(wid)) continue;
1324  if (isBadWire(wid)) continue;
1325  double effi = 1.;
1326  isDeadWire(wid, effi);
1327  effiSum += effi;
1328  m_meanT0 += effi * m_t0[iCL][iW];
1329  stdvT0 += effi * m_t0[iCL][iW] * m_t0[iCL][iW];
1330  }
1331  }
1332  if (effiSum > 0.) {
1333  m_meanT0 /= effiSum;
1334  stdvT0 /= effiSum;
1335  stdvT0 = sqrt(fabs(stdvT0 - m_meanT0 * m_meanT0));
1336  B2DEBUG(29, it << " " << effiSum << " " << m_meanT0 << " " << stdvT0);
1337  if (fabs(m_meanT0 - oldMeanT0) < epsi) break;
1338  oldMeanT0 = m_meanT0;
1339  minT0 = m_meanT0 - nStdv * stdvT0;
1340  maxT0 = m_meanT0 + nStdv * stdvT0;
1341  } else {
1342  B2FATAL("Wire efficiency sum <= 0!");
1343  }
1344  }
1345  if (it1 == maxIt - 1) B2WARNING("Max. iterations(=" << maxIt << ") needed to calculte the mean t0. Strange.");
1346 }
bool isDeadWire(const WireID &wid, double &eff)
Inquire if the wire is dead.
unsigned m_nWires[MAX_N_SLAYERS]
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.
bool isBadWire(const WireID &wid)
Inquire if the wire is totally-dead.
float m_t0[MAX_N_SLAYERS][MAX_N_SCELLS]
t0 for each sense-wire (in nsec).
Class to identify a wire inside the CDC.
Definition: WireID.h:34

◆ cellId()

unsigned cellId ( unsigned  layerId,
const TVector3 &  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 1726 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 1267 of file CDCGeometryPar.h.

1268  {
1269  return m_zFBackwardLayer[layerID];
1270  }
double m_zFBackwardLayer[MAX_N_FLAYERS]
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 1317 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 1262 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 1257 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 1770 of file CDCGeometryPar.cc.

◆ getAlpha()

double getAlpha ( const TVector3 &  posOnWire,
const TVector3 &  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 2654 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 588 of file CDCGeometryPar.h.

◆ getBwdDeltaZ()

double getBwdDeltaZ ( unsigned short  layerID) const
inline

Return backward 'deltaZ'.

Parameters
[in]layerID(0-55)

Definition at line 812 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 600 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 2735 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 2161 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 2083 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 2450 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 1999 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 1569 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 284 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 293 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 965 of file CDCGeometryPar.h.

◆ getFwdDeltaZ()

double getFwdDeltaZ ( unsigned short  layerID) const
inline

Return forward 'deltaZ'.

Parameters
[in]layerID(0-55)

Definition at line 822 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 789 of file CDCGeometryPar.h.

◆ getMeanT0()

double getMeanT0 ( ) const
inline

Returns the mean t0 over all wires.

Returns
mean t0.

Definition at line 1342 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 2260 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 550 of file CDCGeometryPar.h.

◆ getNewLeftRightRaw()

unsigned short getNewLeftRightRaw ( const TVector3 &  posOnWire,
const TVector3 &  posOnTrack,
const TVector3 &  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 2645 of file CDCGeometryPar.cc.

◆ getNominalSpaceResol()

double getNominalSpaceResol ( ) const
inline

Return the nominal spacial resolution.

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

Definition at line 774 of file CDCGeometryPar.h.

◆ getOldLeftRight()

unsigned short getOldLeftRight ( const TVector3 &  posOnWire,
const TVector3 &  posOnTrack,
const TVector3 &  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 2610 of file CDCGeometryPar.cc.

◆ getOutgoingAlpha()

double getOutgoingAlpha ( const double  alpha) const

Converts incoming- to outgoing-alpha.

Parameters
alphain rad.

Definition at line 2680 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 2673 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 2693 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 844 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 802 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 2882 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 2502 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 577 of file CDCGeometryPar.h.

◆ getTheta()

double getTheta ( const TVector3 &  momentum) const

Returns track incident angle (theta in rad.).

Parameters
momentumTrack momentum at the closest point.

Definition at line 2667 of file CDCGeometryPar.cc.

◆ getThresholdEnerguDeposit()

double getThresholdEnerguDeposit ( ) const
inline

Returns threshold for energy deposit in one G4 step.

Returns
threshold (GeV)

Definition at line 541 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 624 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 613 of file CDCGeometryPar.h.

◆ getWireSagCoef()

double getWireSagCoef ( EWirePosition  set,
int  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 1691 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 1851 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 1287 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 1272 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 1702 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 1207 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 1202 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 888 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 745 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 1212 of file CDCGeometryPar.h.

◆ nWireLayers()

unsigned nWireLayers ( ) const
inline

Returns a number of wire layers.

Returns
The number of wire layers.

Definition at line 1322 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 1222 of file CDCGeometryPar.h.

◆ offset()

double offset ( int  layerID) const
inline

Return wire offset in phi direction at endplate.

@parm layerID layerID(0-55).

Returns
offset value.

Definition at line 1217 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 1292 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 1277 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 1714 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 1973 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 1224 of file CDCGeometryPar.cc.

◆ readFFactor()

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

Read fudge factors.

Parameters
gbxParamsGear Dir.
modedummy now.

Definition at line 997 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 1009 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 879 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 1077 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 1154 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 527 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 734 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 1252 of file CDCGeometryPar.h.

◆ senseWireDiameter()

double senseWireDiameter ( ) const
inline

Returns diameter of the sense wire.

Returns
Diameter of the sense wire.

Definition at line 1312 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 1247 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 1242 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 1937 of file CDCGeometryPar.cc.

◆ setEDepToADCConversions()

void setEDepToADCConversions ( )

Set edep-to-ADC conversion params.

(from DB)

Definition at line 1524 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 833 of file CDCGeometryPar.h.

◆ setPropSpeed()

void setPropSpeed ( )

Set prop.

-speeds (from DB).

Definition at line 1358 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 1237 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 1232 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 1227 of file CDCGeometryPar.h.

◆ setWirPosAlignParams()

void setWirPosAlignParams ( )

Set wire alignment params.

from DB.

Definition at line 625 of file CDCGeometryPar.cc.

◆ setWirPosMisalignParams()

void setWirPosMisalignParams ( )

Set wire misalignment params.

from DB.

Definition at line 699 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 1197 of file CDCGeometryPar.h.

◆ wireBackwardPosition() [1/2]

const TVector3 wireBackwardPosition ( int  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 1673 of file CDCGeometryPar.cc.

◆ wireBackwardPosition() [2/2]

const TVector3 wireBackwardPosition ( int  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 1655 of file CDCGeometryPar.cc.

◆ wireForwardPosition() [1/2]

const TVector3 wireForwardPosition ( int  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 1637 of file CDCGeometryPar.cc.

◆ wireForwardPosition() [2/2]

const TVector3 wireForwardPosition ( int  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 1618 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 1332 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 1327 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 1297 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 1307 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 1302 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 1337 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 1282 of file CDCGeometryPar.h.

Member Data Documentation

◆ m_alignmentFromDB

DBObjPtr<CDCAlignment>* m_alignmentFromDB
private

alignment params.

retrieved from DB.

Definition at line 1184 of file CDCGeometryPar.h.

◆ m_BWirPos

float m_BWirPos[MAX_N_SLAYERS][MAX_N_SCELLS][3]
private

Wire position incl.

displacement at the backward endplate for each cell; ibid.

Definition at line 1133 of file CDCGeometryPar.h.

◆ m_BWirPosAlign

float m_BWirPosAlign[MAX_N_SLAYERS][MAX_N_SCELLS][3]
private

Wire position incl.

alignment at the backward endplate for each cell; ibid.

Definition at line 1141 of file CDCGeometryPar.h.

◆ m_BWirPosMisalign

float m_BWirPosMisalign[MAX_N_SLAYERS][MAX_N_SCELLS][3]
private

Wire position incl.

misalignment at the backward endplate for each cell; ibid.

Definition at line 1137 of file CDCGeometryPar.h.

◆ m_displacementFromDB

DBArray<CDCDisplacement>* m_displacementFromDB
private

displacement params.

retrieved from DB.

Definition at line 1183 of file CDCGeometryPar.h.

◆ m_eDepToADCConversionsFromDB

DBObjPtr<CDCEDepToADCConversions>* m_eDepToADCConversionsFromDB
private

Pointer to edep-to-ADC conv.

params. from DB.

Definition at line 1186 of file CDCGeometryPar.h.

◆ m_eDepToADCParams

float m_eDepToADCParams[MAX_N_SLAYERS][MAX_N_SCELLS][7] = {0}
private

edep-to-ADC conv.

params.

Definition at line 1143 of file CDCGeometryPar.h.

◆ m_FWirPos

float m_FWirPos[MAX_N_SLAYERS][MAX_N_SCELLS][3]
private

Wire position incl.

displacement at the forward endplate for each cell; to be implemented in a smarter way.

Definition at line 1132 of file CDCGeometryPar.h.

◆ m_FWirPosAlign

float m_FWirPosAlign[MAX_N_SLAYERS][MAX_N_SCELLS][3]
private

Wire position incl.

alignment at the forward endplate for each cell; ibid.

Definition at line 1140 of file CDCGeometryPar.h.

◆ m_FWirPosMisalign

float m_FWirPosMisalign[MAX_N_SLAYERS][MAX_N_SCELLS][3]
private

Wire position incl.

misalignment at the forward endplate for each cell; ibid.

Definition at line 1136 of file CDCGeometryPar.h.

◆ m_misalignmentFromDB

DBObjPtr<CDCMisalignment>* m_misalignmentFromDB
private

misalignment params.

retrieved from DB.

Definition at line 1185 of file CDCGeometryPar.h.

◆ m_momRmin

double m_momRmin[7]
private

R_min of the cdc mother volume (7 segments).


Definition at line 1124 of file CDCGeometryPar.h.

◆ m_nAlphaPoints

unsigned short m_nAlphaPoints
private

No.

of alpha points for xt.

Definition at line 1094 of file CDCGeometryPar.h.

◆ m_nAlphaPoints4Sgm

unsigned short m_nAlphaPoints4Sgm
private

No.

of alpha points for sigma.

Definition at line 1096 of file CDCGeometryPar.h.

◆ m_nThetaPoints

unsigned short m_nThetaPoints
private

No.

of theta points for xt.

Definition at line 1095 of file CDCGeometryPar.h.

◆ m_nThetaPoints4Sgm

unsigned short m_nThetaPoints4Sgm
private

No.

of theta points for sigma.

Definition at line 1097 of file CDCGeometryPar.h.

◆ m_propSpeedFromDB

DBObjPtr<CDCPropSpeeds>* m_propSpeedFromDB
private

prop.

-speeds retrieved from DB.

Definition at line 1177 of file CDCGeometryPar.h.

◆ m_sResolFromDB

DBObjPtr<CDCSpaceResols>* m_sResolFromDB
private

sigma params.

retrieved from DB.

Definition at line 1180 of file CDCGeometryPar.h.

◆ m_thresholdEnergyDeposit

double m_thresholdEnergyDeposit
private

Energy thresh.

for G4 step

Definition at line 1129 of file CDCGeometryPar.h.

◆ m_timeWalkFromDB

DBObjPtr<CDCTimeWalks>* m_timeWalkFromDB
private

time-walk coeffs.

retrieved from DB.

Definition at line 1178 of file CDCGeometryPar.h.

◆ m_WireSagCoefAlign

float m_WireSagCoefAlign[MAX_N_SLAYERS][MAX_N_SCELLS]
private

Wire sag coefficient incl.

alignment for each cell; ibid.

Definition at line 1142 of file CDCGeometryPar.h.

◆ m_WireSagCoefMisalign

float m_WireSagCoefMisalign[MAX_N_SLAYERS][MAX_N_SCELLS]
private

Wire sag coefficient incl.

misalignment for each cell; ibid.

Definition at line 1138 of file CDCGeometryPar.h.

◆ m_XT

float m_XT[MAX_N_SLAYERS][2][maxNAlphaPoints][maxNThetaPoints][nXTParams]
private

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


Definition at line 1150 of file CDCGeometryPar.h.

◆ m_XTetc

bool m_XTetc
private

Switch for reading x-t etc.

params..

Definition at line 1075 of file CDCGeometryPar.h.

◆ m_xtRelFromDB

DBObjPtr<CDCXtRelations>* m_xtRelFromDB
private

xt params.

retrieved from DB (new).

Definition at line 1179 of file CDCGeometryPar.h.


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