CbmRoot
CbmMuchSegmentManual Class Reference

#include <CbmMuchSegmentManual.h>

Inheritance diagram for CbmMuchSegmentManual:
[legend]
Collaboration diagram for CbmMuchSegmentManual:
[legend]

Public Member Functions

 CbmMuchSegmentManual ()
 
virtual ~CbmMuchSegmentManual ()
 
 CbmMuchSegmentManual (char *inputFile, char *digiFileName)
 
virtual InitStatus Init ()
 
void SegmentMuch ()
 
void SetNStations (Int_t nStations)
 
void SetNRegions (Int_t iStation, Int_t nRegions)
 
void SetRegionRadius (Int_t iStation, Int_t iRegion, Double_t radius)
 
void SetNChannels (Int_t iStation, Int_t nChannels)
 
void SetSigma (Int_t iStation, Int_t iRegion, Double_t sigmaX, Double_t sigmaY)
 
void SetPadSize (Int_t iStation, Int_t iRegion, Double_t padLx, Double_t padLy)
 
void DebugSwitchOn ()
 

Private Member Functions

virtual void SetParContainers ()
 
Int_t IntersectsRad (CbmMuchModuleGemRectangular *module, Double_t radius)
 
Int_t IntersectsRad (CbmMuchSectorRectangular *sector, Double_t radius)
 
void SegmentLayerSide (CbmMuchLayerSide *layerSide)
 
void SegmentModule (CbmMuchModuleGemRectangular *module, Bool_t useModuleDesign)
 
void SegmentSector (CbmMuchModuleGemRectangular *module, CbmMuchSectorRectangular *sector)
 
Double_t GetSectorMaxSize (CbmMuchModuleGemRectangular *module, const TString side, Int_t &iRegion)
 
Double_t GetPadMaxSize (CbmMuchModuleGemRectangular *module, const TString side)
 
Bool_t ShouldSegment (CbmMuchSectorRectangular *sector, const TString direction, Int_t &iRegion)
 
Int_t GetRegionIndex (CbmMuchSectorRectangular *sector)
 
Bool_t IsIncompleteSector (CbmMuchSectorRectangular *sector)
 
void DrawSegmentation ()
 
void Print (Option_t *="") const
 
void ReadInputFile ()
 
void Trim (std::string &str)
 
Bool_t IsDummyLine (std::string &str)
 
void OmitDummyLines (std::ifstream &infile, std::string &str)
 
std::vector< std::string > & Split (const std::string &s, char delim, std::vector< std::string > &elems)
 
std::vector< std::string > Split (const std::string &s, char delim)
 
template<class T >
void StrToNum (std::string &str, T &number)
 
 CbmMuchSegmentManual (const CbmMuchSegmentManual &)
 
CbmMuchSegmentManualoperator= (const CbmMuchSegmentManual &)
 

Private Attributes

CbmGeoMuchParfGeoPar
 
Int_t fNStations
 
TObjArray * fStations
 
Char_t * fInputFileName
 
Char_t * fDigiFileName
 
std::map< Int_t, Int_t > fNRegions
 
std::map< Int_t, std::vector< Double_t > > fRadii
 
std::map< Int_t, std::vector< Double_t > > fSecLx
 
std::map< Int_t, std::vector< Double_t > > fSecLy
 
std::map< Int_t, Int_t > fNChannels
 
std::map< Int_t, std::vector< Int_t > > fNCols
 
std::map< Int_t, std::vector< Int_t > > fNRows
 
Int_t fDebug
 

Detailed Description

Definition at line 30 of file CbmMuchSegmentManual.h.

Constructor & Destructor Documentation

◆ CbmMuchSegmentManual() [1/3]

CbmMuchSegmentManual::CbmMuchSegmentManual ( )

Default constructor.

Definition at line 41 of file CbmMuchSegmentManual.cxx.

◆ ~CbmMuchSegmentManual()

CbmMuchSegmentManual::~CbmMuchSegmentManual ( )
virtual

Destructor.

Definition at line 78 of file CbmMuchSegmentManual.cxx.

◆ CbmMuchSegmentManual() [2/3]

CbmMuchSegmentManual::CbmMuchSegmentManual ( char *  inputFile,
char *  digiFileName 
)

Standard constructor.

Parameters
inputFileName of the input parameters file
digiFileNameName of the output file with segmentation parameters

Definition at line 59 of file CbmMuchSegmentManual.cxx.

◆ CbmMuchSegmentManual() [3/3]

