1 |
konec |
1.1 |
#ifndef L1ObjColl_H
|
2 |
|
|
#define L1ObjColl_H
|
3 |
|
|
|
4 |
|
|
#include "UserCode/L1RpcTriggerAnalysis/interface/L1Obj.h"
|
5 |
|
|
#include <vector>
|
6 |
|
|
|
7 |
|
|
class L1ObjColl : public TObject {
|
8 |
|
|
|
9 |
|
|
public:
|
10 |
|
|
L1ObjColl() {}
|
11 |
|
|
virtual ~L1ObjColl(){}
|
12 |
|
|
|
13 |
konec |
1.3 |
typedef L1Obj::TYPE TYPE;
|
14 |
konec |
1.1 |
void set(const std::vector<L1Obj> & obj) { theL1Obj = obj; }
|
15 |
|
|
void set(const std::vector<bool> & comp) { theL1Matching = comp; }
|
16 |
konec |
1.4 |
void set(const std::vector<double> & dr) { theDeltaR = dr; }
|
17 |
konec |
1.6 |
void push_back(const L1Obj & obj, bool match, double deltaR);
|
18 |
konec |
1.5 |
|
19 |
konec |
1.1 |
const std::vector<L1Obj> & getL1Objs() const { return theL1Obj; }
|
20 |
|
|
const std::vector<bool> & getL1ObjsMatching() const { return theL1Matching; }
|
21 |
konec |
1.5 |
const std::vector<double> & getL1ObjDeltaR() const { return theDeltaR; }
|
22 |
konec |
1.6 |
|
23 |
|
|
L1ObjColl l1RpcColl() const {
|
24 |
|
|
return selectByType(L1Obj::RPCb)+selectByType(L1Obj::RPCf);
|
25 |
|
|
}
|
26 |
|
|
L1ObjColl l1RpcCollEmu() const {
|
27 |
|
|
return selectByType(L1Obj::RPCb_emu)+selectByType(L1Obj::RPCf_emu);
|
28 |
|
|
}
|
29 |
|
|
L1ObjColl l1OthColl() const {
|
30 |
|
|
return selectByType(L1Obj::DT)+selectByType(L1Obj::CSC);
|
31 |
|
|
}
|
32 |
|
|
|
33 |
|
|
L1ObjColl selectByType( TYPE t1) const;
|
34 |
|
|
L1ObjColl selectByPtMin( double ptMin = 0.) const;
|
35 |
|
|
L1ObjColl selectByEta( double etaMin = -1.61, double etaMax = 1.61) const;
|
36 |
|
|
L1ObjColl selectByBx( int bxMin = 0, int bxMax = 0) const;
|
37 |
|
|
L1ObjColl selectByQuality( int qMin = 0, int qMax = 7) const;
|
38 |
|
|
L1ObjColl selectByMatched() const;
|
39 |
|
|
L1ObjColl selectByDeltaR( double deltaRMax) const;
|
40 |
|
|
L1ObjColl operator+(const L1ObjColl &o) const;
|
41 |
konec |
1.5 |
|
42 |
konec |
1.6 |
friend ostream & operator<< (ostream &out, const L1ObjColl&s);
|
43 |
konec |
1.1 |
|
44 |
konec |
1.5 |
//tmp
|
45 |
konec |
1.1 |
std::vector<L1Obj> getL1ObjsMatched(double ptMin = 0) const;
|
46 |
konec |
1.2 |
std::vector<L1Obj> getL1ObjsSelected(
|
47 |
|
|
bool requireMatched = true, bool requireNonMatched = false,
|
48 |
|
|
double ptMin = 0., double ptMax = 161.,
|
49 |
|
|
int bxMin = 0, int bxMax = 0,
|
50 |
|
|
double etaMin = -2.5, double etaMax = 2.5,
|
51 |
|
|
double phiMin = 0., double phiMax = 7.,
|
52 |
|
|
int qMin = 0, int qMax = 7) const;
|
53 |
konec |
1.3 |
static std::vector<L1Obj> typeSelector(const std::vector<L1Obj> & col, TYPE t1=L1Obj::NONE, TYPE t2=L1Obj::NONE, TYPE t3=L1Obj::NONE, TYPE t4=L1Obj::NONE);
|
54 |
|
|
|
55 |
konec |
1.1 |
|
56 |
|
|
private:
|
57 |
|
|
std::vector<L1Obj> theL1Obj;
|
58 |
|
|
std::vector<bool> theL1Matching;
|
59 |
konec |
1.4 |
std::vector<double> theDeltaR;
|
60 |
konec |
1.1 |
|
61 |
|
|
public:
|
62 |
|
|
ClassDef(L1ObjColl,1)
|
63 |
|
|
|
64 |
|
|
};
|
65 |
|
|
|
66 |
|
|
#endif
|