fastjet 2.4.5
Public Member Functions | Protected Attributes
fastjet::d0::ProtoJet< Item > Class Template Reference

#include <ProtoJet.hpp>

Inheritance diagram for fastjet::d0::ProtoJet< Item >:
Inheritance graph
[legend]
Collaboration diagram for fastjet::d0::ProtoJet< Item >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ProtoJet (float seedET)
 ProtoJet (float seedET, float y, float phi)
 ProtoJet (const ProtoJet< Item > &pj)
 ~ProtoJet ()
void addItem (const Item *tw)
void setJet (float y, float phi, float pT)
void updateJet ()
void erase ()
float y () const
float phi () const
float pT () const
const ConeJetInfoinfo () const
const std::list< const Item * > & LItems () const
void print (std::ostream &os) const
void NowStable ()
void splitted ()
void merged ()

Protected Attributes

std::list< const Item * > _LItems
float _y
float _phi
float _pT
ConeJetInfo _info

Detailed Description

template<class Item>
class fastjet::d0::ProtoJet< Item >

Definition at line 58 of file ProtoJet.hpp.


Constructor & Destructor Documentation

template<class Item >
fastjet::d0::ProtoJet< Item >::ProtoJet ( float  seedET)

Definition at line 97 of file ProtoJet.hpp.

References fastjet::d0::ProtoJet< Item >::_phi, fastjet::d0::ProtoJet< Item >::_pT, and fastjet::d0::ProtoJet< Item >::_y.

                                     : _LItems(), _info(seedET) {
    _y  = 0.0;
    _phi= 0.0;
    _pT = 0.0;
}
template<class Item >
fastjet::d0::ProtoJet< Item >::ProtoJet ( float  seedET,
float  y,
float  phi 
)
template<class Item >
fastjet::d0::ProtoJet< Item >::ProtoJet ( const ProtoJet< Item > &  pj)

Definition at line 111 of file ProtoJet.hpp.

References fastjet::d0::ProtoJet< Item >::_LItems.

                                                : _y(pj._y), 
                                                    _phi(pj._phi), _pT(pj._pT),
                                                    _info(pj._info)
{ 
  typename std::list<const Item*>::const_iterator it;
  for(it = pj._LItems.begin(); it != pj._LItems.end(); ++it) { 
    _LItems.push_back(*it);
  }
}
template<class Item>
fastjet::d0::ProtoJet< Item >::~ProtoJet ( ) [inline]

Definition at line 65 of file ProtoJet.hpp.

{;}

Member Function Documentation

template<class Item >
void fastjet::d0::ProtoJet< Item >::addItem ( const Item *  tw)

Definition at line 122 of file ProtoJet.hpp.

Referenced by fastjet::d0::ConeSplitMerge< Item >::split_merge().

                                           {
  _LItems.push_back(tw);
}
template<class Item >
void fastjet::d0::ProtoJet< Item >::erase ( )

Definition at line 155 of file ProtoJet.hpp.

Referenced by fastjet::d0::ConeSplitMerge< Item >::split_merge().

                           {
  _LItems.erase(_LItems.begin(),_LItems.end());
  _y  = 0.0;
  _phi= 0.0;
  _pT = 0.0; 
  // _info is not modified in order to keep split/merge history
}
template<class Item >
const ConeJetInfo & fastjet::d0::ProtoJet< Item >::info ( ) const [inline]
template<class Item >
const std::list< const Item * > & fastjet::d0::ProtoJet< Item >::LItems ( ) const [inline]

Definition at line 199 of file ProtoJet.hpp.

Referenced by fastjet::d0::ConeSplitMerge< Item >::split_merge().

                                                               {
  return _LItems;
}
template<class Item>
void fastjet::d0::ProtoJet< Item >::merged ( ) [inline]

Definition at line 85 of file ProtoJet.hpp.

Referenced by fastjet::d0::ConeSplitMerge< Item >::split_merge().

