Belle II Software development

Modules

 arich data objects
 
 arich modules
 

Classes

class  ARICHCalibrationChecker
 ARICH calibration checker. More...
 
class  ARICHChannelMaskMaker
 ARICH channel mask calibration algorithm. More...
 
class  ARICHDatabaseImporter
 ARICH database importer. More...
 
class  ARICHAerogelInfo
 The Class for ARICH Aerogel Parameters. More...
 
class  ARICHAerogelMap
 Map of the Aerogel placement. More...
 
class  ARICHAerogelRayleighScatteringFit
 The Class for ARICH aerogel Rayleigh scattering fit parameters. More...
 
class  ARICHAeroTilesAlignment
 Alignment parameters for aerogel tiles. More...
 
class  ARICHAeroTilesInfo
 The Class for ARICH aerogel tiles properties for even reconstruction. More...
 
class  ARICHAsicChannelMask
 ARICH Channel Mask. More...
 
class  ARICHAsicInfo
 Tested ASIC chips. More...
 
class  ARICHB2LinkInfo
 List of Belle2Link boards. More...
 
class  ARICHBadChannels
 ARICH bad channels. More...
 
class  ARICHBiasCablesMapping
 The Class for ARICH mapping of bias cables to modules. More...
 
class  ARICHBiasChannelsMapping
 This class provides ARICH mapping of HAPD modules to bias power supply channels. More...
 
class  ARICHBiasCrateCableMapping
 This class provides ARICH bias voltages at gain 40. More...
 
class  ARICHBiasVoltages
 The Class for ARICH bias voltages at gain 40. More...
 
class  ARICHCableInfo
 List of cables. More...
 
class  ARICHChannelMapping
 The Class for ARICH HAPD channel mapping. More...
 
class  ARICHChannelMask
 The Class for ARICH HAPD channel mask. More...
 
class  ARICHComponentTest
 Test of the ARICH component. More...
 
class  ARICHCopperMapping
 The Class for ARICH mapping of merger to copper boards. More...
 
class  ARICHFEBoardInfo
 Front End Electronics Boards. More...
 
class  ARICHFebTest
 ARICH FEB test data. More...
 
class  ARICHFirmware
 ARICH firmware. More...
 
class  ARICHGeoAerogelPlane
 Geometry parameters of HAPD. More...
 
class  ARICHGeoBase
 Base class for geometry parameters. More...
 
class  ARICHGeoCablesEnvelope
 Geometry parameters of cable envelope. More...
 
class  ARICHGeoCooling
 Geometry parameters of cooling system. More...
 
class  ARICHGeoDetectorPlane
 Geometry parameters of ARICH photon detector plane. More...
 
class  ARICHGeoFEBCooling
 Geometry parameters of Cooling System - version2 (v2). More...
 
class  ARICHGeoGlobalDisplacement
 Global displacement parameters for ARICH. More...
 
class  ARICHGeoHAPD
 Geometry parameters of HAPD. More...
 
class  ARICHGeoMasterVolume
 Geometry parameters of ARICH Master volume (envelope) More...
 
class  ARICHGeoMerger
 Geometry parameters of Merger PCB. More...
 
class  ARICHGeoMergerCooling
 Geometry parameters of Merger Cooling System - version2 (v2). More...
 
class  ARICHGeometryConfig
 The Class for ARICH Geometry Parameters. More...
 
class  ARICHGeoMirrorDisplacement
 Mirror displacement parameters for ARICH. More...
 
class  ARICHGeoMirrors
 Geometry parameters of HAPD. More...
 
class  ARICHGeoSupport
 Geometry parameters of ARICH support structures and neutron shield. More...
 
class  ARICHGlobalAlignment
 Geometry parameters of ARICH Master volume (envelope). More...
 
class  ARICHHapdChipInfo
 Contains manufacturer data of one of the 4 photo sensors chips. More...
 
class  ARICHHapdInfo
 Contains manufacturer data of the photo sensor - HAPD. More...
 
class  ARICHHapdMask
 ARICH HAPD Sensor Mask: map of operational/nonoperational HAPDs : one bit per sensor. More...
 
class  ARICHHapdQA
 Contains manufacturer data of the photo sensor - HAPD. More...
 
class  ARICHHapdQE
 Contains manufacturer data of the photo sensor - HAPD. More...
 
class  ARICHHighVoltageConfig
 Configuration parameters of the High Voltage Channel. More...
 
class  ARICHHvCablesMapping
 The Class for ARICH mapping of bias cables to modules. More...
 
class  ARICHHvChannelsMapping
 The Class for ARICH mapping of bias power supply channels to modules. More...
 
class  ARICHHvCrateCableMapping
 The Class for ARICH bias voltages at gain 40. More...
 
class  ARICHMagnetTest
 Contains fractions of dead times measured in a magnet. More...
 
class  ARICHMergerInfo
 List of MergerBoards. More...
 
class  ARICHMergerMap
 Mapping of the merger board to the detector. More...
 
class  ARICHMergerMapping
 The Class for ARICH mapping of modules to merger boards. More...
 
class  ARICHMirrorAlignment
 Mirror alignment parameters for ARICH. More...
 
class  ARICHMirrorInfo
 List of MergerBoards. More...
 
class  ARICHMirrorMap
 Mapping of the mirrors on the detector. More...
 
class  ARICHModulesInfo
 The Class for information on HAPD modules installed in ARICH. More...
 
class  ARICHModuleTest
 ARICH module test data. More...
 
class  ARICHPositionElement
 Position element for ARICH. More...
 
class  ARICHReconstructionPar
 The Class for ARICH reconstruction parameters. More...
 
class  ARICHSensorModuleInfo
 Sensor-module information. More...
 
class  ARICHSensorModuleMap
 Mapping of the sensor-board connections to the detector. More...
 
class  ARICHSimulationPar
 The Class for ARICH simulation parameters. More...
 
struct  tessellatedSolidStr
 Structure which holds apexes of the tessellation volumes. More...
 
class  ARICHTracking
 Beamtest ARICH Geometry Tracking Class. More...
 
class  ARICHBtestGeometryPar
 The Class for ARICH Beamtest Geometry Parameters. More...
 
class  ARICHGeometryPar
 The Class for ARICH Geometry Parameters. More...
 
class  ARICHAerogelHist
 Base class for geometry parameters. More...
 
class  ARICHChannelHist
 ARICH histogram with HAPD plane 3 options for bin segmentation are available type 0 - one bin per HAPD, type 1 - one bin per channel, type 2 - one bin per APD chip HAPD numbering is 1-420 (software numbering), channel is ASIC channel, APD is ASIC channel / 36. More...
 

Functions

double getDetectorZPosition () const
 get z position of detector plane (starting z of HAPDs)
 
int doBeamBackgroundStudy () const
 returns 1 if beam background study (to add additional sensitive modules, detect neutrons, ...), 0 else
 
double getColEffi () const
 get HAPD collection efficiency.
 
double getSensitiveSurfaceSize () const
 get size of detector sensitive surface (size of two chips + gap between)
 
int getNMCopies () const
 get the total number of HAPD modules
 
ROOT::Math::XYVector getChipLocPos (int chipID)
 get center position of chipID-th chip of detector module (in detector module local coordinates)
 
bool isInit ()
 returns true if parametrisation is initialized, false otherwise
 
bool isSimple ()
 returns true if parametrisation is initialized with simple geometry (beamtest)
 
double getAerogelTransmissionLength (int ilayer)
 get transmission length of "ilayer" aerogel layer
 
double getAerogelRefIndex (int ilayer)
 get refractive index of "ilayer" aerogel layer
 
double getAerogelThickness (int ilayer)
 get thickness of "ilayer" aerogel layer
 
double getAerogelZPosition (int ilayer)
 get z position of "ilayer" aerogel layer
 
int getNMirrors ()
 get number of mirror plates
 
double getDetectorWindowThickness ()
 get thickness of detector module window
 
double getDetectorWindowRefIndex ()
 get refractive index of detector module window
 
int getNumberOfAerogelRadiators ()
 get number of aerogel layers
 
double getDetectorPadSize ()
 get detectors module pad size
 
int getDetectorXPadNumber ()
 get number of pads of detector module (in one direction)
 
double getMirrorsStartAngle ()
 get the phi angle of first corner of mirror polygon
 
double getMirrorsZPosition ()
 get the z position of mirror plates (starting z)
 
