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 absorbtion 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 93 of file ARICHBtestGeometryPar.cc.

94 {
95 m_hapdmap.push_back(std::make_pair(x, y));
96 return m_hapdmap.size();
97 }
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 99 of file ARICHBtestGeometryPar.cc.

100 {
101 m_hapdeid.push_back(std::make_pair(x, y));
102 return m_hapdeid.size();
103 }
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 37 of file ARICHBtestGeometryPar.cc.

37 :
38 m_mwpc(new ARICHTracking),
39 m_trackingShift(ROOT::Math::XYZVector()),
40 m_rotationCenter(ROOT::Math::XYZVector()),
41 m_frameRotation(ROOT::Math::Rotation3D()),
43 m_nPads(0),
44 m_init(0),
45 m_simple(0)
46 {
47 clear();
48 }
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 51 of file ARICHBtestGeometryPar.cc.

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

◆ ARICHGeometryPar()

Constructor.

Definition at line 41 of file ARICHGeometryPar.cc.

42 {
43 clear();
44 }

◆ chipLocPosition()

void chipLocPosition ( )
private

calculates the centers of chips in detector module local coordinates

Definition at line 410 of file ARICHGeometryPar.cc.

411 {
412 double xycenter = m_padSize * m_nPadX / 4. + m_chipGap / 2.;
413 m_chipLocPos.push_back(ROOT::Math::XYVector(xycenter - m_padSize * m_nPadX / 4., xycenter - m_padSize * m_nPadX / 4.));
414 m_chipLocPos.push_back(ROOT::Math::XYVector(xycenter - m_padSize * m_nPadX / 4., -xycenter - m_padSize * m_nPadX / 4.));
415 m_chipLocPos.push_back(ROOT::Math::XYVector(-xycenter - m_padSize * m_nPadX / 4., xycenter - m_padSize * m_nPadX / 4.));
416 m_chipLocPos.push_back(ROOT::Math::XYVector(-xycenter - m_padSize * m_nPadX / 4., -xycenter - m_padSize * m_nPadX / 4.));
417 }
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 156 of file ARICHBtestGeometryPar.cc.

157 {
158 m_init = false;
159 m_simple = false;
160 m_trackingShift = ROOT::Math::XYZVector();
161 m_frameRotation = ROOT::Math::Rotation3D();
162 m_rotationCenter = ROOT::Math::XYZVector();
163 }

◆ clear() [2/2]

void clear ( void  )

Clears.

Definition at line 76 of file ARICHGeometryPar.cc.

77 {
78 m_chipGap = 0.0;
79 m_detZpos = 0.0;
80 m_modXSize = 0.0;
81 m_modZSize = 0.0;
82 m_winThick = 0.0;
83 m_winRefInd = 0.0;
84 m_mirrorOuterRad = 0.0;
86 m_mirrorStartAng = 0.0;
87 m_nMirrors = 0;
88 m_mirrorZPos = 0.0;
89 m_nPadX = 0;
90 m_padSize = 0.0;
91 m_detInnerRadius = 0.0;
92 m_detOuterRadius = 0.0;
93 m_nrow = 0;
94 m_nRad = 0;
95 m_init = false;
96 m_simple = false;
97 m_ncol.clear(); m_fDFi.clear(); m_fDR.clear(); m_fR.clear();
98 m_fFi.clear(); m_fFiMod.clear(); m_chipLocPos.clear(); m_padWorldPositions.clear(); m_mirrornorm.clear(); m_mirrorpoint.clear();
99 m_ChannelQE.clear();
100 for (int i = 0; i < MAX_N_ALAYERS; i++) {
101 m_aeroTrLength[i] = 0; m_aeroRefIndex[i] = 0;
102 m_aeroZPosition[i] = 0; m_aeroThickness[i] = 0;
103 }
104 m_nPads = 0;
105 m_ColEffi = 0.;
106 m_LambdaFirst = 0.;
107 m_LambdaStep = 0.;
108 m_NpointsQE = 0;
109 m_qeScale = 0.;
112 for (int i = 0; i < MAXPTS_QE; i++) {m_QE[i] = 0.;}
113
114 m_tileNr = 0;
115 m_tileGap = 0.;
116 m_aeroRin = 0.;
117 m_aeroRout = 0.;
118 for (int i = 0; i < 5; i++) m_tileNphi[i] = 0;
119
120 }
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 lenths.
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
absorbtion 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 184 of file ARICHGeometryPar.cc.

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

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