{_info.merged();};
template<class Item >
void fastjet::d0::ProtoJet< Item >::NowStable ( )

Definition at line 165 of file ProtoJet.hpp.

Referenced by fastjet::d0::ConeSplitMerge< Item >::ConeSplitMerge().

                               {
  _info.initialET(_pT);
}
template<class Item >
float fastjet::d0::ProtoJet< Item >::phi ( ) const [inline]
template<class Item >
void fastjet::d0::ProtoJet< Item >::print ( std::ostream &  os) const

Definition at line 170 of file ProtoJet.hpp.

                                               {
  os<<"y phi Et = ("<<_y<<", "<<_phi<<", "<<this->_Et<<")"<<std::endl;
  os<< " members= " << std::endl;
  typename std::list<const Item*>::const_iterator i;
  for(i = _LItems.begin(); i != _LItems.end(); ++i)
    (*i)->print(os);
  os << std::endl;
}
template<class Item >
float fastjet::d0::ProtoJet< Item >::pT ( ) const [inline]
template<class Item >
void fastjet::d0::ProtoJet< Item >::setJet ( float  y,
float  phi,
float  pT 
)

Definition at line 127 of file ProtoJet.hpp.

References fastjet::d0::inline_maths::phi(), and fastjet::d0::inline_maths::y().

                                                      {
  _y  = y;
  _phi= phi;
  _pT = pT;
}
template<class Item>
void fastjet::d0::ProtoJet< Item >::splitted ( ) [inline]

Definition at line 83 of file ProtoJet.hpp.

Referenced by fastjet::d0::ConeSplitMerge< Item >::split_merge().

{_info.splitted();};
template<class Item >
void fastjet::d0::ProtoJet< Item >::updateJet ( )

Definition at line 134 of file ProtoJet.hpp.

References fastjet::d0::P2phi(), and fastjet::d0::P2y().

Referenced by fastjet::d0::ConeSplitMerge< Item >::split_merge().

                               { 
  //float ETsum = 0.0;
  //float ysum  = 0.0;
  //float PHIsum= 0.0;
  float p[4] = {0.,0.,0.,0.};
  typename std::list<const Item*>::iterator it;
  for(it = _LItems.begin(); it != _LItems.end(); ++it) 
  {
    float pk[4];
    (*it)->p4vec(pk);
    //cout << "updateJet: px=" << pk[0] << " py=" << pk[1] << " pz=" << pk[2] << " E=" << pk[3] << endl; 
    for ( int i = 0; i < 4 ; ++i) p[i] += pk[i];
  }
  _y = P2y(p);
  _phi = P2phi(p);
  _pT = sqrt(p[0]*p[0] + p[1]*p[1]);
  if ( p[3] < 0. ) _pT = - _pT;

}
template<class Item >
float fastjet::d0::ProtoJet< Item >::y ( ) const [inline]

Member Data Documentation

template<class Item>
ConeJetInfo fastjet::d0::ProtoJet< Item >::_info [protected]

Definition at line 92 of file ProtoJet.hpp.

template<class Item>
std::list<const Item*> fastjet::d0::ProtoJet< Item >::_LItems [protected]

Definition at line 85 of file ProtoJet.hpp.

Referenced by fastjet::d0::ProtoJet< Item >::ProtoJet().

template<class Item>
float fastjet::d0::ProtoJet< Item >::_phi [protected]

Definition at line 90 of file ProtoJet.hpp.

Referenced by fastjet::d0::ProtoJet< Item >::ProtoJet().

template<class Item>
float fastjet::d0::ProtoJet< Item >::_pT [protected]

Definition at line 91 of file ProtoJet.hpp.

Referenced by fastjet::d0::ProtoJet< Item >::ProtoJet().

template<class Item>
float fastjet::d0::ProtoJet< Item >::_y [protected]

Definition at line 89 of file ProtoJet.hpp.

Referenced by fastjet::d0::ProtoJet< Item >::ProtoJet().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines