-
Notifications
You must be signed in to change notification settings - Fork 0
/
DiJetEventWeighting.h
78 lines (63 loc) · 1.97 KB
/
DiJetEventWeighting.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
//
// $Id: DiJetEventWeighting.h,v 1.5 2012/09/10 15:44:05 kirschen Exp $
//
#ifndef DIJETEVENTWEIGHTING_H
#define DIJETEVENTWEIGHTING_H
#include "EventProcessor.h"
#include "TwoJetsPtBalanceEvent.h"
#include "CalibData.h"
#include <map>
class Parameters;
// -----------------------------------------------------------------
class DiJetEventWeighting : public EventProcessor
{
public:
DiJetEventWeighting(const std::string& configfile, Parameters* param);
virtual ~DiJetEventWeighting();
bool passCheckBadEventDiJetEventWeighting(Event* event);
bool passCheckStrangeEventDiJetEventWeighting(Event* event);
bool passSetWeightDiJetEventWeighting(Event* event);
protected:
virtual int preprocess(std::vector<Event*>& data,
std::vector<Event*>& control1,
std::vector<Event*>& control2);
virtual int postprocess(std::vector<Event*>& data,
std::vector<Event*>& control1,
std::vector<Event*>& control2) { return data.size();}
private:
std::map<double,double> ndata_,ncontrol_;
std::map<double,int> nCountsData_,nCountsControl_;
std::map<double,double> weights_;
bool useSingleJetTriggers_;
};
class CheckBadEventDiJetEventWeighting{
public:
CheckBadEventDiJetEventWeighting(DiJetEventWeighting* DJEWptr) : DJEWptr_(DJEWptr){};
bool operator() (Event* event)
{
return DJEWptr_->passCheckBadEventDiJetEventWeighting(event);
}
private:
DiJetEventWeighting* DJEWptr_;
};
class CheckStrangeEventDiJetEventWeighting{
public:
CheckStrangeEventDiJetEventWeighting(DiJetEventWeighting* DJEWptr) : DJEWptr_(DJEWptr){};
bool operator() (Event* event)
{
return DJEWptr_->passCheckStrangeEventDiJetEventWeighting(event);
}
private:
DiJetEventWeighting* DJEWptr_;
};
class SetWeightDiJetEventWeighting{
public:
SetWeightDiJetEventWeighting(DiJetEventWeighting* DJEWptr) : DJEWptr_(DJEWptr){};
bool operator() (Event* event)
{
return DJEWptr_->passSetWeightDiJetEventWeighting(event);
}
private:
DiJetEventWeighting* DJEWptr_;
};
#endif