ATLAS Offline Software
Loading...
Searching...
No Matches
Analysis::JetConstituent Class Referenceabstract

Class JetConstituent: This is the implemntation of the JetConstituent class for ParticleJet. More...

#include <JetConstituent.h>

Inheritance diagram for Analysis::JetConstituent:
Collaboration diagram for Analysis::JetConstituent:

Public Types

typedef typename NavigationDefaults::DefaultChildColl< JetCollection, double >::type constituent_coll
typedef constituent_coll::iterator constituent_iter
typedef constituent_coll::const_iterator constituent_const_iter
typedef JetCollection container_type
 Object container type.
typedef double parameter_type
 \ brief Relational parameter type
typedef NavigationDefaults::DefaultChildColl< container_type, parameter_typenavhelper_t
 Collection manager type.
typedef JetCollection::base_value_type constituent_type
typedef JetCollection::reference constituent_ptr_ref
typedef JetCollection::const_reference constituent_const_ptr_ref
typedef JetCollection::value_type constituent_ptr
typedef SG::GenerateIndexingPolicy< JetCollection >::type::index_type external_index_type
typedef NavigableIterator< JetCollection, double, typename NavigationDefaults::DefaultChildColl< JetCollection, double >::typeobject_iter

Public Member Functions

 JetConstituent ()
 constructor
 JetConstituent (NameType &name)
 constructor
 ~JetConstituent ()=default
virtual void setName (NameType &name)
 to set the name
virtual NameType name () const
 returns the infoType of the info objects.
virtual IConstituentclone () const
 a clone method for the proper workings of the copy constructor
const Jetjet () const
 get jet directly without token
double energyInSample (CaloSampling::CaloSample) const
 This is the energy in a sample with the navigation weight and hadronic calibration.
double energyInCryostat () const
 The estimate of the energy cryostat.
void set_jet (const JetCollection *theContainer, const Jet *the_jet, double weight=1)
void set_jet (const JetCollection *theContainer, index_type &theIndex, double weight=1)
void set_constituent (const JetCollection *theContainer, const Jet *the_jet, double weight=1)
void set_constituent (const JetCollection *theContainer, index_type &theIndex, double weight=1)
double getJetWeight (const Jet *the_jet) const
double getJetWeight (const JetCollection *theContainer, index_type &theIndex) const
void set_energyInSample (CaloSampling::CaloSample, double)
 set energy in sample WITH hadronic weights
double wtCryo () const
void set_wtCryo (double)
 Set wtCryoLocal defined as wtCryoLocal = wtCryo / sqrt( average_TileBar0_weight * average_EMB3_weight)
virtual void fillToken (INavigationToken &navToken) const
void putElement (const JetCollection *objectContainer, const constituent_type *constituentObject, const double &objectParameter=double(), size_t sizeHint=0)
void insertElement (const JetCollection *objectContainer, const constituent_type *constituentObject, const double &objectParameter=double(), size_t sizeHint=0)
void reweight (const constituent_type *constituentObject, const double &objectParameter=double())
bool remove (const constituent_type *aConstituent)
bool removeAll ()
bool replace (const JetCollection *newObjectContainer)
 replace old object container with a new container assumes that all objects have been or will be inserted to the new container
bool contains (const constituent_type *aConstituent) const
virtual object_iter begin () const
virtual object_iter end () const
virtual unsigned int size () const
double getParameter (const constituent_type *aConstituent) const
const JetCollectiongetContainer (const constituent_type *aConstituent) const
bool getIndex (const constituent_type *aConstituent, external_index_type &theIndex) const
virtual void fillToken (INavigationToken &thisToken, const std::any &weight) const =0

Protected Member Functions

const constituent_collgetConstituents () const
const constituent_collgetPtrToConstituents () const
virtual const constituent_typegetConstituentPtr (constituent_iter iter) const
virtual double getConstituentPar (constituent_iter iter) const
void dumpStore () const

Private Types

typedef Navigable< JetCollection, double >::external_index_type index_type
typedef Navigable< JetCollection, double >::constituent_iter iter_type

Private Member Functions

virtual void apply (NavigationToken< constituent_type > &navToken) const
virtual void toKidsAfterAccept (INavigationToken &navToken) const
virtual void toKidsAfterReject (INavigationToken &navToken) const

Private Attributes

std::string m_name
double m_wtCryoLocal
std::vector< double > m_energyInSample
constituent_coll m_constituents

Detailed Description

Class JetConstituent: This is the implemntation of the JetConstituent class for ParticleJet.

Author
cranm.nosp@m.er@c.nosp@m.ern.c.nosp@m.h

