111 #include "TRestRingsMask.h"
113 #include "TRandom3.h"
171 Double_t r = TMath::Sqrt(x * x + y * y);
174 if (r < ringRadius.second && r >= ringRadius.first)
return cont %
fMaxRegions + 1;
186 for (
int n = 0; n <
fNRings; n++) {
190 std::pair<Double_t, Double_t> p(inR, outR);
226 RESTMetadata <<
"Inner radii : (";
227 for (
unsigned int n = 0; n <
fRingsRadii.size(); n++) {
228 if (n > 0) RESTMetadata <<
", ";
234 RESTMetadata <<
"Outter radii : (";
235 for (
unsigned int n = 0; n <
fRingsRadii.size(); n++) {
236 if (n > 0) RESTMetadata <<
", ";
248 for (
unsigned int n = 0; n <
fRingsRadii.size(); n++)
An abstract class used to encapsulate different mask pattern class definitions.
void SetType(const std::string &type)
It defines the mask type. To be called by the inherited class constructor.
Int_t fMaxRegions
The maximum number of regions allowed in each mask.
void PrintMetadata() override
Prints on screen the information about the metadata members of TRestPatternMask.
virtual Int_t GetRegion(Double_t &x, Double_t &y)
To be implemented at the inherited class with the pattern and region identification logic.
void PrintCommonPatternMembers()
Prints on screen the information about the metadata members without header.
A class used to define a rings mask pattern.
void GenerateRings()
It will initialize the variable fRingsRadii using the number of radius, initial radius,...
virtual Int_t GetRegion(Double_t &x, Double_t &y) override
It returns a number identifying the region where the particle with coordinates (x,...
void Initialize() override
Function to initialize input/output event members and define the section name.
Double_t fRingsGap
The periodity of the rings structure in mm. Optionally used to initialize the rings.
void PrintMask() override
Prints on screen the information about the metadata members of TRestRingsMask, including common patte...
TRestRingsMask()
Default constructor.
Double_t fRingsThickness
The width of the rings structure in mm. Optionally used to initialize the rings.
void PrintMetadata() override
Prints on screen the information about the metadata members from this class.
~TRestRingsMask()
Default destructor.
Int_t fNRings
The number of rings inside the structure.
void PrintMaskMembers() override
Prints on screen the information about the metadata members of TRestRingsMask, excluding common metad...
Double_t fInitialRadius
The initial radius for the inner ring.
std::vector< std::pair< Double_t, Double_t > > fRingsRadii
A pair containing inner/outter radius for each ring.
void PrintRings()
Prints on screen the information about the metadata members of TRestRingsMask, excluding common metad...
@ REST_Info
+show most of the information for each steps