-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEventBinning.h
52 lines (45 loc) · 1.33 KB
/
EventBinning.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
//
// $Id: EventBinning.h,v 1.2 2010/12/20 11:08:13 stadie Exp $
//
#ifndef EVENTBINNING_H
#define EVENTBINNING_H
#include "EventProcessor.h"
#include <vector>
#include <map>
#include <set>
class Parameters;
class Binning;
class Event;
class Jet;
// -----------------------------------------------------------------
class EventBinning : public EventProcessor
{
public:
EventBinning(const std::string& configfile, Parameters* param);
virtual ~EventBinning();
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);
private:
typedef std::vector<Event*>::iterator DataIter;
typedef std::vector<Event*>::const_iterator DataConstIter;
Event* createBinnedJetTruthEvent(DataIter begin, DataIter end);
Event* createBinnedJetWidthEvent(DataIter begin, DataIter end);
bool binEvents_;
int eventsperbin_;
Binning* binning_;
typedef float (Jet::*JetFunction)() const;
JetFunction jetfunc_[4];
struct ltgenjetpt
{
bool operator()(const Event* e1, const Event* e2) const;
};
typedef std::map<int,std::vector<Event*> > BinMap;
typedef std::map<int,std::vector<Event*> >::iterator BinMapIter;
BinMap bins_;
};
#endif