-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEventReader.h
69 lines (57 loc) · 1.95 KB
/
EventReader.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
//
// $Id: EventReader.h,v 1.18 2011/06/30 14:27:14 stadie Exp $
//
#ifndef EVENTREADER_H
#define EVENTREADER_H
class Event;
class Parameters;
class ConfigFile;
class Measurement;
class CorFactors;
class CorFactorsFactory;
class TTree;
class JetConstraintEvent;
class Parametrization;
class Binning;
#include <vector>
#include <string>
class EventReader
{
public:
static unsigned int numberOfEventReaders_; //!< Number of initialized event readers
EventReader(const std::string& configfile, Parameters* p);
virtual ~EventReader();
virtual int readEvents(std::vector<Event*>& data) = 0;
virtual int readControlEvents(std::vector<Event*>& control, int id) {
return 0;
}
static int addConstraints(std::vector<Event*>& data);
protected:
//! Read CorFactors from Ntuple
virtual CorFactors* createCorFactors(int jetid) const { return 0;}
//! Create TTree with data files
TTree* createTree(const std::string& name) const;
ConfigFile* config_; //!< The configfile
Parameters* par_; //!< The parametrization
CorFactorsFactory* corFactorsFactory_; //! Factory class for external source of CorFactors;
Parametrization *cp_;
bool useTracks_; //!< True, if tracks are used in calibration
//! Correct jets to L3 i.e. with L1*L2*L3
bool correctToL3_;
//!< Correct jets with L2*L3 corrections
bool correctL2L3_;
//! Correct jets with L1 correction
bool correctL1_;
//! update CorFactorsFactory with "name"
void updateCorFactorsFactory(std::string jcn);
double weightRelToNtuple_;
double eventWeight_;
float (*tower_error_param)(const float *x, const Measurement *xorig, float err);
float (*jet_error_param) (const float *x, const Measurement *xorig, float err);
float (*track_error_param)(const float *x, const Measurement *xorig, float err);
static std::vector<JetConstraintEvent*> constraints_;
static Binning* binning_;
static int nEvents_, counter_;
static void reportProgress(int addedEvents);
};
#endif