Belle II Software  release-08-01-10
Collaboration diagram for cdc:

Modules

 cdc data objects
 
 cdc modules
 

Classes

class  CDCDatabaseImporter
 CDC database importer. More...
 
class  SliceFit
 Class to do the slice fit. More...
 
class  CDCADCDeltaPedestals
 Database object for ADC pedestals. More...
 
class  CDCAlignment
 CDC alignment constants. More...
 
class  CDCBadWires
 Database object for bad wires. More...
 
class  CDCChannelMap
 Database object of CDC channel map. More...
 
class  CDCCorrToThresholds
 Database object for correcting a simple threshold model in MC. More...
 
struct  asicChannel
 record to be used to store ASIC info More...
 
struct  adcChannelPair
 pair ADC, channel More...
 
struct  adcAsicTuple
 tuple to store ADC,Channel -> 8 asicChannels More...
 
struct  adc_search
 functions to search in the sorted list of tuples More...
 
class  CDCCrossTalkLibrary
 Database object for ASIC crosstalk library. More...
 
class  CDCDisplacement
 Database object for displacement of sense wire position. More...
 
class  CDCEDepToADCConversions
 Database object for energy-deposit to ADC-count conversion. More...
 
class  CDCFEElectronics
 Database object for Fron-endt electronics params. More...
 
class  CDCFEEParams
 Database object for FEE params. More...
 
class  CDCFudgeFactorsForSigma
 Database object for fudge factors for CDC space resol. More...
 
class  CDCGeometry
 The Class for CDC geometry. More...
 
class  CDCLayerAlignment
 CDC layers alignment constants. More...
 
class  CDClayerTimeCut
 Database object for timing offset (t0). More...
 
class  CDCMisalignment
 CDC misalignment constants. More...
 
class  CDCPropSpeeds
 Database object for signal propagation speed along the wire. More...
 
class  CDCSpaceResols
 Database object for space resolutions. More...
 
class  CDCTimeWalks
 Database object for time-walk. More...
 
class  CDCTimeZeros
 Database object for timing offset (t0). More...
 
class  CDCTriggerPlane
 Database object for timing offset (t0). More...
 
class  CDCWireHitRequirements
 Database object containing cut values to filter CDCWireHits. More...
 
class  CDCXtRelations
 Database object for xt-relations. More...
 

Typedefs

typedef array< asicChannel, 8 > asicChannels
 fixed sized array of ASIC channels
 

Functions

 CDCSensitiveDetector (G4String name, G4double thresholdEnergyDeposit, G4double thresholdKineticEnergy)
 Constructor.
 
void Initialize (G4HCofThisEvent *) override
 Register CDC hits collection into G4HCofThisEvent.
 
bool step (G4Step *aStep, G4TouchableHistory *history) override
 Process each step and calculate variables defined in CDCB4VHit.
 
void EndOfEvent (G4HCofThisEvent *) override
 Do what you want to do at the beginning of each event (why this is not called ?) More...
 
void saveSimHit (const G4int layerId, const G4int wireId, const G4int trackID, const G4int pid, const G4double distance, const G4double tof, const G4double edep, const G4double stepLength, const G4ThreeVector &mom, const G4ThreeVector &posW, const G4ThreeVector &posIn, const G4ThreeVector &posOut, const G4ThreeVector &posTrack, const G4int lr, const G4int NewLrRaw, const G4int NewLr, const G4double speed, const G4double hitWeight)
 Save CDCSimHit into datastore.
 
void CellBound (const G4int layerId, const G4int ic1, const G4int ic2, const G4double venter[6], const G4double vexit[6], const G4double s1, const G4double s2, G4double xint[6], G4double &sint, G4int &iflag)
 Calculate intersection of track with cell boundary. More...
 
void GCUBS (const G4double x, const G4double y, const G4double d1, const G4double d2, G4double a[4])
 
void for_Rotat (const G4double bfld[3])
 Calculates a rotation matrix. More...
 
void Rotat (G4double &x, G4double &y, G4double &z, const int mode)
 Translation method. More...
 
void Rotat (G4double x[3], const int mode)
 Overloaded translation method.
 
