8#if !defined(SIMULATIONBASE) and !defined(GENERATIONBASE)
16 if( std::abs( m ) < 0.00001 ) {
19 p = std::sqrt(
e *
e - m * m );
26 double aEta = std::abs(
eta );
30 const double sinTh = 1.0 / std::cosh( aEta );
39 switch( part->type() ){
40 case Type::CaloCluster: {
43 constit.SetCoordinates(
ptFromEEtaM( cl->rawE(), cl->rawEta(), cl->rawM() ),
50#if !defined(SIMULATIONBASE) and !defined(GENERATIONBASE)
51 case Type::ParticleFlow: {
54 else constit.SetCoordinates( 0, 1, 1, 0 );
63 constit.SetCoordinates( part->pt(), part->eta(),
64 part->phi(), part->m() );
93 using ELVector = std::vector<ElementLink<IParticleContainer> >;
96 if ( ! el.isValid() )
return false;
123 std::vector<const IParticle*> v(
m_elVector->size() );
124 for(
size_t i=0;i<v.size(); i++) v[i] = *(
m_elVector->at(i));
130 std::vector<JetConstituent>
vec(N);
131 for (
size_t i=0;i<N;i++ ) {
Scalar eta() const
pseudorapidity method
std::vector< size_t > vec
This file defines helper classes to deal with jet constituents.
ElementLink implementation for ROOT usage.
Class providing the definition of the 4-vector interface.
JetConstitScale m_sigState
ELiterator m_cachedMomIndex
iterator(ELiterator it, JetConstitScale s)
bool operator==(const iterator &other) const
const JetConstituent * operator*()
const JetConstituent * operator->()
bool operator!=(const iterator &other) const
const std::vector< ElementLink< IParticleContainer > > * m_elVector
iterator begin() const
iterator on the first constituent
size_t size() const
number of constituents
JetConstituent operator[](size_t i) const
Constituent proxy at position i.
std::vector< const IParticle * > asIParticleVector() const
vector of pointer to the underlying IParticles.
JetConstituent front() const
first constituent proxy
bool isValid() const
Check if element links are valid.
JetConstitScale m_sigState
JetConstituent back() const
last constituent proxy
iterator end() const
iterator after the last constituent
bool empty() const
true if vector is empty()
std::vector< JetConstituent > asSTLVector()
Returns this vector as a std::vector Provided for convenience when dealing with the JetConstituentVec...
JetConstituent at(size_t i) const
Constituent proxy at position i.
4-vector of jet constituent at the scale used during jet finding.
virtual double ptEM() const
get EM scale pt
virtual double etaEM() const
get EM scale eta
virtual double phiEM() const
get EM scale phi
virtual double mEM() const
get EM scale mass
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
void fillJetConstituent(const IParticle *part, JetConstituent &constit, JetConstitScale sigState)
PFO_v1 PFO
Definition of the current "pfo version".
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
double ptFromEEtaM(const double e, const double eta, const double m)
JetConstituentVector::iterator iterator
@ UncalibratedJetConstituent