CbmMuchSegmentManual::CbmMuchSegmentManual ( const CbmMuchSegmentManual )
private

Member Function Documentation

◆ DebugSwitchOn()

void CbmMuchSegmentManual::DebugSwitchOn ( )
inline

Definition at line 93 of file CbmMuchSegmentManual.h.

References fDebug.

◆ DrawSegmentation()

◆ GetPadMaxSize()

Double_t CbmMuchSegmentManual::GetPadMaxSize ( CbmMuchModuleGemRectangular module,
const TString  side 
)
private

Gets maximum pad size for the given module.

Parameters
moduleModule to process
sideDefines which side of a pad should be returned
Returns
maximum pad length, if side="Length", maximum pad width, if side="Width"

Definition at line 650 of file CbmMuchSegmentManual.cxx.

References fNCols, fNRows, CbmMuchModule::GetDetectorId(), GetSectorMaxSize(), and CbmMuchAddress::GetStationIndex().

Referenced by SegmentModule(), and SegmentSector().

◆ GetRegionIndex()

Int_t CbmMuchSegmentManual::GetRegionIndex ( CbmMuchSectorRectangular sector)
private

Gets region index for the given sector.

Parameters
sectorSector
Returns
Index of the region for the sector

Definition at line 600 of file CbmMuchSegmentManual.cxx.

References fNRegions, fRadii, fSecLx, fSecLy, CbmMuchSector::GetAddress(), CbmMuchSectorRectangular::GetPosition(), CbmMuchSectorRectangular::GetSize(), CbmMuchAddress::GetStationIndex(), and IsIncompleteSector().

Referenced by ShouldSegment().

◆ GetSectorMaxSize()

Double_t CbmMuchSegmentManual::GetSectorMaxSize ( CbmMuchModuleGemRectangular module,
const TString  side,
Int_t &  iRegion 
)
private

Gets maximum sector size for the given module.

Parameters
moduleModule to process
sideDefines which side of a sector should be returned
iRegionRegion index containing the given module
Returns
Maximum sector length, if side="Length", maximum sector width, if side="Width"

Definition at line 630 of file CbmMuchSegmentManual.cxx.

References fNRegions, fRadii, fSecLx, fSecLy, CbmMuchModule::GetDetectorId(), CbmMuchAddress::GetStationIndex(), and IntersectsRad().

Referenced by GetPadMaxSize(), SegmentModule(), and SegmentSector().

◆ Init()

InitStatus CbmMuchSegmentManual::Init ( )
virtual

◆ IntersectsRad() [1/2]

Int_t CbmMuchSegmentManual::IntersectsRad ( CbmMuchModuleGemRectangular module,
Double_t  radius 
)
private

Checks whether the given module is intersected by the circle of the given radius.

Parameters
moduleModule to verify
radiusRadius of the circle
Returns
0 if the module is outside the circle, 1 if it is intersected by the circle, 2 if it is contained in the circle

Definition at line 498 of file CbmMuchSegmentManual.cxx.

References CbmMuchModule::GetPosition(), and CbmMuchModule::GetSize().

Referenced by GetSectorMaxSize(), and SegmentSector().

◆ IntersectsRad() [2/2]

Int_t CbmMuchSegmentManual::IntersectsRad ( CbmMuchSectorRectangular sector,
Double_t  radius 
)
private

Checks whether the given sector is intersected by the circle of the given radius.

Parameters
sectorSector to verify
radiusRadius of the circle
Returns
0 if the sector is outside the circle, 1 if it is intersected by the circle, 2 if it is contained in the circle

Definition at line 532 of file CbmMuchSegmentManual.cxx.

References CbmMuchSectorRectangular::GetPosition(), and CbmMuchSectorRectangular::GetSize().

◆ IsDummyLine()

Bool_t CbmMuchSegmentManual::IsDummyLine ( std::string &  str)
inlineprivate

Definition at line 225 of file CbmMuchSegmentManual.h.

References Trim().

Referenced by OmitDummyLines().

◆ IsIncompleteSector()

Bool_t CbmMuchSegmentManual::IsIncompleteSector ( CbmMuchSectorRectangular sector)
private

Determines whether the given sector is incomplete.

Parameters
sectorSector to process
Returns
true if the sector is incomplete, false otherwise

Definition at line 662 of file CbmMuchSegmentManual.cxx.

References fNChannels, CbmMuchSector::GetAddress(), CbmMuchSector::GetNChannels(), CbmMuchSectorRectangular::GetSize(), and CbmMuchAddress::GetStationIndex().

