00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 #ifndef __Atlfast_cluster__
00037 #define __Atlfast_cluster__
00038
00039 #include <iostream>
00040
00041
00042 #include "CLHEP/Vector/LorentzVector.h"
00043 #include "AtlfastCode/IKinematic.h"
00044
00045
00046 #include "AtlfastCode/AssociationManager.h"
00047
00048
00049 #include "GaudiKernel/ContainedObject.h"
00050 #include "GaudiKernel/ObjectVector.h"
00051 #include "GaudiKernel/SmartRefVector.h"
00052
00053
00054
00055 static const CLID CLID_ATLFAST_CLUSTER=2302 ;
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065 namespace Atlfast {
00073 class Cluster :
00074 public IKinematic,
00075 public ContainedObject,
00076 public AssociationManager
00077 {
00078
00079 private:
00080
00081
00082 HepLorentzVector m_momentum ;
00083
00085
00086
00087
00088
00089
00090 public:
00091
00092
00093
00094
00100 template <class CellIterator>
00101 Cluster( const HepLorentzVector& vec,
00102 CellIterator first,
00103 CellIterator last ) :
00104 IKinematic(),
00105 ContainedObject(),
00106 AssociationManager(),
00107 m_momentum(vec)
00108 {
00109
00110
00111 for ( CellIterator i=first; i != last; ++i )
00112 {
00113 this->associate(*i);
00114 }
00115 }
00116
00118 Cluster( const Cluster& src ) :
00119 IKinematic(),
00120 ContainedObject(),
00121 AssociationManager( src ),
00122 m_momentum(src.m_momentum)
00123 {}
00124
00125
00127 Cluster() :
00128 IKinematic(),
00129 ContainedObject(),
00130 AssociationManager(),
00131 m_momentum(HepLorentzVector(0.0,0.0,0.0,0.0))
00132 {}
00133
00134 virtual ~Cluster() {}
00135
00136
00137
00138
00139
00141 virtual HepLorentzVector momentum() const {return m_momentum; }
00143 virtual double eta() const { return m_momentum.pseudoRapidity() ;}
00145 virtual double phi() const { return m_momentum.phi() ; }
00147 virtual double pT() const { return m_momentum.perp() ;}
00148
00150 virtual double eT() const {
00151 return m_momentum.e()*m_momentum.perp()/m_momentum.rho() ;}
00153 virtual double mT() const { return m_momentum.mt(); }
00154
00155
00156
00157
00158 static const CLID& classID() { return CLID_ATLFAST_CLUSTER; }
00159 virtual const CLID& clID() const { return CLID_ATLFAST_CLUSTER; }
00160
00164 virtual StreamBuffer& serialize(StreamBuffer& s);
00168 virtual StreamBuffer& serialize(StreamBuffer& s) const;
00169
00170 };
00171
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181
00182
00183 typedef ObjectVector<Cluster> t_clusterCollection ;
00184
00185
00186 }
00187
00188
00189 #endif
00190
00191
00192
00193
00194
00195
00196
00197
00198
00199
00200
00201