1 |
#ifndef L1ObjMaker_H
|
2 |
#define L1ObjMaker_H
|
3 |
|
4 |
#include <vector>
|
5 |
#include "UserCode/L1RpcTriggerAnalysis/interface/L1Obj.h"
|
6 |
#include "FWCore/ParameterSet/interface/ParameterSet.h"
|
7 |
#include "DataFormats/Provenance/interface/RunID.h"
|
8 |
#include "DataFormats/Provenance/interface/EventID.h"
|
9 |
|
10 |
|
11 |
namespace edm {class Event; }
|
12 |
|
13 |
class L1ObjMaker {
|
14 |
public:
|
15 |
L1ObjMaker(const edm::ParameterSet & cfg);
|
16 |
const std::vector<L1Obj> & operator()(const edm::Event &ev) { run(ev); return theL1Objs; }
|
17 |
|
18 |
private:
|
19 |
void run(const edm::Event &ev);
|
20 |
bool getGMTReadout(const edm::Event &ev, std::vector<L1Obj> & result, const edm::InputTag &readout, L1Obj::TYPE t);
|
21 |
bool getRpcRegional(const edm::Event &ev, std::vector<L1Obj> & result, const edm::InputTag &l1RpcDigis);
|
22 |
|
23 |
private:
|
24 |
template <class T> L1Obj makeL1Obj( T& t, L1Obj::TYPE type) {
|
25 |
L1Obj obj;
|
26 |
obj.bx = t.bx();
|
27 |
obj.q = t.quality();
|
28 |
obj.pt = t.ptValue();
|
29 |
obj.eta = t.etaValue();
|
30 |
obj.phi = t.phiValue();
|
31 |
//obj.charge = t.charge();
|
32 |
obj.type = type;
|
33 |
return obj;
|
34 |
}
|
35 |
private:
|
36 |
edm::ParameterSet theConfig;
|
37 |
std::vector<L1Obj> theL1Objs;
|
38 |
edm::EventNumber_t lastEvent;
|
39 |
edm::RunNumber_t lastRun;
|
40 |
|
41 |
};
|
42 |
#endif
|