Referenced by GetRegionIndex(), and SegmentSector().

◆ OmitDummyLines()

void CbmMuchSegmentManual::OmitDummyLines ( std::ifstream &  infile,
std::string &  str 
)
inlineprivate

Definition at line 231 of file CbmMuchSegmentManual.h.

References IsDummyLine().

Referenced by ReadInputFile().

◆ operator=()

CbmMuchSegmentManual& CbmMuchSegmentManual::operator= ( const CbmMuchSegmentManual )
private

◆ Print()

◆ ReadInputFile()

void CbmMuchSegmentManual::ReadInputFile ( )
private

Reads input parameters for the segmentation.

Definition at line 897 of file CbmMuchSegmentManual.cxx.

References fInputFileName, fNChannels, fNRegions, fNStations, fRadii, OmitDummyLines(), SetNChannels(), SetNRegions(), SetNStations(), SetPadSize(), SetRegionRadius(), Split(), and StrToNum().

Referenced by Init().

◆ SegmentLayerSide()

void CbmMuchSegmentManual::SegmentLayerSide ( CbmMuchLayerSide layerSide)
private

Performs segmentation of the given layer side.

Parameters
layerSidelayer side to segment

Definition at line 281 of file CbmMuchSegmentManual.cxx.

References CbmMuchModule::GetDetectorType(), CbmMuchLayerSide::GetModule(), CbmMuchLayerSide::GetNModules(), and SegmentModule().

Referenced by SegmentMuch().

◆ SegmentModule()

void CbmMuchSegmentManual::SegmentModule ( CbmMuchModuleGemRectangular module,
Bool_t  useModuleDesign 
)
private

Performs segmentation of the given module.

Parameters
moduleModule to segment
useModuleDesignWhether module design is used

Definition at line 297 of file CbmMuchSegmentManual.cxx.

References fNCols, fNRows, CbmMuchModule::GetDetectorId(), CbmMuchModuleGem::GetNSectors(), GetPadMaxSize(), CbmMuchModule::GetPosition(), GetSectorMaxSize(), CbmMuchModule::GetSize(), CbmMuchAddress::GetStationIndex(), i, and SegmentSector().

Referenced by SegmentLayerSide().

◆ SegmentMuch()

void CbmMuchSegmentManual::SegmentMuch ( )

◆ SegmentSector()

◆ SetNChannels()

void CbmMuchSegmentManual::SetNChannels ( Int_t  iStation,
Int_t  nChannels 
)

Sets number of channels per sector for the given station.

Parameters
iStationStation index
nChannelsNumber of channels

Definition at line 118 of file CbmMuchSegmentManual.cxx.

References fDebug, fNChannels, and fNStations.

Referenced by ReadInputFile().

◆ SetNRegions()

void CbmMuchSegmentManual::SetNRegions ( Int_t  iStation,
Int_t  nRegions 
)

Sets number of circled regions for the given station.

Parameters
iStationStation index
nRegionsNumber of regions in the station

Definition at line 82 of file CbmMuchSegmentManual.cxx.

References fDebug, fNChannels, fNCols, fNRegions, fNRows, fNStations, fRadii, fSecLx, and fSecLy.

Referenced by ReadInputFile().

◆ SetNStations()

void CbmMuchSegmentManual::SetNStations ( Int_t  nStations)
inline

Sets number of stations.

Parameters
nStationsNumber of stations

Definition at line 54 of file CbmMuchSegmentManual.h.

References fNStations.

Referenced by ReadInputFile().

◆ SetPadSize()

void CbmMuchSegmentManual::SetPadSize ( Int_t  iStation,
Int_t  iRegion,
Double_t  padLx,
Double_t  padLy 
)

Sets pad size for the given region of the given station.

Parameters
iStationStation index
iRegionRegion index
padLxPad width
padLyPad length

Definition at line 177 of file CbmMuchSegmentManual.cxx.

References fNCols, fNRegions, fNRows, fNStations, fSecLx, and fSecLy.

Referenced by ReadInputFile().

◆ SetParContainers()

void CbmMuchSegmentManual::SetParContainers ( )
privatevirtual

Get parameter containers

Definition at line 205 of file CbmMuchSegmentManual.cxx.

References fGeoPar.

◆ SetRegionRadius()

void CbmMuchSegmentManual::SetRegionRadius ( Int_t  iStation,
Int_t  iRegion,
Double_t  radius 
)