double getDetectorZPosition ()
 get z position of detector plane (starting z)
 
double getQEScaling ()
 get QE scaling factor for photons internally reflected in HAPD window
 
double getWindowAbsorbtion ()
 get absorption probability for photons internally reflected in HAPD window
 
double getChipNegativeCrosstalk ()
 get factor to suppress p.e. detection efficiency due to negative polarity crosstalk among chip channels
 
int getNrTiles ()
 get number of aerogel tiles in radial direction (number of rings)
 
int getNphiTiles (int nRing)
 get number of aerogel tiles in each radial ring
 
double getTileGap ()
 get size of the gap between aerogel tiles
 
double getAeroTubeRin ()
 get the inner size of aerogel tube
 
double getAeroTubeRout ()
 get the outer size of aerogel tube
 
static ARICHBtestGeometryParInstance ()
 Static method to get a reference to the ARICHBtestGeometryPar instance.
 
 ARICHBtestGeometryPar ()
 Constructor.
 
 ARICHBtestGeometryPar (const ARICHBtestGeometryPar &arichPar)
 copy constructor
 
virtual ~ARICHBtestGeometryPar ()
 Destructor.
 
void setMwpc (ARICHTracking *m_mwpc)
 Set the pointer of the tracking MWPCs.
 
ARICHTrackinggetMwpc ()
 Get the pointer of the tracking MWPCs.
 
std::pair< double, double > GetHapdChannelPosition (int)
 Get the position of the HAPD channel.
 
std::pair< int, int > GetHapdElectronicMap (int)
 Get the mapping of the electronic channel to the HAPD module nr and the channel number.
 
int AddHapdChannelPositionPair (double, double)
 Set the position of the HAPD channel.
 
int AddHapdElectronicMapPair (int, int)
 Set the mapping of the electronic channel to the HAPD module nr and the channel number.
 
void setTrackingShift (const ROOT::Math::XYZVector &)
 Set the tracking shift.
 
ROOT::Math::XYZVector getTrackingShift ()
 Get the tracking shift.
 
void setRotationCenter (const ROOT::Math::XYZVector &)
 Set the rotation center of the Aerogel RICH frame.
 
ROOT::Math::XYZVector getRotationCenter ()
 Get the rotation center of the Aerogel RICH frame.
 
void setFrameRotation (double)
 Set the rotation angle of the Aerogel RICH frame.
 
ROOT::Math::Rotation3D getFrameRotation ()
 Get the rotation matrix of the Aerogel RICH frame.
 
void setAverageAgel (bool)
 Set the flag for the reconstruction by using the average aerogel refractive index.
 
bool getAverageAgel ()
 Get the flag for the reconstruction by using the average aerogel refractive index.
 
void clear (void)
 Clears.
 
void setOffset (const ROOT::Math::XYZVector &)
 Set of the setup global offset.
 
ROOT::Math::XYZVector getOffset ()
 Get the setup global offset.
 
void Print (void) const
 Print some debug information.
 
static ARICHGeometryParInstance ()
 Static method to get a reference to the ARICHGeometryPar instance.
 
 ARICHGeometryPar ()
 Constructor.
 
virtual ~ARICHGeometryPar ()
 Destructor.
 
void Initialize (const GearDir &content, const GearDir &mirrorinfo)
 calculates detector parameters needed for geometry build and reconstruction - the mirrorinfo can be in separate directory
 
void Initialize (const GearDir &content)
 calculates detector parameters needed for geometry build and reconstruction.
 
void clear (void)
 Clears.
 
void read (const GearDir &content)
 gets geometry parameters from gearbox.
 
void frontEndMapping (const GearDir &content)
 reads front-end board to merger to cooper mapping from an xml file
 
int getMergerFromCooper (int cooperID, int finesse)
 returns merger board ID from cooperID and finesse
 
int getBoardFromMerger (int mergerID, int slot)
 returns front-end board ID from merger ID and slot
 
int getNBoardsOnMerger (int mergerID)
 returns number of front-end boards connected to the merger
 
void readModuleInfo (const GearDir &content)
 read parameters of each module from gearbox.
 
double QE (double e) const
 get photocathode quantum efficiency at energy e.
 
void Print (void) const
 Print some debug information.
 
double getChannelQE (int moduleID, int channelID)
 get channel quantum efficiency
 
int getChannelID (ROOT::Math::XYVector hit)
 get ID number of channel containing point "hit" (hit is in detector module local coordinates)
 
void modulesPosition (const GearDir &content)
 calculates the positions of HAPD modules, with the parameters from xml.
 
void modulesPositionSimple (const GearDir &content)
 gets modules positions directly from xml file (for simple "beamtest" geometry).
 
int getCopyNo (const ROOT::Math::XYZVector &hit)
 get the copy number of HAPD module containing point "hit"
 
ROOT::Math::XYZVector getOrigin (int copyno)
 get the position of copyno-th HAPD module origin
 
G4ThreeVector getOriginG4 (int copyNo)
 get the position of copyNo-th HAPD module origin (returns G4ThreeVector)
 
double getModAngle (int copyno)
 get the angle of copyno-th HAPD rotation
 
void chipLocPosition ()
 calculates the centers of chips in detector module local coordinates
 
int getChipID (ROOT::Math::XYVector locpos)
 get ID number of chip containing point "locpos"
 
ROOT::Math::XYZVector getChannelCenterGlob (int modID, int chanID)
 get center of chanID channel of modID detector module (in global coordinates)
 
ROOT::Math::XYVector getChannelCenterLoc (int chID)
 get center position of chID channel (in detector module local coordinates)
 
void padPositions ()
 calculates the centers of channels in local (detector module) and global coordinates
 
void mirrorPositions (const GearDir &content)
 calculates parameters of all mirror planes (normal vector and point on plane)
 
void mirrorPositionSimple (const GearDir &content)
 Gets mirrors positions directly from xml file (in case of simple "beamtest" geometry).
 
ROOT::Math::XYZVector getMirrorNormal (int mirID)
 get normal vector of mirID-th mirror plate
 
ROOT::Math::XYZVector getMirrorPoint (int mirID)
 get one point lying on mirID-th mirror plate
 
void setAeroTransLength (int ilayer, double trlen)
 set transmission length of "ilayer" aerogel layer
 
void setAeroRefIndex (int ilayer, double n)
 set refractive index of "ilayer" aerogel layer
 
void setAerogelThickness (int ilayer, double thick)
 set thickness of "ilayer" aerogel layer
 
void setAerogelZPosition (int ilayer, double zPos)
 set z position of "ilayer" aerogel layer
 
void setWindowRefIndex (double refInd)
 set detector module window refractive index
 
void initDetectorMask (int nmodules)
 initialize detector mask
 
void setActive (int module, int channel, bool val)
 set the channel on/off
 
bool isActive (int module, int channel)
 check the activity of the channel
 
void readMirrorAlignment (const GearDir &content)
 Reads mirror plates alignment parameters.
 
int getAerogelTileID (ROOT::Math::XYVector locpos)
 returns ID number of aerogel tile containing locpos (x-y) point.
 

Variables

static ARICHBtestGeometryParp_B4ARICHBtestGeometryParDB = 0
 Pointer that saves the instance of this class.
 
static ARICHGeometryParp_B4ARICHGeometryParDB = 0
 Pointer that saves the instance of this class.
 

Detailed Description

Function Documentation

◆ AddHapdChannelPositionPair()

int AddHapdChannelPositionPair ( double  x,
double  y 
)

Set the position of the HAPD channel.

Definition at line 89 of file ARICHBtestGeometryPar.cc.

90 {
91 m_hapdmap.push_back(std::make_pair(x, y));
92 return m_hapdmap.size();
93 }
std::vector< std::pair< double, double > > m_hapdmap
the position of the HAPD channels

◆ AddHapdElectronicMapPair()

int AddHapdElectronicMapPair ( int  x,
int  y 
)

Set the mapping of the electronic channel to the HAPD module nr and the channel number.

Definition at line 95 of file ARICHBtestGeometryPar.cc.

96 {
97 m_hapdeid.push_back(std::make_pair(x, y));
98 return m_hapdeid.size();
99 }
std::vector< std::pair< int, int > > m_hapdeid
mapping of the electronic channel to the HAPD module nr and the channel number

◆ ARICHBtestGeometryPar() [1/2]

Constructor.

Definition at line 33 of file ARICHBtestGeometryPar.cc.

