Belle II Software  release-06-01-15
Belle2::CDC Namespace Reference

Classes

class  CrudeT0CalibrationAlgorithm
 Algorithm class for crude T0 calibration. More...
 
class  SpaceResolutionCalibration
 Class for Space resolution calibration. More...
 
class  SpaceResolutionCalibrationAlgorithm
 Class for Space resolution calibration. More...
 
class  T0CalibrationAlgorithm
 Class for T0 Correction . More...
 
class  T0Correction
 Class for T0 Correction . More...
 
class  TimeWalkCalibration
 Class for Time walk calibration. More...
 
class  TimeWalkCalibrationAlgorithm
 Class for Time walk calibration. More...
 
class  WireEfficiencyAlgorithm
 Class for Wire Efficiency estimation. More...
 
class  XTCalibration
 Class to perform xt calibration for drift chamber. More...
 
class  XTCalibrationAlgorithm
 Class to perform xt calibration for drift chamber. More...
 
class  XTFunction
 Class to perform fitting for each xt function. More...
 
class  ADCCountTranslatorBase
 Abstract Base class for the ADC count translator. More...
 
class  CDCGeometryTranslatorBase
 Abstract Base class for the geometry translator. More...
 
class  TDCCountTranslatorBase
 Base class for translation of Drift Time into Drift Length. More...
 
class  CDCGeoControlPar
 The Class for CDC Geometry Control Parameters. More...
 
class  CDCGeometryPar
 The Class for CDC Geometry Parameters. More...
 
class  GeoCDCCreator
 The GeoCDCCreator class. More...
 
class  CDCCalibrationCollectorModule
 Collect hit information for cdc calibration with CAF. More...
 
class  CDCT0CalibrationCollectorModule
 Collect hit information for cdc calibration with CAF. More...
 
class  CDCCosmicAnalysisModule
 Analysis module for CDC CR data. More...
 
class  CDCCRTestModule
 CDC Cosmic test calibration module. More...
 
class  CDCCrudeT0CollectorModule
 Collector for crude t0. More...
 
class  EDepInGas
 The Class for Energy deposit in the gas. More...
 
class  CDCHitFilterModule
 CDCHitFilter: Filters CDC hits according to given configuration criteria. More...
 
class  CDCChannelData
 CDCChannelData. More...
 
class  CDCPackerModule
 CDCPackerModule: The CDC Raw Hits Decoder. More...
 
class  CDCRecoTrackFilterModule
 The module excluding hits of specified Slayers in the RecoTracks. More...
 
class  CDCUnpackerModule
 CDCUnpackerModule: The CDC Raw Hits Decoder. More...
 
class  CDCSensitiveDetector
 The Class for CDC Sensitive Detector. More...
 
class  CDCSimControlPar
 The Class for CDC Simulation Control Parameters. More...
 
class  Helix
 Helix parameter class. More...
 
class  IdealCDCGeometryTranslator
 This class uses the ideal detector geometry for the translation of wire IDs into geometric positions. More...
 
class  LinearGlobalADCCountTranslator
 This class simply assumes a linear translation through (0,0) More...
 
class  RealisticCDCGeometryTranslator
 This class uses the realistic detector geometry (the one after alignment procedure) for the translation of wire IDs into geometric positions. More...
 
class  RealisticTDCCountTranslator
 Translator mirroring the realistic Digitization. More...
 
class  SimpleTDCCountTranslator
 Translator mirroring the simple Digitization. More...
 

Enumerations

enum  {
  c_Left = 0 ,
  c_Right = 1
}
 Argument LR.
 
enum  {
  c_Polynomial = 0 ,
  c_Chebyshev = 1
}
 Argument of fitting function.
 
enum  FitStatus {
  c_lowStat = -1 ,
  c_fitFailure = 0 ,
  c_OK = 1 ,
  c_errorOuter = 2 ,
  c_errorInner = 3
}
 Fit Status. More...
 

Functions

Double_t pol5pol1 (Double_t *x, Double_t *par)
 helper function to initialize xt function with 5th order polynomial + linear.
 
Double_t cheby5pol1 (Double_t *x, Double_t *par)
 helper function to initialize xt function with 5th order Chebshev Polynomial + linear.
 
double ClosestApproach (const TVector3 &bwp, const TVector3 &fwp, const TVector3 &posIn, const TVector3 &posOut, TVector3 &hitPosition, TVector3 &wirePosition)
 Returns a closest distance between a track and a wire. More...
 
void openFileA (std::ifstream &ifs, const std::string &fileName0)
 Open a file. More...
 
void openFileB (boost::iostreams::filtering_istream &ifs, const std::string &fileName0)
 Open a file using boost (to be able to read a gzipped file) More...
 

Variables

geometry::CreatorFactory< GeoCDCCreatorGeoCDCFactory ("CDCCreator")
 Register the GeoCreator.
 

Detailed Description

Enumeration Type Documentation

◆ FitStatus

enum FitStatus

Fit Status.

=-1: low statitic =1: good =0: Fit failure =2: Error Outer =3: Error Inner part;

Definition at line 44 of file XTCalibrationAlgorithm.h.

