10 : qx3_(0), pt_(0), eta_(0), phi_(0), mass_(0),
11 vertex_(0, 0, 0),
pdgId_(0), status_(0),
18 : qx3_( q ), pt_( p4.
pt() ), eta_( p4.
eta() ), phi_( p4.
phi() ), mass_( p4.mass() ),
19 vertex_( vertex ),
pdgId_( pdgId ), status_( status ),
22 if ( integerCharge )
qx3_ *= 3;
27 : qx3_( q ), pt_( p4.
pt() ), eta_( p4.
eta() ), phi_( p4.
phi() ), mass_( p4.mass() ),
28 vertex_( vertex ),
pdgId_( pdgId ), status_( status ),
31 if ( integerCharge )
qx3_ *= 3;
35 : qx3_(src.qx3_), pt_(src.pt_), eta_(src.eta_), phi_(src.phi_), mass_(src.mass_),
36 vertex_(src.vertex_),
pdgId_(src.
pdgId_), status_(src.status_),
59 std::memory_order_acq_rel);
62 std::memory_order_acq_rel);
93 return (*
p4Polar_.load(std::memory_order_acquire));
98 return (*
p4Cartesian_.load(std::memory_order_acquire)).Vect();
104 return (*
p4Cartesian_.load(std::memory_order_acquire)).BoostToCM();
114 return (*
p4Cartesian_.load(std::memory_order_acquire)).E();
119 return (*
p4Polar_.load(std::memory_order_acquire)).Et();
132 return (*
p4Polar_.load(std::memory_order_acquire)).Mt();
137 return (*
p4Polar_.load(std::memory_order_acquire)).Mt2();
142 return (*
p4Cartesian_.load(std::memory_order_acquire)).Px();
147 return (*
p4Cartesian_.load(std::memory_order_acquire)).Py();
152 return (*
p4Cartesian_.load(std::memory_order_acquire)).Pz();
165 return (*
p4Cartesian_.load(std::memory_order_acquire)).Theta();
174 return (*
p4Polar_.load(std::memory_order_acquire)).Rapidity();
188 *
p4Polar_.load(std::memory_order_acquire) =
p4;
189 auto const* p4Polar =
p4Polar_.load(std::memory_order_acquire);
191 eta_ = p4Polar->eta();
192 phi_ = p4Polar->phi();
193 mass_ = p4Polar->mass();
199 *
p4Polar_.load(std::memory_order_acquire) =
p4;
200 auto const* p4Polar =
p4Polar_.load(std::memory_order_acquire);
202 eta_ = p4Polar->eta();
203 phi_ = p4Polar->phi();
204 mass_ = p4Polar->mass();
205 delete p4Cartesian_.exchange(
nullptr, std::memory_order_acq_rel);
215 (*
p4Cartesian_.load(std::memory_order_acquire)).SetPz(pz);
219 auto const* p4Polar =
p4Polar_.load(std::memory_order_acquire);
221 eta_ = p4Polar->eta();
222 phi_ = p4Polar->phi();
223 mass_ = p4Polar->mass();
272 if(!
p4Polar_.load(std::memory_order_acquire)) {
275 if(
p4Polar_.compare_exchange_strong(expect, ptr.get(), std::memory_order_acq_rel)) {
286 if(
p4Cartesian_.compare_exchange_strong(expected, ptr.get(), std::memory_order_acq_rel) ) {
293 delete p4Polar_.exchange(
nullptr, std::memory_order_acq_rel);
294 delete p4Cartesian_.exchange(
nullptr, std::memory_order_acq_rel);
double px() const
x coordinate of momentum vector
void setLongLived()
set long lived flag
double y() const
repidity
double energy() const
energy
Particle()
default constructor
void setP4(const LorentzVector &p4)
set 4-momentum
void clearCache() const
clear internal cache
int pdgId_
PDG identifier.
void setCharge(Charge q)
set electric charge
int status() const
status word
void setVertex(const Point &vertex)
set vertex
Charge qx3_
electric charge
Point vertex_
vertex position
const LorentzVector & p4() const
four-momentum Lorentz vector
std::atomic< LorentzVector * > p4Cartesian_
internal cache for p4
int Charge
electric charge type
double eta() const
momentum pseudorapidity
virtual ~Particle()
destructor
void cacheCartesian() const
set internal cache
double phi() const
momentum azimuthal angle
double theta() const
momentum polar angle
void cachePolar() const
set internal cache
void setMass(double m)
set particle mass
void swap(Particle &other)
double vy() const
y coordinate of vertex position
float pt_
four-momentum Lorentz vector
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
pdgId_(cfg.getParameter< std::vector< int > >("matchPDGId"))
Vector momentum() const
spatial momentum vector
math::XYZPoint Point
point in the space
std::atomic< PolarLorentzVector * > p4Polar_
internal cache for p4
double vx() const
x coordinate of vertex position
const Point & vertex() const
vertex position
double massSqr() const
mass squared
double mtSqr() const
transverse mass squared
double pt() const
transverse momentum
double et() const
transverse energy
void setThreeCharge(Charge qx3)
set electric charge
Particle & operator=(const Particle &rhs)
double p() const
magnitude of momentum vector
double pz() const
z coordinate of momentum vector
bool longLived() const
is long lived?
void setPz(double pz)
set Pz
double vz() const
z coordinate of vertex position
double mt() const
transverse mass
int pdgId() const
PDG identifier.
static const unsigned int longLivedTag
long lived flag
math::XYZVector Vector
point in the space
const PolarLorentzVector & polarP4() const
four-momentum Lorentz vector
int threeCharge() const
electric charge
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
double py() const
y coordinate of momentum vector
void setStatus(int status)
set status word
int charge() const
electric charge
math::XYZTLorentzVector LorentzVector
Lorentz vector.
double rapidity() const
repidity