Belle II Software  release-06-01-15
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...
 
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  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 1605 of file CDCSensitiveDetector.cc.

1606  {
1607  //require within the same super-layer
1608  if (otherWireId.getISuperLayer() != wireId.getISuperLayer()) return 0;
1609 
1610  const signed short iWire = wireId.getIWire();
1611  const signed short iOtherWire = otherWireId.getIWire();
1612  const signed short iCLayer = wireId.getICLayer();
1613  const signed short iOtherCLayer = otherWireId.getICLayer();
1614 
1615  //require nearby wire
1616  if (iWire == iOtherWire) {
1617  } else if (iWire == (iOtherWire + 1) % static_cast<signed short>(m_cdcgp->nWiresInLayer(iOtherCLayer))) {
1618  } else if ((iWire + 1) % static_cast<signed short>(m_cdcgp->nWiresInLayer(iCLayer)) == iOtherWire) {
1619  } else {
1620  return 0;
1621  }
1622  // std::cout <<"iCLayer,iLayer,nShifts= " << iCLayer <<" "<< iLayer <<" "<< nShifts(iCLayer) << std::endl;
1623 
1624  signed short iLayerDifference = otherWireId.getILayer() - wireId.getILayer();
1625  if (abs(iLayerDifference) > 1) return 0;
1626 
1627  if (iLayerDifference == 0) {
1628  if (iWire == (iOtherWire + 1) % static_cast<signed short>(m_cdcgp->nWiresInLayer(iCLayer))) return CW_NEIGHBOR;
1629  else if ((iWire + 1) % static_cast<signed short>(m_cdcgp->nWiresInLayer(iCLayer)) == iOtherWire) return CCW_NEIGHBOR;
1630  else return 0;
1631  } else if (iLayerDifference == -1) {
1632  // const CCWInfo deltaShift = otherLayer.getShift() - layer.getShift();
1633  const signed short deltaShift = m_cdcgp->getShiftInSuperLayer(otherWireId.getISuperLayer(), otherWireId.getILayer()) -
1634  m_cdcgp->getShiftInSuperLayer(wireId.getISuperLayer(), wireId.getILayer());
1635  // std::cout <<"in deltaShift,iOtherWire,iWire= " << deltaShift <<" "<< iOtherWire <<" "<< iWire << std::endl;
1636  if (iWire == iOtherWire) {
1637  if (deltaShift == CW) return CW_IN_NEIGHBOR;
1638  else if (deltaShift == CCW) return CCW_IN_NEIGHBOR;
1639  else return 0;
1640  } else if (iWire == (iOtherWire + 1) % static_cast<signed short>(m_cdcgp->nWiresInLayer(iOtherCLayer))) {
1641  if (deltaShift == CCW) return CW_IN_NEIGHBOR;
1642  else return 0;
1643  } else if ((iWire + 1) % static_cast<signed short>(m_cdcgp->nWiresInLayer(iCLayer)) == iOtherWire) {
1644  if (deltaShift == CW) return CCW_IN_NEIGHBOR;
1645  else return 0;
1646  } else return 0;
1647  } else if (iLayerDifference == 1) {
1648  // const CCWInfo deltaShift = otherLayer.getShift() - layer.getShift();
1649  const signed short deltaShift = m_cdcgp->getShiftInSuperLayer(otherWireId.getISuperLayer(), otherWireId.getILayer()) -
1650  m_cdcgp->getShiftInSuperLayer(wireId.getISuperLayer(), wireId.getILayer());
1651  // std::cout <<"out deltaShift,iOtherWire,iWire= " << deltaShift <<" "<< iOtherWire <<" "<< iWire << std::endl;
1652  if (iWire == iOtherWire) {
1653  if (deltaShift == CW) return CW_OUT_NEIGHBOR;
1654  else if (deltaShift == CCW) return CCW_OUT_NEIGHBOR;
1655  else return 0;
1656  } else if (iWire == (iOtherWire + 1) % static_cast<signed short>(m_cdcgp->nWiresInLayer(iOtherCLayer))) {
1657  if (deltaShift == CCW) return CW_OUT_NEIGHBOR;
1658  else return 0;
1659  } else if ((iWire + 1) % static_cast<signed short>(m_cdcgp->nWiresInLayer(iCLayer)) == iOtherWire) {
1660  if (deltaShift == CW) return CCW_OUT_NEIGHBOR;
1661  else return 0;
1662  } else return 0;
1663  } else return 0;
1664 
1665  }
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 1667 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.

(Relations)

(Arguments) input ic1 integer * 4 #cell(sirial) of entrance. ic2 integer * 4 #cell(sirial) of exit. venter(6) real * 4 (x,y,z,px/p,py/p,pz/p) at entrance. vexit(6) real * 4 (x,y,z,px/p,py/p,pz/p) at exit. s1 real * 4 track length at entrance. s2 real * 4 track length at exit. output xint(6) real * 4 (x,y,z,px/p,py/p,pz/p) at intersection of cell boundary. sint real * 4 track length at intersection of cell boundary. iflag integer * 4 return code from GIPLAN.

Definition at line 685 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 576 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 967 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 932 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 1058 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 1328 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 1003 of file CDCSensitiveDetector.cc.