1
|
#ifndef REFLECTEDBGMAKER_H
|
2
|
#define REFLECTEDBGMAKER_H
|
3
|
|
4
|
#include <utilities/ConfigHandler.hh>
|
5
|
|
6
|
#include "BgMaker.hh"
|
7
|
#include "BgMaps.hh"
|
8
|
|
9
|
|
10
|
namespace Background {
|
11
|
|
12
|
|
13
|
|
14
|
|
15
|
|
16
|
|
17
|
|
18
|
class ReflectedBgMaker : public BgMaker {
|
19
|
|
20
|
public:
|
21
|
|
22
|
ReflectedBgMaker(std::string name,
|
23
|
Utilities::ConfigHandler& cfghandler,
|
24
|
std::string input = "Select",
|
25
|
bool init_now = true);
|
26
|
|
27
|
ReflectedBgMaker(Utilities::ConfigHandler& cfghandler,
|
28
|
std::string input = "Select",
|
29
|
bool init_now = true);
|
30
|
|
31
|
virtual ~ReflectedBgMaker();
|
32
|
|
33
|
virtual void BeginRun();
|
34
|
virtual void EndRun();
|
35
|
|
36
|
int GetNumberOffRegions() { return fNumberOffRegions;};
|
37
|
void SetNumberOffRegions(int noff) { fNumberOffRegions = noff;};
|
38
|
void SetOffDistanceMax (double dist) {if (dist>0.) fMaxOffRegionDist = dist;}
|
39
|
void SetMinOnOffDistance(double dist) {if( dist>0. ) fMinOnOffDist = dist; }
|
40
|
|
41
|
bool IsOnMapEvent();
|
42
|
bool IsOffMapEvent();
|
43
|
void FillOnExposure();
|
44
|
void FillOffExposure();
|
45
|
|
46
|
virtual bool CanMakeMaps(){return true;}
|
47
|
virtual bool CanMakeStats(){return true;}
|
48
|
|
49
|
private:
|
50
|
void ConstructMaker(Utilities::ConfigHandler& cfghandler);
|
51
|
|
52
|
static Tools::Circle* IsCircle(const Tools::Region* region);
|
53
|
bool CreateOffRegions(const Tools::Region* onregion,
|
54
|
const Stash::Coordinate &obspos);
|
55
|
bool CreateOffRegionsForOnCircle(const Tools::Circle* onregion,
|
56
|
const Stash::Coordinate &obspos);
|
57
|
|
58
|
int fMaxNumberOffRegions;
|
59
|
int fMinNumberOffRegions;
|
60
|
double fMinOnOffDist;
|
61
|
int fNumberOffRegions;
|
62
|
double fRotationAngleDeg;
|
63
|
|
64
|
double fCurrentOffset;
|
65
|
double fMaxOffRegionDist;
|
66
|
|
67
|
bool fUseCircularOff;
|
68
|
|
69
|
ClassDef( Background::ReflectedBgMaker, 3 );
|
70
|
};
|
71
|
}
|
72
|
|
73
|
|
74
|
|
75
|
#endif
|
76
|
|