|
ATLAS Offline Software
|
#include <ElectronSelector.h>
|
template<class T > |
static CLHEP::Hep3Vector | calculateMomentum (const T *pP) |
|
template<class T > |
static float | EvalInvMass (const T *pxP1, const T *pxP2, float fMass1, float fMass2=invalidAnswer) |
|
template<class T > |
static float | EvalInvMass (const T *pxP1, const T *pxP2, const T *pxp3, const T *pxP4, float fMass1, float fMass2=-999.9, float fMass3=-999.9, float fMass4=invalidAnswer) |
|
template<class T > |
static float | EvalDiMuInvMass (const T *pxP1, const T *pxP2) |
|
template<class T > |
static float | EvalFourMuInvMass (const T *pxP1, const T *pxP2, const T *pxP3, const T *pxP4) |
|
template<class T > |
static float | EvaluateAngle (const T *pxP1, const T *pxP2) |
|
template<class T > |
static float | EvalPtDiff (const T *pxP1, const T *pxP2) |
|
template<class T > |
static float | EvalPhiDiff (const T *pxP1, const T *pxP2) |
|
template<class T > |
static float | EvalEtaDiff (const T *pxP1, const T *pxP2) |
|
template<class T > |
static float | EvalPt (const T *pxP1, const T *pxP2) |
|
template<class T > |
static float | EvalPhi (const T *pxP1, const T *pxP2) |
|
template<class T > |
static float | EvalEta (const T *pxP1, const T *pxP2) |
|
template<class T > |
static float | EvalCharge (const T *pxP1, const T *pxP2) |
|
template<class T > |
static float | EvalTransverseMass (const T *pxP1, float fMETx, float fMETy, float fMass1, float fMass2=invalidAnswer) |
|
template<class T > |
static float | EvalTransverseMass (const T *pxP1, float fMETx, float fMETy) |
|
template<class T > |
static float | EvalTransverseMass (const T *pxP1, const T *pxP2, float fMETx, float fMETy, float fMass1, float fMass2=invalidAnswer) |
|
template<class T > |
static float | EvalTransverseMass (const T *pxP1, const T *pxP2, float fMETx, float fMETy) |
|
Definition at line 30 of file ElectronSelector.h.
◆ PARENT
◆ ElectronSelector() [1/2]
ElectronSelector::ElectronSelector |
( |
| ) |
|
◆ ~ElectronSelector()
ElectronSelector::~ElectronSelector |
( |
| ) |
|
◆ ElectronSelector() [2/2]
◆ BookHistograms()
void EventAnalysis::BookHistograms |
( |
| ) |
|
|
protectedvirtualinherited |
◆ calculateMomentum()
template<class T >
CLHEP::Hep3Vector EventAnalysis::calculateMomentum |
( |
const T * |
pP | ) |
|
|
staticinherited |
◆ Clear()
void ElectronSelector::Clear |
( |
| ) |
|
|
private |
◆ EvalCharge()
template<class T >
float EventAnalysis::EvalCharge |
( |
const T * |
pxP1, |
|
|
const T * |
pxP2 |
|
) |
| |
|
staticinherited |
Definition at line 238 of file EventAnalysis.h.
242 return static_cast<float>( pxP1->charge() + pxP2->charge() );
◆ EvalDiMuInvMass()
template<class T >
float EventAnalysis::EvalDiMuInvMass |
( |
const T * |
pxP1, |
|
|
const T * |
pxP2 |
|
) |
| |
|
staticinherited |
◆ EvalEta()
template<class T >
float EventAnalysis::EvalEta |
( |
const T * |
pxP1, |
|
|
const T * |
pxP2 |
|
) |
| |
|
staticinherited |
Definition at line 229 of file EventAnalysis.h.
235 return static_cast<float>( (xTmp1 + xTmp2).pseudoRapidity() );
◆ EvalEtaDiff()
template<class T >
float EventAnalysis::EvalEtaDiff |
( |
const T * |
pxP1, |
|
|
const T * |
pxP2 |
|
) |
| |
|
staticinherited |
Definition at line 201 of file EventAnalysis.h.
208 return static_cast<float>( xTmp1.polarAngle(xTmp2) );
◆ EvalFourMuInvMass()
template<class T >
float EventAnalysis::EvalFourMuInvMass |
( |
const T * |
pxP1, |
|
|
const T * |
pxP2, |
|
|
const T * |
pxP3, |
|
|
const T * |
pxP4 |
|
) |
| |
|
staticinherited |
◆ EvalInvMass() [1/2]
template<class T >
float EventAnalysis::EvalInvMass |
( |
const T * |
pxP1, |
|
|
const T * |
pxP2, |
|
|
const T * |
pxp3, |
|
|
const T * |
pxP4, |
|
|
float |
fMass1, |
|
|
float |
fMass2 = -999.9 , |
|
|
float |
fMass3 = -999.9 , |
|
|
float |
fMass4 = invalidAnswer |
|
) |
| |
|
staticinherited |
Definition at line 132 of file EventAnalysis.h.
140 fMass2 = ( fMass2 < 0.0f ) ? fMass1 : fMass2;
141 fMass3 = ( fMass3 < 0.0f ) ? fMass1 : fMass3;
142 fMass4 = ( fMass4 < 0.0f ) ? fMass1 : fMass4;
150 CLHEP::HepLorentzVector xLVec; xLVec.setVectM ( xTmp1, fMass1 );
151 CLHEP::HepLorentzVector xLVec2; xLVec2.setVectM( xTmp2, fMass2 );
152 CLHEP::HepLorentzVector xLVec3; xLVec3.setVectM( xTmp3, fMass3 );
153 CLHEP::HepLorentzVector xLVec4; xLVec4.setVectM( xTmp4, fMass4 );
159 return static_cast<float>( xLVec.m() );
◆ EvalInvMass() [2/2]
Definition at line 106 of file EventAnalysis.h.
113 fMass2 = ( fMass2 < 0.0f ) ? fMass1 : fMass2;
117 CLHEP::HepLorentzVector xLVec1; xLVec1.setVectM( xTmp1, fMass1 );
118 CLHEP::HepLorentzVector xLVec2; xLVec2.setVectM( xTmp2, fMass2 );
119 return static_cast<float>( xLVec1.invariantMass( xLVec2 ) );
◆ EvalPhi()
template<class T >
float EventAnalysis::EvalPhi |
( |
const T * |
pxP1, |
|
|
const T * |
pxP2 |
|
) |
| |
|
staticinherited |
◆ EvalPhiDiff()
template<class T >
float EventAnalysis::EvalPhiDiff |
( |
const T * |
pxP1, |
|
|
const T * |
pxP2 |
|
) |
| |
|
staticinherited |
Definition at line 190 of file EventAnalysis.h.
197 return static_cast<float>( xTmp1.deltaPhi(xTmp2) );
◆ EvalPt()
template<class T >
float EventAnalysis::EvalPt |
( |
const T * |
pxP1, |
|
|
const T * |
pxP2 |
|
) |
| |
|
staticinherited |
◆ EvalPtDiff()
template<class T >
float EventAnalysis::EvalPtDiff |
( |
const T * |
pxP1, |
|
|
const T * |
pxP2 |
|
) |
| |
|
staticinherited |
◆ EvalTransverseMass() [1/4]
template<class T >
float EventAnalysis::EvalTransverseMass |
( |
const T * |
pxP1, |
|
|
const T * |
pxP2, |
|
|
float |
fMETx, |
|
|
float |
fMETy |
|
) |
| |
|
staticinherited |
◆ EvalTransverseMass() [2/4]
template<class T >
float EventAnalysis::EvalTransverseMass |
( |
const T * |
pxP1, |
|
|
const T * |
pxP2, |
|
|
float |
fMETx, |
|
|
float |
fMETy, |
|
|
float |
fMass1, |
|
|
float |
fMass2 = invalidAnswer |
|
) |
| |
|
staticinherited |
Definition at line 279 of file EventAnalysis.h.
286 fMass2 = ( fMass2 < 0.0f ) ? fMass1 : fMass2;
288 CLHEP::Hep3Vector xTmp1 = CLHEP::Hep3Vector( pxP1->p4().Px() *
EAna::CGeV, pxP1->p4().Py() *
EAna::CGeV, 0.0f );
289 CLHEP::Hep3Vector xTmp2 = CLHEP::Hep3Vector( pxP2->p4().Px() *
EAna::CGeV, pxP2->p4().Py() *
EAna::CGeV, 0.0f );
290 CLHEP::Hep3Vector xTmp12 = xTmp1 + xTmp2;
291 CLHEP::Hep3Vector xTmp3 = CLHEP::Hep3Vector( fMETx, fMETy, 0.0
f );
292 CLHEP::HepLorentzVector xLVec1; xLVec1.setVectM( xTmp12, fMass1 );
293 CLHEP::HepLorentzVector xLVec2; xLVec2.setVectM( xTmp3, 0.0
f );
294 return static_cast<float>( xLVec1.invariantMass( xLVec2 ) );
◆ EvalTransverseMass() [3/4]
template<class T >
float EventAnalysis::EvalTransverseMass |
( |
const T * |
pxP1, |
|
|
float |
fMETx, |
|
|
float |
fMETy |
|
) |
| |
|
staticinherited |
◆ EvalTransverseMass() [4/4]
template<class T >
float EventAnalysis::EvalTransverseMass |
( |
const T * |
pxP1, |
|
|
float |
fMETx, |
|
|
float |
fMETy, |
|
|
float |
fMass1, |
|
|
float |
fMass2 = invalidAnswer |
|
) |
| |
|
staticinherited |
Definition at line 254 of file EventAnalysis.h.
261 fMass2 = ( fMass2 < 0.0f ) ? fMass1 : fMass2;
263 CLHEP::Hep3Vector xTmp1 = CLHEP::Hep3Vector( pxP1->p4().Px() *
EAna::CGeV, pxP1->p4().Py() *
EAna::CGeV, 0.0f );
264 CLHEP::Hep3Vector xTmp2 = CLHEP::Hep3Vector( fMETx, fMETy, 0.0
f );
265 CLHEP::HepLorentzVector xLVec1; xLVec1.setVectM( xTmp1, fMass1 );
266 CLHEP::HepLorentzVector xLVec2; xLVec2.setVectM( xTmp2, 0.0
f );
267 return static_cast<float>( xLVec1.invariantMass( xLVec2 ) );
◆ EvaluateAngle()
template<class T >
float EventAnalysis::EvaluateAngle |
( |
const T * |
pxP1, |
|
|
const T * |
pxP2 |
|
) |
| |
|
staticinherited |
Definition at line 163 of file EventAnalysis.h.
170 return static_cast<float>( xTmp1.angle(xTmp2) );
◆ GetElecNegTrackParticle()
◆ GetElecPosTrackParticle()
◆ GetElectronCollectionSize()
unsigned int ElectronSelector::GetElectronCollectionSize |
( |
| ) |
|
|
inline |
◆ Init()
void ElectronSelector::Init |
( |
| ) |
|
|
virtual |
Reimplemented from EventAnalysis.
Definition at line 53 of file ElectronSelector.cxx.
55 (*m_msgStream) <<
MSG::DEBUG <<
" -- ElectronSelector::Init -- START -- " <<
endmsg;
61 (*m_msgStream) << MSG::INFO <<
"ElectronSelector::Init -- Setting up electron LH tool." <<
endmsg;
64 const std::string elecWorkingPoint =
"LooseLHElectron";
66 if((
m_LHTool2015->setProperty(
"WorkingPoint",elecWorkingPoint.c_str())).isFailure()) {
67 (*m_msgStream) << MSG::WARNING <<
"Failure loading ConfigFile for electron likelihood tool with working point: " << elecWorkingPoint.c_str() <<
endmsg;
70 (*m_msgStream) << MSG::INFO <<
"Loading ConfigFile for electron likelihood tool with working point: " << elecWorkingPoint <<
". SUCCESS " <<
endmsg;
74 std::string confDir =
"ElectronPhotonSelectorTools/offline/mc20_20210514/ElectronLikelihoodVeryLooseOfflineConfig2017_Smooth.conf";
75 if ( (
m_LHTool2015->setProperty(
"ConfigFile", confDir)).isSuccess()) {
76 (*m_msgStream) << MSG::INFO <<
"Electron likelihood config ("<< confDir.c_str() <<
") setting SUCCESS!" <<
endmsg;
79 (*m_msgStream) << MSG::WARNING <<
"Electron likelihood config ("<< confDir.c_str() <<
") setting FAILURE" <<
endmsg;
83 (*m_msgStream) << MSG::INFO <<
"Electron likelihood tool initialize() SUCCESS!" <<
endmsg;
86 (*m_msgStream) << MSG::WARNING <<
"Electron likelihood tool initialize() FAILURE!" <<
endmsg;
89 (*m_msgStream) <<
MSG::DEBUG <<
" --ElectronSelector::Init -- COMPLETED -- " <<
endmsg;
◆ operator=()
◆ OrderElectronList()
bool ElectronSelector::OrderElectronList |
( |
| ) |
|
|
private |
Definition at line 216 of file ElectronSelector.cxx.
220 bool goodlist =
true;
223 double ptMinus1 = 0.;
224 double ptMinus2 = 0.;
228 int elecnegcount = 0;
229 int elecposcount = 0;
268 if (elecposcount == 0 || elecnegcount == 0) {
270 if (
m_doDebug) std::cout <<
" -- ElectronSelector::OrderElectronList -- No opposite charge electrons --> DISCARD ALL ELECTRONS -- " << std::endl;
277 if (
m_doDebug && elecposcount + elecnegcount >= 2 ){
278 std::cout <<
" -- ElectronSelector::OrderElectronList -- electron summary list taking " << elecposcount + elecnegcount
279 <<
" electrons from the input list of " <<
m_pxElTrackList.size() <<
" electrons: " << std::endl;
280 if (
m_elecneg1 >= 0) std::cout <<
" leading e-: " <<
m_elecneg1 <<
" Pt = " << ptMinus1 << std::endl;
281 if (
m_elecneg2 >= 0) std::cout <<
" second e-: " <<
m_elecneg2 <<
" Pt = " << ptMinus2 << std::endl;
282 if (
m_elecpos1 >= 0) std::cout <<
" leading e+: " <<
m_elecpos1 <<
" Pt = " << ptPlus1 << std::endl;
283 if (
m_elecpos2 >= 0) std::cout <<
" second e+: " <<
m_elecpos2 <<
" Pt = " << ptPlus2 << std::endl;
286 if (elecposcount + elecnegcount >= 2){
294 (*m_msgStream) <<
MSG::DEBUG <<
" -- ElectronSelector::OrderElectronList -- COMPLETED -- status: "<< goodlist << std::endl;
◆ PrepareElectronList()
Definition at line 94 of file ElectronSelector.cxx.
96 (*m_msgStream) <<
MSG::DEBUG <<
" --ElectronSelector::PrepareElectronList -- START -- " <<
endmsg;
100 electron_iterator iter = pxElecContainer->
begin();
101 electron_iterator iterEnd = pxElecContainer->
end();
104 int electroncount = 0;
105 for(; iter != iterEnd ; ++iter) {
107 (*m_msgStream) <<
MSG::DEBUG <<
" -- ElectronSelector::PrepareElectronList -- candiate electron " << electroncount
112 (*m_msgStream) <<
MSG::DEBUG <<
" -- ElectronSelector::PrepareElectronList -- candiate electron " << electroncount
117 bool progressingwell =
true;
119 (*m_msgStream) <<
MSG::DEBUG <<
" -- ElectronSelector::PrepareElectronList -- finished recording electrons. "
121 <<
" out of tested electron candidates:" << electroncount <<
endmsg;
126 if (!progressingwell) {
127 (*m_msgStream) <<
MSG::DEBUG <<
" -- ElectronSelector::PrepareElectronList -- FAILED -- this event has not even a good e+e- pair " <<
endmsg;
131 (*m_msgStream) <<
MSG::DEBUG <<
" -- ElectronSelector::PrepareElectronList -- COMPLETED -- electroncount -- m_pxElTrackList.size() / all = "
◆ RecordElectron()
Definition at line 138 of file ElectronSelector.cxx.
141 bool electronisgood =
true;
145 electronisgood =
false;
146 (*m_msgStream) <<
MSG::DEBUG <<
" -- electron fails workingpoint selection -- " <<
endmsg;
152 if (!theTrackParticle) {
153 electronisgood =
false;
154 (*m_msgStream) <<
MSG::DEBUG <<
" -- electron fails trackparticle -- " <<
endmsg;
158 electronisgood =
false;
163 electronisgood =
false;
164 (*m_msgStream) <<
MSG::DEBUG <<
" -- electron fails pt cut -- pt= " << theTrackParticle->
pt()
165 <<
" < " <<
m_ptCut <<
" (cut value) "
171 electronisgood =
false;
172 (*m_msgStream) <<
MSG::DEBUG <<
" -- electron candidate has no CaloCluster " <<
endmsg;
176 electronisgood =
false;
177 (*m_msgStream) <<
MSG::DEBUG <<
" -- electron fails cluster Et cut -- Et= " << (cluster->
e() *
cos(theTrackParticle->
theta()))*
m_CGeV
178 <<
" < " <<
m_ptCut <<
" (cut value) "
182 if (electronisgood && (std::abs(cluster->
eta())>
m_etaCut || std::abs(theTrackParticle->
eta())>
m_etaCut) ) {
183 electronisgood =
false;
184 (*m_msgStream) <<
MSG::DEBUG <<
" -- electron fails eta cut -- cluster_eta= " << cluster->
eta() <<
endmsg;
187 if (electronisgood) {
191 (*m_msgStream) <<
MSG::DEBUG <<
" * RecordElectron * good electron found -> store this electron with pt " << theTrackParticle->
pt()
196 return electronisgood;
◆ Register()
void EventAnalysis::Register |
( |
| ) |
|
|
privateinherited |
◆ RetrieveVertices()
bool ElectronSelector::RetrieveVertices |
( |
| ) |
|
|
private |
Definition at line 299 of file ElectronSelector.cxx.
301 if (
m_doDebug) std::cout <<
" -- ElectronSelector::RetrieveVertices -- START -- list size: "
304 bool goodvertices =
false;
305 int nverticesfound = 1;
342 if (nverticesfound >= 1) goodvertices =
true;
344 if (
m_doDebug) std::cout <<
" -- ElectronSelector::RetrieveVertices -- COMPLETED -- status: " << goodvertices << std::endl;
◆ setDebug()
void ElectronSelector::setDebug |
( |
bool |
debug | ) |
|
|
inline |
◆ SetPtCut()
void ElectronSelector::SetPtCut |
( |
float |
newpt | ) |
|
|
inline |
◆ invalidAnswer
constexpr float EventAnalysis::invalidAnswer {-999.9f} |
|
staticconstexprinherited |
◆ m_CGeV
const float ElectronSelector::m_CGeV = 1.0e-3 |
|
private |
◆ m_doDebug
bool ElectronSelector::m_doDebug |
|
private |
◆ m_elecneg1
int ElectronSelector::m_elecneg1 = 0 |
|
private |
◆ m_elecneg2
int ElectronSelector::m_elecneg2 = 0 |
|
private |
◆ m_elecpos1
int ElectronSelector::m_elecpos1 = 0 |
|
private |
◆ m_elecpos2
int ElectronSelector::m_elecpos2 = 0 |
|
private |
◆ m_etaCut
float ElectronSelector::m_etaCut |
|
private |
◆ m_goodElecNegTrackParticleList
◆ m_goodElecPosTrackParticleList
◆ m_LHTool2015
◆ m_msgStream
MsgStream* ElectronSelector::m_msgStream |
|
private |
◆ m_ptCut
float ElectronSelector::m_ptCut |
|
private |
◆ m_pxElectron
◆ m_pxElTrackList
◆ m_uPassedEvents
unsigned int EventAnalysis::m_uPassedEvents |
|
protectedinherited |
◆ m_x1DHistograms
std::map<unsigned int, TH1F*> EventAnalysis::m_x1DHistograms |
|
protectedinherited |
◆ m_x1DProfHistograms
std::map<unsigned int, TProfile*> EventAnalysis::m_x1DProfHistograms |
|
protectedinherited |
◆ m_x2DHistograms
std::map<unsigned int, TH2F*> EventAnalysis::m_x2DHistograms |
|
protectedinherited |
◆ m_x2DProfHistograms
std::map<unsigned int, TProfile2D*> EventAnalysis::m_x2DProfHistograms |
|
protectedinherited |
◆ m_xSampleName
std::string EventAnalysis::m_xSampleName |
|
protectedinherited |
◆ s_uNumInstances
std::atomic< unsigned int > ElectronSelector::s_uNumInstances |
|
staticprivate |
The documentation for this class was generated from the following files:
static float EvalInvMass(const T *pxP1, const T *pxP2, float fMass1, float fMass2=invalidAnswer)
std::vector< const xAOD::TrackParticle * > m_pxElTrackList
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Scalar phi() const
phi method
std::vector< const xAOD::TrackParticle * > m_goodElecPosTrackParticleList
DataModel_detail::const_iterator< DataVector > const_iterator
Standard const_iterator.
Scalar perp() const
perp method - perpenticular length
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
static std::atomic< unsigned int > s_uNumInstances
uint16_t author(uint16_t bitmask=EgammaParameters::AuthorALL) const
Get author.
const xAOD::TrackParticle * trackParticle(size_t index=0) const
Pointer to the xAOD::TrackParticle/s that match the electron candidate.
std::map< unsigned int, TH1F * > m_x1DHistograms
IMessageSvc * getMessageSvc(bool quiet=false)
std::vector< const xAOD::TrackParticle * > m_goodElecNegTrackParticleList
Description of a calorimeter cluster.
std::map< unsigned int, TH2F * > m_x2DHistograms
static float EvalTransverseMass(const T *pxP1, float fMETx, float fMETy, float fMass1, float fMass2=invalidAnswer)
static CLHEP::Hep3Vector calculateMomentum(const T *pP)
virtual double eta() const
The pseudorapidity ( ) of the particle.
bool RecordElectron(const xAOD::Electron *)
const xAOD::Muon * m_pxElectron
const xAOD::CaloCluster * caloCluster(size_t index=0) const
Pointer to the xAOD::CaloCluster/s that define the electron candidate.
std::map< unsigned int, TProfile * > m_x1DProfHistograms
AsgElectronLikelihoodTool * m_LHTool2015
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
std::map< unsigned int, TProfile2D * > m_x2DProfHistograms
Class describing a TrackParticle.
std::string m_xSampleName
float theta() const
Returns the parameter, which has range 0 to .
virtual double e() const
The total energy of the particle.
static constexpr float invalidAnswer
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
const uint16_t AuthorElectron
Object Reconstructed by standard cluster-based algorithm.