44  {c_lowStat = -1, c_fitFailure = 0, c_OK = 1,
45  c_errorOuter = 2, c_errorInner = 3
46  };

Function Documentation

◆ ClosestApproach()

double ClosestApproach ( const TVector3 &  bwp,
const TVector3 &  fwp,
const TVector3 &  posIn,
const TVector3 &  posOut,
TVector3 &  hitPosition,
TVector3 &  wirePosition 
)

Returns a closest distance between a track and a wire.

Parameters
bwp[in]wire position at backward
fwp[in]wire position at forward
posIn[in]entrance position
posOut[in]exit position
hitPosition[out]track position corresp. to the closetst distance
wirePosition[out]wire position corresp. to the closetst distance

Definition at line 17 of file ClosestApproach.cc.

19  {
20  //----------------------------------------------------------
21  /* For two lines r=r1+t1.v1 & r=r2+t2.v2
22  the closest approach is d=|(r2-r1).(v1 x v2)|/|v1 x v2|
23  the point where closest approach are
24  t1=(v1 x v2).[(r2-r1) x v2]/[(v1 x v2).(v1 x v2)]
25  t2=(v1 x v2).[(r2-r1) x v1]/[(v1 x v2).(v1 x v2)]
26  if v1 x v2=0 means two lines are parallel
27  d=|(r2-r1) x v1|/|v1|
28  */
29 
30  double t2, distance;
31 
32  //--------------------------
33  // Get wirepoint @ endplate
34  //--------------------------
35  /* CDCGeometryPar& cdcgp = CDCGeometryPar::Instance();
36  TVector3 tfwp = cdcgp.wireForwardPosition(layerId, cellId);
37  G4ThreeVector fwp(tfwp.x(), tfwp.y(), tfwp.z());
38  TVector3 tbwp = cdcgp.wireBackwardPosition(layerId, cellId);
39  G4ThreeVector bwp(tbwp.x(), tbwp.y(), tbwp.z());
40  */
41 
42  TVector3 wireLine = fwp - bwp;
43  TVector3 hitLine = posOut - posIn;
44 
45  TVector3 hitXwire = hitLine.Cross(wireLine);
46  TVector3 wire2hit = fwp - posOut;
47 
48  //----------------------------------------------------------------
49  // Hitposition is the position on hit line where closest approach
50  // of two lines, but it may out the area from posIn to posOut
51  //----------------------------------------------------------------
52  if (hitXwire.Mag() == 0) {
53  distance = wireLine.Cross(wire2hit).Mag() / wireLine.Mag();
54  hitPosition = posIn;
55  t2 = (posIn - fwp).Dot(wireLine) / wireLine.Mag2();
56  } else {
57  double t1 = hitXwire.Dot(wire2hit.Cross(wireLine)) / hitXwire.Mag2();
58  hitPosition = posOut + t1 * hitLine;
59  t2 = hitXwire.Dot(wire2hit.Cross(hitLine)) / hitXwire.Mag2();
60 
61  //should not constrain hitPosition inside the cell
62  // double dInOut = (posOut - posIn).Mag();
63  // double dHitIn = (hitPosition - posIn).Mag();
64  // double dHitOut = (hitPosition - posOut).Mag();
65  // if (dHitIn <= dInOut && dHitOut <= dInOut) { //Between point in & out
66  distance = fabs(wire2hit.Dot(hitXwire) / hitXwire.Mag());
67  /*
68  } else if (dHitOut > dHitIn) { // out posIn
69  distance = wireLine.Cross(posIn - fwp).Mag() / wireLine.Mag();
70  hitPosition = posIn;
71  t2 = (posIn - fwp).Dot(wireLine) / wireLine.Mag2();
72  } else { // out posOut
73  distance = wireLine.Cross(posOut - fwp).Mag() / wireLine.Mag();
74  hitPosition = posOut;
75  t2 = (posOut - fwp).Dot(wireLine) / wireLine.Mag2();
76  }
77  */
78  }
79 
80  wirePosition = fwp + t2 * wireLine;
81  return distance;
82  }

◆ openFileA()

void openFileA ( std::ifstream &  ifs,
const std::string &  fileName0 
)

Open a file.

Parameters
[in]ifsinput file-stream
[in]fileName0file-name on cdc/data directory

Definition at line 26 of file OpenFile.cc.

27  {
28  std::string fileName1 = "/data/cdc/" + fileName0;
29  std::string fileName = FileSystem::findFile(fileName1, true);
30 
31  if (fileName == "") {
32  fileName = FileSystem::findFile(fileName0, true);
33  }
34 
35  if (fileName == "") {
36  B2FATAL("CDC::openFile: " << fileName0 << " not exist!");
37  } else {
38  B2INFO("CDC::openFile: open " << fileName);
39  ifs.open(fileName.c_str());
40  if (!ifs) B2FATAL("CDC::openFile: cannot open " << fileName << " !");
41  }
42  }

◆ openFileB()

void openFileB ( boost::iostreams::filtering_istream &  ifs,
const std::string &  fileName0 
)

Open a file using boost (to be able to read a gzipped file)

Parameters
[in]ifsinput file-stream
[in]fileName0file-name on cdc/data directory

Definition at line 45 of file OpenFile.cc.