CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Typedefs | Functions
reco::JetTracksAssociation Namespace Reference

Typedefs

typedef edm::AssociationVector
< reco::JetRefBaseProd, Values
Container
 
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::JetBaseRef &)
 get value for the association. Throw exception if no association found More...
 
const reco::TrackRefVectorgetValue (const Container &, const reco::Jet &)
 get value for the association. Throw exception if no association found More...
 
bool hasJet (const Container &, const reco::JetBaseRef &)
 check if jet is associated More...
 
bool hasJet (const Container &, const reco::Jet &)
 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::JetBaseRef)
 Get number of tracks associated with jet. More...
 
int tracksNumber (const Container &, const reco::Jet &)
 Get number of tracks associated with jet. More...
 
LorentzVector tracksP4 (const Container &, const reco::JetBaseRef)
 Get LorentzVector as sum of all tracks associated with jet. More...
 
LorentzVector tracksP4 (const Container &, const reco::Jet &)
 Get LorentzVector as sum of all tracks associated with jet. More...
 

Typedef Documentation

Definition at line 28 of file JetTracksAssociation.h.

Definition at line 25 of file JetTracksAssociation.h.

Definition at line 31 of file JetTracksAssociation.h.

Definition at line 32 of file JetTracksAssociation.h.

Definition at line 33 of file JetTracksAssociation.h.

Definition at line 30 of file JetTracksAssociation.h.

Definition at line 26 of file JetTracksAssociation.h.

Definition at line 29 of file JetTracksAssociation.h.

Definition at line 27 of file JetTracksAssociation.h.

Function Documentation

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 58 of file JetTracksAssociation.cc.

References reco::JetExtendedAssociation::allJets().

Referenced by JetPlusTrackCorrector::rebuildJta().

58  {
59  return JetAssociationTemplate::allJets (fContainer);
60 }
std::vector< reco::JetBaseRef > allJets(const Container &)
fill list of all jets associated with values. Return # of jets in the list
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 48 of file JetTracksAssociation.cc.

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

49  {
50  return JetAssociationTemplate::getValue<Container, reco::TrackRefVector> (fContainer, fJet);
51 }
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 53 of file JetTracksAssociation.cc.

54  {
55  return JetAssociationTemplate::getValue<Container, reco::TrackRefVector> (fContainer, fJet);
56 }
bool reco::JetTracksAssociation::hasJet ( const Container &  fContainer,
const reco::JetBaseRef fJet 
)

check if jet is associated

Definition at line 62 of file JetTracksAssociation.cc.

References reco::JetExtendedAssociation::hasJet().

63  {
64  return JetAssociationTemplate::hasJet (fContainer, fJet);
65 }
bool hasJet(const Container &, const reco::JetBaseRef &)
check if jet is associated
bool reco::JetTracksAssociation::hasJet ( const Container &  fContainer,
const reco::Jet fJet 
)

check if jet is associated

Definition at line 67 of file JetTracksAssociation.cc.

References reco::JetExtendedAssociation::hasJet().

68  {
69  return JetAssociationTemplate::hasJet (fContainer, fJet);
70 }
bool hasJet(const Container &, const reco::JetBaseRef &)
check if jet is associated
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 42 of file JetTracksAssociation.cc.

References reco::JetExtendedAssociation::setValue().

Referenced by JetTracksAssociationDR::associateTracksToJets(), JetTracksAssociationExplicit::produce(), JetTracksAssociationDRVertex::produce(), JetTracksAssociationDRVertexAssigned::produce(), JetTracksAssociationDRCalo::produce(), JetVetoedTracksAssociationDRVertex::produce(), and JetTracksAssociationXtrpCalo::produce().

44  {
45  return JetAssociationTemplate::setValue (fContainer, fJet,fValue);
46 }
bool setValue(Container &, const reco::JetBaseRef &, const JetExtendedData &)
associate jet with value. Returns false and associate nothing if jet is already associated ...
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 36 of file JetTracksAssociation.cc.

References reco::JetExtendedAssociation::setValue().

38  {
39  return JetAssociationTemplate::setValue (fContainer, fJet,fValue);
40 }
bool setValue(Container &, const reco::JetBaseRef &, const JetExtendedData &)
associate jet with value. Returns false and associate nothing if jet is already associated ...
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.

References reco::JetExtendedAssociation::getValue().

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

7  {
8  return getValue (fContainer, fJet).size();
9 }
const JetExtendedData & getValue(const Container &, const reco::JetBaseRef &)
get value for the association. Throw exception if no association found
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.

References reco::JetExtendedAssociation::getValue().

10  {
11  return getValue (fContainer, fJet).size();
12 }
const JetExtendedData & getValue(const Container &, const reco::JetBaseRef &)
get value for the association. Throw exception if no association found
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 15 of file JetTracksAssociation.cc.

References reco::JetExtendedAssociation::getValue(), reco::TrackBase::p(), reco::TrackBase::px(), reco::TrackBase::py(), reco::TrackBase::pz(), mps_fire::result, edm::RefVector< C, T, F >::size(), lumiQTWidget::t, and testEve_cfg::tracks.

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

15  {
16  const reco::TrackRefVector* tracks = &getValue (fContainer, fJet);
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 }
double p() const
momentum vector magnitude
Definition: TrackBase.h:610
math::PtEtaPhiELorentzVectorF LorentzVector
double px() const
x coordinate of momentum vector
Definition: TrackBase.h:622
tuple result
Definition: mps_fire.py:95
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
double pz() const
z coordinate of momentum vector
Definition: TrackBase.h:634
tuple tracks
Definition: testEve_cfg.py:39
size_type size() const
Size of the RefVector.
Definition: RefVector.h:99
const JetExtendedData & getValue(const Container &, const reco::JetBaseRef &)
get value for the association. Throw exception if no association found
double py() const
y coordinate of momentum vector
Definition: TrackBase.h:628
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 25 of file JetTracksAssociation.cc.

References reco::JetExtendedAssociation::getValue(), reco::TrackBase::p(), reco::TrackBase::px(), reco::TrackBase::py(), reco::TrackBase::pz(), mps_fire::result, edm::RefVector< C, T, F >::size(), lumiQTWidget::t, and testEve_cfg::tracks.

25  {
26  const reco::TrackRefVector* tracks = &getValue (fContainer, fJet);
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 }
double p() const
momentum vector magnitude
Definition: TrackBase.h:610
math::PtEtaPhiELorentzVectorF LorentzVector
double px() const
x coordinate of momentum vector
Definition: TrackBase.h:622
tuple result
Definition: mps_fire.py:95
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
double pz() const
z coordinate of momentum vector
Definition: TrackBase.h:634
tuple tracks
Definition: testEve_cfg.py:39
size_type size() const
Size of the RefVector.
Definition: RefVector.h:99
const JetExtendedData & getValue(const Container &, const reco::JetBaseRef &)
get value for the association. Throw exception if no association found
double py() const
y coordinate of momentum vector
Definition: TrackBase.h:628