43 genMET_(iOther.genMET_),
44 caloMET_(iOther.caloMET_),
45 pfMET_(iOther.pfMET_),
52 uncorInfo_.store(
new std::vector<UncorInfo>{*
tmp},std::memory_order_release);
58 delete uncorInfo_.load(std::memory_order_acquire);
70 delete uncorInfo_.exchange(
new std::vector<UncorInfo>{*
tmp},std::memory_order_acq_rel);
73 delete uncorInfo_.exchange(
nullptr, std::memory_order_acq_rel);
118 const std::vector<CorrMETData>& corrs(
mEtCorr());
119 const auto nCorrectionsTmp = corrs.size();
121 std::unique_ptr<std::vector<UncorInfo>> uncorInfoTmpPtr{
new std::vector<UncorInfo>{
uncorrMAXN} };
122 auto& uncorInfoTmp = *uncorInfoTmpPtr;
130 for (
unsigned int iC=0; iC < nCorrectionsTmp; ++iC){
131 uncorInfoTmp[ix].corEx += corrs[iC].mex;
132 uncorInfoTmp[ix].corEy += corrs[iC].mey;
133 uncorInfoTmp[ix].corSumEt += corrs[iC].sumet;
140 if (nCorrectionsTmp >=1 ){
142 uncorInfoTmp[ix].corEx += corrs[iC].mex;
143 uncorInfoTmp[ix].corEy += corrs[iC].mey;
144 uncorInfoTmp[ix].corSumEt += corrs[iC].sumet;
151 if (nCorrectionsTmp >=2 ){
153 uncorInfoTmp[ix].corEx += corrs[iC].mex;
154 uncorInfoTmp[ix].corEy += corrs[iC].mey;
155 uncorInfoTmp[ix].corSumEt += corrs[iC].sumet;
162 if (nCorrectionsTmp >=3 ){
164 uncorInfoTmp[ix].corEx += corrs[iC].mex;
165 uncorInfoTmp[ix].corEy += corrs[iC].mey;
166 uncorInfoTmp[ix].corSumEt += corrs[iC].sumet;
174 std::vector<UncorInfo>* expected=
nullptr;
175 if(
uncorInfo_.compare_exchange_strong(expected,uncorInfoTmpPtr.get(),std::memory_order_acq_rel)) {
176 uncorInfoTmpPtr.release();
183 uci.
pt =
sqrt(lpx*lpx + lpy*lpy);
184 uci.
phi = atan2(lpy, lpx);
Analysis-level MET class.
float uncorrectedPhi(UncorrectionType ix=uncorrALL) const
SpecificPFMETData getSpecific() const
void checkUncor_() const
check and set transients
float corEx(UncorrectionType ix=uncorrALL) const
virtual double py() const GCC11_FINAL
y coordinate of momentum vector
unsigned int nCorrections_
float corSumEt(UncorrectionType ix=uncorrALL) const
SpecificCaloMETData getSpecific() const
virtual float phi() const GCC11_FINAL
momentum azimuthal angle
std::atomic< std::vector< UncorInfo > * > uncorInfo_
T const * get() const
Returns C++ pointer to the item.
virtual double px() const GCC11_FINAL
x coordinate of momentum vector
std::vector< reco::GenMET > genMET_
float uncorrectedPt(UncorrectionType ix=uncorrALL) const
std::vector< CorrMETData > mEtCorr() const
float corEy(UncorrectionType ix=uncorrALL) const
MET & operator=(MET const &)
const reco::GenMET * genMET() const
return the associated GenMET
void setPtPhi_(UncorInfo &uci) const
std::vector< SpecificCaloMETData > caloMET_
std::vector< std::vector< double > > tmp
Templated PAT object container.
void setGenMET(const reco::GenMET &gm)
set the associated GenMET
std::vector< SpecificPFMETData > pfMET_
virtual float pt() const GCC11_FINAL
transverse momentum
value_type const * get() const
unsigned int nCorrections() const
return uncorrrection related stuff