REST-for-Physics  v2.3
Rare Event Searches ToolKit for Physics
TRestSpiderMask.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_TRestSpiderMask
24 #define REST_TRestSpiderMask
25 
26 #include <TRestPatternMask.h>
27 
30  private:
31  void Initialize() override;
33  Double_t fArmsSeparationAngle = 0; //<
34 
36  Double_t fArmsWidth = TMath::Pi() / 18. / 4.; //<
37 
39  Double_t fInitialRadius = 20.; //<
40 
42  Double_t fInternalRegionRadius = 0.; //<
43 
45  std::vector<std::pair<Double_t, Double_t>> fPositiveRanges;
46 
48  std::vector<std::pair<Double_t, Double_t>> fNegativeRanges;
49 
50  public:
51  void GenerateSpider();
52 
53  virtual Int_t GetRegion(Double_t& x, Double_t& y) override;
54 
57 
59  Double_t GetArmsWidth() { return fArmsWidth; }
60 
62  Double_t GetInitialRadius() { return fInitialRadius; }
63 
64  void PrintMetadata() override;
65  void PrintMaskMembers() override;
66  void PrintMask() override;
67 
69  TRestSpiderMask(const char* cfgFileName, std::string name = "");
71 
72  ClassDefOverride(TRestSpiderMask, 2);
73 };
74 #endif
An abstract class used to encapsulate different mask pattern class definitions.
A class used to define and generate a spider structure mask.
void GenerateSpider()
This method is used to initialize the spider arm angles data members that are used to determine if a ...
Double_t fInternalRegionRadius
Radius of an internal circular region defined inside the fInitialRadius. If 0, there will be no regio...
void PrintMetadata() override
Prints on screen the complete information about the metadata members from this class.
Double_t GetArmsSeparationAngle()
It returns the gap/periodicity of the spider structure arms in radians.
Double_t GetArmsWidth()
It returns the angular width of each spider arm in radians.
virtual Int_t GetRegion(Double_t &x, Double_t &y) override
It returns a number identifying the region where the particle with coordinates (x,...
Double_t fArmsSeparationAngle
The angle between two consecutive spider arms measured in radians.
Double_t GetInitialRadius()
It returns the inner ring radius that defines the inner start of the spider structure.
std::vector< std::pair< Double_t, Double_t > > fPositiveRanges
Used internally to define the forbidden (cosine) angular ranges imposed by the spider structure (0,...
void PrintMask() override
Prints on screen the information about the metadata members from this class, including common pattern...
Double_t fArmsWidth
The width of each specific spider arm. Measured in radians. Default is 2.5 degrees.
Double_t fInitialRadius
The spider structure will be effective from this radius, in mm. Default is from 20 mm.
std::vector< std::pair< Double_t, Double_t > > fNegativeRanges
Used internally to define the forbidden (cosine) ang. ranges imposed by the spider structure (Pi,...
void Initialize() override
Function to initialize input/output event members and define the section name.
void PrintMaskMembers() override
Prints on screen the information about the metadata members from this class, excluding common metadat...
~TRestSpiderMask()
Default destructor.
TRestSpiderMask()
Default constructor.