void HELWIR (const G4double xwb4, const G4double ywb4, const G4double zwb4, const G4double xwf4, const G4double ywf4, const G4double zwf4, const G4double xp, const G4double yp, const G4double zp, const G4double px, const G4double py, const G4double pz, const G4double B_kG[3], const G4double charge, const G4int ntryMax, G4double &distance, G4double q2[3], G4double q1[3], G4double q3[3], G4int &ntry)
 Calculate closest points between helix and wire. More...
 
void Mvopr (const G4int ndim, const G4double b[3], const G4double m[3][3], const G4double a[3], G4double c[3], const G4int mode)
 Calculate the result of a matrix times vector. More...
 
std::vector< int > WireId_in_hit_order (int id0, int id1, int nWires)
 Sort wire id.
 
G4double ClosestApproach (G4ThreeVector bwp, G4ThreeVector fwp, G4ThreeVector posIn, G4ThreeVector posOut, G4ThreeVector &hitPosition, G4ThreeVector &wirePosition)
 Assume line track to calculate distance between track and wire (drift length).
 
void setModifiedLeftRightFlag ()
 set left/right flag modified for tracking
 
void reAssignLeftRightInfo ()
 Re-assign left/right info.
 
unsigned short areNeighbors (const WireID &wireId, const WireID &otherWireId) const
 Check if neighboring cell in the same super-layer; essentially a copy from cdcLocalTracking/mclookup. More...
 
unsigned short areNeighbors (unsigned short iCLayer, unsigned short iSuperLayer, unsigned short iLayer, unsigned short iWire, const WireID &otherWireId) const
 Check if neighboring cell in the same super-layer; essentially a copy from cdcLocalTracking/mclookup. More...
 

Detailed Description

Function Documentation

◆ areNeighbors() [1/2]

unsigned short areNeighbors ( const WireID wireId,
const WireID otherWireId 
) const
private

Check if neighboring cell in the same super-layer; essentially a copy from cdcLocalTracking/mclookup.

Parameters
[in]wireIdwire-id. in question (reference)
[in]otherWireIdanother wire-id. in question

Definition at line 1609 of file CDCSensitiveDetector.cc.

