|
ATLAS Offline Software
|
#include <DiphotonVertexDecorator.h>
|
| DiphotonVertexDecorator (const std::string &t, const std::string &n, const IInterface *p) |
| Constructor with parameters. More...
|
|
| ~DiphotonVertexDecorator () |
| Destructor. More...
|
|
StatusCode | initialize () |
|
StatusCode | finalize () |
|
virtual StatusCode | addBranches () const |
| Pass the thinning service
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 |
|
|
ToolHandle< CP::IPhotonVertexSelectionTool > | m_photonVertexSelectionTool {this, "PhotonVertexSelectionTool", "", ""} |
|
SG::ReadHandleKey< xAOD::VertexContainer > | m_primaryVertexKey {this, "PrimaryVertexName", "PrimaryVertices", "" } |
|
SG::ReadHandleKey< xAOD::PhotonContainer > | m_photonKey { this, "PhotonKey", "Photons", "" } |
|
SG::WriteHandleKey< xAOD::VertexContainer > | m_diphotonVertexKey {this, "DiphotonVertexName", "HggPrimaryVertices", "" } |
|
SG::ReadHandleKey< xAOD::FlowElementContainer > | m_FEContainerHandleKey {this,"PFOContainerName","JetETMissChargedParticleFlowObjects","ReadHandleKey for the PFO container"} |
|
double | m_minPhotonPt |
|
bool | m_removeCrack |
|
double | m_maxEta |
|
bool | m_ignoreConv |
|
std::string | m_pfoToolName |
|
double | m_tcMatch_dR |
|
double | m_tcMatch_maxRat |
|
StoreGateSvc_t | m_evtStore |
| Pointer to StoreGate (event store by default) More...
|
|
StoreGateSvc_t | m_detStore |
| Pointer to StoreGate (detector store by default) More...
|
|
std::vector< SG::VarHandleKeyArray * > | m_vhka |
|
bool | m_varHandleArraysDeclared |
|
- Author
- Bruno Lenzi
-
Leo Cerda
-
magda.nosp@m.c@ce.nosp@m.rn.ch
Definition at line 37 of file DiphotonVertexDecorator.h.
◆ StoreGateSvc_t
◆ DiphotonVertexDecorator()
DerivationFramework::DiphotonVertexDecorator::DiphotonVertexDecorator |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
Constructor with parameters.
Definition at line 29 of file DiphotonVertexDecorator.cxx.
35 declareInterface<DerivationFramework::IAugmentationTool>(
this);
◆ ~DiphotonVertexDecorator()
DerivationFramework::DiphotonVertexDecorator::~DiphotonVertexDecorator |
( |
| ) |
|
◆ addBranches()
StatusCode DerivationFramework::DiphotonVertexDecorator::addBranches |
( |
| ) |
const |
|
virtual |
Pass the thinning service
Implements DerivationFramework::IAugmentationTool.
Definition at line 66 of file DiphotonVertexDecorator.cxx.
73 if (!PV->empty() && PV->at(0)) {
74 ATH_MSG_DEBUG(
"Default PV " << PV->at(0) <<
", type = " << PV->at(0)->vertexType() <<
" , z = " << PV->at(0)->z() );
85 if (not ph1 or ph->pt() > ph1->
pt())
90 else if (not ph2 or ph->pt() > ph2->pt()) ph2 = ph;
101 std::vector<std::pair<const xAOD::Vertex*, float> > vxResult;
106 for(
const auto *
const fe : *FEHandle) passORDec(*fe) =
true;
111 if(!vxResult.empty()) {
112 newPV = vxResult[0].first;
119 ATH_MSG_DEBUG(
"PhotonVertexSelection returns vertex " << newPV <<
" " << (newPV? Form(
" with z = %g", newPV->
z()) :
"") );
122 HggPV.second->setShallowIO(
false);
125 ATH_CHECK(vertexContainer.recordNonConst(std::unique_ptr< xAOD::VertexContainer >(HggPV.first),
126 std::unique_ptr< xAOD::ShallowAuxContainer >(HggPV.second)));
137 for (
unsigned int iPV=0; iPV<PV->size(); iPV++) {
138 const auto *vx = PV->at(iPV);
139 auto yyvx = (HggPV.first)->at(iPV);
149 for (
const auto& vxR: vxResult) {
151 if ( vx == vxR.first ) {
152 vertexScoreAcc(*yyvx) = vxR.second;
153 vertexFailTypeAcc(*yyvx) = vertexFailType;
154 vertexCaseAcc(*yyvx) = yyvertexVtxType;
155 leadingPhotonLinkAcc(*yyvx) =
phlink_t(*photons, ph1->
index());
156 subleadingPhotonLinkAcc(*yyvx) =
phlink_t(*photons, ph2->index());
166 for(yyvx_itr = (HggPV.first)->begin(); yyvx_itr != yyvx_end; ++yyvx_itr ) {
168 vertexScoreAcc(**yyvx_itr) = -9999;
169 vertexFailTypeAcc(**yyvx_itr) = vertexFailType;
170 vertexCaseAcc(**yyvx_itr) = yyvertexVtxType;
171 leadingPhotonLinkAcc(**yyvx_itr) = (
phlink_t()) ;
172 subleadingPhotonLinkAcc(**yyvx_itr) = (
phlink_t());
182 return StatusCode::SUCCESS;
◆ 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);
◆ 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.
◆ 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.
◆ 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
◆ finalize()
StatusCode DerivationFramework::DiphotonVertexDecorator::finalize |
( |
| ) |
|
◆ greaterPtFlowElement()
◆ initialize()
StatusCode DerivationFramework::DiphotonVertexDecorator::initialize |
( |
| ) |
|
◆ 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.
◆ interfaceID()
static const InterfaceID& DerivationFramework::IAugmentationTool::interfaceID |
( |
| ) |
|
|
inlinestaticinherited |
AlgTool interface methods.
Definition at line 31 of file IAugmentationTool.h.
31 {
return IID_IAugmentationTool; }
◆ matchFlowElement()
Definition at line 222 of file DiphotonVertexDecorator.cxx.
226 std::vector<const xAOD::FlowElement*> nearbyFE;
227 nearbyFE.reserve(20);
228 for(
const auto *
const fe : *feCont) {
230 if( ( !fe->isCharged() && fe->e() > FLT_MIN )) nearbyFE.push_back(fe);
236 double eg_cl_e = swclus->
e();
241 for(
const auto& fe : nearbyFE) {
244 double fe_e = fe->e();
247 ATH_MSG_VERBOSE(
"Reject topocluster in sum. Ratio vs eg cluster: " << (fe_e/eg_cl_e));
248 if( !bestbadmatch || (std::abs(fe_e/eg_cl_e-1.) < std::abs(bestbadmatch->
e()/eg_cl_e-1.)) ) bestbadmatch = fe;
252 ATH_MSG_VERBOSE(
"E match with new nFE: " << std::abs(sumE_fe+fe_e - eg_cl_e) / eg_cl_e);
253 if( (doSum = std::abs(sumE_fe+fe_e-eg_cl_e) < std::abs(sumE_fe - eg_cl_e)) ) {
254 passORDec(*fe) =
false;
259 if(sumE_fe<FLT_MIN && bestbadmatch) {
260 passORDec(*bestbadmatch) =
false;
263 return StatusCode::SUCCESS;
◆ msg() [1/2]
◆ msg() [2/2]
◆ 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.
◆ PhotonPreselect()
bool DerivationFramework::DiphotonVertexDecorator::PhotonPreselect |
( |
const xAOD::Photon * |
ph | ) |
const |
|
private |
Definition at line 185 of file DiphotonVertexDecorator.cxx.
188 if (!ph)
return false;
190 if (!ph->
isGoodOQ(34214))
return false;
196 if(DFCommonPhotonsIsEMLooseAcc.isAvailable(*ph)){
198 val =
static_cast<bool>(DFCommonPhotonsIsEMLooseAcc(*ph));
204 if(!defined || !
val)
return false;
211 double eta = std::abs(caloCluster->etaBE(2));
◆ renounce()
◆ renounceArray()
◆ 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_detStore
◆ m_diphotonVertexKey
◆ m_evtStore
◆ m_FEContainerHandleKey
SG::ReadHandleKey<xAOD::FlowElementContainer> DerivationFramework::DiphotonVertexDecorator::m_FEContainerHandleKey {this,"PFOContainerName","JetETMissChargedParticleFlowObjects","ReadHandleKey for the PFO container"} |
|
private |
◆ m_ignoreConv
bool DerivationFramework::DiphotonVertexDecorator::m_ignoreConv |
|
private |
◆ m_maxEta
double DerivationFramework::DiphotonVertexDecorator::m_maxEta |
|
private |
◆ m_minPhotonPt
double DerivationFramework::DiphotonVertexDecorator::m_minPhotonPt |
|
private |
◆ m_pfoToolName
std::string DerivationFramework::DiphotonVertexDecorator::m_pfoToolName |
|
private |
◆ m_photonKey
◆ m_photonVertexSelectionTool
ToolHandle<CP::IPhotonVertexSelectionTool> DerivationFramework::DiphotonVertexDecorator::m_photonVertexSelectionTool {this, "PhotonVertexSelectionTool", "", ""} |
|
private |
◆ m_primaryVertexKey
◆ m_removeCrack
bool DerivationFramework::DiphotonVertexDecorator::m_removeCrack |
|
private |
◆ m_tcMatch_dR
double DerivationFramework::DiphotonVertexDecorator::m_tcMatch_dR |
|
private |
◆ m_tcMatch_maxRat
double DerivationFramework::DiphotonVertexDecorator::m_tcMatch_maxRat |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
Scalar eta() const
pseudorapidity method
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
uint16_t author(uint16_t bitmask=EgammaParameters::AuthorALL) const
Get author.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool PhotonPreselect(const xAOD::Photon *ph) const
#define ATH_MSG_VERBOSE(x)
Class providing the definition of the 4-vector interface.
const DV * asDataVector() const
Return a pointer to this object, as a const DataVector.
virtual void setOwner(IDataHandleHolder *o)=0
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Description of a calorimeter cluster.
(Non-const) Iterator class for DataVector/DataList.
const uint16_t AuthorCaloTopo35
Photon reconstructed by SW CaloTopo35 seeded clusters.
static bool greaterPtFlowElement(const xAOD::FlowElement *part1, const xAOD::FlowElement *part2)
StatusCode matchFlowElement(const xAOD::Photon *eg, const xAOD::FlowElementContainer *pfoCont) const
ToolHandle< CP::IPhotonVertexSelectionTool > m_photonVertexSelectionTool
const xAOD::CaloCluster * caloCluster(size_t index=0) const
Pointer to the xAOD::CaloCluster/s that define the electron candidate.
SG::ReadHandleKey< xAOD::FlowElementContainer > m_FEContainerHandleKey
SG::ReadHandleKey< xAOD::VertexContainer > m_primaryVertexKey
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
float z() const
Returns the z position.
size_t index() const
Return the index of this element within its container.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
ElementLink< xAOD::PhotonContainer > phlink_t
SG::WriteHandleKey< xAOD::VertexContainer > m_diphotonVertexKey
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.
Class describing a Vertex.
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)
DataVector adapter that acts like it holds const pointers.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
virtual double pt() const override final
The transverse momentum ( ) of the particle.
SG::ReadHandleKey< xAOD::PhotonContainer > m_photonKey
bool isInDeltaR(const xAOD::IParticle &p1, const xAOD::IParticle &p2, double dR, bool useRapidity=true)
Check if 2 xAOD::IParticle are in a cone.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
virtual double e() const =0
The total energy of the particle.
bool passSelection(bool &value, const std::string &menu) const
Check if the egamma object pass a selection menu (using the name) If the menu decision is stored in t...
bool isGoodOQ(uint32_t mask) const
Check object quality. Return True is it is Good Object Quality.