33 :
34 m_mwpc(new ARICHTracking),
35 m_trackingShift(ROOT::Math::XYZVector()),
36 m_rotationCenter(ROOT::Math::XYZVector()),
37 m_frameRotation(ROOT::Math::Rotation3D()),
39 m_nPads(0),
40 m_init(0),
41 m_simple(0)
42 {
43 clear();
44 }
ROOT::Math::XYZVector m_trackingShift
Tracking shift.
ROOT::Math::XYZVector m_rotationCenter
rotation center of the Aerogel RICH frame
ROOT::Math::Rotation3D m_frameRotation
rotation matrix of the Aerogel RICH frame
ARICHTracking * m_mwpc
Pointer to the tracking chambers.
bool m_simple
True if parametrization initialized with simple geometry (beamtest)
bool m_init
True if parametrization is already initialized.
int m_nPads
Number of detector module pads.
bool m_averageAgel
flag for the reconstruction by using the average aerogel refractive index

◆ ARICHBtestGeometryPar() [2/2]

copy constructor

Definition at line 47 of file ARICHBtestGeometryPar.cc.

47 :
48 m_trackingShift(arichPar.m_trackingShift),
49 m_rotationCenter(arichPar.m_rotationCenter),
50 m_frameRotation(arichPar.m_frameRotation),
51 m_hapdmap(arichPar.m_hapdmap),
52 m_hapdeid(arichPar.m_hapdeid)
53 {
54 m_averageAgel = arichPar.m_averageAgel;
55 m_nPads = arichPar.m_nPads;
56 m_init = arichPar.m_init;
57 m_simple = arichPar.m_simple;
58 m_mwpc = new ARICHTracking();
59 *m_mwpc = *arichPar.m_mwpc;
61 }
static ARICHBtestGeometryPar * p_B4ARICHBtestGeometryParDB
Pointer that saves the instance of this class.

◆ ARICHGeometryPar()

Constructor.

Definition at line 38 of file ARICHGeometryPar.cc.

39 {
40 clear();
41 }

◆ chipLocPosition()

void chipLocPosition ( )
private

calculates the centers of chips in detector module local coordinates

Definition at line 407 of file ARICHGeometryPar.cc.

408 {
409 double xycenter = m_padSize * m_nPadX / 4. + m_chipGap / 2.;
410 m_chipLocPos.push_back(ROOT::Math::XYVector(xycenter - m_padSize * m_nPadX / 4., xycenter - m_padSize * m_nPadX / 4.));
411 m_chipLocPos.push_back(ROOT::Math::XYVector(xycenter - m_padSize * m_nPadX / 4., -xycenter - m_padSize * m_nPadX / 4.));
412 m_chipLocPos.push_back(ROOT::Math::XYVector(-xycenter - m_padSize * m_nPadX / 4., xycenter - m_padSize * m_nPadX / 4.));
413 m_chipLocPos.push_back(ROOT::Math::XYVector(-xycenter - m_padSize * m_nPadX / 4., -xycenter - m_padSize * m_nPadX / 4.));
414 }
double m_padSize
Detector pad size.
double m_chipGap
Gap between chips in detector module.
std::vector< ROOT::Math::XYVector > m_chipLocPos
vector holding chip positions (in detector module local coordinates)
int m_nPadX
Number of detector module pads in one direction.

◆ clear() [1/2]

void clear ( void  )

Clears.

Definition at line 152 of file ARICHBtestGeometryPar.cc.

153 {
154 m_init = false;
155 m_simple = false;
156 m_trackingShift = ROOT::Math::XYZVector();
157 m_frameRotation = ROOT::Math::Rotation3D();
158 m_rotationCenter = ROOT::Math::XYZVector();
159 }

◆ clear() [2/2]

void clear ( void  )

Clears.

Definition at line 73 of file ARICHGeometryPar.cc.

74 {
75 m_chipGap = 0.0;
76 m_detZpos = 0.0;
77 m_modXSize = 0.0;
78 m_modZSize = 0.0;
79 m_winThick = 0.0;
80 m_winRefInd = 0.0;
81 m_mirrorOuterRad = 0.0;
83 m_mirrorStartAng = 0.0;
84 m_nMirrors = 0;
85 m_mirrorZPos = 0.0;
86 m_nPadX = 0;
87 m_padSize = 0.0;
88 m_detInnerRadius = 0.0;
89 m_detOuterRadius = 0.0;
90 m_nrow = 0;
91 m_nRad = 0;
92 m_init = false;
93 m_simple = false;
94 m_ncol.clear(); m_fDFi.clear(); m_fDR.clear(); m_fR.clear();
95 m_fFi.clear(); m_fFiMod.clear(); m_chipLocPos.clear(); m_padWorldPositions.clear(); m_mirrornorm.clear(); m_mirrorpoint.clear();
96 m_ChannelQE.clear();
97 for (int i = 0; i < MAX_N_ALAYERS; i++) {
98 m_aeroTrLength[i] = 0; m_aeroRefIndex[i] = 0;
99 m_aeroZPosition[i] = 0; m_aeroThickness[i] = 0;
100 }
101 m_nPads = 0;
102 m_ColEffi = 0.;
103 m_LambdaFirst = 0.;
104 m_LambdaStep = 0.;
105 m_NpointsQE = 0;
106 m_qeScale = 0.;
109 for (int i = 0; i < MAXPTS_QE; i++) {m_QE[i] = 0.;}
110
111 m_tileNr = 0;
112 m_tileGap = 0.;
113 m_aeroRin = 0.;
114 m_aeroRout = 0.;
115 for (int i = 0; i < 5; i++) m_tileNphi[i] = 0;
116
117 }
double m_modXSize
Detector module length.
double m_tileGap
Gap size between two aerogel tiles.
double m_winThick
Thickness of detector module window.
double m_LambdaFirst
wavelength [nm]: first QE data point
std::vector< ROOT::Math::XYZVector > m_mirrornorm
vector holding normal vectors of mirror plates
double m_aeroRout
Outer radius of aerogel tube.
double m_detZpos
Z position of detector plane.
double m_detInnerRadius
Inner radius of detector tube.
double m_aeroRin
Inner radius of aerogel tube.
double m_mirrorOuterRad
Radius of circle outscribed to mirrors polygon.
double m_aeroZPosition[MAX_N_ALAYERS]
Array of aerogel Z positions.
double m_qeScale
QE scale factor for photons internally reflected in HAPD window.
double m_detOuterRadius
Outer radius of detector tube.
std::vector< double > m_fDR
minimal distance between detector modules in radial direction
int m_nrow
number of detector rings
double m_modZSize
Detector module height.
double m_aeroTrLength[MAX_N_ALAYERS]
Array of aerogel transmission lengths.
int m_NpointsQE
number of QE data points
std::vector< double > m_fR
radial coordinate of detector modules
double m_LambdaStep
wavelength [nm]: step
int m_tileNphi[5]
Number of aerogel tiles in phi direction of each "radial" ring.
double m_winRefInd
Detector window refractive index.
double m_ColEffi
collection efficiency
bool m_simple
True if parametrization initialized with simple geometry (beamtest)
int m_nRad
Number of aerogel layers.
double m_mirrorZPos
Z position of mirror plates (starting z)
std::vector< double > m_fDFi
angle covered by one detector module in ring
double m_chipNegativeCrosstalk
to simulate opposite polarity crosstalk among channels on chip
double m_QE[MAXPTS_QE]
quantum efficiency curve
double m_aeroRefIndex[MAX_N_ALAYERS]
Array of aerogel refracive indices.
std::vector< double > m_fFi
angular coordinate of detector modules
double m_windowAbsorbtion
absorption probability for photons internally reflected in HAPD window
bool m_init
True if parametrization is already initialized.
int m_nPads
total number of pads in a sensor
std::vector< ROOT::Math::XYZVector > m_mirrorpoint
vector holding one point of each mirror plate
std::vector< ROOT::Math::XYVector > m_padWorldPositions
map holding channel global positions
std::vector< uint8_t > m_ChannelQE
Channel QE at 400nm.
std::vector< double > m_fFiMod
angle of detector module
double m_mirrorStartAng
The angle of first corner of mirror plates polygon.
double m_aeroThickness[MAX_N_ALAYERS]
Array of aerogel thickness.
int m_nMirrors
Number of mirrors segments.
std::vector< int > m_ncol
m_ncol[i] gives number of detector modules in i-th detector ring (first one is the outer most)
int m_tileNr
Number of aerogel tiles in radial direction.
double m_mirrorThickness
Thickness of mirror plates.