Definition at line 42 of file JetConstituent.h.

Member Typedef Documentation

◆ constituent_coll

typedef typename NavigationDefaults::DefaultChildColl<JetCollection, double>::type Navigable< JetCollection, double, typename NavigationDefaults::DefaultChildColl<JetCollection, double>::type >::constituent_coll
inherited

Definition at line 101 of file Navigable.h.

◆ constituent_const_iter

typedef constituent_coll::const_iterator Navigable< JetCollection, double, typename NavigationDefaults::DefaultChildColl<JetCollection, double>::type >::constituent_const_iter
inherited

Definition at line 103 of file Navigable.h.

◆ constituent_const_ptr_ref

typedef JetCollection::const_reference Navigable< JetCollection, double, typename NavigationDefaults::DefaultChildColl<JetCollection, double>::type >::constituent_const_ptr_ref
inherited

Definition at line 151 of file Navigable.h.

◆ constituent_iter

typedef constituent_coll::iterator Navigable< JetCollection, double, typename NavigationDefaults::DefaultChildColl<JetCollection, double>::type >::constituent_iter
inherited

Definition at line 102 of file Navigable.h.

◆ constituent_ptr

typedef JetCollection::value_type Navigable< JetCollection, double, typename NavigationDefaults::DefaultChildColl<JetCollection, double>::type >::constituent_ptr
inherited

Definition at line 152 of file Navigable.h.

◆ constituent_ptr_ref

typedef JetCollection::reference Navigable< JetCollection, double, typename NavigationDefaults::DefaultChildColl<JetCollection, double>::type >::constituent_ptr_ref
inherited

Definition at line 150 of file Navigable.h.

◆ constituent_type

typedef JetCollection::base_value_type Navigable< JetCollection, double, typename NavigationDefaults::DefaultChildColl<JetCollection, double>::type >::constituent_type
inherited

Definition at line 149 of file Navigable.h.

◆ container_type

typedef JetCollection Navigable< JetCollection, double, typename NavigationDefaults::DefaultChildColl<JetCollection, double>::type >::container_type
inherited

Object container type.

Definition at line 110 of file Navigable.h.

◆ external_index_type

Definition at line 156 of file Navigable.h.

◆ index_type

◆ iter_type

◆ navhelper_t

Collection manager type.

Definition at line 114 of file Navigable.h.

◆ object_iter

◆ parameter_type

typedef double Navigable< JetCollection, double, typename NavigationDefaults::DefaultChildColl<JetCollection, double>::type >::parameter_type
inherited

\ brief Relational parameter type

Definition at line 112 of file Navigable.h.

Constructor & Destructor Documentation

◆ JetConstituent() [1/2]

Analysis::JetConstituent::JetConstituent ( )

constructor

Definition at line 22 of file JetConstituent.cxx.

22 :
23 m_wtCryoLocal ( 0 ),
24 m_energyInSample ( CaloSampling::Unknown )
25 { }
std::vector< double > m_energyInSample

◆ JetConstituent() [2/2]

Analysis::JetConstituent::JetConstituent ( NameType & name)

constructor

Definition at line 27 of file JetConstituent.cxx.

27 :
28 m_name (name),
29 m_wtCryoLocal ( 0 ),
30 m_energyInSample ( CaloSampling::Unknown )//reserve space in vector
31 { }
virtual NameType name() const
returns the infoType of the info objects.

◆ ~JetConstituent()

Analysis::JetConstituent::~JetConstituent ( )
default

Member Function Documentation

◆ apply()

virtual void Navigable< JetCollection, double, typename NavigationDefaults::DefaultChildColl<JetCollection, double>::type >::apply ( NavigationToken< constituent_type > & navToken) const
privatevirtualinherited

◆ begin()

virtual object_iter Navigable< JetCollection, double, typename NavigationDefaults::DefaultChildColl<JetCollection, double>::type >::begin ( ) const
virtualinherited

◆ clone()

IConstituent * Analysis::JetConstituent::clone ( ) const
virtual

a clone method for the proper workings of the copy constructor

Implements Analysis::IConstituent.

Definition at line 38 of file JetConstituent.cxx.

39 { return new JetConstituent( *this );}

◆ contains()

bool Navigable< JetCollection, double, typename NavigationDefaults::DefaultChildColl<JetCollection, double>::type >::contains ( const constituent_type * aConstituent) const
inherited

◆ dumpStore()

void Navigable< JetCollection, double, typename NavigationDefaults::DefaultChildColl<JetCollection, double>::type >::dumpStore ( ) const
protectedinherited

◆ end()