◆ 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 149 of file ARICHBtestGeometryPar.cc.

150 {
151 return m_averageAgel;
152 }

◆ getBoardFromMerger()

int getBoardFromMerger ( int  mergerID,
int  slot 
)

returns front-end board ID from merger ID and slot

Definition at line 246 of file ARICHGeometryPar.cc.

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

◆ getChannelCenterGlob()

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

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

Definition at line 431 of file ARICHGeometryPar.cc.

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

◆ getChannelCenterLoc()

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

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

Definition at line 437 of file ARICHGeometryPar.cc.

438 {
439 return m_padLocPositions[chID];
440 }
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 313 of file ARICHGeometryPar.cc.

314 {
315 int ChipID = getChipID(position);
316 int Npad = int(m_nPadX / 2);
317 ROOT::Math::XYVector chipPos = getChipLocPos(ChipID);
318 ROOT::Math::XYVector locloc = position - chipPos;
319 int ix = int(locloc.X() / m_padSize);
320 int iy = int(locloc.Y() / m_padSize);
321 if (locloc.X() < 0 || locloc.Y() < 0) return -1;
322 if (ix > Npad - 1 || iy > Npad - 1) return -1;
323 int chID = ChipID * Npad * Npad + iy + ix * Npad;
324 return chID;
325 }
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 307 of file ARICHGeometryPar.cc.

308 {
309 int id = (moduleID - 1) * m_nPads + channelID;
310 return m_ChannelQE.at(id) / 100.0;
311 }

◆ getChipID()

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

get ID number of chip containing point "locpos"

Definition at line 420 of file ARICHGeometryPar.cc.

421 {
422 if (locpos.X() > 0) {
423 if (locpos.Y() > 0) return 0;
424 return 1;
425 }
426 if (locpos.Y() > 0) return 2;
427 return 3;
428 }

◆ 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 375 of file ARICHGeometryPar.cc.

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

◆ 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 139 of file ARICHBtestGeometryPar.cc.

140 {
141 return m_frameRotation;
142 }

◆ GetHapdChannelPosition()

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

Get the position of the HAPD channel.

Definition at line 83 of file ARICHBtestGeometryPar.cc.

84 {
85 return m_hapdmap[id];
86 }

◆ 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 88 of file ARICHBtestGeometryPar.cc.

89 {
90 return m_hapdeid[id];
91 }

◆ getMergerFromCooper()

int getMergerFromCooper ( int  cooperID,
int  finesse 
)

returns merger board ID from cooperID and finesse

Definition at line 234 of file ARICHGeometryPar.cc.

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

◆ getMirrorNormal()

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

get normal vector of mirID-th mirror plate

Definition at line 503 of file ARICHGeometryPar.cc.

504 {
505 return m_mirrornorm[mirID];
506 }

◆ getMirrorPoint()

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

get one point lying on mirID-th mirror plate

Definition at line 508 of file ARICHGeometryPar.cc.

509 {
510 return m_mirrorpoint[mirID];
511 }

◆ 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 405 of file ARICHGeometryPar.cc.

406 {
407 return m_fFiMod[copyno - 1];
408 }

◆ getMwpc()

ARICHTracking * getMwpc ( )

Get the pointer of the tracking MWPCs.

Definition at line 78 of file ARICHBtestGeometryPar.cc.

79 {
80 return m_mwpc;
81 }

◆ getNBoardsOnMerger()

int getNBoardsOnMerger ( int  mergerID)

returns number of front-end boards connected to the merger

Definition at line 260 of file ARICHGeometryPar.cc.

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

◆ 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 172 of file ARICHBtestGeometryPar.cc.

173 {
174 return m_offset;
175 }
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 392 of file ARICHGeometryPar.cc.

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

◆ getOriginG4()

G4ThreeVector getOriginG4 ( int  copyNo)

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

Definition at line 399 of file ARICHGeometryPar.cc.

400 {
401 ROOT::Math::XYZVector origin = getOrigin(copyNo);
402 return G4ThreeVector(origin.X() / Unit::mm, origin.Y() / Unit::mm, origin.Z() / Unit::mm);
403 }
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 127 of file ARICHBtestGeometryPar.cc.

128 {
129 return m_rotationCenter;
130 }