◆ doBeamBackgroundStudy()

int doBeamBackgroundStudy ( ) const
inline

returns 1 if beam background study (to add additional sensitive modules, detect neutrons, ...), 0 else

Definition at line 289 of file ARICHGeometryConfig.h.

290 {
291 return m_bbstudy;
292 }
int m_bbstudy
is beam background study

◆ frontEndMapping()

void frontEndMapping ( const GearDir content)
private

reads front-end board to merger to cooper mapping from an xml file

Definition at line 181 of file ARICHGeometryPar.cc.

182 {
183
184 GearDir mapping(content, "FrontEndMapping");
185
186 for (const GearDir& merger : mapping.getNodes("Merger")) {
187 unsigned mergerID = (unsigned) merger.getInt("@id");
188
189 auto testMer = m_mergerIDs.find(mergerID);
190 if (testMer != m_mergerIDs.end()) {
191 B2ERROR(mapping.getPath() << "/MergerID " << mergerID <<
192 " ***input already used");
193 }
194
195 m_mergerIDs.insert(mergerID);
196
197 std::vector<unsigned> boardIDs;
198 for (const GearDir& board : merger.getNodes("FEboards/FEboard")) {
199 unsigned boardID = board.getInt();
200 auto testBor = m_boardIDs.find(boardID);
201 if (testBor != m_boardIDs.end()) {
202 B2ERROR(mapping.getPath() << "/FEboardID " << boardID <<
203 " ***input already used");
204 }
205 boardIDs.push_back(boardID);
206 m_boardIDs.insert(boardID);
207 }
208 m_merger2feb.insert(std::pair<int, std::vector<unsigned>>(mergerID, boardIDs));
209 unsigned copperID = (unsigned) merger.getInt("COPPERid");
210 string finesseSlot = merger.getString("FinesseSlot");
211 int finesse = 0;
212 if (finesseSlot == "A") {finesse = 0;}
213 else if (finesseSlot == "B") {finesse = 1;}
214 else if (finesseSlot == "C") {finesse = 2;}
215 else if (finesseSlot == "D") {finesse = 3;}
216 else {
217 B2ERROR(merger.getPath() << "/FinesseSlot " << finesseSlot <<
218 " ***invalid slot (valid are A, B, C, D)");
219 continue;
220 }
221
222 m_copperIDs.insert(copperID);
223
224 std::pair<unsigned, int> copfin(copperID, finesse);
225 m_copper2merger.insert(std::pair<std::pair<unsigned, int>, unsigned>(copfin, mergerID));
226
227 }
228
229 }
std::unordered_set< unsigned int > m_boardIDs
FEB ID's.
std::unordered_set< unsigned int > m_mergerIDs
Merger ID's.
std::unordered_set< unsigned int > m_copperIDs
COPPER ID's.
std::map< std::pair< unsigned, int >, unsigned > m_copper2merger
mapping of merger boards to cooper boards
std::map< int, std::vector< unsigned > > m_merger2feb
mapping of front-end boards to mergers

◆ getAerogelRefIndex()

double getAerogelRefIndex ( int  ilayer)
inline

get refractive index of "ilayer" aerogel layer

Definition at line 313 of file ARICHGeometryPar.h.

314 {
315 return m_aeroRefIndex[layer];
316 }

◆ getAerogelThickness()

double getAerogelThickness ( int  ilayer)
inline

get thickness of "ilayer" aerogel layer

Definition at line 318 of file ARICHGeometryPar.h.

319 {
320 return m_aeroThickness[layer];
321 }

◆ getAerogelTileID()

int getAerogelTileID ( ROOT::Math::XYVector  locpos)

returns ID number of aerogel tile containing locpos (x-y) point.

Definition at line 582 of file ARICHGeometryPar.cc.

583 {
584
585 double size = (m_aeroRout - m_aeroRin) / double(m_tileNr);
586 double r = locpos.R();
587 double phi = ROOT::Math::VectorUtil::Phi_0_2pi(locpos.Phi());
588 int nr = int((r - m_aeroRin) / size);
589
590 if (r < m_aeroRin + nr * size + m_tileGap / 2. || r > m_aeroRin + (nr + 1)*size - m_tileGap / 2.) return 0;
591
592 double dphi = 2.*M_PI / double(m_tileNphi[nr]);
593 double gapPhi = m_tileGap / (m_aeroRin + (nr + 1) * size - m_tileGap / 2.);
594
595 int nphi = int(phi / dphi);
596 if (phi < nphi * dphi + gapPhi / 2. || phi > (nphi + 1)*dphi - gapPhi / 2.) return 0;
597
598 int tileID = nphi;
599 for (int i = 0; i < nr; i++) tileID += m_tileNphi[i];
600
601 return tileID + 1;
602
603 }

◆ getAerogelTransmissionLength()

double getAerogelTransmissionLength ( int  ilayer)
inline

get transmission length of "ilayer" aerogel layer

Definition at line 308 of file ARICHGeometryPar.h.

309 {
310 return m_aeroTrLength[layer];
311 }

◆ getAerogelZPosition()

double getAerogelZPosition ( int  ilayer)
inline

get z position of "ilayer" aerogel layer

Definition at line 323 of file ARICHGeometryPar.h.

324 {
325 return m_aeroZPosition[layer];
326 }

◆ getAeroTubeRin()

double getAeroTubeRin ( )
inline

get the inner size of aerogel tube

Definition at line 404 of file ARICHGeometryPar.h.

405 {
406 return m_aeroRin;
407 }

◆ getAeroTubeRout()

double getAeroTubeRout ( )
inline

get the outer size of aerogel tube

Definition at line 409 of file ARICHGeometryPar.h.

410 {
411 return m_aeroRout;
412 }

◆ getAverageAgel()

bool getAverageAgel ( )

Get the flag for the reconstruction by using the average aerogel refractive index.

Definition at line 145 of file ARICHBtestGeometryPar.cc.

146 {
147 return m_averageAgel;
148 }

◆ getBoardFromMerger()

int getBoardFromMerger ( int  mergerID,
int  slot 
)

returns front-end board ID from merger ID and slot

Definition at line 243 of file ARICHGeometryPar.cc.

244 {
245 auto boards = m_merger2feb.find(mergerID);
246 if (boards == m_merger2feb.end()) {
247 B2ERROR("getBoardFromMerger: " << " merger " << mergerID << " is not mapped");
248 return -1;
249 }
250 if ((boards->second).size() <= unsigned(slot)) {
251 B2ERROR("getBoardFromMerger: " << " merger " << mergerID << " slot " << slot << " is not assigned to FE board.");
252 return -1;
253 }
254 return (boards->second).at(slot);
255 }

◆ getChannelCenterGlob()

ROOT::Math::XYZVector getChannelCenterGlob ( int  modID,
int  chanID 
)

get center of chanID channel of modID detector module (in global coordinates)

Definition at line 428 of file ARICHGeometryPar.cc.

429 {
430 int id = (modID - 1) * m_nPads + chanID;
431 return ROOT::Math::XYZVector(m_padWorldPositions.at(id).X(), m_padWorldPositions.at(id).Y(), m_detZpos + m_winThick);
432 }

◆ getChannelCenterLoc()

ROOT::Math::XYVector getChannelCenterLoc ( int  chID)

get center position of chID channel (in detector module local coordinates)

Definition at line 434 of file ARICHGeometryPar.cc.

435 {
436 return m_padLocPositions[chID];
437 }
std::map< int, ROOT::Math::XYVector > m_padLocPositions
map holding channel local positions (in detector module local coordinates)

◆ getChannelID()

int getChannelID ( ROOT::Math::XYVector  hit)

get ID number of channel containing point "hit" (hit is in detector module local coordinates)

Definition at line 310 of file ARICHGeometryPar.cc.

311 {
312 int ChipID = getChipID(position);
313 int Npad = int(m_nPadX / 2);
314 ROOT::Math::XYVector chipPos = getChipLocPos(ChipID);
315 ROOT::Math::XYVector locloc = position - chipPos;
316 int ix = int(locloc.X() / m_padSize);
317 int iy = int(locloc.Y() / m_padSize);
318 if (locloc.X() < 0 || locloc.Y() < 0) return -1;
319 if (ix > Npad - 1 || iy > Npad - 1) return -1;
320 int chID = ChipID * Npad * Npad + iy + ix * Npad;
321 return chID;
322 }
ROOT::Math::XYVector getChipLocPos(int chipID)
get center position of chipID-th chip of detector module (in detector module local coordinates)
int getChipID(ROOT::Math::XYVector locpos)
get ID number of chip containing point "locpos"

