23#ifndef REST_TRestPatternMask
24#define REST_TRestPatternMask
27#include <TRestMetadata.h>
59 void SetMaxRegions(Int_t regions) {
fMaxRegions = regions; }
92 virtual void PrintMaskMembers() {}
An abstract class used to encapsulate different mask pattern class definitions.
Double_t GetMaskRadius()
It returns the mask radius.
TCanvas * DrawMonteCarlo(Int_t nSamples=10000)
It generates a Monte Carlo with positions and paints them the returned canvas. Each unique region is ...
void SetType(const std::string &type)
It defines the mask type. To be called by the inherited class constructor.
TVector2 fOffset
It is used to introduce an offset on the pattern (not the mask, mask is always centered)
TRestPatternMask()
Default constructor.
TVector2 GetOffset()
It returns the rotation angle.
TCanvas * fCanvas
A canvas for drawing.
Int_t fMaxRegions
The maximum number of regions allowed in each mask.
Bool_t HitsPattern(Double_t x, Double_t y)
Returns true if the pattern was hit. If (x,y) it is inside a region then, the pattern was not hit by ...
void SetRotationAngle(const Double_t &angle)
It defines the rotation angle.
void PrintMetadata() override
Prints on screen the information about the metadata members of TRestPatternMask.
Double_t fRotationAngle
An angle (in radians) used to introduce a rotation to the pattern.
Double_t GetRotationAngle()
It returns the rotation angle.
Int_t ApplyCommonMaskTransformation(Double_t &x, Double_t &y)
It produces an effective mask rotation and translation for the point x,y.
virtual Int_t GetRegion(Double_t &x, Double_t &y)
To be implemented at the inherited class with the pattern and region identification logic.
~TRestPatternMask()
Default destructor.
Double_t fMaskRadius
The maximum mask radius in mm (if 0 it will be infinite)
void SetOffset(const TVector2 &offset)
It defines the pattern offset.
std::string fPatternType
The pattern type (None/Stripped/Grid/Spider/Rings)
void SetMaskRadius(const Double_t &radius)
It defines the mask radius.
std::string GetType()
It returns the mask pattern type.
void PrintCommonPatternMembers()
Prints on screen the information about the metadata members without header.