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;
125 switch( constituent->subdetId() )
128 pt_em += constituent->pt();
131 pt_had += constituent->pt();
134 pt_had += constituent->pt();
140 if(pt_em>0) hOe = pt_had / pt_em ;
181 bool operator<(const HGCalClusterT<C>&
cl)
const {
return mipPt() <
cl.mipPt();}
183 bool operator<=(const HGCalClusterT<C>&
cl)
const {
return !(
cl>*
this); }
228 clusterCentre = clusterCentre*mipPt_ + constituentCentre*cMipt;
229 if( (mipPt_ + cMipt ) > 0 )
231 clusterCentre /= ( mipPt_ + cMipt );
235 if( clusterCentre.
z()!=0 )
237 centreProj_=
GlobalPoint( clusterCentre / clusterCentre.
z() );
void addConstituent(const edm::Ptr< C > &c, bool updateCentre=true, float fraction=1.)
virtual double pt() const final
transverse momentum
double distance(const l1t::HGCalTriggerCell &tc) const
void sigmaRRTot(float sigmaRRTot)
const_iterator constituents_end() const
void sigmaEtaEtaMax(float sigmaEtaEtaMax)
void showerLength(int showerLength)
void firstLayer(int firstLayer)
float sigmaPhiPhiTot() const
virtual double eta() const final
momentum pseudorapidity
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
uint32_t subdetId() const
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
uint32_t rawId() const
get the raw id
virtual double phi() const final
momentum azimuthal angle
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
void sigmaZZ(float sigmaZZ)
void sigmaPhiPhiTot(float sigmaPhiPhiTot)
HGCalClusterT(const edm::Ptr< C > &c)
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
float sigmaEtaEtaTot() const
int coreShowerLength() const
float sigmaRRMean() const
virtual void setP4(const LorentzVector &p4) final
set 4-momentum
math::XYZTLorentzVector LorentzVector
Lorentz vector.
const GlobalPoint & position() const
void maxLayer(int maxLayer)
bool operator>=(const HGCalClusterT< C > &cl) const
virtual const LorentzVector & p4() const final
four-momentum Lorentz vector
float sigmaPhiPhiMax() const
void sigmaEtaEtaTot(float sigmaEtaEtaTot)
void sigmaRRMean(float sigmaRRMean)
void setValid(bool valid)
int layer() const
get the layer #
void coreShowerLength(int coreShowerLength)
const std::unordered_map< uint32_t, edm::Ptr< C > > & constituents() const