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
79
|
#ifndef JetReco_JetExtendedAssociation_h
#define JetReco_JetExtendedAssociation_h
/** \class JetExtendedAssociation
*
* \short Association between jets and extended Jet information
*
* \author Fedor Ratnikov, Sept. 9, 2007
*
************************************************************/
#include "DataFormats/Common/interface/AssociationVector.h"
#include "DataFormats/JetReco/interface/JetCollection.h"
#include "DataFormats/Common/interface/Ref.h"
#include "DataFormats/Common/interface/RefToBase.h"
#include "DataFormats/Common/interface/RefVector.h"
#include "DataFormats/Math/interface/LorentzVector.h"
namespace fwlite {
class Event;
}
namespace reco {
namespace JetExtendedAssociation {
class JetExtendedData;
typedef math::PtEtaPhiELorentzVectorF LorentzVector;
typedef reco::JetExtendedAssociation::JetExtendedData Value;
typedef std::vector<Value> Values;
typedef edm::AssociationVector<reco::JetRefBaseProd, Values> Container;
typedef Container::value_type value_type;
typedef Container::transient_vector_type transient_vector_type;
typedef edm::Ref<Container> Ref;
typedef edm::RefProd<Container> RefProd;
typedef edm::RefVector<Container> RefVector;
/// Number of tracks associated in the vertex
int tracksAtVertexNumber(const Container&, const reco::JetBaseRef&);
/// Number of tracks associated in the vertex
int tracksAtVertexNumber(const Container&, const reco::Jet&);
/// p4 of tracks associated in the vertex
const LorentzVector& tracksAtVertexP4(const Container&, const reco::JetBaseRef&);
const LorentzVector& tracksAtVertexP4(const Container&, const reco::Jet&);
/// Number of tracks associated at calo face
int tracksAtCaloNumber(const Container&, const reco::JetBaseRef&);
/// Number of tracks associated at calo face
int tracksAtCaloNumber(const Container&, const reco::Jet&);
/// p4 of tracks associated at calo face
const LorentzVector& tracksAtCaloP4(const Container&, const reco::JetBaseRef&);
/// p4 of tracks associated at calo face
const LorentzVector& tracksAtCaloP4(const Container&, const reco::Jet&);
/// associate jet with value. Returns false and associate nothing if jet is already associated
bool setValue(Container&, const reco::JetBaseRef&, const JetExtendedData&);
/// associate jet with value. Returns false and associate nothing if jet is already associated
bool setValue(Container*, const reco::JetBaseRef&, const JetExtendedData&);
/// get value for the association. Throw exception if no association found
const JetExtendedData& getValue(const Container&, const reco::JetBaseRef&);
/// get value for the association. Throw exception if no association found
const JetExtendedData& getValue(const Container&, const reco::Jet&);
/// fill list of all jets associated with values. Return # of jets in the list
std::vector<reco::JetBaseRef> allJets(const Container&);
/// check if jet is associated
bool hasJet(const Container&, const reco::JetBaseRef&);
/// check if jet is associated
bool hasJet(const Container&, const reco::Jet&);
class JetExtendedData {
public:
JetExtendedData();
~JetExtendedData() {}
int mTracksAtVertexNumber;
LorentzVector mTracksAtVertexP4;
int mTracksAtCaloNumber;
LorentzVector mTracksAtCaloP4;
};
} // namespace JetExtendedAssociation
} // namespace reco
#endif
|