Belle II Software development
Belle2::CDC Namespace Reference

Classes

class  ADCCountTranslatorBase
 Abstract Base class for the ADC count translator. More...
 
class  CDCCalibrationCollectorModule
 Collect hit information for cdc calibration with CAF. More...
 
class  CDCChannelData
 CDCChannelData. 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  CDCFudgeFactorCalibrationCollectorModule
 Collect hit information for cdc calibration with CAF. More...
 
class  CDCGeoControlPar
 The Class for CDC Geometry Control Parameters. More...
 
class  CDCGeometryPar
 The Class for CDC Geometry Parameters. More...
 
class  CDCGeometryTranslatorBase
 Abstract Base class for the geometry translator. More...
 
class  CDCHitFilterModule
 CDCHitFilter: Filters CDC hits according to given configuration criteria. More...
 
class  CDCPackerModule
 CDCPackerModule: The CDC Raw Hits Decoder. More...
 
class  CDCRecoTrackFilterModule
 The module excluding hits of specified Slayers in the RecoTracks. More...
 
class  CDCSensitiveDetector
 The Class for CDC Sensitive Detector. More...
 
class  CDCSimControlPar
 The Class for CDC Simulation Control Parameters. More...
 
class  CDCT0CalibrationCollectorModule
 Collect hit information for cdc calibration with CAF. More...
 
class  CDCUnpackerModule
 CDCUnpackerModule: The CDC Raw Hits Decoder. More...
 
class  CrudeT0CalibrationAlgorithm
 Algorithm class for crude T0 calibration. More...
 
class  EDepInGas
 The Class for Energy deposit in the gas. More...
 
class  FudgeFactorCalibrationAlgorithm
 Class for CDC fudge factor calibration . More...
 
class  GeoCDCCreator
 The GeoCDCCreator class. More...
 
class  GeoCDCCreatorReducedCDC
 The GeoCDCCreatorReducedCDC class. 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  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  TDCCountTranslatorBase
 Base class for translation of Drift Time into Drift Length. 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...
 

Enumerations

enum  {
  c_Left = 0 ,
  c_Right = 1
}
 Argument LR. More...
 
enum  {
  c_Polynomial = 0 ,
  c_Chebyshev = 1
}
 Argument of fitting function. More...
 
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 B2Vector3D &bwp, const B2Vector3D &fwp, const B2Vector3D &posIn, const B2Vector3D &posOut, B2Vector3D &hitPosition, B2Vector3D &wirePosition)
 Returns a closest distance between a track and a wire.
 
void openFileA (std::ifstream &ifs, const std::string &fileName0)
 Open a file.
 
void openFileB (boost::iostreams::filtering_istream &ifs, const std::string &fileName0)
 Open a file using boost (to be able to read a gzipped file)
 

Variables

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

Detailed Description

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Argument LR.

Definition at line 28 of file XTCalibrationAlgorithm.h.

28{c_Left = 0, c_Right = 1};

◆ anonymous enum

anonymous enum

Argument of fitting function.

Definition at line 33 of file XTCalibrationAlgorithm.h.

33{c_Polynomial = 0, c_Chebyshev = 1};

◆ 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

◆ cheby5pol1()

Double_t cheby5pol1 ( Double_t *  x,
Double_t *  par 
)

helper function to initialize xt function with 5th order Chebshev Polynomial + linear.

Definition at line 48 of file XTFunction.h.

49 {
50 Double_t xx = x[0];
51 Double_t x6, x2;
52 Double_t f, ctp;
53
54 if (xx < par[6]) {
55 f = ROOT::Math::Chebyshev5(xx, par[0], par[1], par[2], par[3], par[4], par[5]);
56 } else {
57 x6 = par[6];
58 x2 = xx - x6;
59 ctp = ROOT::Math::Chebyshev5(x6, par[0], par[1], par[2], par[3], par[4], par[5]);
60 f = par[7] * x2 + ctp;
61 }
62 return f;
63 }

◆ ClosestApproach()

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

Returns a closest distance between a track and a wire.

Parameters
[in]bwpwire position at backward
[in]fwpwire position at forward
[in]posInentrance position
[in]posOutexit position
[out]hitPositiontrack position corresp. to the closetst distance
[out]wirePositionwire 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 B2Vector3D tfwp = cdcgp.wireForwardPosition(layerId, cellId);
37 G4ThreeVector fwp(tfwp.X(), tfwp.Y(), tfwp.Z());
38 B2Vector3D tbwp = cdcgp.wireBackwardPosition(layerId, cellId);
39 G4ThreeVector bwp(tbwp.X(), tbwp.Y(), tbwp.Z());
40 */
41
42 B2Vector3D wireLine = fwp - bwp;
43 B2Vector3D hitLine = posOut - posIn;
44
45 B2Vector3D hitXwire = hitLine.Cross(wireLine);
46 B2Vector3D 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 }
B2Vector3< DataType > Cross(const B2Vector3< DataType > &p) const
Cross product.
Definition: B2Vector3.h:296
DataType Mag() const
The magnitude (rho in spherical coordinate system).
Definition: B2Vector3.h:159
DataType Mag2() const
The magnitude squared (rho^2 in spherical coordinate system).
Definition: B2Vector3.h:157
DataType Dot(const B2Vector3< DataType > &p) const
Scalar product.
Definition: B2Vector3.h:290

◆ 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.

46 {
47 std::string fileName1 = "/data/cdc/" + fileName0;
48 std::string fileName = FileSystem::findFile(fileName1, true);
49
50 if (fileName == "") {
51 fileName = FileSystem::findFile(fileName0, true);
52 }
53
54 if (fileName == "") {
55 B2FATAL("CDC::openFile: " << fileName0 << " not exist!");
56 } else {
57 B2INFO("CDC::openFile: open " << fileName);
58 if ((fileName.rfind(".gz") != string::npos) && (fileName.length() - fileName.rfind(".gz") == 3)) {
59 ifs.push(boost::iostreams::gzip_decompressor());
60 }
61 ifs.push(boost::iostreams::file_source(fileName));
62 if (!ifs) B2FATAL("CDC::openFile: cannot open " << fileName << " !");
63 }
64 }

◆ pol5pol1()

Double_t pol5pol1 ( Double_t *  x,
Double_t *  par 
)

helper function to initialize xt function with 5th order polynomial + linear.

Definition at line 27 of file XTFunction.h.

28 {
29 Double_t xx = x[0];
30 Double_t x6, x2;
31 Double_t f, ctp;
32 if (xx < par[6]) {
33 f = par[0] + par[1] * xx + par[2] * xx * xx + par[3] * xx * xx * xx + par[4] * xx * xx * xx * xx + par[5] * xx * xx * xx * xx * xx;
34 } else {
35 x6 = par[6];
36 x2 = xx - x6;
37 ctp = par[0] + par[1] * x6 + par[2] * x6 * x6 + par[3] * x6 * x6 * x6 + par[4] * x6 * x6 * x6 * x6 + par[5] * x6 * x6 * x6 * x6 *
38 x6;
39 f = par[7] * x2 + ctp;
40 }
41 return f;
42 }