CbmRoot
Loading...
Searching...
No Matches
CbmRichGeoHandler Class Reference

#include <CbmRichGeoHandler.h>

Public Member Functions

virtual ~CbmRichGeoHandler ()=default
 
 CbmRichGeoHandler (const CbmRichGeoHandler &)=delete
 
CbmRichGeoHandleroperator= (const CbmRichGeoHandler &)=delete
 
std::vector< Int_tGetPixelAddresses ()
 
Int_t GetPixelAddressByPath (const std::string &path)
 
CbmRichPixelDataGetPixelDataByAddress (Int_t address)
 
Int_t GetRandomPixelAddress ()
 
std::vector< Int_tGetPmtIds ()
 
CbmRichPmtDataGetPmtDataById (Int_t id)
 
std::vector< Int_tGetNeighbourPixels (Int_t address, Int_t N, Bool_t horizontal=true, Bool_t vertical=true, Bool_t diagonal=true)
 Return the addresses of the neighbour pixels.
 
std::vector< Int_tGetDirectNeighbourPixels (Int_t address, Bool_t horizontal=true, Bool_t vertical=true)
 Return the addresses of the direct neighbour pixels.
 
std::vector< Int_tGetDiagonalNeighbourPixels (Int_t address)
 Return the addresses of the diagonal neighbour pixels.
 
std::vector< Int_tGetNxNNeighbourPixels (Int_t address, Int_t n)
 Return the addresses of pixels in a (2n+1)*(2n+1) grid, with the address pixel in the center of the grid. Addresses are limited to the same MAPMT as the input address. Needed for noise digis caused by charged particles.
 

Static Public Member Functions

static CbmRichGeoHandlerGetInstance ()
 

Private Types

enum class  CbmRichGeoSetup { Rich , MiniRich }
 

Private Member Functions

 CbmRichGeoHandler ()
 
void Init ()
 Initialize maps.
 
CbmRichGeoSetup GetDetectorSetup (const TString &nodePath)
 Identify detector setup (RICH or mRICH) by node path.
 
Int_t CreateAddressRich (const std::string &nodePath, Int_t &channelAddr, Int_t &pmtId)
 Create channel address & pmt Id from node path for RICH.
 
Int_t CreateAddressMiniRich (const std::string &nodePath, Int_t &channelAddr, Int_t &pmtId)
 Create channel address & pmt Id from node path for mRICH.
 

Private Attributes

bool fFallback {false}
 
std::map< std::string, Int_tfPixelPathToAddress {}
 
std::map< Int_t, std::unique_ptr< CbmRichPixelData > > fPixelAddressToData {}
 
std::vector< Int_tfPixelAddresses {}
 
std::map< std::string, Int_tfPmtPathToId {}
 
std::map< Int_t, std::unique_ptr< CbmRichPmtData > > fPmtIdToData {}
 
std::vector< Int_tfPmtIds {}
 

Detailed Description

Definition at line 25 of file CbmRichGeoHandler.h.

Member Enumeration Documentation

◆ CbmRichGeoSetup

enum class CbmRichGeoHandler::CbmRichGeoSetup
strongprivate
Enumerator
Rich 
MiniRich 

Definition at line 26 of file CbmRichGeoHandler.h.

Constructor & Destructor Documentation

◆ CbmRichGeoHandler() [1/2]

CbmRichGeoHandler::CbmRichGeoHandler ( )
inlineprivate

Constructor

Definition at line 34 of file CbmRichGeoHandler.h.

References Init().

Referenced by CbmRichGeoHandler(), GetInstance(), and operator=().

◆ ~CbmRichGeoHandler()

virtual CbmRichGeoHandler::~CbmRichGeoHandler ( )
virtualdefault

Destructor

◆ CbmRichGeoHandler() [2/2]

CbmRichGeoHandler::CbmRichGeoHandler ( const CbmRichGeoHandler & )
delete

Copy constructor (disabled)

References CbmRichGeoHandler().

Member Function Documentation

◆ CreateAddressMiniRich()

Int_t CbmRichGeoHandler::CreateAddressMiniRich ( const std::string & nodePath,
Int_t & channelAddr,
Int_t & pmtId )
private

Create channel address & pmt Id from node path for mRICH.

Parameters
nodePathNode path
Returns
Channel address

Definition at line 309 of file CbmRichGeoHandler.cxx.

References x, and y.

Referenced by Init().

◆ CreateAddressRich()

Int_t CbmRichGeoHandler::CreateAddressRich ( const std::string & nodePath,
Int_t & channelAddr,
Int_t & pmtId )
private

Create channel address & pmt Id from node path for RICH.

Parameters
nodePathNode path
Returns
Channel address

Definition at line 269 of file CbmRichGeoHandler.cxx.

References CbmRichAddress::GetAddress(), and CbmRichAddress::GetMotherAddress().

Referenced by Init().

◆ GetDetectorSetup()

CbmRichGeoSetup CbmRichGeoHandler::GetDetectorSetup ( const TString & nodePath)
inlineprivate

Identify detector setup (RICH or mRICH) by node path.

Returns
Detector setup as 0: RICH or 1: mRICH

Definition at line 133 of file CbmRichGeoHandler.h.

References MiniRich, and Rich.

Referenced by Init().

◆ GetDiagonalNeighbourPixels()

std::vector< Int_t > CbmRichGeoHandler::GetDiagonalNeighbourPixels ( Int_t address)
inline

Return the addresses of the diagonal neighbour pixels.

Parameters
addressPixel address

Definition at line 95 of file CbmRichGeoHandler.h.

References GetNeighbourPixels().

Referenced by CbmRichDigitizer::AddCrossTalk().

◆ GetDirectNeighbourPixels()

