1 #ifndef DataFormats_L1Trigger_HGCalClusterT_h 2 #define DataFormats_L1Trigger_HGCalClusterT_h 12 #include "Math/Vector3D.h" 14 #include <unordered_map> 91 fraction = fraction_itr->second;
127 switch( id_constituent.second->subdetId() )
130 pt_em += id_constituent.second->pt() *
fraction;
133 pt_had += id_constituent.second->pt() *
fraction;
136 pt_had += id_constituent.second->pt() *
fraction;
142 if(pt_em>0) hOe = pt_had / pt_em ;
183 bool operator<(const HGCalClusterT<C>&
cl)
const {
return mipPt() <
cl.mipPt();}
185 bool operator<=(const HGCalClusterT<C>&
cl)
const {
return !(
cl>*
this); }
230 clusterCentre = clusterCentre*mipPt_ + constituentCentre*cMipt;
231 if( (mipPt_ + cMipt ) > 0 )
233 clusterCentre /= ( mipPt_ + cMipt );
237 if( clusterCentre.
z()!=0 )
239 centreProj_=
GlobalPoint( clusterCentre / clusterCentre.
z() );
void addConstituent(const edm::Ptr< C > &c, bool updateCentre=true, float fraction=1.)
double distance(const l1t::HGCalTriggerCell &tc) const
void sigmaRRTot(float sigmaRRTot)
const_iterator constituents_end() const
void sigmaEtaEtaMax(float sigmaEtaEtaMax)
double eta() const final
momentum pseudorapidity
void showerLength(int showerLength)
void firstLayer(int firstLayer)
float sigmaPhiPhiTot() const
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
HGCalClusterT(const LorentzVector p4, int pt=0, int eta=0, int phi=0)
float sigmaEtaEtaMax() const
Global3DPoint GlobalPoint
constexpr uint32_t rawId() const
get the raw id
uint32_t subdetId() const
double pt() const final
transverse momentum
std::unordered_map< uint32_t, edm::Ptr< C > > constituents_
const GlobalPoint & centreProj() const
const GlobalPoint & position() const
std::unordered_map< uint32_t, edm::Ptr< C > >::const_iterator const_iterator
PtEtaPhiMLorentzVectorD PtEtaPhiMLorentzVector
Lorentz vector with cartesian internal representation.
void sigmaRRMax(float sigmaRRMax)
const_iterator constituents_begin() const
void removeConstituent(const edm::Ptr< C > &c, bool updateCentre=true)
int zside() const
get the z-side of the cell (1/-1)
T z() const
Cartesian z coordinate.
~HGCalClusterT() override
void updateP4AndPosition(const edm::Ptr< C > &c, bool updateCentre=true, float fraction=1.)
bool operator>(const HGCalClusterT< C > &cl) const
void sigmaPhiPhiMax(float sigmaPhiPhiMax)
std::unordered_map< uint32_t, double > constituentsFraction_
const GlobalPoint & centre() const
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
void sigmaZZ(float sigmaZZ)
const LorentzVector & p4() const final
four-momentum Lorentz vector
void sigmaPhiPhiTot(float sigmaPhiPhiTot)
HGCalClusterT(const edm::Ptr< C > &c)
float sigmaEtaEtaTot() const
int coreShowerLength() const
float sigmaRRMean() const
math::XYZTLorentzVector LorentzVector
Lorentz vector.
const GlobalPoint & position() const
void maxLayer(int maxLayer)
bool operator>=(const HGCalClusterT< C > &cl) const
float sigmaPhiPhiMax() const
void sigmaEtaEtaTot(float sigmaEtaEtaTot)
void sigmaRRMean(float sigmaRRMean)
double phi() const final
momentum azimuthal angle
void setValid(bool valid)
void setP4(const LorentzVector &p4) final
set 4-momentum
int layer() const
get the layer #
void coreShowerLength(int coreShowerLength)
const std::unordered_map< uint32_t, edm::Ptr< C > > & constituents() const