◆ getChannelQE()

double getChannelQE ( int  moduleID,
int  channelID 
)

get channel quantum efficiency

Definition at line 304 of file ARICHGeometryPar.cc.

305 {
306 int id = (moduleID - 1) * m_nPads + channelID;
307 return m_ChannelQE.at(id) / 100.0;
308 }

◆ getChipID()

int getChipID ( ROOT::Math::XYVector  locpos)

get ID number of chip containing point "locpos"

Definition at line 417 of file ARICHGeometryPar.cc.

418 {
419 if (locpos.X() > 0) {
420 if (locpos.Y() > 0) return 0;
421 return 1;
422 }
423 if (locpos.Y() > 0) return 2;
424 return 3;
425 }

◆ getChipLocPos()

ROOT::Math::XYVector getChipLocPos ( int  chipID)
inline

get center position of chipID-th chip of detector module (in detector module local coordinates)

Definition at line 292 of file ARICHGeometryPar.h.

293 {
294 return m_chipLocPos.at(chipID);
295 }

◆ getChipNegativeCrosstalk()

double getChipNegativeCrosstalk ( )
inline

get factor to suppress p.e. detection efficiency due to negative polarity crosstalk among chip channels

Definition at line 383 of file ARICHGeometryPar.h.

384 {
386 }

◆ getColEffi()

double getColEffi ( ) const
inline

get HAPD collection efficiency.

Definition at line 277 of file ARICHGeometryPar.h.

278 {
279 return m_ColEffi;
280 }

◆ getCopyNo()

int getCopyNo ( const ROOT::Math::XYZVector &  hit)

get the copy number of HAPD module containing point "hit"

Definition at line 372 of file ARICHGeometryPar.cc.

373 {
374 double x = hit.X();
375 double y = hit.Y();
376 double r = sqrt(x * x + y * y);
377 double fi = atan2(y, x);
378 if (fi < 0) fi += 2 * M_PI;
379 int ntot = 0;
380 for (int i = 0; i < m_nrow; i++) {
381 int nfi = int(fi / m_fDFi[i]);
382 int copyno = ntot + nfi;
383 if (fabs(r - m_fR[copyno]) < m_modXSize / 2.) return copyno + 1;
384 ntot += m_ncol[i];
385 }
386 return -1;
387 }

◆ getDetectorPadSize()

double getDetectorPadSize ( )
inline

get detectors module pad size

Definition at line 348 of file ARICHGeometryPar.h.

349 {
350 return m_padSize;
351 }

◆ getDetectorWindowRefIndex()

double getDetectorWindowRefIndex ( )
inline

get refractive index of detector module window

Definition at line 338 of file ARICHGeometryPar.h.

339 {
340 return m_winRefInd;
341 }

◆ getDetectorWindowThickness()

double getDetectorWindowThickness ( )
inline

get thickness of detector module window

Definition at line 333 of file ARICHGeometryPar.h.

334 {
335 return m_winThick;
336 }

◆ getDetectorXPadNumber()

int getDetectorXPadNumber ( )
inline

get number of pads of detector module (in one direction)

Definition at line 353 of file ARICHGeometryPar.h.

354 {
355 return m_nPadX;
356 }

◆ getDetectorZPosition() [1/2]

double getDetectorZPosition ( )
inline

get z position of detector plane (starting z)

Definition at line 368 of file ARICHGeometryPar.h.

369 {
370 return m_detZpos;
371 }

◆ getDetectorZPosition() [2/2]

double getDetectorZPosition ( ) const
inline

get z position of detector plane (starting z of HAPDs)

Definition at line 284 of file ARICHGeometryConfig.h.

285 {
286 return m_detectorPlane.getPosition().Z() - m_hapd.getModuleSizeZ() / 2.;
287 }
ROOT::Math::XYZVector getPosition() const
Get center point.
double getModuleSizeZ() const
Returns module size in z (HAPD + FEB height)
Definition: ARICHGeoHAPD.h:228
ARICHGeoDetectorPlane m_detectorPlane
detector plane geometry configuration
ARICHGeoHAPD m_hapd
HAPD geometry configuration.

◆ getFrameRotation()

ROOT::Math::Rotation3D getFrameRotation ( )

Get the rotation matrix of the Aerogel RICH frame.

Definition at line 135 of file ARICHBtestGeometryPar.cc.

136 {
137 return m_frameRotation;
138 }

◆ GetHapdChannelPosition()

std::pair< double, double > GetHapdChannelPosition ( int  id)

Get the position of the HAPD channel.

Definition at line 79 of file ARICHBtestGeometryPar.cc.

80 {
81 return m_hapdmap[id];
82 }

◆ GetHapdElectronicMap()

std::pair< int, int > GetHapdElectronicMap ( int  id)

Get the mapping of the electronic channel to the HAPD module nr and the channel number.

Definition at line 84 of file ARICHBtestGeometryPar.cc.

85 {
86 return m_hapdeid[id];
87 }

◆ getMergerFromCooper()

int getMergerFromCooper ( int  cooperID,
int  finesse 
)

returns merger board ID from cooperID and finesse

Definition at line 231 of file ARICHGeometryPar.cc.

232 {
233 auto merger = m_copper2merger.find(std::pair<unsigned, int>(copperID, finesse));
234 if (merger == m_copper2merger.end()) {
235 // B2INFO("getMergerFromCooper: " << " copper " << copperID << ", finesse "
236 // << finesse << " is not assigned to any merger board");
237 return 0;
238 }
239
240 return merger->second;
241 }

◆ getMirrorNormal()

ROOT::Math::XYZVector getMirrorNormal ( int  mirID)

get normal vector of mirID-th mirror plate

Definition at line 500 of file ARICHGeometryPar.cc.

501 {
502 return m_mirrornorm[mirID];
503 }

◆ getMirrorPoint()

ROOT::Math::XYZVector getMirrorPoint ( int  mirID)

get one point lying on mirID-th mirror plate

Definition at line 505 of file ARICHGeometryPar.cc.

506 {
507 return m_mirrorpoint[mirID];
508 }

◆ getMirrorsStartAngle()

double getMirrorsStartAngle ( )
inline

get the phi angle of first corner of mirror polygon

Definition at line 358 of file ARICHGeometryPar.h.

359 {
360 return m_mirrorStartAng;
361 }

◆ getMirrorsZPosition()

double getMirrorsZPosition ( )
inline

get the z position of mirror plates (starting z)

Definition at line 363 of file ARICHGeometryPar.h.

364 {
365 return m_mirrorZPos;
366 }

◆ getModAngle()

double getModAngle ( int  copyno)

get the angle of copyno-th HAPD rotation

Definition at line 402 of file ARICHGeometryPar.cc.

403 {
404 return m_fFiMod[copyno - 1];
405 }

◆ getMwpc()

ARICHTracking * getMwpc ( )

Get the pointer of the tracking MWPCs.

Definition at line 74 of file ARICHBtestGeometryPar.cc.

75 {
76 return m_mwpc;
77 }

◆ getNBoardsOnMerger()

int getNBoardsOnMerger ( int  mergerID)

returns number of front-end boards connected to the merger

Definition at line 257 of file ARICHGeometryPar.cc.

258 {
259 auto boards = m_merger2feb.find(mergerID);
260 if (boards == m_merger2feb.end()) {
261 B2ERROR("getNBoardsOnMerger: " << " merger " << mergerID << " is not mapped");
262 }
263 return (boards->second).size();
264 }

◆ getNMCopies()

int getNMCopies ( ) const
inline

get the total number of HAPD modules

Definition at line 287 of file ARICHGeometryPar.h.

288 {
289 return m_fR.size();
290 }

◆ getNMirrors()

int getNMirrors ( )
inline

get number of mirror plates

Definition at line 328 of file ARICHGeometryPar.h.

329 {
330 return m_nMirrors;
331 }

◆ getNphiTiles()

int getNphiTiles ( int  nRing)
inline

get number of aerogel tiles in each radial ring

Definition at line 393 of file ARICHGeometryPar.h.

394 {
395 if (nRing > 4) return 0;
396 return m_tileNphi[nRing];
397 }

◆ getNrTiles()

