REST-for-Physics  v2.3
Rare Event Searches ToolKit for Physics
TRestGridMask.h
1/*************************************************************************
2 * This file is part of the REST software framework. *
3 * *
4 * Copyright (C) 2016 GIFNA/TREX (University of Zaragoza) *
5 * For more information see https://gifna.unizar.es/trex *
6 * *
7 * REST is free software: you can redistribute it and/or modify *
8 * it under the terms of the GNU General Public License as published by *
9 * the Free Software Foundation, either version 3 of the License, or *
10 * (at your option) any later version. *
11 * *
12 * REST is distributed in the hope that it will be useful, *
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 * GNU General Public License for more details. *
16 * *
17 * You should have a copy of the GNU General Public License along with *
18 * REST in $REST_PATH/LICENSE. *
19 * If not, see https://www.gnu.org/licenses/. *
20 * For the list of contributors see $REST_PATH/CREDITS. *
21 *************************************************************************/
22
23#ifndef REST_TRestGridMask
24#define REST_TRestGridMask
25
26#include <TRestPatternMask.h>
27
30 private:
31 void Initialize() override;
32
34 Double_t fGridGap = 1; //<
35
37 Double_t fGridThickness = 0.5; //<
38
40 Int_t fModulus = 10; //<
41
42 public:
43 virtual Int_t GetRegion(Double_t& x, Double_t& y) override;
44
46 Double_t GetGridGap() { return fGridGap; }
47
49 Double_t GetGridThickness() { return fGridThickness; }
50
52 Int_t GetModulus() { return fModulus; }
53
54 void PrintMetadata() override;
55 void PrintMaskMembers() override;
56 void PrintMask() override;
57
59 TRestGridMask(const char* cfgFileName, std::string name = "");
61
62 ClassDefOverride(TRestGridMask, 1);
63};
64#endif
A class used to define a grid mask pattern.
Definition: TRestGridMask.h:29
Int_t GetModulus()
It returns the modulus used to define a finite set of ids.
Definition: TRestGridMask.h:52
Double_t fGridThickness
The width of the grid structure in mm.
Definition: TRestGridMask.h:37
void PrintMask() override
Prints on screen the information about the metadata members of TRestRingsMask, including common patte...
Double_t GetGridThickness()
It returns the thickness of the grid in mm.
Definition: TRestGridMask.h:49
Double_t fGridGap
The periodity of the grid structure in mm.
Definition: TRestGridMask.h:34
void PrintMetadata() override
Prints on screen the complete information about the metadata members from this class.
void Initialize() override
Function to initialize input/output event members and define the section name.
Int_t fModulus
It defines the maximum number of cells/regions in each axis.
Definition: TRestGridMask.h:40
Double_t GetGridGap()
It returns the gap/periodicity of the grid in mm.
Definition: TRestGridMask.h:46
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 PrintMaskMembers() override
Prints on screen the information about the metadata members of TRestRingsMask, excluding common metad...
TRestGridMask()
Default constructor.
~TRestGridMask()
Default destructor.
An abstract class used to encapsulate different mask pattern class definitions.