Belle II Software development
Belle2::CDC Namespace Reference

Namespaces

namespace  NWireNeighborKind
 Namespace hiding the constants of the enum.
 

Classes

class  ADCCountTranslatorBase
 Abstract Base class for the ADC count translator. More...
 
class  CDCBadWireCollectorModule
 Collect hit information for cdc calibration with CAF. 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  CDCGeometryLoader
 Load the CDC geometry from the conditions database. 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  CDCWire
 Class representing a sense wire in the central drift chamber. More...
 
class  CDCWireLayer
 Class representing a sense wire layer in the central drift chamber. More...
 
class  CDCWireSuperLayer
 Class representing a sense wire superlayer in the central drift chamber. More...
 
class  CDCWireTopology
 Class representing the sense wire arrangement in the whole of the central drift chamber. 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  GeoCDCCreatorReducedCDCNoSL0SL1
 The GeoCDCCreatorReducedCDCNoSL0SL1 class. More...
 
struct  GetEStereoKind
 Generic functor to get the stereo kind from an object. More...
 
struct  GetILayer
 Generic functor to get the superlayer id from an object. More...
 
struct  GetISuperLayer
 Generic functor to get the superlayer id from an object. 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...
 
struct  ISuperLayerUtil
 This is a utility class for the free ISuperLayer type. More...
 
struct  IWireUtil
 This is a utility class for the free IWire type. 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  WireLine
 A three dimensional limited line represented by its closest approach to the z-axes (reference position ) and its skew parameter. More...
 
class  WireNeighborKind
 Type for the neighbor relationship from one wire to another. More...
 
class  WireNeighborPair
 Class representing a pair of neighbors in the CDC in a single layer For certain circumstances it is allowed that both wires point to nullptr, e.g. 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...
 

Typedefs

using EWireNeighborKind = NWireNeighborKind::EWireNeighborKind
 Importing only the enum but not the constants.
 
using EWirePosition = CDCGeometryPar::EWirePosition
 For ease-of-use just create a new alias for CDCGeometryPar::EWirePosition.
 
using ILayer = signed short
 The type of the layer ids enumerating layers within a superlayer.
 
using ISuperLayer = signed short
 The type of the layer and superlayer ids.
 
using IWire = signed short
 The type of the wire ids enumerating wires within a given layer.
 

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...
 
enum class  EStereoKind {
  c_Axial = 0 ,
  c_StereoV = -1 ,
  c_StereoU = 1 ,
  c_Invalid = -999
}
 Type for the stereo property of the wire. 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< GeoCDCCreatorReducedCDCNoSL0SL1GeoCDCFactoryReducedCDCNoSL0SL1 ("CDCCreatorReducedCDCNoSL0SL1")
 Register the GeoCreator.
 

Detailed Description

Typedef Documentation

◆ EWireNeighborKind

Importing only the enum but not the constants.

Definition at line 47 of file EWireNeighborKind.h.

◆ EWirePosition

For ease-of-use just create a new alias for CDCGeometryPar::EWirePosition.

Definition at line 19 of file EWirePosition.h.

◆ ILayer

using ILayer = signed short

The type of the layer ids enumerating layers within a superlayer.

Definition at line 18 of file ILayer.h.

◆ ISuperLayer

using ISuperLayer = signed short

The type of the layer and superlayer ids.

Definition at line 24 of file ISuperLayer.h.

◆ IWire

using IWire = signed short

The type of the wire ids enumerating wires within a given layer.

Definition at line 20 of file IWire.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Argument of fitting function.

Definition at line 34 of file XTCalibrationAlgorithm.h.

34{c_Polynomial = 0, c_Chebyshev = 1};

◆ anonymous enum

anonymous enum

Argument LR.

Definition at line 29 of file XTCalibrationAlgorithm.h.

29{c_Left = 0, c_Right = 1};

◆ EStereoKind

enum class EStereoKind
strong

Type for the stereo property of the wire.

Enumerator
c_Axial 

Constant for an axial wire.

c_StereoV 

Constant for an stereo wire in the V configuration.

c_StereoU 

Constant for an stereo wire in the U configuration.

c_Invalid 

Constant for an invalid stereo information.

Definition at line 20 of file EStereoKind.h.

20 {
22 c_Axial = 0,
23
25 c_StereoV = -1,
26
28 c_StereoU = 1,
29
31 c_Invalid = -999,
32 };
@ c_StereoU
Constant for an stereo wire in the U configuration.
Definition EStereoKind.h:28
@ c_Axial
Constant for an axial wire.
Definition EStereoKind.h:22
@ c_StereoV
Constant for an stereo wire in the V configuration.
Definition EStereoKind.h:25
@ c_Invalid
Constant for an invalid information.

◆ FitStatus

enum FitStatus

Fit Status.

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

Definition at line 45 of file XTCalibrationAlgorithm.h.

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

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
B2Vector3< double > B2Vector3D
typedef for common usage with double
Definition B2Vector3.h:516

◆ 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 25 of file OpenFile.cc.

26 {
27 std::string fileName1 = "/data/cdc/" + fileName0;
28 std::string fileName = FileSystem::findFile(fileName1, true);
29
30 if (fileName == "") {
31 fileName = FileSystem::findFile(fileName0, true);
32 }
33
34 if (fileName == "") {
35 B2FATAL("CDC::openFile: " << fileName0 << " not exist!");
36 } else {
37 B2INFO("CDC::openFile: open " << fileName);
38 ifs.open(fileName.c_str());
39 if (!ifs) B2FATAL("CDC::openFile: cannot open " << fileName << " !");
40 }
41 }
static std::string findFile(const std::string &path, bool silent=false)
Search for given file or directory in local or central release directory, and return absolute path if...

◆ 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 44 of file OpenFile.cc.

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

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