ATLAS Offline Software
Loading...
Searching...
No Matches
FEElectronHelper.cxx
Go to the documentation of this file.
2
3static constexpr float GeV = 1000.f;
4
6
7 bool FEElectronHelper::checkElectronLinks(const std::vector < ElementLink< xAOD::ElectronContainer > >& FE_ElectronLinks, const std::string& qualityString) const{
8
9 for (const ElementLink<xAOD::ElectronContainer>& ElectronLink: FE_ElectronLinks){
10 if (!ElectronLink.isValid()){
11 ATH_MSG_WARNING("JetPFlowSelectionAlg encountered an invalid electron element link. Skipping. ");
12 continue;
13 }
14
15 const xAOD::Electron* electron = *ElectronLink;
16 bool passElectronID = false;
17 bool gotID = electron->passSelection(passElectronID, qualityString);
18 if (!gotID) {
19 ATH_MSG_WARNING("Could not get Electron ID");
20 continue;
21 }
22
23 if( electron->pt() > 10*GeV && passElectronID){
24 return true;
25 }
26 }
27 return false;
28 }
#define ATH_MSG_WARNING(x)
ElementLink< xAOD::ElectronContainer > ElectronLink
bool checkElectronLinks(const std::vector< ElementLink< xAOD::ElectronContainer > > &FE_ElectronLinks, const std::string &qualityString) const
AsgMessaging(const std::string &name)
Constructor with a name.
Electron_v1 Electron
Definition of the current "egamma version".