#ifndef INC_CHARGEDPARTICLECHUNK #define INC_CHARGEDPARTICLECHUNK /////////////////////////////////////////////////////////////////////////////// // File: ChargedParticleChunk.hpp // // Purpose: Chunk containing ChargedParticles // // Created: 23-JAN-1999 Serban Protopopescu // Modify: 1-SEP-1999 moved to chpart_evt, namespace vertex and use // LinkIndex (SP) /////////////////////////////////////////////////////////////////////////////// // Dependencies (#includes) #include "chpart_evt/ChargedParticle.hpp" #include "kinem/D0PhysObjChunk.hpp" #ifndef __CINT__ #include "chpart_evt/ChargedParticleChunk_ref.hpp" #include "chpart_evt/ChargedParticle_ref.hpp" #endif // needed by d0om to handle setup of templated chunk #ifdef __CINT__ #pragma linkage kinem::D0PhysObjChunk; #endif /////////////////////////////////////////////////////////////////////////////// namespace vertex{ class ChargedParticleChunk : public kinem::D0PhysObjChunk { CHUNK_SETUP(ChargedParticleChunk); public: // Constructors ChargedParticleChunk(); // Default ChargedParticleChunk(const edm::RCPID& rcpID, const std::list & parentIDs); ChargedParticleChunk(const edm::RCPID& rcpID ); // full reconstructor. Chunk made with existing ChargedParticle vector. ChargedParticleChunk(const edm::RCPID& rcpID, const std::list & parentIDs, std::vector &pvector); // needed for ThumbNail ChargedParticleChunk(const std::list& rcpIDs, const std::list & parentIDs); ~ChargedParticleChunk(){;} // restore non-persistent attributes void activate(); void sort_particles(); // calculate ChargeParticle Isolation // R and chi2 are cone parameters, ncones is the number of cones // pt_cut is the minimum particle pt to be attempt isolatioon calculation // et_cut is the maximum energy in the cone to count particle as isolated and // fill corresponding vectors in ChargedParticle. void calc_isolation( int ncones, std::vector R, std::vector chi2, float pt_cut, std::vector et_cut, std::vector dz_cut); int version()const; private: int _version; }; class CHcomparePT{ // // class needed for sorting vector container of MCparticle objects // STL idiosyncracies require it friend class ChargedParticle; public: bool operator()(const ChargedParticle& x, const ChargedParticle& y)const{ return x.pT() > y.pT(); } }; inline int ChargedParticleChunk::version()const{ return _version; } } // namespace kinem #endif // INC_CHARGEDPARTICLECHUNK