1610  {
1611  //require within the same super-layer
1612  if (otherWireId.getISuperLayer() != wireId.getISuperLayer()) return 0;
1613 
1614  const signed short iWire = wireId.getIWire();
1615  const signed short iOtherWire = otherWireId.getIWire();
1616  const signed short iCLayer = wireId.getICLayer();
1617  const signed short iOtherCLayer = otherWireId.getICLayer();
1618 
1619  //require nearby wire
1620  if (iWire == iOtherWire) {
1621  } else if (iWire == (iOtherWire + 1) % static_cast<signed short>(m_cdcgp->nWiresInLayer(iOtherCLayer))) {
1622  } else if ((iWire + 1) % static_cast<signed short>(m_cdcgp->nWiresInLayer(iCLayer)) == iOtherWire) {
1623  } else {
1624  return 0;
1625  }
1626  // std::cout <<"iCLayer,iLayer,nShifts= " << iCLayer <<" "<< iLayer <<" "<< nShifts(iCLayer) << std::endl;
1627 
1628  signed short iLayerDifference = otherWireId.getILayer() - wireId.getILayer();
1629  if (abs(iLayerDifference) > 1) return 0;
1630 
1631  if (iLayerDifference == 0) {
1632  if (iWire == (iOtherWire + 1) % static_cast<signed short>(m_cdcgp->nWiresInLayer(iCLayer))) return CW_NEIGHBOR;
1633  else if ((iWire + 1) % static_cast<signed short>(m_cdcgp->nWiresInLayer(iCLayer)) == iOtherWire) return CCW_NEIGHBOR;
1634  else return 0;
1635  } else if (iLayerDifference == -1) {
1636  // const CCWInfo deltaShift = otherLayer.getShift() - layer.getShift();
1637  const signed short deltaShift = m_cdcgp->getShiftInSuperLayer(otherWireId.getISuperLayer(), otherWireId.getILayer()) -
1638  m_cdcgp->getShiftInSuperLayer(wireId.getISuperLayer(), wireId.getILayer());
1639  // std::cout <<"in deltaShift,iOtherWire,iWire= " << deltaShift <<" "<< iOtherWire <<" "<< iWire << std::endl;
1640  if (iWire == iOtherWire) {
1641  if (deltaShift == CW) return CW_IN_NEIGHBOR;
1642  else if (deltaShift == CCW) return CCW_IN_NEIGHBOR;
1643  else return 0;
1644  } else if (iWire == (iOtherWire + 1) % static_cast<signed short>(m_cdcgp->nWiresInLayer(iOtherCLayer))) {
1645  if (deltaShift == CCW) return CW_IN_NEIGHBOR;
1646  else return 0;
1647  } else if ((iWire + 1) % static_cast<signed short>(m_cdcgp->nWiresInLayer(iCLayer)) == iOtherWire) {
1648  if (deltaShift == CW) return CCW_IN_NEIGHBOR;
1649  else return 0;
1650  } else return 0;
1651  } else if (iLayerDifference == 1) {
1652  // const CCWInfo deltaShift = otherLayer.getShift() - layer.getShift();
1653  const signed short deltaShift = m_cdcgp->getShiftInSuperLayer(otherWireId.getISuperLayer(), otherWireId.getILayer()) -
1654  m_cdcgp->getShiftInSuperLayer(wireId.getISuperLayer(), wireId.getILayer());
1655  // std::cout <<"out deltaShift,iOtherWire,iWire= " << deltaShift <<" "<< iOtherWire <<" "<< iWire << std::endl;
1656  if (iWire == iOtherWire) {
1657  if (deltaShift == CW) return CW_OUT_NEIGHBOR;
1658  else if (deltaShift == CCW) return CCW_OUT_NEIGHBOR;
1659  else return 0;
1660  } else if (iWire == (iOtherWire + 1) % static_cast<signed short>(m_cdcgp->nWiresInLayer(iOtherCLayer))) {
1661  if (deltaShift == CCW) return CW_OUT_NEIGHBOR;
1662  else return 0;
1663  } else if ((iWire + 1) % static_cast<signed short>(m_cdcgp->nWiresInLayer(iCLayer)) == iOtherWire) {
1664  if (deltaShift == CW) return CCW_OUT_NEIGHBOR;
1665  else return 0;
1666  } else return 0;
1667  } else return 0;
1668 
1669  }
unsigned nWiresInLayer(int layerId) const
Returns wire numbers in a layer.
signed short getShiftInSuperLayer(unsigned short iSuperLayer, unsigned short iLayer) const
Returns shift in the super-layer.
const signed short CW_NEIGHBOR
Constant for clockwise.
const signed short CCW_NEIGHBOR
Constant for counterclockwise.
CDCGeometryPar * m_cdcgp
Pointer to CDCGeometryPar object.
const signed short CW_IN_NEIGHBOR
Constant for clockwise inwards.
const signed short CCW_OUT_NEIGHBOR
Constant for counterclockwise outwards.
const signed short CW_OUT_NEIGHBOR
Constant for clockwise outwards.
const signed short CCW
Constant for counterclockwise orientation.
const signed short CCW_IN_NEIGHBOR
Constant for counterclockwise inwards.
const signed short CW
Constant for clockwise orientation.

◆ areNeighbors() [2/2]

unsigned short areNeighbors ( unsigned short  iCLayer,
unsigned short  iSuperLayer,
unsigned short  iLayer,
unsigned short  iWire,
const WireID otherWireId 
) const
private

Check if neighboring cell in the same super-layer; essentially a copy from cdcLocalTracking/mclookup.

Parameters
[in]iCLayerlater-id (continuous) in question (reference)
[in]iSuperLayersuper-later-id in question (reference)
[in]iLayerlater-id in the super-layer in question (reference)
[in]iWirewire-id in the layer in question (reference)
[in]otherWireIdanother wire-id. in question

Definition at line 1671 of file CDCSensitiveDetector.cc.

◆ CellBound()

void CellBound ( const G4int  layerId,
const G4int  ic1,
const G4int  ic2,
const G4double  venter[6],
const G4double  vexit[6],
const G4double  s1,
const G4double  s2,
G4double  xint[6],
G4double &  sint,
G4int &  iflag 
)
private

