29#define CHECK_HITS(EXP) \
31 ATH_MSG_WARNING("Failed \"" << #EXP << "\""); \
44 "Minimum number of silicon hits to be an electron==>not photon for sure");
48 "Minimum number of Pixel hits to be an electron==>not photon for sure");
51 "Maximum EoverP , more that this is ambiguous");
53 "minPCut",
m_minPtCut = 2000,
"Minimum Pt, less than that is ambiguous");
56 "Maximum value for Rconv - RfirstHit for Si+Si conversions "
57 "where both tracks have innermost hits");
60 "If true classify as ambiguous when there is no vertex and "
62 "If false classify no vertex as for sure not photon");
65 "When used as a selector accept the ambiguous as default");
70 return StatusCode::SUCCESS;
89 uint8_t trkPixelHits(0);
97 trkSiHits += trkPixelHits;
106 size_t nTrkVxWithInnermostHit{};
115 ATH_MSG_DEBUG(
"Vertex, SiSi, tracks with innermost pixel hits: "
116 << (vx !=
nullptr) <<
", " << vxDoubleSi <<
", " << nTrkVxWithInnermostHit);
117 ATH_MSG_DEBUG(
"Track, Si hits, pixel hits, has innermost pixel hit: "
118 << (tp !=
nullptr) <<
", " << (
int) trkSiHits <<
", " << (
int) trkPixelHits
119 <<
" , " << (
int) trkHasInnermostHit);
140 (vxDoubleSi && !trkPixelHits && shareTrack)){
150 double track_ep = cluster_e * fabs(tp->qOverP());
195 ATH_MSG_DEBUG(
"Returning Ambiguous due to no conv vertex and track with "
196 "no innermost hits");
203 if (trkHasInnermostHit && (!vxDoubleSi || nTrkVxWithInnermostHit == 1 ||
221 const double track_p = fabs(1.0/tp->qOverP());
223 type = !vxDoubleSi || (fabs(track_p - cluster_e) < fabs(vertex_p- cluster_e))?
255 ATH_MSG_DEBUG(
"Author Fwd of Topo seeded. Do not do overlap or ambiguity");
260 if (!
egamma.ambiguousObject()){
273 if (!electron || !photon){
282 electron->trackParticle(),
311 uint8_t trkExpectHit(0);
314 if (trkNhits) {
return true;}
317 if (trkExpectHit) {
return false;}
320 if (trkNhits) {
return true;}
323 if (trkExpectHit) {
return false;}
335 if (!tp) {
ATH_MSG_WARNING(
"Null pointer to track particle in vertex");}
345 if (!tp) {
ATH_MSG_WARNING(
"Null pointer to track particle in vertex");}
346 if (tp == &trk) {
return true;}
#define ATH_MSG_WARNING(x)
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
SG::Accessor< T, ALLOC > Accessor
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
unsigned int author() const
Reconstruction Author.
ClusterSize clusterSize() const
Get cluster size.
virtual double e() const
The total energy of the particle.
flt_t altE() const
Get Energy in signal state ALTCALIBRATED.
size_t nTrackParticles() const
Get the number of tracks associated with this vertex.
const TrackParticle * trackParticle(size_t i) const
Get the pointer to a given track that was used in vertex reco.
@ Photon
The object is a photon.
@ Electron
The object is an electron.
Amg::Vector3D momentumAtVertex(const xAOD::Photon *, bool debug=false)
return the momentum at the vertex (which can be 0)
xAOD::EgammaParameters::ConversionType conversionType(const xAOD::Photon *ph)
return the photon conversion type (see EgammaEnums)
float conversionRadius(const xAOD::Vertex *vx)
return the conversion radius or 9999.
const uint16_t AuthorPhoton
Object Reconstructed by standard cluster-based algorithm.
const uint16_t AuthorCaloTopo35
Photon reconstructed by SW CaloTopo35 seeded clusters.
@ doubleSi
two tracks, both with Si hits
const uint16_t AuthorElectron
Object Reconstructed by standard cluster-based algorithm.
const uint16_t AuthorAmbiguous
Object Reconstructed by standard cluster-based algorithm.
const uint16_t AuthorFwdElectron
Electron reconstructed by the Forward cluster-based algorithm.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Vertex_v1 Vertex
Define the latest version of the vertex class.
Egamma_v1 Egamma
Definition of the current "egamma version".
Photon_v1 Photon
Definition of the current "egamma version".
@ expectInnermostPixelLayerHit
Do we expect a 0th-layer barrel hit for this track?
@ numberOfNextToInnermostPixelLayerHits
these are the hits in the 1st pixel barrel layer
@ expectNextToInnermostPixelLayerHit
Do we expect a 1st-layer barrel hit for this track?
@ numberOfSCTHits
number of hits in SCT [unit8_t].
@ numberOfInnermostPixelLayerHits
these are the hits in the 0th pixel barrel layer
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].
Electron_v1 Electron
Definition of the current "egamma version".