int getNrTiles ( )
inline

get number of aerogel tiles in radial direction (number of rings)

Definition at line 388 of file ARICHGeometryPar.h.

389 {
390 return m_tileNr;
391 }

◆ getNumberOfAerogelRadiators()

int getNumberOfAerogelRadiators ( )
inline

get number of aerogel layers

Definition at line 343 of file ARICHGeometryPar.h.

344 {
345 return m_nRad;
346 }

◆ getOffset()

ROOT::Math::XYZVector getOffset ( )

Get the setup global offset.

Definition at line 168 of file ARICHBtestGeometryPar.cc.

169 {
170 return m_offset;
171 }
ROOT::Math::XYZVector m_offset
Global offset.

◆ getOrigin()

ROOT::Math::XYZVector getOrigin ( int  copyno)

get the position of copyno-th HAPD module origin

Definition at line 389 of file ARICHGeometryPar.cc.

390 {
391 const double amag = std::abs(m_fR[copyNo - 1]);
392 const double phi = m_fFi[copyNo - 1];
393 return ROOT::Math::XYZVector(amag * std::cos(phi), amag * std::sin(phi), m_detZpos + m_modZSize / 2.);
394 }

◆ getOriginG4()

G4ThreeVector getOriginG4 ( int  copyNo)

get the position of copyNo-th HAPD module origin (returns G4ThreeVector)

Definition at line 396 of file ARICHGeometryPar.cc.

397 {
398 ROOT::Math::XYZVector origin = getOrigin(copyNo);
399 return G4ThreeVector(origin.X() / Unit::mm, origin.Y() / Unit::mm, origin.Z() / Unit::mm);
400 }
static const double mm
[millimeters]
Definition: Unit.h:70
ROOT::Math::XYZVector getOrigin(int copyno)
get the position of copyno-th HAPD module origin

◆ getQEScaling()

double getQEScaling ( )
inline

get QE scaling factor for photons internally reflected in HAPD window

Definition at line 373 of file ARICHGeometryPar.h.

374 {
375 return m_qeScale;
376 }

◆ getRotationCenter()

ROOT::Math::XYZVector getRotationCenter ( )

Get the rotation center of the Aerogel RICH frame.

Definition at line 123 of file ARICHBtestGeometryPar.cc.

124 {
125 return m_rotationCenter;
126 }

◆ getSensitiveSurfaceSize()

double getSensitiveSurfaceSize ( ) const
inline

get size of detector sensitive surface (size of two chips + gap between)

Definition at line 282 of file ARICHGeometryPar.h.

283 {
284 return m_nPadX * m_padSize + m_chipGap;
285 }

◆ getTileGap()

double getTileGap ( )
inline

get size of the gap between aerogel tiles

Definition at line 399 of file ARICHGeometryPar.h.

400 {
401 return m_tileGap;
402 }

◆ getTrackingShift()

ROOT::Math::XYZVector getTrackingShift ( )

Get the tracking shift.

Definition at line 110 of file ARICHBtestGeometryPar.cc.

111 {
112 return m_trackingShift;
113 }

◆ getWindowAbsorbtion()

double getWindowAbsorbtion ( )
inline

get absorption probability for photons internally reflected in HAPD window

Definition at line 378 of file ARICHGeometryPar.h.

379 {
380 return m_windowAbsorbtion;
381 }

◆ initDetectorMask()

void initDetectorMask ( int  nmodules)

initialize detector mask

Definition at line 536 of file ARICHGeometryPar.cc.

537 {
538 int m_DetectorMaskSize = m_nPads * nmodules / 32 + 1;
539 for (int i = 0; i < m_DetectorMaskSize; i++) {
540 m_DetectorMask.push_back(0xFFFFFFFF);
541 }
542 B2INFO("DetectorMask initialized size=" << m_nPads << " * " << nmodules << " +1 =" << m_DetectorMaskSize);
543
544 }
std::vector< uint32_t > m_DetectorMask
Detector Mask of inactive channels.

◆ Initialize() [1/2]

void Initialize ( const GearDir content)

calculates detector parameters needed for geometry build and reconstruction.

Definition at line 68 of file ARICHGeometryPar.cc.

69 {
70 Initialize(content, content);
71 }
void Initialize(const GearDir &content)
calculates detector parameters needed for geometry build and reconstruction.

◆ Initialize() [2/2]

void Initialize ( const GearDir content,
const GearDir mirrorinfo 
)

calculates detector parameters needed for geometry build and reconstruction - the mirrorinfo can be in separate directory

Definition at line 47 of file ARICHGeometryPar.cc.

48 {
49
50 read(content);
51 string Type = content.getString("@type", "");
52 if (Type == "beamtest") {
53 m_simple = true;
54 modulesPositionSimple(content);
55 mirrorPositionSimple(mirrorcontent);
56 } else {
57 modulesPosition(content);
58 mirrorPositions(content);
59 frontEndMapping(content);
60 }
63 initDetectorMask(m_fR.size());
64 readModuleInfo(content);
65 m_init = true;
66 }
void mirrorPositions(const GearDir &content)
calculates parameters of all mirror planes (normal vector and point on plane)
void modulesPositionSimple(const GearDir &content)
gets modules positions directly from xml file (for simple "beamtest" geometry).
void frontEndMapping(const GearDir &content)
reads front-end board to merger to cooper mapping from an xml file
void padPositions()
calculates the centers of channels in local (detector module) and global coordinates
void read(const GearDir &content)
gets geometry parameters from gearbox.
void mirrorPositionSimple(const GearDir &content)
Gets mirrors positions directly from xml file (in case of simple "beamtest" geometry).
void initDetectorMask(int nmodules)
initialize detector mask
void chipLocPosition()
calculates the centers of chips in detector module local coordinates
void readModuleInfo(const GearDir &content)
read parameters of each module from gearbox.
void modulesPosition(const GearDir &content)
calculates the positions of HAPD modules, with the parameters from xml.

◆ Instance() [1/2]

ARICHBtestGeometryPar * Instance ( )
static

Static method to get a reference to the ARICHBtestGeometryPar instance.

Returns
A reference to an instance of this class.

Definition at line 25 of file ARICHBtestGeometryPar.cc.

◆ Instance() [2/2]

ARICHGeometryPar * Instance ( )
static

Static method to get a reference to the ARICHGeometryPar instance.

Returns
A reference to an instance of this class.

Definition at line 30 of file ARICHGeometryPar.cc.

31 {
34 }
36 }
static ARICHGeometryPar * p_B4ARICHGeometryParDB
Pointer that saves the instance of this class.

◆ isActive()

bool isActive ( int  module,
int  channel 
)

check the activity of the channel

Definition at line 558 of file ARICHGeometryPar.cc.

559 {
560 int ch = (module - 1) * m_nPads + channel;
561 int bit = ch % 32;
562 int idx = ch / 32;
563 return m_DetectorMask[idx] & (1 << bit);
564 }

◆ isInit()

bool isInit ( )
inline

returns true if parametrisation is initialized, false otherwise

Definition at line 297 of file ARICHGeometryPar.h.

298 {
299 return m_init;
300 }

◆ isSimple()

bool isSimple ( )
inline

returns true if parametrisation is initialized with simple geometry (beamtest)

Definition at line 302 of file ARICHGeometryPar.h.

303 {
304 return m_simple;
305 }

◆ mirrorPositions()

void mirrorPositions ( const GearDir content)
private

calculates parameters of all mirror planes (normal vector and point on plane)

Calculates mirror positions (normal vectors and on point of every mirror plate) and stores them.

Definition at line 474 of file ARICHGeometryPar.cc.

475 {
476 double rmir = m_mirrorOuterRad * cos(M_PI / m_nMirrors) - m_mirrorThickness;
477 for (int i = 0; i < m_nMirrors; i++) {
478 ROOT::Math::XYZVector norm(cos(2.*M_PI / double(m_nMirrors) * (i + 0.5) + m_mirrorStartAng),
479 sin(2.*M_PI / double(m_nMirrors) * (i + 0.5) + m_mirrorStartAng), 0);
480 m_mirrornorm.push_back(norm);
481 m_mirrorpoint.push_back(rmir * norm);
482 }
483 readMirrorAlignment(content);
484 }
void readMirrorAlignment(const GearDir &content)
Reads mirror plates alignment parameters.

◆ mirrorPositionSimple()

void mirrorPositionSimple ( const GearDir content)
private