◆ 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 114 of file ARICHBtestGeometryPar.cc.

115 {
116 return m_trackingShift;
117 }

◆ getWindowAbsorbtion()

double getWindowAbsorbtion ( )
inline

get absorbtion 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 539 of file ARICHGeometryPar.cc.

540 {
541 int m_DetectorMaskSize = m_nPads * nmodules / 32 + 1;
542 for (int i = 0; i < m_DetectorMaskSize; i++) {
543 m_DetectorMask.push_back(0xFFFFFFFF);
544 }
545 B2INFO("DetectorMask initialized size=" << m_nPads << " * " << nmodules << " +1 =" << m_DetectorMaskSize);
546
547 }
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 71 of file ARICHGeometryPar.cc.

72 {
73 Initialize(content, content);
74 }
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 50 of file ARICHGeometryPar.cc.

51 {
52
53 read(content);
54 string Type = content.getString("@type", "");
55 if (Type == "beamtest") {
56 m_simple = true;
57 modulesPositionSimple(content);
58 mirrorPositionSimple(mirrorcontent);
59 } else {
60 modulesPosition(content);
61 mirrorPositions(content);
62 frontEndMapping(content);
63 }
66 initDetectorMask(m_fR.size());
67 readModuleInfo(content);
68 m_init = true;
69 }
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 29 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 33 of file ARICHGeometryPar.cc.

34 {
37 }
39 }
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 561 of file ARICHGeometryPar.cc.

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

◆ 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 477 of file ARICHGeometryPar.cc.

478 {
479 double rmir = m_mirrorOuterRad * cos(M_PI / m_nMirrors) - m_mirrorThickness;
480 for (int i = 0; i < m_nMirrors; i++) {
481 ROOT::Math::XYZVector norm(cos(2.*M_PI / double(m_nMirrors) * (i + 0.5) + m_mirrorStartAng),
482 sin(2.*M_PI / double(m_nMirrors) * (i + 0.5) + m_mirrorStartAng), 0);
483 m_mirrornorm.push_back(norm);
484 m_mirrorpoint.push_back(rmir * norm);
485 }
486 readMirrorAlignment(content);
487 }
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 489 of file ARICHGeometryPar.cc.

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

◆ modulesPosition()

void modulesPosition ( const GearDir content)
private

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

Definition at line 327 of file ARICHGeometryPar.cc.

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

◆ modulesPositionSimple()

void modulesPositionSimple ( const GearDir content)
private

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

Definition at line 363 of file ARICHGeometryPar.cc.

364 {
365 BOOST_FOREACH(const GearDir & module, content.getNodes("Detector/Plane/Modules/Module")) {
366 ROOT::Math::XYVector position(module.getLength("xPos"), module.getLength("yPos"));
367 double angle = module.getAngle("angle") / Unit::rad;
368 m_fFi.push_back(position.Phi());
369 m_fR.push_back(position.R());
370 m_fFiMod.push_back(angle);
371 }
372 B2INFO("Altogether " << m_fR.size() << " ARICH photon detector modules will be placed.");
373 }
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 443 of file ARICHGeometryPar.cc.

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

◆ Print() [1/2]

void Print ( void  ) const

Print some debug information.

Definition at line 178 of file ARICHBtestGeometryPar.cc.

179 {
180
181 }

◆ Print() [2/2]

void Print ( void  ) const

Print some debug information.

Definition at line 303 of file ARICHGeometryPar.cc.

304 {
305 }

◆ QE()

double QE ( double  e) const

get photocathode quantum efficiency at energy e.

Definition at line 292 of file ARICHGeometryPar.cc.

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

◆ read()

void read ( const GearDir content)

gets geometry parameters from gearbox.

Definition at line 122 of file ARICHGeometryPar.cc.

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

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

◆ readModuleInfo()

void readModuleInfo ( const GearDir content)

read parameters of each module from gearbox.

Definition at line 269 of file ARICHGeometryPar.cc.

