forked from h2gglobe/h2gglobe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BaseSmearer.h
97 lines (68 loc) · 2.27 KB
/
BaseSmearer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#ifndef __BASESMEARER__
#define __BASESMEARER__
#include "LoopAll.h"
// ------------------------------------------------------------------------------------
/**
* \class BaseSmearer
*
* Defines the interface to be implemented by any smearing function on photon informations
*
*
*/
class PhotonReducedInfo;
class BaseSmearer
{
public:
// ! C-TOR
BaseSmearer();
// ! D-TOR
virtual ~BaseSmearer();
// ! the class name
virtual const std::string & name() const = 0;
// !
operator const std::string & () const { return this->name(); };
// ! return smeared photon informations
virtual bool smearPhoton( PhotonReducedInfo & pho, float & weight, int run, float syst_shift=0. ) const = 0;
int smearerId() const { return smearerId_; };
bool amRegistered() const { return smearerId_ > -1; };
static int nRegisteredSmerers() { return nRegisteredSmerers_; };
protected:
static int nRegisteredSmerers_;
int smearerId_;
void registerMe();
/// virtual bool smearDiPhoton( TLorentzVector & 4p, const TVector3 & selVtx, const TVector3 & trueVtx);
};
// ! Used to search analyzers by name
bool operator == (BaseSmearer * a, const std::string & b);
class BaseDiPhotonSmearer
{
public:
// ! C-TOR
BaseDiPhotonSmearer();
// ! D-TOR
virtual ~BaseDiPhotonSmearer();
// ! the class name
virtual const std::string & name() const = 0;
// !
operator const std::string & () const { return this->name(); };
virtual bool smearDiPhoton( TLorentzVector & p4, TVector3 & selVtx, float & weight, const int & category,
const int & genMassPoint, const TVector3 & trueVtx, float & idMVA1, float & idMVA2, float syst_shift=0.) const = 0 ;
};
// ! Used to search analyzers by name
bool operator == (BaseDiPhotonSmearer * a, const std::string & b);
class BaseGenLevelSmearer
{
public:
// ! C-TOR
BaseGenLevelSmearer();
// ! D-TOR
virtual ~BaseGenLevelSmearer();
// ! the class name
virtual const std::string & name() const = 0;
// !
operator const std::string & () const { return this->name(); };
virtual bool smearEvent( float & weight, const TLorentzVector & p4, const int nPu, const int sample_type, float syst_shift=0.) const = 0 ;
};
// ! Used to search analyzers by name
bool operator == (BaseGenLevelSmearer * a, const std::string & b);
#endif