virtual object_iter Navigable< JetCollection, double, typename NavigationDefaults::DefaultChildColl<JetCollection, double>::type >::end ( ) const
virtualinherited

◆ energyInCryostat()

double Analysis::JetConstituent::energyInCryostat ( ) const

The estimate of the energy cryostat.


Normally this is wtCryo*sqrt(EMB3*tileBar0) where EMB3&tilebar0 do NOT have any hadronic calibration applied.
In order to avoid holding a lot more information in the ParticleJet we return wtCryoLocal * sqrt(EMB3_calib * tileBar0_calib) where EMB3_calib = average_EMB3_weight * EMB3 tileBar0_calib = average_TileBar0_weight * tileBar0 and thus wtCryoLocal = wtCryo / sqrt( average_TileBar0_weight * average_EMB3_weight).

Definition at line 126 of file JetConstituent.cxx.

127 {
128 return m_wtCryoLocal*sqrt( fabs(m_energyInSample[CaloSampling::EMB3])
129 *fabs(m_energyInSample[CaloSampling::TileBar0]) );
130 }

◆ energyInSample()

double Analysis::JetConstituent::energyInSample ( CaloSampling::CaloSample s) const

This is the energy in a sample with the navigation weight and hadronic calibration.

Definition at line 110 of file JetConstituent.cxx.

111 {
112 return m_energyInSample[s];
113 }

◆ fillToken() [1/2]

virtual void INavigable::fillToken ( INavigationToken & thisToken,
const std::any & weight ) const
pure virtualinherited

Implemented in Analysis::ISvxAssociation, Analysis::ISvxConstituent, Analysis::Muon, Analysis::MuonAssociation, Analysis::ParticleShallowClone, Analysis::TauJet, CaloClusterNavigable, constituent_iter< ElectronContainer, double >, constituent_iter< INavigable4MomentumCollection, double >, constituent_iter< JetCollection, double >, constituent_iter< MuonContainer, double >, constituent_iter< PhotonContainer, double >, constituent_iter< TrackParticleContainer, double >, eflowObject, egamma, external_index_type< CaloCellContainer, double >, external_index_type< ElectronContainer, double >, external_index_type< INavigable4MomentumCollection, double >, external_index_type< JetCollection, double >, external_index_type< MuonContainer, double >, external_index_type< PhotonContainer, double >, external_index_type< TrackParticleContainer, double >, Jet, Nav4MomWrapper< Navigable_t, P4Momentum_t >, Navigable< CONT, RPAR, COLL >, Navigable< CaloClusterContainer >, Navigable< collection_t, weight_t >, Navigable< INavigable4MomentumCollection, double >, NavigableTerminalNode, object_iter< CaloCellContainer, double >, object_iter< TrackParticleContainer, double >, ParticleImpl< INavigable_t, I4Momentum_t, IParticle_t >, ParticleImpl< ::Analysis::MuonNavigation, ::P4ImplIPtCotThPhiM >, ParticleImpl< ::Analysis::TauJetNavigation, ::P4ImplEEtaPhiM >, ParticleImpl< CompositeParticleNavigation, P4ImplPxPyPzE, ParticleEvent::Base >, ParticleImpl< egammaNavigation, P4ImplEEtaPhiM >, ParticleImpl< INavigable_t, I4Momentum_t, IParticle_t >, ParticleImpl< NavigableTerminalNode, P4ImplEEtaPhiM, ParticleEvent::Base >, ParticleImpl< NavigableTerminalNode, P4ImplIPtCotThPhiM, ParticleEvent::Base >, ParticleImpl< NavigableTerminalNode, P4ImplPxPyPzE, ParticleEvent::Base >, ParticleImpl< NeutrinoNavigation, P4ImplPxPyPzE >, ParticleImpl< TruthParticleNavigation, TruthParticleMomentum, TruthParticleBase >, ParticleSigStateImpl< INavigable_t, I4Momentum_t, IParticle_t >, ParticleSigStateImpl< INavigable_t, I4Momentum_t, IParticle_t >, and ParticleSigStateImpl< Navigable< INavigable4MomentumCollection, double >, P4ImplPxPyPzE, ParticleEvent::Base >.

◆ fillToken() [2/2]

virtual void Navigable< JetCollection, double, typename NavigationDefaults::DefaultChildColl<JetCollection, double>::type >::fillToken ( INavigationToken & navToken) const
virtualinherited

Implements INavigable.

◆ getConstituentPar()

virtual double Navigable< JetCollection, double, typename NavigationDefaults::DefaultChildColl<JetCollection, double>::type >::getConstituentPar ( constituent_iter iter) const
protectedvirtualinherited

◆ getConstituentPtr()