Gets mirrors positions directly from xml file (in case of simple "beamtest" geometry).

Definition at line 486 of file ARICHGeometryPar.cc.

487 {
488 double thick = content.getLength("Mirrors/thickness");
489 for (const GearDir& mirror : content.getNodes("Mirrors/Mirror")) {
490 double angle = mirror.getAngle("angle");
491 ROOT::Math::XYZVector point(mirror.getLength("xPos") - cos(angle)*thick / 2., mirror.getLength("yPos") - sin(angle)*thick / 2., 0);
492 ROOT::Math::XYZVector norm(cos(angle), sin(angle), 0);
493 m_mirrorpoint.push_back(point);
494 m_mirrornorm.push_back(norm);
495 m_mirrorZPos = mirror.getLength("zPos");
496 m_nMirrors++;
497 }
498 }

◆ modulesPosition()

void modulesPosition ( const GearDir content)
private

calculates the positions of HAPD modules, with the parameters from xml.

Definition at line 324 of file ARICHGeometryPar.cc.

325 {
326
327 GearDir detParams(content, "Detector/Plane/Rings");
328
329 double r = m_detInnerRadius;
330
331 for (const GearDir& ring : detParams.getNodes("Ring")) {
332 double dR = ring.getLength("dR");
333 r += dR;
334 double rcenter = r + m_modXSize / 2.;
335 if (rcenter + m_modXSize * sqrt(2) / 2. > m_detOuterRadius) {
336 B2WARNING(m_ncol.size() + 1 << "th ring of ARICH photon detectors will not be placed (out of detector tube).");
337 break;
338 }
339 m_nrow++;
340 int nSeg = ring.getInt("nSegments") ;
341 double dFi = ring.getLength("dFi");
342 m_fDR.push_back(dR);
343 double f = 2.*atan2((m_modXSize + dFi) / 2., r);
344 int blaa = int(2.*M_PI / f / nSeg) * nSeg;
345 m_ncol.push_back(blaa);
346 f = 2.*M_PI / double(blaa);
347 m_fDFi.push_back(f);
348 B2INFO(blaa << " modules of " << m_ncol.size() << "th ring of ARICH photon detectors will be placed at r = " << rcenter << "cm. ");
349 for (int nv = 0; nv < blaa; ++nv) {
350 m_fR.push_back(rcenter);
351 double fi = f * (nv + 0.5);
352 m_fFi.push_back(fi);
353 m_fFiMod.push_back(fi);
354 }
355 r += (m_modXSize + r * (1 - cos(f / 2.)));
356 }
357 B2INFO("Altogether " << m_fR.size() << " ARICH photon detector modules will be placed.");
358 }

◆ modulesPositionSimple()

void modulesPositionSimple ( const GearDir content)
private

gets modules positions directly from xml file (for simple "beamtest" geometry).

Definition at line 360 of file ARICHGeometryPar.cc.

361 {
362 for (const GearDir& module : content.getNodes("Detector/Plane/Modules/Module")) {
363 ROOT::Math::XYVector position(module.getLength("xPos"), module.getLength("yPos"));
364 double angle = module.getAngle("angle") / Unit::rad;
365 m_fFi.push_back(position.Phi());
366 m_fR.push_back(position.R());
367 m_fFiMod.push_back(angle);
368 }
369 B2INFO("Altogether " << m_fR.size() << " ARICH photon detector modules will be placed.");
370 }
static const double rad
Standard of [angle].
Definition: Unit.h:50

◆ padPositions()

void padPositions ( )
private

calculates the centers of channels in local (detector module) and global coordinates

Definition at line 440 of file ARICHGeometryPar.cc.

441 {
442 int Npad = int(m_nPadX / 2.);
443 ROOT::Math::XYVector xstart(m_padSize / 2., m_padSize / 2.);
444 for (int chipID = 0; chipID < 4; chipID++) {
445 ROOT::Math::XYVector chipPos = getChipLocPos(chipID);
446 for (int ix = 0; ix < Npad; ix++) {
447 for (int iy = 0; iy < Npad; iy++) {
448 int chanID = chipID * Npad * Npad + ix * Npad + iy;
449 ROOT::Math::XYVector center(m_padSize / 2. + ix * m_padSize, m_padSize / 2. + iy * m_padSize);
450 center = center + chipPos;
451 m_padLocPositions[chanID] = center;
452 }
453 }
454 }
455 for (int iMod = 0; iMod < getNMCopies(); iMod++) {
456 const double magnitude = std::abs(m_fR[iMod]);
457 const double phi = m_fFi[iMod];
458 const double phiMod = m_fFiMod[iMod];
459 const double iModCenterX = magnitude * std::cos(phi);
460 const double iModCenterY = magnitude * std::sin(phi);
461
462 for (unsigned int iChan = 0; iChan < m_padLocPositions.size(); iChan++) {
463 const ROOT::Math::XYVector& iChanCenter = m_padLocPositions[iChan];
464 const double cosPhiMod = std::cos(phiMod);
465 const double sinPhiMod = std::sin(phiMod);
466 const double iChanCenterRotatedX = iChanCenter.X() * cosPhiMod - iChanCenter.Y() * sinPhiMod;
467 const double iChanCenterRotatedY = iChanCenter.X() * sinPhiMod + iChanCenter.Y() * cosPhiMod;
468 ROOT::Math::XYVector iWorld(iModCenterX + iChanCenterRotatedX, iModCenterY + iChanCenterRotatedY);
469 m_padWorldPositions.push_back(iWorld);
470 }
471 }
472 }
int getNMCopies() const
get the total number of HAPD modules

◆ Print() [1/2]

void Print ( void  ) const

Print some debug information.

Definition at line 174 of file ARICHBtestGeometryPar.cc.

175 {
176
177 }

◆ Print() [2/2]

void Print ( void  ) const

Print some debug information.

Definition at line 300 of file ARICHGeometryPar.cc.

301 {
302 }

◆ QE()

double QE ( double  e) const

get photocathode quantum efficiency at energy e.

Definition at line 289 of file ARICHGeometryPar.cc.

290 {
291 if (e < 0.001) return 0;
292 double dlam = 1240 / e - m_LambdaFirst;
293 if (dlam < 0) return 0;
294 int i = int(dlam / m_LambdaStep);
295 if (i > m_NpointsQE - 2) return 0;
296 return m_QE[i] + (m_QE[i + 1] - m_QE[i]) / m_LambdaStep * (dlam - i * m_LambdaStep);
297 }

◆ read()

void read ( const GearDir content)

gets geometry parameters from gearbox.

Definition at line 119 of file ARICHGeometryPar.cc.

120 {
121
122 //------------------------------
123 // Get ARICH geometry parameters
124 //------------------------------
125 GearDir detParams(content, "Detector");
126 m_modXSize = detParams.getLength("Module/moduleXSize");
127 m_modZSize = detParams.getLength("Module/moduleZSize");
128 m_winThick = detParams.getLength("Module/windowThickness");
129 m_nPadX = detParams.getInt("Module/padXNum");
131 m_padSize = detParams.getLength("Module/padSize");
132 m_chipGap = detParams.getLength("Module/chipGap");
133 m_detZpos = detParams.getLength("Plane/zPosition");
134 m_qeScale = detParams.getDouble("Module/qeScale");
135 m_windowAbsorbtion = detParams.getDouble("Module/windowAbsorbtion");
136 m_chipNegativeCrosstalk = detParams.getDouble("Module/chipNegativeCrosstalk");
137 string Type = content.getString("@type", "");
138 if (Type == "beamtest") return;
139 m_detInnerRadius = detParams.getLength("Plane/tubeInnerRadius");
140 m_detOuterRadius = detParams.getLength("Plane/tubeOuterRadius");
141
142 GearDir mirrParams(content, "Mirrors");
143 if (mirrParams) {
144 m_nMirrors = mirrParams.getInt("nMirrors");
145 m_mirrorThickness = mirrParams.getLength("mirrorThickness");
146 m_mirrorOuterRad = mirrParams.getLength("outerRadius");
147 m_mirrorStartAng = mirrParams.getAngle("startAngle");
148 m_mirrorZPos = mirrParams.getLength("Zposition");
149 }
150
151 GearDir qeParams(content, "QE");
152 m_ColEffi = qeParams.getDouble("ColEffi");
153 m_LambdaFirst = qeParams.getLength("LambdaFirst") / Unit::nm;
154 m_LambdaStep = qeParams.getLength("LambdaStep") / Unit::nm;
155 m_NpointsQE = 0;
156 for (int i = 0; i < MAXPTS_QE; i++) {
157 int ii = i + 1;
158 stringstream ss; string cc;
159 ss << ii; ss >> cc;
160 string path = "Qeffi[@component='point-" + cc + "']/";
161 GearDir qe(qeParams, path);
162 if (!qe) break;
163 m_NpointsQE++;
164 m_QE[i] = qe.getDouble("qe");
165 }
166
167 GearDir aerogel(content, "Aerogel");
168 m_tileNr = aerogel.getInt("tileNr");
169 m_tileGap = aerogel.getLength("tileGap") / Unit::cm;
170 m_aeroRin = aerogel.getLength("tubeInnerRadius") / Unit::cm;
171 m_aeroRout = aerogel.getLength("tubeOuterRadius") / Unit::cm;
172
173 int i = 0;
174 for (const GearDir& ring : aerogel.getNodes("tileNphi/Ring")) {
175 m_tileNphi[i] = ring.getInt();
176 i++;
177 }
178
179 }
static const double nm
[nanometers]
Definition: Unit.h:72
static const double cm
Standard units with the value = 1.
Definition: Unit.h:47