270 {
271 istringstream chstream;
272 int ch; double qq;
273 GearDir modParams(content, "ModuleInfo");
274 uint8_t defqe = uint8_t(modParams.getDouble("DefaultQE") * 100);
275 m_ChannelQE.assign(m_nPads * m_fR.size(), defqe);
276 BOOST_FOREACH(const GearDir & module, modParams.getNodes("Module")) {
277 int modid = atoi(module.getString("@id", "").c_str());
278 chstream.str(module.getString("ChannelsQE"));
279 while (chstream >> ch >> qq) {
280 int chid = (modid - 1) * m_nPads + ch;
281 m_ChannelQE[chid] = uint8_t(qq * 100);
282 }
283 chstream.clear();
284 chstream.str(module.getString("DeadChannels"));
285 while (chstream >> ch) {
286 setActive(modid, ch, false);
287 }
288 chstream.clear();
289 }
290 }
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 549 of file ARICHGeometryPar.cc.

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

◆ setAerogelThickness()

void setAerogelThickness ( int  ilayer,
double  thick 
)

set thickness of "ilayer" aerogel layer

Definition at line 523 of file ARICHGeometryPar.cc.

524 {
525 m_nRad++;
526 m_aeroThickness[layer] = thick;
527 }

◆ setAerogelZPosition()

void setAerogelZPosition ( int  ilayer,
double  zPos 
)

set z position of "ilayer" aerogel layer

Definition at line 529 of file ARICHGeometryPar.cc.

530 {
531 m_aeroZPosition[layer] = zPos;
532 }

◆ setAeroRefIndex()

void setAeroRefIndex ( int  ilayer,
double  n 
)

set refractive index of "ilayer" aerogel layer

Definition at line 518 of file ARICHGeometryPar.cc.

519 {
520 if (n) m_aeroRefIndex[layer] = n;
521 }

◆ setAeroTransLength()

void setAeroTransLength ( int  ilayer,
double  trlen 
)

set transmission length of "ilayer" aerogel layer

Definition at line 513 of file ARICHGeometryPar.cc.

514 {
515 m_aeroTrLength[layer] = trlength;
516 }

◆ setAverageAgel()

void setAverageAgel ( bool  v)

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

Definition at line 144 of file ARICHBtestGeometryPar.cc.

145 {
146 m_averageAgel = v;
147 }

◆ setFrameRotation()

void setFrameRotation ( double  v)

Set the rotation angle of the Aerogel RICH frame.

Definition at line 132 of file ARICHBtestGeometryPar.cc.

133 {
134 m_frameRotation = ROOT::Math::Rotation3D() * ROOT::Math::RotationY(v);
135 B2INFO("ARICHBtestGeometryPar::setFrameRotation=" << v);
136
137 }

◆ setMwpc()

void setMwpc ( ARICHTracking m_mwpc)

Set the pointer of the tracking MWPCs.

Definition at line 72 of file ARICHBtestGeometryPar.cc.

73 {
74 m_mwpc = m;
75 }

◆ setOffset()

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

Set of the setup global offset.

Definition at line 165 of file ARICHBtestGeometryPar.cc.

166 {
167 m_offset = v;
168 B2INFO("ARICHBtestGeometryPar::setOffset=" << m_offset.X() << "," << m_offset.Y() << "," << m_offset.Z());
169
170 }

◆ setRotationCenter()

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

Set the rotation center of the Aerogel RICH frame.

Definition at line 119 of file ARICHBtestGeometryPar.cc.

120 {
122 B2INFO("ARICHBtestGeometryPar::setRotationCenter=" << m_rotationCenter.X() << "," << m_rotationCenter.Y() << "," <<
123 m_rotationCenter.Z());
124
125 }

◆ setTrackingShift()

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

Set the tracking shift.

Definition at line 105 of file ARICHBtestGeometryPar.cc.

106 {
107 m_trackingShift = v;
108 B2INFO("ARICHBtestGeometryPar::setTrackingShift=" << m_trackingShift.X() << "," << m_trackingShift.Y() << "," <<
109 m_trackingShift.Z());
110
111 }

◆ setWindowRefIndex()

void setWindowRefIndex ( double  refInd)

set detector module window refractive index

Definition at line 534 of file ARICHGeometryPar.cc.

535 {
536 m_winRefInd = refInd;
537 }

◆ ~ARICHBtestGeometryPar()

~ARICHBtestGeometryPar ( )
virtual

Destructor.

Definition at line 67 of file ARICHBtestGeometryPar.cc.

68 {
69 }

◆ ~ARICHGeometryPar()

~ARICHGeometryPar ( )
virtual

Destructor.

Definition at line 46 of file ARICHGeometryPar.cc.

47 {
48 }

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.