|
ATLAS Offline Software
|
Go to the documentation of this file.
27 #ifndef XAOD_STANDALONE // For now metadata is Athena-only
37 return StatusCode::FAILURE;
40 if (
m_isPHYSLITE && photonkey.find(
"AnalysisPhotons")==std::string::npos){
41 ATH_MSG_ERROR(
"You are running on PHYSLITE derivation. Please change the Photons container to 'AnalysisPhotons'");
42 return StatusCode::FAILURE;
47 if (containerToBeCopied !=
nullptr) {
48 photons = containerToBeCopied;
54 copy = shallowcopy.first;
55 copyaux = shallowcopy.second;
58 ATH_MSG_WARNING(
"Failed to set original object links on " << photonkey);
61 ATH_MSG_DEBUG(
"Not retrieving photon collecton, using existing one provided by user");
74 return StatusCode::SUCCESS;
82 if ( !
input.caloCluster() ) {
84 return StatusCode::SUCCESS;
98 ATH_MSG_INFO(
"PHOTON deadHVTools: " << pass_deadHVTool );
101 dec_baseline(
input) =
false;
102 dec_selected(
input) = 0;
103 dec_isol(
input) =
false;
106 if (!pass_deadHVTool)
return StatusCode::SUCCESS;
110 return StatusCode::SUCCESS;
113 ATH_MSG_ERROR(
"FillPhoton: EgammaCalibTool applyCorrection failed");
116 ATH_MSG_ERROR(
"FillPhoton: IsolationCorrectionTool applyCorrection failed");
120 if (
input.pt() <
ptcut || std::abs(
input.caloCluster()->etaBE(2)) >= etacut)
return StatusCode::SUCCESS;
123 if ( std::abs(
input.caloCluster()->etaBE(2) ) >1.37 && std::abs(
input.caloCluster()->etaBE(2) ) <1.52) {
124 return StatusCode::SUCCESS;
130 return StatusCode::SUCCESS;
133 bool passPhCleaning =
false;
134 if (acc_passPhCleaning.isAvailable(
input) && acc_passPhCleaningNoTime.isAvailable(
input)) {
141 if (!passPhCleaning)
return StatusCode::SUCCESS;
144 bool passBaseID =
false;
150 if (!passBaseID)
return StatusCode::SUCCESS;
155 dec_baseline(
input) =
true;
156 dec_selected(
input) = 2;
160 return StatusCode::SUCCESS;
166 dec_signal(
input) =
false;
168 if ( !acc_baseline(
input) )
return false;
173 if ( etacut==DUMMYDEF ){
176 else if ( std::abs(
input.caloCluster()->etaBE(2)) > etacut )
return false;
179 if ( std::abs(
input.caloCluster()->etaBE(2) ) >1.37 && std::abs(
input.caloCluster()->etaBE(2) ) <1.52) {
192 ATH_MSG_VERBOSE (
"DFCommonPhotonsIsEMxxx variables are not found. Calculating the ID from Photon ID tool..");
195 if ( !passID )
return false;
197 dec_signal(
input) =
true;
229 double sf_trigger = 1.;
239 dec_effscalefact(ph) =
sf;
250 if (ret != StatusCode::SUCCESS) {
251 ATH_MSG_ERROR(
"Cannot configure AsgPhotonEfficiencyCorrectionTool (reco) for systematic var. " << systConfig.
name() );
255 if (ret != StatusCode::SUCCESS) {
256 ATH_MSG_ERROR(
"Cannot configure AsgPhotonEfficiencyCorrectionTool (iso) for systematic var. " << systConfig.
name() );
260 if (ret != StatusCode::SUCCESS) {
261 ATH_MSG_ERROR(
"Cannot configure AsgPhotonEfficiencyCorrectionTool (trigger) for systematic var. " << systConfig.
name() );
286 double sf_trigger = 1.;
296 if (ret != StatusCode::SUCCESS) {
297 ATH_MSG_ERROR(
"Cannot configure AsgPhotonEfficiencyCorrectionTool back to default.");
301 if (ret != StatusCode::SUCCESS) {
302 ATH_MSG_ERROR(
"Cannot configure AsgPhotonEfficiencyCorrectionTool (iso) for systematic var. " << systConfig.
name() );
306 if (ret != StatusCode::SUCCESS) {
307 ATH_MSG_ERROR(
"Cannot configure AsgPhotonEfficiencyCorrectionTool (trigger) for systematic var. " << systConfig.
name() );
312 dec_effscalefact(ph) =
sf;
def retrieve(aClass, aKey=None)
SG::ConstAccessor< char > m_acc_photonIdBaseline
double m_photonBaselinePt
asg::AnaToolHandle< IAsgDeadHVCellRemovalTool > m_deadHVTool
asg::AnaToolHandle< CP::IEgammaCalibrationAndSmearingTool > m_egammaCalibTool
Combined electron collection.
double GetTotalPhotonSFsys(const xAOD::PhotonContainer &photons, const CP::SystematicSet &systConfig, const bool effSF=true, const bool isoSF=true, const bool triggerSF=false) override final
bool m_photonBaselineCrackVeto
asg::AnaToolHandle< IAsgPhotonEfficiencyCorrectionTool > m_photonTriggerSFTool
asg::AnaToolHandle< CP::IIsolationSelectionTool > m_isoBaselineTool
Class creating a shallow copy of an existing auxiliary container.
Class to wrap a set of SystematicVariations.
std::string m_photonIso_WP
std::string name() const
returns: the systematics joined into a single string.
bool IsSignalPhoton(const xAOD::Photon &input, const float ptcut, const float etacut=DUMMYDEF) const override final
#define ATH_MSG_VERBOSE(x)
double GetSignalPhotonSFsys(const xAOD::Photon &ph, const CP::SystematicSet &systConfig, const bool effSF=true, const bool isoSF=true, const bool triggerSF=false) override final
double m_photonBaselineEta
asg::AnaToolHandle< IAsgPhotonEfficiencyCorrectionTool > m_photonEfficiencySFTool
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
bool passOQquality(const xAOD::Photon &ph)
Helper to ease the implemmantation of the pass Quality requirements.
@ OutOfValidityRange
Input object is out of validity range.
virtual asg::AcceptData accept(const xAOD::IParticle *part) const =0
accept with pointer to IParticle so as to not hide the IAsgSelectionTool one
const uint16_t AuthorAmbiguous
Object Reconstructed by standard cluster-based algorithm.
::StatusCode StatusCode
StatusCode definition for legacy code.
std::pair< std::vector< unsigned int >, bool > res
asg::AnaToolHandle< IAsgPhotonIsEMSelector > m_photonSelIsEM
std::string m_photonBaselineIso_WP
double GetTotalPhotonSF(const xAOD::PhotonContainer &photons, const bool effSF=true, const bool isoSF=true, const bool triggerSF=false) const override final
double GetSignalPhotonSF(const xAOD::Photon &ph, const bool effSF=true, const bool isoSF=true, const bool triggerSF=false) const override final
std::pair< std::unique_ptr< T >, std::unique_ptr< ShallowAuxContainer > > shallowCopyContainer(const T &cont, [[maybe_unused]] const EventContext &ctx)
Function making a shallow copy of a constant container.
StatusCode FillPhoton(xAOD::Photon &input, const float ptcut, const float etacut) override final
const uint32_t BADCLUSPHOTON
@ Ok
The correction was done successfully.
StatusCode GetPhotons(xAOD::PhotonContainer *©, xAOD::ShallowAuxContainer *©aux, const bool recordSG=true, const std::string &photonkey="Photons", const xAOD::PhotonContainer *containerToBeCopied=nullptr) override final
#define ATH_MSG_WARNING(x)
asg::AnaToolHandle< IAsgPhotonIsEMSelector > m_photonSelIsEMBaseline
bool setOriginalObjectLink(const IParticle &original, IParticle ©)
This function should be used by CP tools when they make a deep copy of an object in their correctedCo...
Return value from object correction CP tools.
CP::SystematicSet m_currentSyst
const uint16_t AuthorPhoton
Object Reconstructed by standard cluster-based algorithm.
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
bool passOQqualityDelayed(const xAOD::Photon &ph)
Helpers to ease the implementation of the pass Quality requirements.
setBGCode setTAP setLVL2ErrorBits bool
asg::AnaToolHandle< CP::IIsolationCorrectionTool > m_isoCorrTool
SG::ConstAccessor< char > m_acc_photonId
asg::AnaToolHandle< IAsgPhotonEfficiencyCorrectionTool > m_photonIsolationSFTool
asg::AnaToolHandle< IEGammaAmbiguityTool > m_egammaAmbiguityTool
asg::AnaToolHandle< CP::IIsolationSelectionTool > m_isoTool