std::vector< Int_t > CbmRichGeoHandler::GetDirectNeighbourPixels ( Int_t address,
Bool_t horizontal = true,
Bool_t vertical = true )
inline

Return the addresses of the direct neighbour pixels.

Parameters
addressPixel address

Definition at line 86 of file CbmRichGeoHandler.h.

References GetNeighbourPixels().

Referenced by CbmRichDigitizer::AddCrossTalk().

◆ GetInstance()

◆ GetNeighbourPixels()

std::vector< Int_t > CbmRichGeoHandler::GetNeighbourPixels ( Int_t address,
Int_t N,
Bool_t horizontal = true,
Bool_t vertical = true,
Bool_t diagonal = true )

Return the addresses of the neighbour pixels.

Parameters
addressPixel address
nSize of the grid (2n+1)*(2n+1)
horizontalreturn horizontal neighbours
verticalreturn vertical neighbours
diagonalreturn diagonal neighbours

Definition at line 231 of file CbmRichGeoHandler.cxx.

References CbmRichPmtData::fPixelAddresses, CbmRichPixelData::fPixelId, CbmRichPixelData::fPmtId, GetPixelDataByAddress(), and GetPmtDataById().

Referenced by GetDiagonalNeighbourPixels(), GetDirectNeighbourPixels(), and GetNxNNeighbourPixels().

◆ GetNxNNeighbourPixels()

std::vector< Int_t > CbmRichGeoHandler::GetNxNNeighbourPixels ( Int_t address,
Int_t n )
inline

Return the addresses of pixels in a (2n+1)*(2n+1) grid, with the address pixel in the center of the grid. Addresses are limited to the same MAPMT as the input address. Needed for noise digis caused by charged particles.

Parameters
addressPixel address
nSize of the grid (2n+1)*(2n+1)

Definition at line 108 of file CbmRichGeoHandler.h.

References GetNeighbourPixels().

Referenced by CbmRichDigitizer::AddChargedParticleCluster().

◆ GetPixelAddressByPath()

Int_t CbmRichGeoHandler::GetPixelAddressByPath ( const std::string & path)

Return pixel address by node path

Definition at line 210 of file CbmRichGeoHandler.cxx.

References fPixelPathToAddress.

Referenced by CbmRich::ProcessHits().

◆ GetPixelAddresses()

std::vector< Int_t > CbmRichGeoHandler::GetPixelAddresses ( )
inline

◆ GetPixelDataByAddress()

◆ GetPmtDataById()

CbmRichPmtData * CbmRichGeoHandler::GetPmtDataById ( Int_t id)

Return CbmRichDataPmt by pmt id

Definition at line 226 of file CbmRichGeoHandler.cxx.

References fPmtIdToData.

Referenced by CbmRichGeoTest::DrawPmtPoint(), GetNeighbourPixels(), CbmRichUtil::GetPmtHistBins(), and CbmRichUrqmdTest::NofHitsAndPoints().

◆ GetPmtIds()

std::vector< Int_t > CbmRichGeoHandler::GetPmtIds ( )
inline

Return ids for all pmts

Definition at line 66 of file CbmRichGeoHandler.h.

References fPmtIds.

Referenced by CbmRichGeoTest::DrawPmts(), CbmRichUtil::GetPmtHistBins(), and CbmRichUrqmdTest::NofHitsAndPoints().

◆ GetRandomPixelAddress()

Int_t CbmRichGeoHandler::GetRandomPixelAddress ( )

Return random address. Used for random noise digis

Definition at line 224 of file CbmRichGeoHandler.cxx.

References fPixelAddresses.

Referenced by CbmRichDigitizer::AddDarkRateNoise(), and CbmRichDigitizer::AddEventNoise().

◆ Init()

void CbmRichGeoHandler::Init ( )
private

◆ operator=()

CbmRichGeoHandler & CbmRichGeoHandler::operator= ( const CbmRichGeoHandler & )
delete

Assignment operator (disabled)

References CbmRichGeoHandler().

Member Data Documentation

◆ fFallback

bool CbmRichGeoHandler::fFallback {false}
private

Definition at line 114 of file CbmRichGeoHandler.h.

Referenced by Init().

◆ fPixelAddresses

std::vector<Int_t> CbmRichGeoHandler::fPixelAddresses {}
private

Definition at line 118 of file CbmRichGeoHandler.h.

Referenced by GetPixelAddresses(), GetRandomPixelAddress(), and Init().

◆ fPixelAddressToData

std::map<Int_t, std::unique_ptr<CbmRichPixelData> > CbmRichGeoHandler::fPixelAddressToData {}
private

Definition at line 117 of file CbmRichGeoHandler.h.

Referenced by GetPixelDataByAddress(), and Init().

◆ fPixelPathToAddress

std::map<std::string, Int_t> CbmRichGeoHandler::fPixelPathToAddress {}
private

Definition at line 116 of file CbmRichGeoHandler.h.

Referenced by GetPixelAddressByPath(), and Init().

◆ fPmtIds

std::vector<Int_t> CbmRichGeoHandler::fPmtIds {}
private

Definition at line 122 of file CbmRichGeoHandler.h.

Referenced by GetPmtIds(), and Init().

◆ fPmtIdToData

std::map<Int_t, std::unique_ptr<CbmRichPmtData> > CbmRichGeoHandler::fPmtIdToData {}
private

Definition at line 121 of file CbmRichGeoHandler.h.

Referenced by GetPmtDataById(), and Init().

◆ fPmtPathToId

std::map<std::string, Int_t> CbmRichGeoHandler::fPmtPathToId {}
private

Definition at line 120 of file CbmRichGeoHandler.h.

Referenced by Init().


The documentation for this class was generated from the following files: