CMS 3D CMS Logo

Typedefs | Functions
reco::JetTracksAssociation Namespace Reference

Typedefs

typedef edm::AssociationVector< reco::JetRefBaseProd, ValuesContainer
 
typedef math::PtEtaPhiELorentzVectorF LorentzVector
 
typedef edm::Ref< ContainerRef
 
typedef edm::RefProd< ContainerRefProd
 
typedef edm::RefVector< ContainerRefVector
 
typedef Container::transient_vector_type transient_vector_type
 
typedef reco::TrackRefVector Value
 
typedef Container::value_type value_type
 
typedef std::vector< ValueValues
 

Functions

std::vector< reco::JetBaseRefallJets (const Container &)
 fill list of all jets associated with values. Return # of jets in the list More...
 
const reco::TrackRefVectorgetValue (const Container &, const reco::Jet &)
 get value for the association. Throw exception if no association found More...
 
const reco::TrackRefVectorgetValue (const Container &, const reco::JetBaseRef &)
 get value for the association. Throw exception if no association found More...
 
bool hasJet (const Container &, const reco::Jet &)
 check if jet is associated More...
 
bool hasJet (const Container &, const reco::JetBaseRef &)
 check if jet is associated More...
 
bool setValue (Container &, const reco::JetBaseRef &, reco::TrackRefVector)
 associate jet with value. Returns false and associate nothing if jet is already associated More...
 
bool setValue (Container *, const reco::JetBaseRef &, reco::TrackRefVector)
 associate jet with value. Returns false and associate nothing if jet is already associated More...
 
int tracksNumber (const Container &, const reco::Jet &)
 Get number of tracks associated with jet. More...
 
int tracksNumber (const Container &, const reco::JetBaseRef)
 Get number of tracks associated with jet. More...
 
LorentzVector tracksP4 (const Container &, const reco::Jet &)
 Get LorentzVector as sum of all tracks associated with jet. More...
 
LorentzVector tracksP4 (const Container &, const reco::JetBaseRef)
 Get LorentzVector as sum of all tracks associated with jet. More...
 

Typedef Documentation

◆ Container

Definition at line 28 of file JetTracksAssociation.h.

◆ LorentzVector

Definition at line 25 of file JetTracksAssociation.h.

◆ Ref

Definition at line 31 of file JetTracksAssociation.h.

◆ RefProd

Definition at line 32 of file JetTracksAssociation.h.

◆ RefVector

Definition at line 33 of file JetTracksAssociation.h.

◆ transient_vector_type

Definition at line 30 of file JetTracksAssociation.h.

◆ Value

Definition at line 26 of file JetTracksAssociation.h.

◆ value_type

Definition at line 29 of file JetTracksAssociation.h.

◆ Values

Definition at line 27 of file JetTracksAssociation.h.

Function Documentation

◆ allJets()

std::vector< reco::JetBaseRef > reco::JetTracksAssociation::allJets ( const Container fContainer)

fill list of all jets associated with values. Return # of jets in the list

Definition at line 56 of file JetTracksAssociation.cc.

56  {
57  return JetAssociationTemplate::allJets(fContainer);
58 }

References reco::JetExtendedAssociation::allJets().

Referenced by JetPlusTrackCorrector::rebuildJta().

◆ getValue() [1/2]

const reco::TrackRefVector & reco::JetTracksAssociation::getValue ( const Container fContainer,
const reco::Jet fJet 
)

get value for the association. Throw exception if no association found

Definition at line 52 of file JetTracksAssociation.cc.

52  {
53  return JetAssociationTemplate::getValue<Container, reco::TrackRefVector>(fContainer, fJet);
54 }

◆ getValue() [2/2]

const reco::TrackRefVector & reco::JetTracksAssociation::getValue ( const Container fContainer,
const reco::JetBaseRef fJet 
)

get value for the association. Throw exception if no association found

Definition at line 47 of file JetTracksAssociation.cc.

48  {
49  return JetAssociationTemplate::getValue<Container, reco::TrackRefVector>(fContainer, fJet);
50 }

Referenced by JetPlusTrackCorrector::excludeJta(), JetPlusTrackCorrector::jtaUsingEventData(), and JetPlusTrackCorrector::rebuildJta().

◆ hasJet() [1/2]

bool reco::JetTracksAssociation::hasJet ( const Container fContainer,
const reco::Jet fJet 
)

check if jet is associated

Definition at line 64 of file JetTracksAssociation.cc.

64  {
65  return JetAssociationTemplate::hasJet(fContainer, fJet);
66 }

References reco::JetExtendedAssociation::hasJet().

◆ hasJet() [2/2]

bool reco::JetTracksAssociation::hasJet ( const Container fContainer,
const reco::JetBaseRef fJet 
)

check if jet is associated

Definition at line 60 of file JetTracksAssociation.cc.

60  {
61  return JetAssociationTemplate::hasJet(fContainer, fJet);
62 }

