 |
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 |
|
virtual |
Definition at line 65 of file DiphotonVertexDecorator.cxx.
72 if (!PV->empty() && PV->at(0)) {
73 ATH_MSG_DEBUG(
"Default PV " << PV->at(0) <<
", type = " << PV->at(0)->vertexType() <<
" , z = " << PV->at(0)->z() );
84 if (not ph1 or ph->pt() > ph1->
pt())
89 else if (not ph2 or ph->pt() > ph2->pt()) ph2 = ph;
100 std::vector<std::pair<const xAOD::Vertex*, float> > vxResult;
105 for(
const auto *
const fe : *FEHandle) passORDec(*fe) =
true;
110 if(!vxResult.empty()) {
111 newPV = vxResult[0].first;
118 ATH_MSG_DEBUG(
"PhotonVertexSelection returns vertex " << newPV <<
" " << (newPV? Form(
" with z = %g", newPV->
z()) :
"") );
121 HggPV.second->setShallowIO(
false);
124 ATH_CHECK(vertexContainer.recordNonConst(std::unique_ptr< xAOD::VertexContainer >(HggPV.first),
125 std::unique_ptr< xAOD::ShallowAuxContainer >(HggPV.second)));
136 for (
unsigned int iPV=0; iPV<PV->size(); iPV++) {
137 const auto *vx = PV->at(iPV);
138 auto yyvx = (HggPV.first)->at(iPV);
148 for (
const auto& vxR: vxResult) {
150 if ( vx == vxR.first ) {
151 vertexScoreAcc(*yyvx) = vxR.second;
152 vertexFailTypeAcc(*yyvx) = vertexFailType;
153 vertexCaseAcc(*yyvx) = yyvertexVtxType;
154 leadingPhotonLinkAcc(*yyvx) =
phlink_t(*photons, ph1->
index());
155 subleadingPhotonLinkAcc(*yyvx) =
phlink_t(*photons, ph2->index());
165 for(yyvx_itr = (HggPV.first)->begin(); yyvx_itr != yyvx_end; ++yyvx_itr ) {
167 vertexScoreAcc(**yyvx_itr) = -9999;
168 vertexFailTypeAcc(**yyvx_itr) = vertexFailType;
169 vertexCaseAcc(**yyvx_itr) = yyvertexVtxType;
170 leadingPhotonLinkAcc(**yyvx_itr) = (
phlink_t()) ;
171 subleadingPhotonLinkAcc(**yyvx_itr) = (
phlink_t());
181 return StatusCode::SUCCESS;
◆ finalize()
StatusCode DerivationFramework::DiphotonVertexDecorator::finalize |
( |
| ) |
|
◆ greaterPtFlowElement()
◆ initialize()
StatusCode DerivationFramework::DiphotonVertexDecorator::initialize |
( |
| ) |
|
◆ matchFlowElement()
Definition at line 221 of file DiphotonVertexDecorator.cxx.
225 std::vector<const xAOD::FlowElement*> nearbyFE;
226 nearbyFE.reserve(20);
227 for(
const auto *
const fe : *feCont) {
229 if( ( !fe->isCharged() && fe->e() > FLT_MIN )) nearbyFE.push_back(fe);
235 double eg_cl_e = swclus->
e();
240 for(
const auto& fe : nearbyFE) {
243 double fe_e = fe->e();
246 ATH_MSG_VERBOSE(
"Reject topocluster in sum. Ratio vs eg cluster: " << (fe_e/eg_cl_e));
247 if( !bestbadmatch || (std::abs(fe_e/eg_cl_e-1.) < std::abs(bestbadmatch->
e()/eg_cl_e-1.)) ) bestbadmatch = fe;
251 ATH_MSG_VERBOSE(
"E match with new nFE: " << std::abs(sumE_fe+fe_e - eg_cl_e) / eg_cl_e);
252 if( (doSum = std::abs(sumE_fe+fe_e-eg_cl_e) < std::abs(sumE_fe - eg_cl_e)) ) {
253 passORDec(*fe) =
false;
258 if(sumE_fe<FLT_MIN && bestbadmatch) {
259 passORDec(*bestbadmatch) =
false;
262 return StatusCode::SUCCESS;
◆ PhotonPreselect()
bool DerivationFramework::DiphotonVertexDecorator::PhotonPreselect |
( |
const xAOD::Photon * |
ph | ) |
const |
|
private |
Definition at line 184 of file DiphotonVertexDecorator.cxx.
187 if (!ph)
return false;
189 if (!ph->
isGoodOQ(34214))
return false;
195 if(DFCommonPhotonsIsEMLooseAcc.isAvailable(*ph)){
197 val =
static_cast<bool>(DFCommonPhotonsIsEMLooseAcc(*ph));
203 if(!defined || !
val)
return false;
210 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.