|
ATLAS Offline Software
|
This tool can be used to identify the overlap of a V+jets and V+gamma sample or in fact between most V^n+gamma^m and V^n+gamma^(m-1) samples (e.g.
More...
#include <VGammaORTool.h>
|
| VGammaORTool (const std::string &name) |
|
virtual | ~VGammaORTool () override |
|
virtual StatusCode | inOverlap (bool &result, const std::vector< TLorentzVector > *leptons=0, const std::vector< TLorentzVector > *photons=0, const std::vector< int > *lepton_origins=0, const std::vector< int > *photon_origins=0) const override |
| Determine whether current event is in overlap region (set via reference). More...
|
|
virtual StatusCode | photonPtsOutsideDr (std::vector< float > &result, const std::vector< TLorentzVector > *leptons=0, const std::vector< TLorentzVector > *photons=0, const std::vector< int > *lepton_origins=0, const std::vector< int > *photon_origins=0) const override |
| Determine the pTs of photons outside the dR cut that is configured in tool initialization (dR_lepton_photon_cut). More...
|
|
virtual StatusCode | photonPtsOutsideDrs (std::map< float, std::vector< float > > &result, const std::vector< TLorentzVector > *leptons=0, const std::vector< TLorentzVector > *photons=0, const std::vector< int > *lepton_origins=0, const std::vector< int > *photon_origins=0) const override |
| Determine the pTs of photons outside of several dR cuts that are configured in tool initialization (dR_lepton_photon_cuts). More...
|
|
virtual bool | frixioneIsolated (const xAOD::TruthParticle &photon, const xAOD::TruthParticleContainer &truthParticles, float dR0, float exponent, float epsilon) const override |
| Function determining whether a photon is frixione isolated from truthParticles Parameters as defined in https://arxiv.org/pdf/hep-ph/9801442. More...
|
|
std::vector< TLorentzVector > | getPhotonP4s (const xAOD::TruthParticleContainer &truthParticleContainer) const |
| Get final state photons from truthParticleContainer A minimum pT cut and isolation is applied according to tool configuration Filter function is applied, only photons from relevant origins are kept. More...
|
|
std::vector< TLorentzVector > | getLeptonP4s (const xAOD::TruthParticleContainer &truthParticleContainer) const |
| Get final state leptons from truthParticleContainer Filter function is applied, only leptons from relevant origins are kept. More...
|
|
virtual StatusCode | initialize () |
| Dummy implementation of the initialisation function. More...
|
|
virtual void | print () const |
| Print the state of the tool. More...
|
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysInitialize () override |
| Perform system initialization for an algorithm. More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
|
StatusCode | photonPtsOutsideDrs (std::map< float, std::vector< float > > &result, const std::vector< float > &drCuts, const std::vector< TLorentzVector > *leptons=0, const std::vector< TLorentzVector > *photons=0, const std::vector< int > *lepton_origins=0, const std::vector< int > *photon_origins=0) const |
|
StatusCode | setInput (std::vector< TLorentzVector > &leptons_out, std::vector< TLorentzVector > &photons_out, const std::vector< TLorentzVector > *lepton_p4s, const std::vector< TLorentzVector > *photon_p4s, const std::vector< int > *lepton_origins, const std::vector< int > *photon_origins) const |
|
std::vector< TLorentzVector > | filterPhotonOrigins (const std::vector< TLorentzVector > &, const std::vector< int > &) const |
|
std::vector< TLorentzVector > | filterLeptonOrigins (const std::vector< TLorentzVector > &, const std::vector< int > &) const |
|
bool | isFromTau (const xAOD::TruthParticle &lepton, int nRecursions=0) const |
|
bool | checkPhotonPts (const std::vector< float > &photon_pts) const |
|
float | frixioneFunc (float dR, float dR0, float exponent, float epsilon) const |
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &) |
| specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &) |
| specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
|
This tool can be used to identify the overlap of a V+jets and V+gamma sample or in fact between most V^n+gamma^m and V^n+gamma^(m-1) samples (e.g.
V+gammagamma vs V+gamma or VV+gamma vs VV). It can either decide whether an event is in the overlap region for fixed cuts on photons and lepton or be used to extract relevant information from the event so that the overlap removal (OR) can be performed at a later stage with a simple 'if' statement.
The OR functions (inOverlap(result), photonPtsOutsideDr(result), or photonPtsOutsideDrs(result)), set the result via reference and return a status code. Usually the tool will take leptons and photons from the current event but this behavior can be overwritten by explicitly setting leptons and photons as additional arguments to the functions.
Further documented at https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/VGammaORTool
Definition at line 37 of file VGammaORTool.h.
◆ StoreGateSvc_t
◆ VGammaORTool()
VGammaORTool::VGammaORTool |
( |
const std::string & |
name | ) |
|
Definition at line 8 of file VGammaORTool.cxx.
14 declareProperty(
"veto_lepton_origins",
m_lepton_veto_origins = {3, 5, 6, 7, 8, 9, 23, 24, 25, 26, 27, 28, 29, 30, 31,
15 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42});
16 declareProperty(
"preferred_lepton_origins",
m_preferred_lepton_origins = {1, 2, 4, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21});
18 declareProperty(
"veto_photon_origins",
m_veto_photon_origins = {9, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 42});
33 ATH_MSG_ERROR(origin <<
" in both lepton origin and lepton veto origin, this is not correct.");
◆ ~VGammaORTool()
VGammaORTool::~VGammaORTool |
( |
| ) |
|
|
overridevirtual |
◆ checkPhotonPts()
bool VGammaORTool::checkPhotonPts |
( |
const std::vector< float > & |
photon_pts | ) |
const |
|
private |
Definition at line 333 of file VGammaORTool.cxx.
335 ATH_MSG_ERROR(
"photon_pT_cuts needs to be a non-empty list, when inOverlap is called, set as property or in constructor.");
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ filterLeptonOrigins()
std::vector< TLorentzVector > VGammaORTool::filterLeptonOrigins |
( |
const std::vector< TLorentzVector > & |
lepton_candidates, |
|
|
const std::vector< int > & |
lepton_origins |
|
) |
| const |
|
private |
Definition at line 202 of file VGammaORTool.cxx.
205 if (lepton_candidates.size() != lepton_origins.size()) {
207 "VGammaORTool::filterLeptonOrigins" <<
": size of lepton candidates (" << lepton_candidates.size() <<
") different from number of lepton origins (" << lepton_origins.size() <<
210 std::vector<TLorentzVector> lepton_p4s;
211 std::vector<TLorentzVector> leptons_not_vetoed_p4s;
213 for (
uint i = 0;
i < lepton_candidates.size();
i++) {
214 const TLorentzVector p4 = lepton_candidates[
i];
215 const int p_origin = lepton_origins[
i];
218 lepton_p4s.push_back(p4);
230 leptons_not_vetoed_p4s.push_back(p4);
236 for (
const auto&
l : leptons_not_vetoed_p4s) {
237 lepton_p4s.push_back(
l);
◆ filterPhotonOrigins()
std::vector< TLorentzVector > VGammaORTool::filterPhotonOrigins |
( |
const std::vector< TLorentzVector > & |
photon_candidates, |
|
|
const std::vector< int > & |
photon_origins |
|
) |
| const |
|
private |
Definition at line 179 of file VGammaORTool.cxx.
182 if (photon_candidates.size() != photon_origins.size()) {
184 "VGammaORTool::filterPhotonOrigins" <<
": size of photon candidates (" << photon_candidates.size() <<
") different from number of photon origins (" << photon_origins.size() <<
188 std::vector<TLorentzVector> photon_p4s;
189 for (
uint i = 0;
i < photon_candidates.size();
i++) {
190 const TLorentzVector p4 = photon_candidates[
i];
191 const int p_origin = photon_origins[
i];
195 photon_p4s.push_back(p4);
◆ frixioneFunc()
float VGammaORTool::frixioneFunc |
( |
float |
dR, |
|
|
float |
dR0, |
|
|
float |
exponent, |
|
|
float |
epsilon |
|
) |
| const |
|
private |
Definition at line 392 of file VGammaORTool.cxx.
393 return epsilon * TMath::Power((1 - TMath::Cos(dR)) / (1 - TMath::Cos(dR0)), exponent);
◆ frixioneIsolated()
Function determining whether a photon is frixione isolated from truthParticles Parameters as defined in https://arxiv.org/pdf/hep-ph/9801442.
Implements IVGammaORTool.
Definition at line 350 of file VGammaORTool.cxx.
358 std::map<float, float> dr_to_pt;
359 for (
const auto *
p : truthParticles) {
366 const float dRgamma =
photon.p4().DeltaR(
p->p4());
370 if (dr_to_pt.count(dRgamma) > 0) {
371 dr_to_pt[dRgamma] +=
p->pt();
373 dr_to_pt[dRgamma] =
p->pt();
379 for (
const auto& pair : dr_to_pt) {
380 sumPt += pair.second;
381 const float dRgamma = pair.first;
◆ getKey()
Get the (hashed) key of an object that is in the event store.
This is a bit of a special one. StoreGateSvc
and xAOD::TEvent
both provide ways for getting the SG::sgkey_t
key for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.
In order to allow tools to efficiently perform this operation, they can use this helper function.
- See also
- asg::AsgTool::getName
- Parameters
-
ptr | The bare pointer to the object that the event store should know about |
- Returns
- The hashed key of the object in the store. If not found, an invalid (zero) key.
Definition at line 119 of file AsgTool.cxx.
121 #ifdef XAOD_STANDALONE
127 return (
proxy ==
nullptr ? 0 :
proxy->sgkey() );
128 #endif // XAOD_STANDALONE
◆ getLeptonP4s()
Get final state leptons from truthParticleContainer Filter function is applied, only leptons from relevant origins are kept.
Definition at line 245 of file VGammaORTool.cxx.
246 std::vector<const xAOD::TruthParticle*> tau_candidates;
247 std::vector<const xAOD::TruthParticle*> elmu_candidates;
248 for (
const auto *
p : truthParticles) {
255 bool childIsTau =
false;
256 bool hasChildren =
false;
258 for (
uint i = 0;
i <
p->nChildren();
i++) {
259 if (
p->child(
i) ==
nullptr)
continue;
262 if (
p->child(
i)->pdgId() ==
p->pdgId()) {
267 if (hasChildren && !childIsTau) tau_candidates.push_back(
p);
271 elmu_candidates.push_back(
p);
275 sort(tau_candidates.begin(), tau_candidates.end(),
277 return p1->pt() > p2->pt();
279 sort(elmu_candidates.begin(), elmu_candidates.end(),
281 return p1->pt() > p2->pt();
284 std::vector<const xAOD::TruthParticle*> lepton_candidates(tau_candidates);
285 lepton_candidates.insert(lepton_candidates.end(), elmu_candidates.begin(), elmu_candidates.end());
287 std::vector<TLorentzVector> lepton_p4s;
288 std::vector<int> lepton_origins;
290 for (
const auto&
p : lepton_candidates) {
291 const unsigned int origin = classifierParticleOriginAcc(*
p);
292 lepton_origins.push_back(origin);
293 lepton_p4s.push_back(
p->p4());
◆ getName()
const std::string & asg::AsgTool::getName |
( |
const void * |
ptr | ) |
const |
|
inherited |
Get the name of an object that is / should be in the event store.
This is a bit of a special one. StoreGateSvc
and xAOD::TEvent
both provide ways for getting the std::string
name for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.
In order to allow tools to efficiently perform this operation, they can use this helper function.
- See also
- asg::AsgTool::getKey
- Parameters
-
ptr | The bare pointer to the object that the event store should know about |
- Returns
- The string name of the object in the store. If not found, an empty string.
Definition at line 106 of file AsgTool.cxx.
108 #ifdef XAOD_STANDALONE
114 static const std::string
dummy =
"";
116 #endif // XAOD_STANDALONE
◆ getPhotonP4s()
Get final state photons from truthParticleContainer A minimum pT cut and isolation is applied according to tool configuration Filter function is applied, only photons from relevant origins are kept.
Definition at line 299 of file VGammaORTool.cxx.
300 std::vector<TLorentzVector> photon_p4s;
301 std::vector<int> photon_origins;
302 for (
const auto *
p : truthParticles) {
309 const unsigned int origin = classifierParticleOriginAcc(*
p);
310 photon_origins.push_back(origin);
311 photon_p4s.push_back(
p->p4());
◆ getProperty()
template<class T >
const T* asg::AsgTool::getProperty |
( |
const std::string & |
name | ) |
const |
|
inherited |
Get one of the tool's properties.
◆ initialize()
virtual StatusCode asg::AsgTool::initialize |
( |
| ) |
|
|
inlinevirtualinherited |
Dummy implementation of the initialisation function.
It's here to allow the dual-use tools to skip defining an initialisation function. Since many are doing so...
Reimplemented in SimpleMuonTriggerScaleFactors, Trig::TrigMuonMatching, CP::MuonTriggerScaleFactors, IHIEventShapeMapTool, ST::SUSYObjDef_xAOD, InDetSecVtxTruthMatchTool, JetGrooming::RecSoftDrop, met::METMaker, AsgForwardElectronIsEMSelector, JetGrooming::JetTrimming, ORUtils::BaseOverlapTool, PMGTools::PMGSherpa22VJetsWeightTool, AsgElectronEfficiencyCorrectionTool, CP::ElectronChargeEfficiencyCorrectionTool, AsgForwardElectronLikelihoodTool, CorrectPFOTool, CP::IsolationCorrectionTool, TauAnalysisTools::TauTruthMatchingTool, EGammaAmbiguityTool, InDetVertexTruthMatchTool, AthOnnx::OnnxRuntimeSessionToolCPU, AthOnnx::OnnxRuntimeSessionToolCUDA, PuppiWeightTool, CP::EgammaCalibrationAndSmearingTool, CP::FFJetSmearingTool, JetBalancePFlowJvtTool, JetIsolationTool, JetForwardPFlowJvtTool, MCTruthClassifier, InDet::InDetHardScatterSelectionTool, dRMatchingTool, xAOD::BPhysBlindingTool, JetVertexTaggerTool, tauRecTools::TrackRNN, LVL1::L1CaloOfflineTriggerTowerTools, TauAnalysisTools::TauSelectionTool, JetRecTool, met::METAssociationTool, CP::TrackVertexAssociationTool, met::METAssociator, xAOD::TrackIsolationTool, InDet::InDetTrackSelectionTool, egammaMVACalibTool, TrigConf::xAODConfigTool, JetCleaningTool, met::METCaloRegionsTool, ZDC::ZdcLEDAnalysisTool, ZDC::RpdSubtractCentroidTool, CP::MuonCalibTool, LVL1::L1CaloCells2TriggerTowers, IDTPM::TrackAnalysisInfoWriteTool, JetVertexFractionTool, LVL1BS::PpmByteStreamReadV1V2Tool, JetClusterer, JetForwardJvtToolBDT, CP::AsgFlagSelectionTool, TauTrackFinder, TauAnalysisTools::DiTauSelectionTool, JetClustererByVertex, BookkeeperTool, JetBadChanCorrTool, xAOD::BPhysTrackVertexMapTool, JetModifiedMassDrop, xAOD::CaloIsolationTool, EnhancedBiasWeighter, InDet::InDetUsedInFitTrackDecoratorTool, CP::AsgPtEtaSelectionTool, TauAnalysisTools::BuildTruthTaus, tauRecTools::TauTrackRNNClassifier, InDet::InDetSecVtxTrackSelectionTool, AthONNX::JSSMLTool, JetForwardJvtTool, JetPileupTag::JetVertexNNTagger, CP::EgammaIsGoodOQSelectionTool, CP::IsolationCloseByCorrectionTool, ElectronPhotonVariableCorrectionBase, CP::MuonCalibIntScaleSmearTool, JetFinder, AsgElectronIsEMSelector, CP::MuonCalibIntHighpTSmearTool, CP::MuonCalibIntSagittaTool, met::METBuilderTool, CP::AsgMaskSelectionTool, ECUtils::EventCleaningTool, TauAnalysisTools::TauTruthTrackMatchingTool, met::METSoftTermsTool, LVL1::L1CaloLArTowerEnergy, HiggsTruthCategoryTool, IDTPM::TrackRoiSelectionTool, TauAnalysisTools::CommonDiTauEfficiencyTool, HIJetConstituentSubtractionTool, JetTrackSumMomentsTool, JetGrooming::SoftDrop, JetTrackMomentsTool, met::METTruthTool, PMGTools::PMGSherpaVjetsSysTool, JetQGTaggerVariableTool, ClusterMatching::CaloClusterMatchingTool, AsgPhotonEfficiencyCorrectionTool, FlavorTagDiscriminants::MultifoldGNNTool, InDet::JetTrackFilterTool, DiTauRecTools::DiTauDiscriminantTool, asg::DataHandleTestTool, xAODMaker::FileMetaDataTool, InDet::InclusiveTrackFilterTool, InDet::InDetTrackTruthFilterTool, HIJetClusterSubtractorTool, CP::MVATrackVertexAssociationTool, IDTPM::RoiSelectionTool, IDTPM::VertexRoiSelectionTool, CP::BaseFakeBkgTool, ElectronPhotonVariableCorrectionTool, JetCalibrationTool, JetCaloQualityTool, JetOriginCorrectionTool, IDTPM::TrackObjectSelectionTool, InDet::InDetTrackBiasingTool, HIJetClusterIndexAssociationTool, TauWPDecorator, TrigGlobalEfficiencyCorrectionTool, ZdcRecChannelToolV2, InDetGNNHardScatterSelection::GNNTool, CP::BaseLinearFakeBkgTool, FlavorTagDiscriminants::GNNTool, CP::MuonSelectionTool, TauAnalysisTools::CommonDiTauSmearingTool, JSSTaggerBase, CP::LhoodMM_tools, AsgElectronLikelihoodTool, DiTauRecTools::DiTauIDVarCalculator, CP::JetQGTagger, Pileup1DResidualCalibStep, LVL1::L1CaloFcal23Cells2RxMappingTool, IDTPM::TrackQualitySelectionTool, IDTPM::VertexQualitySelectionTool, ORUtils::OverlapRemovalTool, Ringer::AsgRingerSelectorTool, InDet::InDetTrackSmearingTool, CP::JetJvtEfficiency, JetCopier, JetGrooming::JetGroomer, met::METPhotonAssociator, JetECPSFractionTool, JetPtAssociationTool, met::METElectronAssociator, met::METTauAssociator, PMGTools::PMGDecayProductsSelectionTool, WeightToolBase, HIJetDRAssociationTool, JetClusterMomentsTool, met::METJetAssocTool, TauVertexFinder, IDTPM::JsonPlotsDefReadTool, TauAnalysisTools::DiTauSmearingTool, BJetCorrectionTool, JetDRTrackAssocTool, JetReclusterer, TauDecayModeNNClassifier, BDTVertexWeightCalculator, asg::UnitTestTool1, ZDC::ZdcAnalysisTool, IDTPM::DeltaRMatchingToolBase< T, R >, AsgElectronSelectorTool, GSCCalibStep, EtaMassJESCalibStep, JetReclusteringTool, met::METMuonAssociator, TauPi0CreateROI, TauShotFinder, IDTPM::DeltaRMatchingToolBase< xAOD::TrackParticle, xAOD::TruthParticle >, IDTPM::DeltaRMatchingToolBase< xAOD::TruthParticle, xAOD::TrackParticle >, IDTPM::DeltaRMatchingToolBase< xAOD::TrackParticle >, ZdcRecChannelToolLucrod, PMGTools::PMGTruthWeightTool, JetCalibTool, SmearingCalibStep, JetVoronoiMomentsTool, Trig::MatchFromCompositeTool, asg::UnitTestTool3, IDTPM::TruthTrackMatchingTool, CP::ApplyFakeFactor, AsgElectronChargeIDSelectorTool, HIJetMaxOverMeanTool, PanTau::Tool_FeatureExtractor, TauElectronVetoVariables, ZDC::ZdcTrigValidTool, IDTPM::TruthQualitySelectionTool, CP::IsolationSelectionTool, WeightsAgregator, EL::UnitTestTool, FlavorTagDiscriminants::TrackClassifier, JetLArHVTool, IDTPM::EFTrackMatchingTool, IDTPM::OfflineTrackQualitySelectionTool, IDTPM::TrackTruthMatchingTool, HI::HIPileupTool, BTaggingSelectionTool, InDet::InDetTrackTruthOriginTool, JetHelper::VarTool, FlavorTagDiscriminants::DL2Tool, PileupAreaCalibStep, EnergyCorrelatorGeneralizedRatiosTool, EnergyCorrelatorGeneralizedTool, EnergyCorrelatorRatiosTool, EnergyCorrelatorTool, TauEleOverlapChecker, TauJetRNNEvaluator, asg::UnitTestTool2, JetTruthLabelingTool, ZDC::ZdcRecTool, HIJetConstituentModifierTool, TauCalibrateLC, TauGNNEvaluator, TauPi0ScoreCalculator, TauRecToolBase, Trig::TrigEgammaEmulationPrecisionElectronHypoTool, asg::UnitTestTool1A, PDFWeight, HIEventShapeJetIteration, HIJetSignificanceTool, CP::JetQGTaggerBDT, JetWidthTool, TauVertexVariables, Trig::TrigEgammaEmulationPrecisionPhotonHypoTool, Trig::TrigEgammaMatchingTool, Trig::R3IParticleRetrievalTool, JetPileupLabelingTool, JetFromPseudojet, JetTruthParticleSelectorTool, Trig::TrigEgammaEmulationBaseHypoTool, AthOnnx::OnnxRuntimeInferenceTool, ZDC::RPDAnalysisTool, CP::ApplyE2YFakeRate, ParticleScaleFactorTool, TauAnalysisTools::TauHFVetoTool, InDet::InDetTrackSystematicsTool, JetCaloQualityToolFE, Trig::MatchingTool, Trig::R3MatchingTool, JetParticleAssociation, JetHelper::HistoInput2D, Trig::TrigEgammaEmulationChain, Trig::TrigEgammaEmulationFastCaloHypoTool, xAODtoHepMCTool, HIEventShapeMapTool, HI::HIVertexSelectionTool, TauVertexedClusterDecorator, Trig::IParticleRetrievalTool, HI::HIEventSelectionTool, FlavorTagDiscriminants::HbbTagTool, JetConstituentFrac, JetGroomMRatio, Validator, JetHelper::HistoInput1D, JetHelper::TextInputMCJES, ExtendTrackToLayerTool, Trig::TypedScoringTool, TrackTruthSelectionTool, HIUEModulatorTool, JSSWTopTaggerANN, CP::JvtEfficiencyToolBase, JetEMScaleMomTool, MvaTESVariableDecorator, TauAODMuonRemovalTool, TauCombinedTES, CP::AsymptMatrixTool, ParticleJetDeltaRLabelTool, HIEventShapeSummaryTool, FlavorTagDiscriminants::BTagAugmenterTool, FlavorTagDiscriminants::VRJetOverlapDecoratorTool, JSSTaggerUtils, JetCaloEnergies, ParticleJetGhostLabelTool, FlavorTagDiscriminants::BTagMuonAugmenterTool, BTaggingEfficiencyJsonTool, MBTSTimeFilterTool, JSSWTopTaggerDNN, SmoothedTopTagger, MvaTESEvaluator, BoostedJetTaggerTool, CP::IsolationLowPtPLVTool, Trig::DRScoringTool, Trig::EgammaDRScoringTool, BTaggingSelectionJsonTool, SmoothedWZTagger, CP::FJvtEfficiencyTool, CP::JvtSelectionToolBase, CP::NNJvtSelectionTool, AthAsgExUnittestTool, CP::JvtSelectionTool, CP::FJvtSelectionTool, CP::JvtEfficiencyTool, CP::NNJvtEfficiencyTool, BookkeeperDumperTool, TrigFastCalibWithRings, BTaggingEfficiencyTool, BTaggingTruthTaggingTool, MissingCellListTool, JetVoronoiDiagramHelpers::Diagram, FastJetInterfaceTool, CP::PhotonVertexSelectionTool, met::METSystematicsTool, Trig::TrigEgammaEmulationToolMT, JetAttributeRatioSelector, BTaggingEigenVectorRecompositionTool, Trig::TrigDecisionTool, CP::PhotonPointingTool, met::METRecoTool, CP::PileupReweightingTool, LVL1::L1CaloxAODOfflineTriggerTowerTools, LVL1::TrigT1CaloMonErrorToolV1, met::METTrackFilterTool, LVL1::TrigT1CaloMonErrorTool, SoftKillerWeightTool, EventDensityTool, met::METSignificance, JetUncertaintiesTool, CP::JetTileCorrectionTool, xAODMaker::TriggerMenuMetaDataTool, D3PD::D3PDMCTruthClassifier, JetConstituentModSequence, HistoGroupBase, AsgPhotonIsEMSelector, JetAttributeSelector, TrackVertexAssociationTool, met::METRefinerTool, TauAnalysisTools::CommonSmearingTool, PanTau::Tool_DetailsArranger, LVL1::L1CaloMonitoringCaloTool, LVL1::L1CaloTTIdTools, JetInputElRemovalTool, GoodRunsListSelectionTool, TauAnalysisTools::CommonEfficiencyTool, PanTau::PanTauProcessor, xAODMaker::TruthMetaDataTool, EventShapeCopier, met::METJetTool, ZdcByteStreamReadV1V2Tool, FSR::FsrPhotonTool, Trig::StaticBunchCrossingTool, ZMassConstraint::ConstraintFit, TauAnalysisTools::TauEfficiencyCorrectionsTool, PanTau::Tool_DecayModeDeterminator, PanTau::Tool_ModeDiscriminator, CP::ElectronLRTOverlapRemovalTool, HIClusterSubtraction, JetAttributeHisto, JetPseudojetCopier, met::METEgammaAssociator, Trig::xAODBunchCrossingTool, TauAnalysisTools::DiTauEfficiencyCorrectionsTool, TauAnalysisTools::DiTauTruthMatchingTool, TauAnalysisTools::TauSmearingTool, met::METTruthAssociator, PanTau::Tool_InformationStore, HistoDefinitionTool, PanTau::Tool_InputConverter, DiTauMassTools::MissingMassTool, JetBottomUpSoftDrop, JetRecursiveSoftDrop, PMGTools::PMGCrossSectionTool, JetSoftDrop, TrigEgammaMatchingToolMT, JetConstituentsRetriever, VoronoiWeightTool, JetCaloCellQualityTool, JetContainerHistoFiller, ChargedHadronSubtractionTool, met::METRegionsTool, met::METSoftAssociator, PanTau::Tool_TauConstituentGetter, ConstituentSubtractorTool, JetHistoBase, JetSelectorAttributeRunII, JetSplitter, CaloClusterConstituentsOrigin, CP::MuonLRTOverlapRemovalTool, HistosForJetSelection, JetPruner, JetToolRunner, JetUsedInFitTrackDecoratorTool, JetTrimmer, NSubjettinessRatiosTool, CP::MuonEfficiencyScaleFactors, JetConstitFourMomTool, NSubjettinessTool, ZdcDataAccessV2, JetPseudojetRetriever, LVL1BS::TrigT1CaloDataAccessV2, PanTau::Tool_TauConstituentSelector, CopyTruthParticles, ClusterAtEMScaleTool, CP::IsolationHelper, HIEfficiencyResponseHistos, AsgDeadHVCellRemovalTool, EfficiencyResponseHistos, ConstitTimeCutTool, JetSelectorAttribute, HIJetUEMonitoring, JetSubStructureMomentToolsBase, AsgHelloTool, CopyTruthJetParticles, LeadingJetsRelations, and JetEventSelector.
Definition at line 133 of file AsgTool.h.
133 {
return StatusCode::SUCCESS; }
◆ inOverlap()
StatusCode VGammaORTool::inOverlap |
( |
bool & |
result, |
|
|
const std::vector< TLorentzVector > * |
leptons = 0 , |
|
|
const std::vector< TLorentzVector > * |
photons = 0 , |
|
|
const std::vector< int > * |
lepton_origins = 0 , |
|
|
const std::vector< int > * |
photon_origins = 0 |
|
) |
| const |
|
overridevirtual |
Determine whether current event is in overlap region (set via reference).
The overlap region is defined by dR_lepton_photon_cut, photon_pT_cut and many more configurable parameters. Note that the function returns a status code. The first agument is the result, the remaining arguments are optional:
- If null pointers are given for leptons or photons, they will be taken from the event
- One can override this behaviour by manually specifying vectors of lepton/photon
- If lepton or photon origins are given in addition to the lepton four vectors, particles from irrelevant origins (e.g. decays) are filtered out This can be useful when working with derivations which store the origin but not the full truth record
Implements IVGammaORTool.
Definition at line 48 of file VGammaORTool.cxx.
53 std::vector<float> photon_pts;
56 return StatusCode::SUCCESS;
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ isFromTau()
◆ msg() [1/2]
◆ msg() [2/2]
◆ msg_level_name()
const std::string & asg::AsgTool::msg_level_name |
( |
| ) |
const |
|
inherited |
A deprecated function for getting the message level's name.
Instead of using this, weirdly named function, user code should get the string name of the current minimum message level (in case they really need it...), with:
MSG::name( msg().level() )
This function's name doesn't follow the ATLAS coding rules, and as such will be removed in the not too distant future.
- Returns
- The string name of the current minimum message level that's printed
Definition at line 101 of file AsgTool.cxx.
◆ msgLvl()
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ photonPtsOutsideDr()
StatusCode VGammaORTool::photonPtsOutsideDr |
( |
std::vector< float > & |
result, |
|
|
const std::vector< TLorentzVector > * |
leptons = 0 , |
|
|
const std::vector< TLorentzVector > * |
photons = 0 , |
|
|
const std::vector< int > * |
lepton_origins = 0 , |
|
|
const std::vector< int > * |
photon_origins = 0 |
|
) |
| const |
|
overridevirtual |
Determine the pTs of photons outside the dR cut that is configured in tool initialization (dR_lepton_photon_cut).
Calculates a vector of photon pts, ordered by descending pt. Once these values are calculated they can be stored and used to easily perform OR with arbitrary pT. Note that the function returns a status code. The first agument is the result, the remaining arguments are optional
- If null pointers are given for leptons or photons, they will be taken from the event
- One can override this behaviour by manually specifying vectors of lepton/photon
- If lepton or photon origins are given in addition to the lepton four vectors, particles from irrelevant origins (e.g. decays) are filtered out This can be useful when working with derivations which store the origin but not the full truth record
Implements IVGammaORTool.
Definition at line 62 of file VGammaORTool.cxx.
67 std::map<float, std::vector<float> > photon_pt_map;
70 return StatusCode::SUCCESS;
◆ photonPtsOutsideDrs() [1/2]
StatusCode VGammaORTool::photonPtsOutsideDrs |
( |
std::map< float, std::vector< float > > & |
result, |
|
|
const std::vector< float > & |
drCuts, |
|
|
const std::vector< TLorentzVector > * |
leptons = 0 , |
|
|
const std::vector< TLorentzVector > * |
photons = 0 , |
|
|
const std::vector< int > * |
lepton_origins = 0 , |
|
|
const std::vector< int > * |
photon_origins = 0 |
|
) |
| const |
|
private |
Definition at line 89 of file VGammaORTool.cxx.
95 std::vector<TLorentzVector> good_leptons;
96 std::vector<TLorentzVector> good_photons;
97 ANA_CHECK(
setInput(good_leptons,good_photons,leptons,photons,lepton_origins,photon_origins));
100 for (
const auto& drCut : drCuts) {
101 result[drCut] = std::vector<float>();
102 for (
const auto&
photon : good_photons) {
103 bool tooCloseToLepton =
false;
105 const float dr =
photon.DeltaR(good_leptons[i_lep]);
107 tooCloseToLepton =
true;
111 if (!tooCloseToLepton)
result[drCut].push_back(
photon.Pt());
117 return StatusCode::SUCCESS;
◆ photonPtsOutsideDrs() [2/2]
StatusCode VGammaORTool::photonPtsOutsideDrs |
( |
std::map< float, std::vector< float > > & |
result, |
|
|
const std::vector< TLorentzVector > * |
leptons = 0 , |
|
|
const std::vector< TLorentzVector > * |
photons = 0 , |
|
|
const std::vector< int > * |
lepton_origins = 0 , |
|
|
const std::vector< int > * |
photon_origins = 0 |
|
) |
| const |
|
overridevirtual |
Determine the pTs of photons outside of several dR cuts that are configured in tool initialization (dR_lepton_photon_cuts).
Calculates a mapping between dRs and vector of photon pts (ordered by descending pt). Once these values are calculated they can be stored and used to easily perform OR with arbitrary pT and multiple dR cuts. Note that the function returns a status code. The first agument is the result, the remaining arguments are optional
- If null pointers are given for leptons or photons, they will be taken from the event
- One can override this behaviour by manually specifying vectors of lepton/photon
- If lepton or photon origins are given in addition to the lepton four vectors, particles from irrelevant origins (e.g. decays) are filtered out This can be useful when working with derivations which store the origin but not the full truth record
Implements IVGammaORTool.
Definition at line 76 of file VGammaORTool.cxx.
82 return StatusCode::SUCCESS;
◆ print()
void asg::AsgTool::print |
( |
| ) |
const |
|
virtualinherited |
Print the state of the tool.
Implements asg::IAsgTool.
Reimplemented in JetRecTool, JetFinder, JetModifiedMassDrop, JetFromPseudojet, JetReclusterer, JetReclusteringTool, JetTruthLabelingTool, JetPileupLabelingTool, HI::HIPileupTool, JetDumper, JetBottomUpSoftDrop, JetRecursiveSoftDrop, JetSoftDrop, JetConstituentsRetriever, JetSubStructureMomentToolsBase, JetSplitter, JetToolRunner, JetPruner, JetPseudojetRetriever, JetTrimmer, AsgHelloTool, and KtDeltaRTool.
Definition at line 131 of file AsgTool.cxx.
◆ renounce()
◆ renounceArray()
◆ setInput()
StatusCode VGammaORTool::setInput |
( |
std::vector< TLorentzVector > & |
leptons_out, |
|
|
std::vector< TLorentzVector > & |
photons_out, |
|
|
const std::vector< TLorentzVector > * |
lepton_p4s, |
|
|
const std::vector< TLorentzVector > * |
photon_p4s, |
|
|
const std::vector< int > * |
lepton_origins, |
|
|
const std::vector< int > * |
photon_origins |
|
) |
| const |
|
private |
Definition at line 122 of file VGammaORTool.cxx.
133 if(lepton_p4s==0 || photon_p4s==0){
141 std::vector<TLorentzVector> muonsOut=
getLeptonP4s(*truthMuons);
142 std::vector<TLorentzVector> electronsOut=
getLeptonP4s(*truthElectrons);
143 leptons_out.insert(leptons_out.end(),muonsOut.begin(),muonsOut.end());
144 leptons_out.insert(leptons_out.end(),electronsOut.begin(),electronsOut.end());
147 if(lepton_origins!=0){
151 leptons_out = *lepton_p4s;
158 if(photon_origins!=0){
162 photons_out = *photon_p4s;
166 ATH_MSG_DEBUG(
"VGammaORTool::setInput" <<
": Found " << photons_out.size() <<
" photons.");
167 ATH_MSG_DEBUG(
"VGammaORTool::setInput" <<
": Found " << leptons_out.size() <<
" leptons.");
171 "VGammaORTool::setInput" <<
": Found " << leptons_out.size() <<
" leptons but expected " <<
m_n_leptons <<
".");
174 return StatusCode::SUCCESS;
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_abs_pdgids_excluded_from_iso
std::vector<int> VGammaORTool::m_abs_pdgids_excluded_from_iso |
|
private |
◆ m_detStore
◆ m_dR_lepton_photon_cut
float VGammaORTool::m_dR_lepton_photon_cut |
|
private |
◆ m_dR_lepton_photon_cuts
std::vector<float> VGammaORTool::m_dR_lepton_photon_cuts |
|
private |
◆ m_evtStore
◆ m_frixione_dR
float VGammaORTool::m_frixione_dR |
|
private |
◆ m_frixione_epsilon
float VGammaORTool::m_frixione_epsilon |
|
private |
◆ m_frixione_exponent
float VGammaORTool::m_frixione_exponent |
|
private |
◆ m_lepton_pdgIds
std::vector<int> VGammaORTool::m_lepton_pdgIds |
|
private |
◆ m_lepton_veto_origins
std::vector<int> VGammaORTool::m_lepton_veto_origins |
|
private |
◆ m_min_considered_photon_pT
float VGammaORTool::m_min_considered_photon_pT |
|
private |
◆ m_n_leptons
int VGammaORTool::m_n_leptons |
|
private |
◆ m_photon_pT_cuts
std::vector<float> VGammaORTool::m_photon_pT_cuts |
|
private |
◆ m_preferred_lepton_origins
std::vector<int> VGammaORTool::m_preferred_lepton_origins |
|
private |
◆ m_truthClassifier
◆ m_use_gamma_iso
bool VGammaORTool::m_use_gamma_iso |
|
private |
◆ m_varHandleArraysDeclared
◆ m_veto_photon_origins
std::vector<int> VGammaORTool::m_veto_photon_origins |
|
private |
◆ m_vhka
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
const TruthParticle_v1 * parent(size_t i=0) const
Retrieve the i-th mother (TruthParticle) of this TruthParticle.
std::string find(const std::string &s)
return a remapped string
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool is_same_particle(const T1 &p1, const T2 &p2)
Method to establish if two particles in the GenEvent actually represent the same particle.
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
virtual void setOwner(IDataHandleHolder *o)=0
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
size_t nParents() const
Number of parents of this particle.
bool is_simulation_particle(const T &p)
Method to establish if a particle (or barcode) was created during the simulation (TODO update to be s...
Class describing a truth particle in the MC record.
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
bool isStable(const T &p)
Identify if the particle is stable, i.e. has not decayed.
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
#define ATH_MSG_WARNING(x)
bool isPhoton(const xAOD::Egamma *eg)
is the object a photon
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
int pdgId() const
PDG ID code.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>