CMS 3D CMS Logo

Public Member Functions | Private Attributes

l1slhc::L1CaloJet Class Reference

#include <L1CaloJet.h>

List of all members.

Public Member Functions

void addConstituent (const L1CaloRegionRef &)
const bool & central () const
const int & E () const
const L1CaloRegionRefVectorgetConstituents () const
int hasConstituent (const int &, const int &)
const int & iEta () const
const int & iPhi () const
 L1CaloJet (const int &, const int &)
 L1CaloJet ()
const
math::PtEtaPhiMLorentzVector
p4 () const
void removeConstituent (const int &, const int &)
void setCentral (const bool &)
void setE (const int &)
void setP4 (const math::PtEtaPhiMLorentzVector &)
 ~L1CaloJet ()

Private Attributes

bool mCentral
L1CaloRegionRefVector mConstituents
int mE
int mIeta
int mIphi
math::PtEtaPhiMLorentzVector mP4

Detailed Description

Definition at line 15 of file L1CaloJet.h.


Constructor & Destructor Documentation

l1slhc::L1CaloJet::L1CaloJet ( )

Definition at line 7 of file L1CaloJet.cc.

                              :
        mIeta( 0 ), 
        mIphi( 0 ), 
        mE( 0 ), 
        mCentral( true )
        {
        }
l1slhc::L1CaloJet::L1CaloJet ( const int &  iEta,
const int &  iPhi 
)

Definition at line 17 of file L1CaloJet.cc.

                                                              :
        mIeta( iEta ), 
        mIphi( iPhi ), 
        mE( 0 ), 
        mCentral( true )
        {
        }
l1slhc::L1CaloJet::~L1CaloJet ( )

Definition at line 25 of file L1CaloJet.cc.

        {


        }

Member Function Documentation

void l1slhc::L1CaloJet::addConstituent ( const L1CaloRegionRef region)

Definition at line 77 of file L1CaloJet.cc.

References mConstituents, and mE.

Referenced by L1CaloJetProducer::algorithm().

        {
                mE += region->E(  );
                mConstituents.push_back( region );
        }
const bool & l1slhc::L1CaloJet::central ( ) const

Definition at line 59 of file L1CaloJet.cc.

References mCentral.

Referenced by setCentral().

        {
                return mCentral;
        }
const int & l1slhc::L1CaloJet::E ( ) const
const L1CaloRegionRefVector & l1slhc::L1CaloJet::getConstituents ( ) const

Definition at line 83 of file L1CaloJet.cc.

References mConstituents.

Referenced by operator<<().

        {
                return mConstituents;
        }
int l1slhc::L1CaloJet::hasConstituent ( const int &  eta,
const int &  phi 
)

Definition at line 88 of file L1CaloJet.cc.

References i, mConstituents, mIeta, mIphi, and pos.

Referenced by removeConstituent().

        {
                int pos = -1;
                for ( unsigned int i = 0; i < mConstituents.size(  ); ++i )
                {
                        L1CaloRegionRef tower = mConstituents.at( i );
                        if ( tower->iEta(  ) == eta + mIeta && tower->iPhi(  ) == phi + mIphi )
                        {
                                pos = i;
                                break;
                        }
                }

                return pos;
        }
const int & l1slhc::L1CaloJet::iEta ( ) const

Definition at line 42 of file L1CaloJet.cc.

References mIeta.

Referenced by L1CaloJetProducer::calculateJetPosition(), std::operator<(), and operator<<().

        {
                return mIeta;
        }
const int & l1slhc::L1CaloJet::iPhi ( ) const

Definition at line 48 of file L1CaloJet.cc.

References mIphi.

Referenced by L1CaloJetProducer::calculateJetPosition(), and operator<<().

        {
                return mIphi;
        }
const math::PtEtaPhiMLorentzVector & l1slhc::L1CaloJet::p4 ( ) const

Definition at line 71 of file L1CaloJet.cc.

References mP4.

Referenced by setP4().

        {
                return mP4;
        }
void l1slhc::L1CaloJet::removeConstituent ( const int &  eta,
const int &  phi 
)

Definition at line 104 of file L1CaloJet.cc.

References hasConstituent(), mConstituents, mE, and pos.

Referenced by L1CaloJetFilter::algorithm().

        {
                int pos = hasConstituent( eta, phi );
                if ( pos != -1 )
                {
                        mE = mE - mConstituents.at( pos )->E(  );
                        mConstituents.erase( mConstituents.begin(  ) + pos );
                }
        }
void l1slhc::L1CaloJet::setCentral ( const bool &  central)

Definition at line 36 of file L1CaloJet.cc.

References central(), and mCentral.

Referenced by L1CaloJetFilter::algorithm().

        {
                mCentral = central;
        }
void l1slhc::L1CaloJet::setE ( const int &  E)

Definition at line 66 of file L1CaloJet.cc.

References E(), and mE.

        {
                mE = E;
        }
void l1slhc::L1CaloJet::setP4 ( const math::PtEtaPhiMLorentzVector p4)

Definition at line 31 of file L1CaloJet.cc.

References mP4, and p4().

Referenced by L1CaloJetProducer::calculateJetPosition().

        {
                mP4 = p4;
        }

Member Data Documentation

Definition at line 48 of file L1CaloJet.h.

Referenced by central(), and setCentral().

Definition at line 50 of file L1CaloJet.h.

Referenced by addConstituent(), getConstituents(), hasConstituent(), and removeConstituent().

int l1slhc::L1CaloJet::mE [private]

Definition at line 47 of file L1CaloJet.h.

Referenced by addConstituent(), E(), removeConstituent(), and setE().

int l1slhc::L1CaloJet::mIeta [private]

Definition at line 45 of file L1CaloJet.h.

Referenced by hasConstituent(), and iEta().

int l1slhc::L1CaloJet::mIphi [private]

Definition at line 46 of file L1CaloJet.h.

Referenced by hasConstituent(), and iPhi().

Definition at line 51 of file L1CaloJet.h.

Referenced by p4(), and setP4().