virtual const constituent_type * Navigable< JetCollection, double, typename NavigationDefaults::DefaultChildColl<JetCollection, double>::type >::getConstituentPtr ( constituent_iter iter) const
protectedvirtualinherited

◆ getConstituents()

const constituent_coll & Navigable< JetCollection, double, typename NavigationDefaults::DefaultChildColl<JetCollection, double>::type >::getConstituents ( ) const
inlineprotectedinherited

Definition at line 290 of file Navigable.h.

290{ return m_constituents; }

◆ getContainer()

const JetCollection * Navigable< JetCollection, double, typename NavigationDefaults::DefaultChildColl<JetCollection, double>::type >::getContainer ( const constituent_type * aConstituent) const
inherited

◆ getIndex()

bool Navigable< JetCollection, double, typename NavigationDefaults::DefaultChildColl<JetCollection, double>::type >::getIndex ( const constituent_type * aConstituent,
external_index_type & theIndex ) const
inherited

◆ getJetWeight() [1/2]

double Analysis::JetConstituent::getJetWeight ( const Jet * the_jet) const

Definition at line 91 of file JetConstituent.cxx.

92 {
93 // from Navigable
94 return (this->contains(the_jet) )
95 ? this->getParameter(the_jet)
96 : 0.;
97 }
double getParameter(const constituent_type *aConstituent) const
bool contains(const constituent_type *aConstituent) const

◆ getJetWeight() [2/2]

double Analysis::JetConstituent::getJetWeight ( const JetCollection * theContainer,
index_type & theIndex ) const

Definition at line 99 of file JetConstituent.cxx.

101 {
102 // from Navigable
103 return (this->contains(theContainer,theIndex))
104 ? this->getParameter(theContainer,theIndex)
105 : 0.;
106 }

◆ getParameter()

double Navigable< JetCollection, double, typename NavigationDefaults::DefaultChildColl<JetCollection, double>::type >::getParameter ( const constituent_type * aConstituent) const
inherited

◆ getPtrToConstituents()

const constituent_coll * Navigable< JetCollection, double, typename NavigationDefaults::DefaultChildColl<JetCollection, double>::type >::getPtrToConstituents ( ) const
inlineprotectedinherited

Definition at line 294 of file Navigable.h.

295 { return &m_constituents; }

◆ insertElement()

void Navigable< JetCollection, double, typename NavigationDefaults::DefaultChildColl<JetCollection, double>::type >::insertElement ( const JetCollection * objectContainer,
const constituent_type * constituentObject,
const double & objectParameter = RPAR(),
size_t sizeHint = 0 )
inherited

◆ jet()

const Jet * Analysis::JetConstituent::jet ( ) const

get jet directly without token

Definition at line 41 of file JetConstituent.cxx.

42 {
43 //get jet from Navigable
44 if (this->size() ==0)
45 return 0;
46 else if (this->size() > 1)
47 return 0;
48 // this shouldn't happen
49 else
50 return getConstituentPtr((this->getConstituents()).begin());
51 }
const constituent_coll & getConstituents() const
Definition Navigable.h:290
virtual unsigned int size() const
virtual object_iter begin() const
virtual const constituent_type * getConstituentPtr(constituent_iter iter) const

◆ name()

NameType Analysis::JetConstituent::name ( ) const
virtual

returns the infoType of the info objects.

This has to be set by the tagger.

Implements Analysis::IConstituent.

Definition at line 36 of file JetConstituent.cxx.

36{ return m_name;}

◆ putElement()

void Navigable< JetCollection, double, typename NavigationDefaults::DefaultChildColl<JetCollection, double>::type >::putElement ( const JetCollection * objectContainer,
const constituent_type * constituentObject,
const double & objectParameter = RPAR(),
size_t sizeHint = 0 )
inherited

◆ remove()

bool Navigable< JetCollection, double, typename NavigationDefaults::DefaultChildColl<JetCollection, double>::type >::remove ( const constituent_type * aConstituent)
inherited

◆ removeAll()

bool Navigable< JetCollection, double, typename NavigationDefaults::DefaultChildColl<JetCollection, double>::type >::removeAll ( )
inlineinherited

Definition at line 237 of file Navigable.h.

237{ m_constituents.clear(); return this->size() == 0 ; }

◆ replace()

bool Navigable< JetCollection, double, typename NavigationDefaults::DefaultChildColl<JetCollection, double>::type >::replace ( const JetCollection * newObjectContainer)
inherited

replace old object container with a new container assumes that all objects have been or will be inserted to the new container

◆ reweight()

