CbmRoot
|
#include <CbmMuchSegmentManual.h>
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 &) | |
CbmMuchSegmentManual & | operator= (const CbmMuchSegmentManual &) |
Private Attributes | |
CbmGeoMuchPar * | fGeoPar |
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 |
Definition at line 30 of file CbmMuchSegmentManual.h.
CbmMuchSegmentManual::CbmMuchSegmentManual | ( | ) |
Default constructor.
Definition at line 41 of file CbmMuchSegmentManual.cxx.
|
virtual |
Destructor.
Definition at line 78 of file CbmMuchSegmentManual.cxx.
CbmMuchSegmentManual::CbmMuchSegmentManual | ( | char * | inputFile, |
char * | digiFileName | ||
) |
Standard constructor.
inputFile | Name of the input parameters file |
digiFileName | Name of the output file with segmentation parameters |
Definition at line 59 of file CbmMuchSegmentManual.cxx.
|
private |
|
inline |
Definition at line 93 of file CbmMuchSegmentManual.h.
References fDebug.
|
private |
Draws segmented stations.
Definition at line 796 of file CbmMuchSegmentManual.cxx.
References CbmMuchSectorRectangular::DrawPads(), fDigiFileName, fNRegions, fRadii, fStations, CbmMuchModule::GetDetectorType(), CbmMuchStation::GetLayer(), CbmMuchLayerSide::GetModule(), CbmMuchSector::GetNChannels(), CbmMuchLayerSide::GetNModules(), CbmMuchModuleGem::GetNSectors(), CbmMuchSectorRectangular::GetPadDx(), CbmMuchSectorRectangular::GetPadDy(), CbmMuchSectorRectangular::GetPosition(), CbmMuchStation::GetRmin(), CbmMuchModuleGem::GetSectorByIndex(), CbmMuchLayer::GetSide(), CbmMuchSectorRectangular::GetSize(), and CbmMuchModuleGemRectangular::InitModule().
Referenced by SegmentMuch().
|
private |
Gets maximum pad size for the given module.
module | Module to process |
side | Defines which side of a pad should be returned |
Definition at line 650 of file CbmMuchSegmentManual.cxx.
References fNCols, fNRows, CbmMuchModule::GetDetectorId(), GetSectorMaxSize(), and CbmMuchAddress::GetStationIndex().
Referenced by SegmentModule(), and SegmentSector().
|
private |
Gets region index for the given sector.
sector | 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().
|
private |
Gets maximum sector size for the given module.
module | Module to process |
side | Defines which side of a sector should be returned |
iRegion | Region index containing the given module |
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().
|
virtual |
Initialization.
Definition at line 214 of file CbmMuchSegmentManual.cxx.
References fDebug, fGeoPar, fNCols, fNRegions, fNRows, fNStations, fSecLx, fSecLy, fStations, CbmGeoMuchPar::GetStations(), ReadInputFile(), and SegmentMuch().
|
private |
Checks whether the given module is intersected by the circle of the given radius.
module | Module to verify |
radius | Radius of the circle |
Definition at line 498 of file CbmMuchSegmentManual.cxx.
References CbmMuchModule::GetPosition(), and CbmMuchModule::GetSize().
Referenced by GetSectorMaxSize(), and SegmentSector().
|
private |
Checks whether the given sector is intersected by the circle of the given radius.
sector | Sector to verify |
radius | Radius of the circle |
Definition at line 532 of file CbmMuchSegmentManual.cxx.
References CbmMuchSectorRectangular::GetPosition(), and CbmMuchSectorRectangular::GetSize().
|
inlineprivate |
Definition at line 225 of file CbmMuchSegmentManual.h.
References Trim().
Referenced by OmitDummyLines().
|
private |
Determines whether the given sector is incomplete.
sector | Sector to process |
Definition at line 662 of file CbmMuchSegmentManual.cxx.
References fNChannels, CbmMuchSector::GetAddress(), CbmMuchSector::GetNChannels(), CbmMuchSectorRectangular::GetSize(), and CbmMuchAddress::GetStationIndex().
Referenced by GetRegionIndex(), and SegmentSector().
|
inlineprivate |
Definition at line 231 of file CbmMuchSegmentManual.h.
References IsDummyLine().
Referenced by ReadInputFile().
|
private |
|
private |
Prints summary.
Definition at line 681 of file CbmMuchSegmentManual.cxx.
References fDigiFileName, fNRegions, fSecLx, fSecLy, fStations, CbmMuchModule::GetDetectorType(), CbmMuchStation::GetLayer(), CbmMuchLayerSide::GetModule(), CbmMuchSector::GetNChannels(), CbmMuchStation::GetNLayers(), CbmMuchLayerSide::GetNModules(), CbmMuchModuleGem::GetNSectors(), CbmMuchSectorRectangular::GetPadDx(), CbmMuchSectorRectangular::GetPadDy(), CbmMuchSectorRectangular::GetPadNx(), CbmMuchSectorRectangular::GetPadNy(), CbmMuchModuleGem::GetSectorByIndex(), CbmMuchLayer::GetSide(), max(), and min().
Referenced by SegmentMuch().
|
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().
|
private |
Performs segmentation of the given layer side.
layerSide | layer side to segment |
Definition at line 281 of file CbmMuchSegmentManual.cxx.
References CbmMuchModule::GetDetectorType(), CbmMuchLayerSide::GetModule(), CbmMuchLayerSide::GetNModules(), and SegmentModule().
Referenced by SegmentMuch().
|
private |
Performs segmentation of the given module.
module | Module to segment |
useModuleDesign | Whether 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().
void CbmMuchSegmentManual::SegmentMuch | ( | ) |
Performs the segmentation of all stations.
Definition at line 249 of file CbmMuchSegmentManual.cxx.
References DrawSegmentation(), f, fDigiFileName, fStations, CbmMuchStation::GetLayer(), CbmMuchStation::GetNLayers(), CbmMuchLayer::GetSideB(), CbmMuchLayer::GetSideF(), Print(), and SegmentLayerSide().
Referenced by Init().
|
private |
Performs segmentation of the given sector in the module.
module | Module which contains the given sector |
sector | Sector to segment |
Definition at line 415 of file CbmMuchSegmentManual.cxx.
References CbmMuchModuleGem::AddSector(), fNCols, fNRows, fStations, CbmMuchModule::GetCutRadius(), CbmMuchModule::GetDetectorId(), CbmMuchModuleGem::GetNSectors(), CbmMuchSectorRectangular::GetPadDx(), CbmMuchSectorRectangular::GetPadDy(), GetPadMaxSize(), CbmMuchSectorRectangular::GetPadNx(), CbmMuchSectorRectangular::GetPadNy(), CbmMuchSectorRectangular::GetPosition(), CbmMuchStation::GetRmax(), GetSectorMaxSize(), CbmMuchSectorRectangular::GetSize(), CbmMuchAddress::GetStationIndex(), i, IntersectsRad(), IsIncompleteSector(), and ShouldSegment().
Referenced by SegmentModule().
void CbmMuchSegmentManual::SetNChannels | ( | Int_t | iStation, |
Int_t | nChannels | ||
) |
Sets number of channels per sector for the given station.
iStation | Station index |
nChannels | Number of channels |
Definition at line 118 of file CbmMuchSegmentManual.cxx.
References fDebug, fNChannels, and fNStations.
Referenced by ReadInputFile().
void CbmMuchSegmentManual::SetNRegions | ( | Int_t | iStation, |
Int_t | nRegions | ||
) |
Sets number of circled regions for the given station.
iStation | Station index |
nRegions | Number 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().
|
inline |
Sets number of stations.
nStations | Number of stations |
Definition at line 54 of file CbmMuchSegmentManual.h.
References fNStations.
Referenced by ReadInputFile().
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.
Definition at line 177 of file CbmMuchSegmentManual.cxx.
References fNCols, fNRegions, fNRows, fNStations, fSecLx, and fSecLy.
Referenced by ReadInputFile().
|
privatevirtual |
Get parameter containers
Definition at line 205 of file CbmMuchSegmentManual.cxx.
References fGeoPar.
void CbmMuchSegmentManual::SetRegionRadius | ( | Int_t | iStation, |
Int_t | iRegion, | ||
Double_t | radius | ||
) |
Sets the radius for the given circled region in the given station.
iStation | Station index |
iRegion | Region index |
radius | Radius of the region |
Definition at line 131 of file CbmMuchSegmentManual.cxx.
References fDebug, fNRegions, fNStations, and fRadii.
Referenced by ReadInputFile().
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.
iStation | Station index |
iRegion | Region index |
sigmaX | Resolution in X direction |
sigmaY | Resolution in Y direction |
Definition at line 149 of file CbmMuchSegmentManual.cxx.
References fNCols, fNRegions, fNRows, fNStations, fSecLx, and fSecLy.
|
private |
Checks whether the given sector should be segmented in the given direction.
sector | Sector to verify |
direction | Direction to segment in ("X" or "Y") |
iRegion | Region index of the sector |
Definition at line 566 of file CbmMuchSegmentManual.cxx.
References fSecLx, fSecLy, CbmMuchSector::GetAddress(), GetRegionIndex(), CbmMuchSectorRectangular::GetSize(), and CbmMuchAddress::GetStationIndex().
Referenced by SegmentSector().
|
inlineprivate |
Definition at line 248 of file CbmMuchSegmentManual.h.
References Split().
|
inlineprivate |
Definition at line 238 of file CbmMuchSegmentManual.h.
Referenced by ReadInputFile(), and Split().
|
inlineprivate |
Definition at line 254 of file CbmMuchSegmentManual.h.
Referenced by ReadInputFile().
|
inlineprivate |
Definition at line 217 of file CbmMuchSegmentManual.h.
Referenced by IsDummyLine().
|
private |
Definition at line 115 of file CbmMuchSegmentManual.h.
Referenced by DebugSwitchOn(), Init(), SetNChannels(), SetNRegions(), and SetRegionRadius().
|
private |
Definition at line 100 of file CbmMuchSegmentManual.h.
Referenced by DrawSegmentation(), Print(), and SegmentMuch().
|
private |
Definition at line 96 of file CbmMuchSegmentManual.h.
Referenced by Init(), and SetParContainers().
|
private |
Definition at line 99 of file CbmMuchSegmentManual.h.
Referenced by ReadInputFile().
|
private |
Definition at line 110 of file CbmMuchSegmentManual.h.
Referenced by IsIncompleteSector(), ReadInputFile(), SetNChannels(), and SetNRegions().
|
private |
Definition at line 112 of file CbmMuchSegmentManual.h.
Referenced by GetPadMaxSize(), Init(), SegmentModule(), SegmentSector(), SetNRegions(), SetPadSize(), and SetSigma().
|
private |
Definition at line 102 of file CbmMuchSegmentManual.h.
Referenced by DrawSegmentation(), GetRegionIndex(), GetSectorMaxSize(), Init(), Print(), ReadInputFile(), SetNRegions(), SetPadSize(), SetRegionRadius(), and SetSigma().
|
private |
Definition at line 114 of file CbmMuchSegmentManual.h.
Referenced by GetPadMaxSize(), Init(), SegmentModule(), SegmentSector(), SetNRegions(), SetPadSize(), and SetSigma().
|
private |
Definition at line 97 of file CbmMuchSegmentManual.h.
Referenced by Init(), ReadInputFile(), SetNChannels(), SetNRegions(), SetNStations(), SetPadSize(), SetRegionRadius(), and SetSigma().
|
private |
Definition at line 104 of file CbmMuchSegmentManual.h.
Referenced by DrawSegmentation(), GetRegionIndex(), GetSectorMaxSize(), ReadInputFile(), SetNRegions(), and SetRegionRadius().
|
private |
Definition at line 106 of file CbmMuchSegmentManual.h.
Referenced by GetRegionIndex(), GetSectorMaxSize(), Init(), Print(), SetNRegions(), SetPadSize(), SetSigma(), and ShouldSegment().
|
private |
Definition at line 108 of file CbmMuchSegmentManual.h.
Referenced by GetRegionIndex(), GetSectorMaxSize(), Init(), Print(), SetNRegions(), SetPadSize(), SetSigma(), and ShouldSegment().
|
private |
Definition at line 98 of file CbmMuchSegmentManual.h.
Referenced by DrawSegmentation(), Init(), Print(), SegmentMuch(), and SegmentSector().