References reco::JetExtendedAssociation::hasJet().

◆ setValue() [1/2]

bool reco::JetTracksAssociation::setValue ( Container fContainer,
const reco::JetBaseRef fJet,
reco::TrackRefVector  fValue 
)

◆ setValue() [2/2]

bool reco::JetTracksAssociation::setValue ( Container fContainer,
const reco::JetBaseRef fJet,
reco::TrackRefVector  fValue 
)

associate jet with value. Returns false and associate nothing if jet is already associated

Definition at line 35 of file JetTracksAssociation.cc.

37  {
38  return JetAssociationTemplate::setValue(fContainer, fJet, fValue);
39 }

References reco::JetExtendedAssociation::setValue().

◆ tracksNumber() [1/2]

int reco::JetTracksAssociation::tracksNumber ( const Container fContainer,
const reco::Jet fJet 
)

Get number of tracks associated with jet.

Definition at line 10 of file JetTracksAssociation.cc.

10  {
11  return getValue(fContainer, fJet).size();
12 }

References reco::JetExtendedAssociation::getValue().

◆ tracksNumber() [2/2]

int reco::JetTracksAssociation::tracksNumber ( const Container fContainer,
const reco::JetBaseRef  fJet 
)

Get number of tracks associated with jet.

Definition at line 7 of file JetTracksAssociation.cc.

7  {
8  return getValue(fContainer, fJet).size();
9 }

References reco::JetExtendedAssociation::getValue().

Referenced by JetValidation::analyze(), and JetExtender::produce().

◆ tracksP4() [1/2]

reco::JetTracksAssociation::LorentzVector reco::JetTracksAssociation::tracksP4 ( const Container fContainer,
const reco::Jet fJet 
)

Get LorentzVector as sum of all tracks associated with jet.

Definition at line 24 of file JetTracksAssociation.cc.

25  {
26  const reco::TrackRefVector* tracks = &getValue(fContainer, fJet);
27  math::XYZTLorentzVector result(0, 0, 0, 0);
28  for (unsigned t = 0; t < tracks->size(); ++t) {
29  const reco::Track& track = *((*tracks)[t]);
30  result += math::XYZTLorentzVector(track.px(), track.py(), track.pz(), track.p()); // massless hypothesis
31  }
33 }

References reco::JetExtendedAssociation::getValue(), mps_fire::result, OrderedSet::t, HLT_2018_cff::track, and PDWG_EXOHSCP_cff::tracks.

◆ tracksP4() [2/2]

reco::JetTracksAssociation::LorentzVector reco::JetTracksAssociation::tracksP4 ( const Container fContainer,
const reco::JetBaseRef  fJet 
)

Get LorentzVector as sum of all tracks associated with jet.

Definition at line 14 of file JetTracksAssociation.cc.

15  {
16  const reco::TrackRefVector* tracks = &getValue(fContainer, fJet);
17  math::XYZTLorentzVector result(0, 0, 0, 0);
18  for (unsigned t = 0; t < tracks->size(); ++t) {
19  const reco::Track& track = *((*tracks)[t]);
20  result += math::XYZTLorentzVector(track.px(), track.py(), track.pz(), track.p()); // massless hypothesis
21  }
23 }

References reco::JetExtendedAssociation::getValue(), mps_fire::result, OrderedSet::t, HLT_2018_cff::track, and PDWG_EXOHSCP_cff::tracks.

Referenced by JetValidation::analyze(), and JetExtender::produce().

PDWG_EXOHSCP_cff.tracks
tracks
Definition: PDWG_EXOHSCP_cff.py:28
reco::JetExtendedAssociation::setValue
bool setValue(Container &, const reco::JetBaseRef &, const JetExtendedData &)
associate jet with value. Returns false and associate nothing if jet is already associated
Definition: JetExtendedAssociation.cc:44
reco::JetExtendedAssociation::hasJet
bool hasJet(const Container &, const reco::JetBaseRef &)
check if jet is associated
Definition: JetExtendedAssociation.cc:64
edm::RefVector< TrackCollection >
reco::Track
Definition: Track.h:27
OrderedSet.t
t
Definition: OrderedSet.py:90
reco::JetExtendedAssociation::getValue
const JetExtendedData & getValue(const Container &, const reco::JetBaseRef &)
get value for the association. Throw exception if no association found
Definition: JetExtendedAssociation.cc:50
reco::JetExtendedAssociation::allJets
std::vector< reco::JetBaseRef > allJets(const Container &)
fill list of all jets associated with values. Return # of jets in the list
Definition: JetExtendedAssociation.cc:60
reco::JetTracksAssociation::LorentzVector
math::PtEtaPhiELorentzVectorF LorentzVector
Definition: JetTracksAssociation.h:25
math::XYZTLorentzVector
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
HLT_2018_cff.track
track
Definition: HLT_2018_cff.py:10352
mps_fire.result
result
Definition: mps_fire.py:303