forked from h2gglobe/h2gglobe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
DiPhoEfficiencySmearer.h
63 lines (45 loc) · 1.67 KB
/
DiPhoEfficiencySmearer.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
#ifndef __DIPHOEFFICIENCYSMEARER__
#define __DIPHOEFFICIENCYSMEARER__
#include "BaseSmearer.h"
#include "EfficiencySmearer.h"
#include <string>
#include <map>
#include "TFile.h"
#include "TGraphAsymmErrors.h"
class PhotonReducedInfo;
class TRandom3;
// ------------------------------------------------------------------------------------
class DiPhoEfficiencySmearer : public BaseDiPhotonSmearer
{
public:
struct diPhoEfficiencySmearingParameters
{
int n_categories;
std::string categoryType;
std::string parameterSetName;
float idMVASystSize;
std::string efficiency_file;
};
DiPhoEfficiencySmearer(const diPhoEfficiencySmearingParameters& par) ;
virtual ~DiPhoEfficiencySmearer();
virtual const std::string & name() const { return 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) const ;
void name(const std::string & x) { name_ = x; };
void setEffName(const std::string & x) { effName_ =x; };
bool init();
void passFailWeights(bool x) { passFailWeights_ = x; };
void doVtxEff(bool x) { doVtxEff_ = x; };
void doMvaIdEff(bool x) { doMvaIdEff_ = x; };
diPhoEfficiencySmearingParameters myParameters_;
protected:
double getWeight(double pt, std::string theCategory, float syst_shift) const;
bool passFailWeights_, doVtxEff_, doMvaIdEff_;
float idMVASystSize_;
std::string name_;
TRandom3 *rgen_;
std::string effName_;
TFile *theDiPhoEfficiencyFile_;
std::map<std::string,TGraphAsymmErrors*> smearing_eff_graph_;
};
#endif