Calculate intersection of track with cell boundary.

Parameters
[in]layerIdId of the layer.
[in]ic1serial cell number (start w/ one) of entrance.
[in]ic2serial cell number (start w/ one) of exit.
[in]venter(x,y,z,px/p,py/p,pz/p) at entrance.
[in]vexit(x,y,z,px/p,py/p,pz/p) at exit.
[in]s1track length at entrance.
[in]s2track length at exit.
[out]xint(x,y,z,px/p,py/p,pz/p) at intersection of cell boundary.
[out]sinttrack length at intersection of cell boundary.
[out]iflagreturn code from GIPLAN.

Definition at line 689 of file CDCSensitiveDetector.cc.

◆ EndOfEvent()

void EndOfEvent ( G4HCofThisEvent *  )
override

Do what you want to do at the beginning of each event (why this is not called ?)

Do what you want to do at the end of each event

Definition at line 580 of file CDCSensitiveDetector.cc.

◆ for_Rotat()

void for_Rotat ( const G4double  bfld[3])
private

Calculates a rotation matrix.

Calculates a rotation matrix. in advance at a local position in lab. frame. The rotation is done about the coord. origin; lab.-frame to B-field frame in which only Bz-comp. is non-zero.

Definition at line 971 of file CDCSensitiveDetector.cc.

◆ GCUBS()

void GCUBS ( const G4double  x,
const G4double  y,
const G4double  d1,
const G4double  d2,
G4double  a[4] 
)
private
                                                        *

Calculates a cubic through P1,(-X,Y1),(X,Y2),P2 * where Y2=-Y1 * Y=A(1)+A(2)*X+A(3)*X**2+A(4)*X**3 * The coordinate system is assumed to be the cms system * of P1,P2. *

  • ==>Called by : GIPLAN,GICYL * Author H.Boerner ********* *

Definition at line 936 of file CDCSensitiveDetector.cc.

◆ HELWIR()

void HELWIR ( const G4double  xwb4,
const G4double  ywb4,
const G4double  zwb4,
const G4double  xwf4,
const G4double  ywf4,
const G4double  zwf4,
const G4double  xp,
const G4double  yp,
const G4double  zp,
const G4double  px,
const G4double  py,
const G4double  pz,
const G4double  B_kG[3],
const G4double  charge,
const G4int  ntryMax,
G4double &  distance,
G4double  q2[3],
G4double  q1[3],
G4double  q3[3],
G4int &  ntry 
)
private

Calculate closest points between helix and wire.

Input xwb4 : x of wire at backward endplate in lab. ywb4 : y of wire at backward endplate " zwb4 : z of wire at backward endplate " xwf4 : x of wire at forward endplate " ywf4 : y of wire at forward endplate " zwf4 : z of wire at forward endplate " xp : x of helix in lab. yp : y of helix " zp : z of helix " px : px of helix in lab. py : py of helix " pz : pz of helix "

Output q2(1) : x of wire at closest point in lab. q2(2) : y of wire at closest point " q2(3) : z of wire at closest point " q1(1) : x of helix at closest point " q1(2) : y of helix at closest point " q1(3) : z of helix at closest point " q3 : momentum of helix at closest point in lab. ntry :

Definition at line 1062 of file CDCSensitiveDetector.cc.

◆ Mvopr()

void Mvopr ( const G4int  ndim,
const G4double  b[3],
const G4double  m[3][3],
const G4double  a[3],
G4double  c[3],
const G4int  mode 
)
private

Calculate the result of a matrix times vector.

Input ndim : dimension b(1-ndim) : vector m(1-ndim,1-ndim) : matrix a(1-ndim) : vector c(1-ndim) : vector mode : c = m * a for mode=0 c = b * m * a for mode=1 Output c(1-ndim) : for mode 1, solution is put on c[0]

Definition at line 1332 of file CDCSensitiveDetector.cc.

◆ Rotat()

void Rotat ( G4double &  x,
G4double &  y,
G4double &  z,
const int  mode 
)
private

Translation method.

Translates (x,y,z) in lab. to (x,y,z) in B-field frame (mode=1), or reverse translation (mode=-1).

Definition at line 1007 of file CDCSensitiveDetector.cc.