Sets the radius for the given circled region in the given station.

Parameters
iStationStation index
iRegionRegion index
radiusRadius of the region

Definition at line 131 of file CbmMuchSegmentManual.cxx.

References fDebug, fNRegions, fNStations, and fRadii.

Referenced by ReadInputFile().

◆ SetSigma()

void CbmMuchSegmentManual::SetSigma ( Int_t  iStation,
Int_t  iRegion,
Double_t  sigmaX,
Double_t  sigmaY 
)

Sets resolution for the given region of the given station.

Parameters
iStationStation index
iRegionRegion index
sigmaXResolution in X direction
sigmaYResolution in Y direction

Definition at line 149 of file CbmMuchSegmentManual.cxx.

References fNCols, fNRegions, fNRows, fNStations, fSecLx, and fSecLy.

◆ ShouldSegment()

Bool_t CbmMuchSegmentManual::ShouldSegment ( CbmMuchSectorRectangular sector,
const TString  direction,
Int_t &  iRegion 
)
private

Checks whether the given sector should be segmented in the given direction.

Parameters
sectorSector to verify
directionDirection to segment in ("X" or "Y")
iRegionRegion index of the sector
Returns
true if segmentation is required, false otherwise

Definition at line 566 of file CbmMuchSegmentManual.cxx.

References fSecLx, fSecLy, CbmMuchSector::GetAddress(), GetRegionIndex(), CbmMuchSectorRectangular::GetSize(), and CbmMuchAddress::GetStationIndex().

Referenced by SegmentSector().

◆ Split() [1/2]

std::vector<std::string> CbmMuchSegmentManual::Split ( const std::string &  s,
char  delim 
)
inlineprivate

Definition at line 248 of file CbmMuchSegmentManual.h.

References Split().

◆ Split() [2/2]

std::vector<std::string>& CbmMuchSegmentManual::Split ( const std::string &  s,
char  delim,
std::vector< std::string > &  elems 
)
inlineprivate

Definition at line 238 of file CbmMuchSegmentManual.h.

Referenced by ReadInputFile(), and Split().

◆ StrToNum()

template<class T >
void CbmMuchSegmentManual::StrToNum ( std::string &  str,
T &  number 
)
inlineprivate

Definition at line 254 of file CbmMuchSegmentManual.h.

Referenced by ReadInputFile().

◆ Trim()

void CbmMuchSegmentManual::Trim ( std::string &  str)
inlineprivate

Definition at line 217 of file CbmMuchSegmentManual.h.

Referenced by IsDummyLine().

Member Data Documentation

◆ fDebug

Int_t CbmMuchSegmentManual::fDebug
private

◆ fDigiFileName

Char_t* CbmMuchSegmentManual::fDigiFileName
private

Definition at line 100 of file CbmMuchSegmentManual.h.

Referenced by DrawSegmentation(), Print(), and SegmentMuch().

◆ fGeoPar

CbmGeoMuchPar* CbmMuchSegmentManual::fGeoPar
private

Definition at line 96 of file CbmMuchSegmentManual.h.

Referenced by Init(), and SetParContainers().

◆ fInputFileName

Char_t* CbmMuchSegmentManual::fInputFileName
private

Definition at line 99 of file CbmMuchSegmentManual.h.

Referenced by ReadInputFile().

◆ fNChannels

std::map<Int_t, Int_t> CbmMuchSegmentManual::fNChannels
private

◆ fNCols

std::map<Int_t, std::vector<Int_t> > CbmMuchSegmentManual::fNCols
private

◆ fNRegions

std::map<Int_t, Int_t> CbmMuchSegmentManual::fNRegions
private

◆ fNRows

std::map<Int_t, std::vector<Int_t> > CbmMuchSegmentManual::fNRows
private

◆ fNStations

Int_t CbmMuchSegmentManual::fNStations
private

◆ fRadii

std::map<Int_t, std::vector<Double_t> > CbmMuchSegmentManual::fRadii
private

◆ fSecLx

std::map<Int_t, std::vector<Double_t> > CbmMuchSegmentManual::fSecLx
private

◆ fSecLy

std::map<Int_t, std::vector<Double_t> > CbmMuchSegmentManual::fSecLy
private

◆ fStations

TObjArray* CbmMuchSegmentManual::fStations
private

Definition at line 98 of file CbmMuchSegmentManual.h.

Referenced by DrawSegmentation(), Init(), Print(), SegmentMuch(), and SegmentSector().


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