 |
ATLAS Offline Software
|
#include <DiphotonVertexDecorator.h>
|
| 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 |
| |
- Author
- Bruno Lenzi
-
Leo Cerda
-
magda.nosp@m.c@ce.nosp@m.rn.ch
Definition at line 37 of file DiphotonVertexDecorator.h.
◆ DiphotonVertexDecorator()
| DerivationFramework::DiphotonVertexDecorator::DiphotonVertexDecorator |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
◆ ~DiphotonVertexDecorator()
| DerivationFramework::DiphotonVertexDecorator::~DiphotonVertexDecorator |
( |
| ) |
|
◆ addBranches()
| StatusCode DerivationFramework::DiphotonVertexDecorator::addBranches |
( |
const EventContext & |
ctx | ) |
const |
|
virtual |
Definition at line 65 of file DiphotonVertexDecorator.cxx.
71 if (!PV->empty() && PV->at(0)) {
72 ATH_MSG_DEBUG(
"Default PV " << PV->at(0) <<
", type = " << PV->at(0)->vertexType() <<
" , z = " << PV->at(0)->z() );
83 if (not ph1 or ph->pt() > ph1->
pt())
88 else if (not ph2 or ph->pt() > ph2->pt()) ph2 = ph;
99 std::vector<std::pair<const xAOD::Vertex*, float> > vxResult;
104 for(
const auto *
const fe : *FEHandle) passORDec(*fe) =
true;
109 if(!vxResult.empty()) {
110 newPV = vxResult[0].first;
117 ATH_MSG_DEBUG(
"PhotonVertexSelection returns vertex " << newPV <<
" " << (newPV? Form(
" with z = %g", newPV->
z()) :
"") );
120 HggPV.second->setShallowIO(
false);
123 ATH_CHECK(vertexContainer.recordNonConst(std::unique_ptr< xAOD::VertexContainer >(HggPV.first),
124 std::unique_ptr< xAOD::ShallowAuxContainer >(HggPV.second)));
135 for (
unsigned int iPV=0; iPV<PV->size(); iPV++) {
136 const auto *vx = PV->at(iPV);
137 auto yyvx = (HggPV.first)->at(iPV);
147 for (
const auto& vxR: vxResult) {
149 if ( vx == vxR.first ) {
150 vertexScoreAcc(*yyvx) = vxR.second;
151 vertexFailTypeAcc(*yyvx) = vertexFailType;
152 vertexCaseAcc(*yyvx) = yyvertexVtxType;
153 leadingPhotonLinkAcc(*yyvx) =
phlink_t(*photons, ph1->
index());
154 subleadingPhotonLinkAcc(*yyvx) =
phlink_t(*photons, ph2->index());
164 for(yyvx_itr = (HggPV.first)->begin(); yyvx_itr != yyvx_end; ++yyvx_itr ) {
166 vertexScoreAcc(**yyvx_itr) = -9999;
167 vertexFailTypeAcc(**yyvx_itr) = vertexFailType;
168 vertexCaseAcc(**yyvx_itr) = yyvertexVtxType;
169 leadingPhotonLinkAcc(**yyvx_itr) = (
phlink_t()) ;
170 subleadingPhotonLinkAcc(**yyvx_itr) = (
phlink_t());
180 return StatusCode::SUCCESS;
◆ finalize()
| StatusCode DerivationFramework::DiphotonVertexDecorator::finalize |
( |
| ) |
|
◆ greaterPtFlowElement()
◆ initialize()
| StatusCode DerivationFramework::DiphotonVertexDecorator::initialize |
( |
| ) |
|
◆ matchFlowElement()
Definition at line 220 of file DiphotonVertexDecorator.cxx.
224 std::vector<const xAOD::FlowElement*> nearbyFE;
225 nearbyFE.reserve(20);
226 for(
const auto *
const fe : *feCont) {
228 if( ( !fe->isCharged() && fe->e() > FLT_MIN )) nearbyFE.push_back(fe);
234 double eg_cl_e = swclus->
e();
239 for(
const auto& fe : nearbyFE) {
242 double fe_e = fe->e();
245 ATH_MSG_VERBOSE(
"Reject topocluster in sum. Ratio vs eg cluster: " << (fe_e/eg_cl_e));
246 if( !bestbadmatch || (std::abs(fe_e/eg_cl_e-1.) < std::abs(bestbadmatch->
e()/eg_cl_e-1.)) ) bestbadmatch = fe;
250 ATH_MSG_VERBOSE(
"E match with new nFE: " << std::abs(sumE_fe+fe_e - eg_cl_e) / eg_cl_e);
251 if( (doSum = std::abs(sumE_fe+fe_e-eg_cl_e) < std::abs(sumE_fe - eg_cl_e)) ) {
252 passORDec(*fe) =
false;
257 if(sumE_fe<FLT_MIN && bestbadmatch) {
258 passORDec(*bestbadmatch) =
false;
261 return StatusCode::SUCCESS;
◆ PhotonPreselect()
| bool DerivationFramework::DiphotonVertexDecorator::PhotonPreselect |
( |
const xAOD::Photon * |
ph | ) |
const |
|
private |
Definition at line 183 of file DiphotonVertexDecorator.cxx.
186 if (!ph)
return false;
188 if (!ph->
isGoodOQ(34214))
return false;
194 if(DFCommonPhotonsIsEMLooseAcc.isAvailable(*ph)){
196 val =
static_cast<bool>(DFCommonPhotonsIsEMLooseAcc(*ph));
202 if(!defined || !
val)
return false;
209 double eta = std::abs(caloCluster->etaBE(2));
◆ m_diphotonVertexKey
◆ 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 |
The documentation for this class was generated from the following files:
Scalar eta() const
pseudorapidity method
uint16_t author(uint16_t bitmask=EgammaParameters::AuthorALL) const
Get author.
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.
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
float z() const
Returns the z position.
size_t index() const
Return the index of this element within its container.
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.
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.
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.