◆ readMirrorAlignment()

void readMirrorAlignment ( const GearDir content)
private

Reads mirror plates alignment parameters.

Definition at line 566 of file ARICHGeometryPar.cc.

567 {
568 GearDir modParams(content, "Mirrors/Alignment");
569
570 for (const GearDir& plate : modParams.getNodes("Plate")) {
571 int id = atoi(plate.getString("@id").c_str());
572 double dr = plate.getLength("dr");
573 double dphi = plate.getAngle("dphi");
574 double dtheta = plate.getAngle("dtheta");
575 VectorUtil::setMag(m_mirrorpoint[id - 1], m_mirrorpoint[id - 1].R() + dr);
576 VectorUtil::setTheta(m_mirrornorm[id - 1], m_mirrornorm[id - 1].Theta() + dtheta);
577 VectorUtil::setPhi(m_mirrornorm[id - 1], m_mirrornorm[id - 1].Phi() + dphi);
578 }
579 }
double R
typedef autogenerated by FFTW

◆ readModuleInfo()

void readModuleInfo ( const GearDir content)

read parameters of each module from gearbox.

Definition at line 266 of file ARICHGeometryPar.cc.

267 {
268 istringstream chstream;
269 int ch; double qq;
270 GearDir modParams(content, "ModuleInfo");
271 uint8_t defqe = uint8_t(modParams.getDouble("DefaultQE") * 100);
272 m_ChannelQE.assign(m_nPads * m_fR.size(), defqe);
273 for (const GearDir& module : modParams.getNodes("Module")) {
274 int modid = atoi(module.getString("@id", "").c_str());
275 chstream.str(module.getString("ChannelsQE"));
276 while (chstream >> ch >> qq) {
277 int chid = (modid - 1) * m_nPads + ch;
278 m_ChannelQE[chid] = uint8_t(qq * 100);
279 }
280 chstream.clear();
281 chstream.str(module.getString("DeadChannels"));
282 while (chstream >> ch) {
283 setActive(modid, ch, false);
284 }
285 chstream.clear();
286 }
287 }
void setActive(int module, int channel, bool val)
set the channel on/off

◆ setActive()

void setActive ( int  module,
int  channel,
bool  val 
)

set the channel on/off

Definition at line 546 of file ARICHGeometryPar.cc.

547 {
548 int ch = (module - 1) * m_nPads + channel;
549 int bit = ch % 32;
550 unsigned int idx = ch / 32;
551 if (idx >= m_DetectorMask.size()) {
552 B2WARNING(idx << " Wrong detector mask size >= " << m_DetectorMask.size());
553 }
554 if (active) m_DetectorMask[idx] |= (1 << bit);
555 else m_DetectorMask[idx] &= ~(1 << bit);
556 }

◆ setAerogelThickness()

void setAerogelThickness ( int  ilayer,
double  thick 
)

set thickness of "ilayer" aerogel layer

Definition at line 520 of file ARICHGeometryPar.cc.

521 {
522 m_nRad++;
523 m_aeroThickness[layer] = thick;
524 }

◆ setAerogelZPosition()

void setAerogelZPosition ( int  ilayer,
double  zPos 
)

set z position of "ilayer" aerogel layer

Definition at line 526 of file ARICHGeometryPar.cc.

527 {
528 m_aeroZPosition[layer] = zPos;
529 }

◆ setAeroRefIndex()

void setAeroRefIndex ( int  ilayer,
double  n 
)

set refractive index of "ilayer" aerogel layer

Definition at line 515 of file ARICHGeometryPar.cc.

516 {
517 if (n) m_aeroRefIndex[layer] = n;
518 }

◆ setAeroTransLength()

void setAeroTransLength ( int  ilayer,
double  trlen 
)

set transmission length of "ilayer" aerogel layer

Definition at line 510 of file ARICHGeometryPar.cc.

511 {
512 m_aeroTrLength[layer] = trlength;
513 }

◆ setAverageAgel()

void setAverageAgel ( bool  v)

Set the flag for the reconstruction by using the average aerogel refractive index.

Definition at line 140 of file ARICHBtestGeometryPar.cc.

141 {
142 m_averageAgel = v;
143 }

◆ setFrameRotation()

void setFrameRotation ( double  v)

Set the rotation angle of the Aerogel RICH frame.

Definition at line 128 of file ARICHBtestGeometryPar.cc.

129 {
130 m_frameRotation = ROOT::Math::Rotation3D() * ROOT::Math::RotationY(v);
131 B2INFO("ARICHBtestGeometryPar::setFrameRotation=" << v);
132
133 }

◆ setMwpc()

void setMwpc ( ARICHTracking m_mwpc)

Set the pointer of the tracking MWPCs.

Definition at line 68 of file ARICHBtestGeometryPar.cc.

69 {
70 m_mwpc = m;
71 }

◆ setOffset()

void setOffset ( const ROOT::Math::XYZVector &  v)

Set of the setup global offset.

Definition at line 161 of file ARICHBtestGeometryPar.cc.

162 {
163 m_offset = v;
164 B2INFO("ARICHBtestGeometryPar::setOffset=" << m_offset.X() << "," << m_offset.Y() << "," << m_offset.Z());
165
166 }

◆ setRotationCenter()

void setRotationCenter ( const ROOT::Math::XYZVector &  v)

Set the rotation center of the Aerogel RICH frame.

Definition at line 115 of file ARICHBtestGeometryPar.cc.

116 {
118 B2INFO("ARICHBtestGeometryPar::setRotationCenter=" << m_rotationCenter.X() << "," << m_rotationCenter.Y() << "," <<
119 m_rotationCenter.Z());
120
121 }

◆ setTrackingShift()

void setTrackingShift ( const ROOT::Math::XYZVector &  v)

Set the tracking shift.

Definition at line 101 of file ARICHBtestGeometryPar.cc.

102 {
103 m_trackingShift = v;
104 B2INFO("ARICHBtestGeometryPar::setTrackingShift=" << m_trackingShift.X() << "," << m_trackingShift.Y() << "," <<
105 m_trackingShift.Z());
106
107 }

◆ setWindowRefIndex()

void setWindowRefIndex ( double  refInd)

set detector module window refractive index

Definition at line 531 of file ARICHGeometryPar.cc.

532 {
533 m_winRefInd = refInd;
534 }

◆ ~ARICHBtestGeometryPar()

~ARICHBtestGeometryPar ( )
virtual

Destructor.

Definition at line 63 of file ARICHBtestGeometryPar.cc.

64 {
65 }

◆ ~ARICHGeometryPar()

~ARICHGeometryPar ( )
virtual

Destructor.

Definition at line 43 of file ARICHGeometryPar.cc.

44 {
45 }

Variable Documentation

◆ p_B4ARICHBtestGeometryParDB

ARICHBtestGeometryPar * p_B4ARICHBtestGeometryParDB = 0
staticprivate

Pointer that saves the instance of this class.

Definition at line 196 of file ARICHBtestGeometryPar.h.

◆ p_B4ARICHGeometryParDB

ARICHGeometryPar * p_B4ARICHGeometryParDB = 0
staticprivate

Pointer that saves the instance of this class.

Definition at line 248 of file ARICHGeometryPar.h.