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 35 of file CbmMuchSegmentManual.h.
CbmMuchSegmentManual::CbmMuchSegmentManual | ( | ) |
Default constructor.
Definition at line 46 of file CbmMuchSegmentManual.cxx.
|
virtual |
Destructor.
Definition at line 86 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 66 of file CbmMuchSegmentManual.cxx.
|
private |
|
inline |
Definition at line 96 of file CbmMuchSegmentManual.h.
References fDebug.
|
private |
Draws segmented stations.
Definition at line 705 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(), and CbmMuchSectorRectangular::GetSize().
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 579 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 535 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 564 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 200 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 448 of file CbmMuchSegmentManual.cxx.
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 477 of file CbmMuchSegmentManual.cxx.
References CbmMuchSectorRectangular::GetPosition(), and CbmMuchSectorRectangular::GetSize().
|
inlineprivate |
Definition at line 216 of file CbmMuchSegmentManual.h.
References Trim().
Referenced by OmitDummyLines().
|
private |
Determines whether the given sector is incomplete.
sector | Sector to process |
Definition at line 589 of file CbmMuchSegmentManual.cxx.
References fNChannels, CbmMuchSector::GetAddress(), CbmMuchSector::GetNChannels(), CbmMuchSectorRectangular::GetSize(), and CbmMuchAddress::GetStationIndex().
Referenced by GetRegionIndex(), and SegmentSector().
|
inlineprivate |
Definition at line 222 of file CbmMuchSegmentManual.h.
References IsDummyLine().
Referenced by ReadInputFile().
|
private |
|
private |
Prints summary.
Definition at line 607 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(), and CbmMuchLayer::GetSide().
Referenced by SegmentMuch().
|
private |
Reads input parameters for the segmentation.
Definition at line 790 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 269 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 285 of file CbmMuchSegmentManual.cxx.
References fNCols, fNRows, GetPadMaxSize(), GetSectorMaxSize(), CbmMuchAddress::GetStationIndex(), SegmentSector(), and size().
Referenced by SegmentLayerSide().
void CbmMuchSegmentManual::SegmentMuch | ( | ) |
Performs the segmentation of all stations.
Save old global file and folder pointer to avoid messing with FairRoot
Restore old global file and folder pointer to avoid messing with FairRoot
Definition at line 231 of file CbmMuchSegmentManual.cxx.
References DrawSegmentation(), 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 377 of file CbmMuchSegmentManual.cxx.
References fNCols, fNRows, fStations, CbmMuchModule::GetCutRadius(), CbmMuchSectorRectangular::GetPadDx(), CbmMuchSectorRectangular::GetPadDy(), GetPadMaxSize(), CbmMuchSectorRectangular::GetPadNx(), CbmMuchSectorRectangular::GetPadNy(), CbmMuchSectorRectangular::GetPosition(), CbmMuchStation::GetRmax(), GetSectorMaxSize(), CbmMuchSectorRectangular::GetSize(), CbmMuchAddress::GetStationIndex(), IntersectsRad(), IsIncompleteSector(), SegmentSector(), ShouldSegment(), and size().
Referenced by SegmentModule(), and SegmentSector().
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 120 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 90 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 59 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 167 of file CbmMuchSegmentManual.cxx.
References fNCols, fNRegions, fNRows, fNStations, fSecLx, fSecLy, and SetPadSize().
Referenced by ReadInputFile(), and SetPadSize().
|
privatevirtual |
Get parameter containers
Definition at line 190 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 144 of file CbmMuchSegmentManual.cxx.
References fNCols, fNRegions, fNRows, fNStations, fSecLx, fSecLy, and SetSigma().
Referenced by SetSigma().
|
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 506 of file CbmMuchSegmentManual.cxx.
References fSecLx, fSecLy, CbmMuchSector::GetAddress(), GetRegionIndex(), CbmMuchSectorRectangular::GetSize(), CbmMuchAddress::GetStationIndex(), and ShouldSegment().
Referenced by SegmentSector(), and ShouldSegment().
|
inlineprivate |
Definition at line 240 of file CbmMuchSegmentManual.h.
References Split().
|
inlineprivate |
Definition at line 229 of file CbmMuchSegmentManual.h.
Referenced by ReadInputFile(), and Split().
|
inlineprivate |
Definition at line 247 of file CbmMuchSegmentManual.h.
Referenced by ReadInputFile().
|
inlineprivate |
Definition at line 208 of file CbmMuchSegmentManual.h.
Referenced by IsDummyLine().
|
private |
Definition at line 113 of file CbmMuchSegmentManual.h.
Referenced by DebugSwitchOn(), Init(), SetNChannels(), SetNRegions(), and SetRegionRadius().
|
private |
Definition at line 103 of file CbmMuchSegmentManual.h.
Referenced by DrawSegmentation(), Print(), and SegmentMuch().
|
private |
Definition at line 99 of file CbmMuchSegmentManual.h.
Referenced by Init(), and SetParContainers().
|
private |
Definition at line 102 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 111 of file CbmMuchSegmentManual.h.
Referenced by GetPadMaxSize(), Init(), SegmentModule(), SegmentSector(), SetNRegions(), SetPadSize(), and SetSigma().
|
private |
Definition at line 104 of file CbmMuchSegmentManual.h.
Referenced by DrawSegmentation(), GetRegionIndex(), GetSectorMaxSize(), Init(), Print(), ReadInputFile(), SetNRegions(), SetPadSize(), SetRegionRadius(), and SetSigma().
|
private |
Definition at line 112 of file CbmMuchSegmentManual.h.
Referenced by GetPadMaxSize(), Init(), SegmentModule(), SegmentSector(), SetNRegions(), SetPadSize(), and SetSigma().
|
private |
Definition at line 100 of file CbmMuchSegmentManual.h.
Referenced by Init(), ReadInputFile(), SetNChannels(), SetNRegions(), SetNStations(), SetPadSize(), SetRegionRadius(), and SetSigma().
|
private |
Definition at line 105 of file CbmMuchSegmentManual.h.
Referenced by DrawSegmentation(), GetRegionIndex(), GetSectorMaxSize(), ReadInputFile(), SetNRegions(), and SetRegionRadius().
|
private |
Definition at line 107 of file CbmMuchSegmentManual.h.
Referenced by GetRegionIndex(), GetSectorMaxSize(), Init(), Print(), SetNRegions(), SetPadSize(), SetSigma(), and ShouldSegment().
|
private |
Definition at line 109 of file CbmMuchSegmentManual.h.
Referenced by GetRegionIndex(), GetSectorMaxSize(), Init(), Print(), SetNRegions(), SetPadSize(), SetSigma(), and ShouldSegment().
|
private |
Definition at line 101 of file CbmMuchSegmentManual.h.
Referenced by DrawSegmentation(), Init(), Print(), SegmentMuch(), and SegmentSector().