void Navigable< JetCollection, double, typename NavigationDefaults::DefaultChildColl<JetCollection, double>::type >::reweight ( const constituent_type * constituentObject,
const double & objectParameter = RPAR() )
inherited

◆ set_constituent() [1/2]

void Analysis::JetConstituent::set_constituent ( const JetCollection * theContainer,
const Jet * the_jet,
double weight = 1 )
inline

Definition at line 80 of file JetConstituent.h.

82 {set_jet(theContainer, the_jet, weight);}
void set_jet(const JetCollection *theContainer, const Jet *the_jet, double weight=1)

◆ set_constituent() [2/2]

void Analysis::JetConstituent::set_constituent ( const JetCollection * theContainer,
index_type & theIndex,
double weight = 1 )
inline

Definition at line 84 of file JetConstituent.h.

86 {set_jet(theContainer, theIndex, weight);}

◆ set_energyInSample()

void Analysis::JetConstituent::set_energyInSample ( CaloSampling::CaloSample s,
double e )

set energy in sample WITH hadronic weights

Definition at line 133 of file JetConstituent.cxx.

◆ set_jet() [1/2]

void Analysis::JetConstituent::set_jet ( const JetCollection * theContainer,
const Jet * the_jet,
double weight = 1 )

Definition at line 53 of file JetConstituent.cxx.

56 {
57 double newWeight = weight;
58 // jet already in collection
59 if ( this->contains(the_jet) )
60 {
61 // update weight
62 newWeight *= this->getJetWeight(the_jet);
63 // remove the previous jet
64 this->remove(the_jet);
65 }
66
67 // from Navigable base
68 this->putElement(theContainer,the_jet,newWeight);
69
70 }
double getJetWeight(const Jet *the_jet) const
bool remove(const constituent_type *aConstituent)
void putElement(const JetCollection *objectContainer, const constituent_type *constituentObject, const double &objectParameter=double(), size_t sizeHint=0)

◆ set_jet() [2/2]

void Analysis::JetConstituent::set_jet ( const JetCollection * theContainer,
index_type & theIndex,
double weight = 1 )

Definition at line 72 of file JetConstituent.cxx.

75 {
76 double newWeight = weight;
77 // jet already in collection
78 if ( this->contains(theContainer,theIndex) )
79 {
80 // update weight
81 newWeight *= this->getJetWeight(theContainer,theIndex);
82 // remove the previous jet
83 this->remove(theContainer,theIndex);
84 }
85
86 // from Navigable base
87 this->putElement(theContainer,theIndex,newWeight);
88
89 }

◆ set_wtCryo()

void Analysis::JetConstituent::set_wtCryo ( double wtCryoLocal)

Set wtCryoLocal defined as wtCryoLocal = wtCryo / sqrt( average_TileBar0_weight * average_EMB3_weight)

Definition at line 140 of file JetConstituent.cxx.

141 {
142 m_wtCryoLocal = wtCryoLocal;
143 }

◆ setName()

void Analysis::JetConstituent::setName ( NameType & name)
virtual

to set the name

Implements Analysis::IConstituent.

Definition at line 34 of file JetConstituent.cxx.

34{m_name = name;}

◆ size()

virtual unsigned int Navigable< JetCollection, double, typename NavigationDefaults::DefaultChildColl<JetCollection, double>::type >::size ( ) const
virtualinherited

◆ toKidsAfterAccept()

virtual void Navigable< JetCollection, double, typename NavigationDefaults::DefaultChildColl<JetCollection, double>::type >::toKidsAfterAccept ( INavigationToken & navToken) const
privatevirtualinherited

◆ toKidsAfterReject()

virtual void Navigable< JetCollection, double, typename NavigationDefaults::DefaultChildColl<JetCollection, double>::type >::toKidsAfterReject ( INavigationToken & navToken) const
privatevirtualinherited

◆ wtCryo()

double Analysis::JetConstituent::wtCryo ( ) const
inline

Definition at line 95 of file JetConstituent.h.

95{ return m_wtCryoLocal; }

Member Data Documentation

◆ m_constituents

constituent_coll Navigable< JetCollection, double, typename NavigationDefaults::DefaultChildColl<JetCollection, double>::type >::m_constituents
privateinherited

Definition at line 345 of file Navigable.h.

◆ m_energyInSample

std::vector<double> Analysis::JetConstituent::m_energyInSample
private

Definition at line 102 of file JetConstituent.h.

◆ m_name

std::string Analysis::JetConstituent::m_name
private

Definition at line 100 of file JetConstituent.h.

◆ m_wtCryoLocal

double Analysis::JetConstituent::m_wtCryoLocal
private

Definition at line 101 of file JetConstituent.h.


The documentation for this class was generated from the following files: