6#include "CLHEP/Units/PhysicalConstants.h"
7#include "CLHEP/Units/SystemOfUnits.h"
22 return StatusCode::SUCCESS;
25 return StatusCode::SUCCESS;
28 return StatusCode::SUCCESS;
35 float track_p = (electron->trackParticle())->pt()*std::cosh((electron->trackParticle())->eta());
36 if (track_p != 0.) eoverp = (electron->caloCluster())->e()/track_p;
41 if ((fabs(eoverp) < 0.7) || (fabs(eoverp) > 1.5) ){
42 ATH_MSG_DEBUG (
"(eOverP) E/p is out of range! (eoverp="<<eoverp<<
").");
58 ATH_MSG_DEBUG (
"(trackSelectionElectrons) No track particle for Tag check.");
63 ATH_MSG_DEBUG (
"(trackSelectionElectrons) No caloCluster associated for Tag check.");
68 if (! ( (trackElectron->
pt() *
GeV ) > 7) ){
69 ATH_MSG_DEBUG (
"(trackSelectionElectrons) Pt_Track of the electron is below 7 GeV. Electron rejected.");
73 if (! (fabs(trackElectron->
eta()) < 2.47 )){
74 ATH_MSG_DEBUG (
"(trackSelectionElectrons) Electron track_eta is above 2.47. Electron rejected.");
81 bool isPrimVtx =
false;
82 bool passDeltaZ0sin =
false;
86 float delta_z0 = fabs(trackElectron->
z0() + trackElectron->
vz() - vertex->z());
87 float delta_z0_sin = delta_z0 * sin(trackElectron->
theta());
91 passDeltaZ0sin =
true;
93 ATH_MSG_DEBUG (
"(trackSelectionElectrons) delta_z0_sin < 0.5 mm ("<< delta_z0_sin <<
")");
94 ATH_MSG_DEBUG (
"(trackSelectionElectrons) There is a primary vertex in the event.");
100 if (!( isPrimVtx && passDeltaZ0sin)){
101 ATH_MSG_DEBUG (
"(trackSelectionElectrons) For this Tag, delta_z0_sin > 0.5mm, and there is NO primary vertices in the event. Rejecting electron.");
112 ATH_MSG_DEBUG(
"(trackSelectionElectrons) Electron accepted.");
118 if ( fabs(el->eta()) > 1.475 ){
119 ATH_MSG_DEBUG (
"(isTagElectron) Electron |eta| > 1.475 (" << fabs(el->eta()) <<
").");
125 float absEta = fabs(el->caloCluster()->etaBE(2));
127 ATH_MSG_DEBUG (
"(isTagElectron) Selecting Tag Electron Eta is inside crack region.");
140 float elTagEt = el->e()/(cosh(el->trackParticle()->eta()));
141 float elTagPt = el->pt();
143 ATH_MSG_DEBUG (
"(isTagElectron) Tag Electron Et/pT: "<< elTagEt <<
"/"<< elTagPt <<
", threshold =" <<
m_etMinTag *
GeV <<
".");
148 ATH_MSG_DEBUG (
"(isTagElectron) Checking electron object quality...");
150 ATH_MSG_DEBUG (
"(isTagElectron) \tTag Electron is a BADCLUSELECTRON.");
159 if ( fabs(el->eta()) > 1.475 ){
160 ATH_MSG_DEBUG (
"(isGoodProbeElectron) Electron |eta| > 1.475 (" << fabs(el->eta()) <<
").");
165 ATH_MSG_DEBUG (
" (isGoodProbeElectron) Checking Probe electron object quality...");
167 ATH_MSG_DEBUG (
" (isGoodProbeElectron) \tProbe Electron is a BADCLUSELECTRON.");
172 float electronPt = el->pt();
179 float absEta = fabs(el->caloCluster()->etaBE(2));
181 ATH_MSG_DEBUG (
"(isGoodProbeElectron) Electron Eta inside LAr crack region...");
192 ATH_MSG_DEBUG (
"(isGoodProbeElectron) Electron is a good probe!");
197 if ( (absEta > 1.37 && absEta < 1.52) || (absEta > 2.47) ){
206 if (cell->caloDDE()->is_tile())
return 0;
207 else if (cell->caloDDE()->is_lar_em_barrel())
return 1;
208 else if (cell->caloDDE()->is_lar_em_endcap_inner())
return 2;
209 else if (cell->caloDDE()->is_lar_em_endcap_outer())
return 3;
210 else if (cell->caloDDE()->is_lar_hec())
return 4;
211 else if (cell->caloDDE()->is_lar_fcal())
return 5;
213 ATH_MSG_ERROR (
" #### Region not found for cell offline ID "<< cell->ID() <<
" ! Returning -999.");
Scalar phi() const
phi method
#define ATH_MSG_WARNING(x)
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Data object for each calorimeter readout cell.
std::vector< float > * m_vtx_x
Gaudi::Property< bool > m_doTruthEventDump
std::vector< std::vector< double > > * m_c_channelShape
std::vector< float > * m_el_deltae
std::vector< float > * m_c_channelPed
Gaudi::Property< bool > m_doAssocTopoCluster711Dump
std::vector< int > * m_c_clusterIndex_rawChLvl
Gaudi::Property< float > m_d0TagSig
std::vector< double > * m_c_clusterEnergy
unsigned long long m_e_eventNumber
std::vector< double > * m_c711_cellEnergy
std::vector< float > * m_c_rawChannelQuality
std::vector< int > * m_c711_cellRegion
std::vector< float > * m_el_fracs1
std::vector< double > * m_c711_channelTime
std::vector< int > * m_c_cellRegion
std::vector< unsigned int > * m_c_channelChannelIdMap
std::vector< float > * m_ph_energy
std::vector< double > * m_zee_py
std::vector< float > * m_el_wtots1
std::vector< double > * m_hits_cellPhi
std::vector< int > * m_c711_cellLayer
virtual StatusCode initialize() override
std::vector< double > * m_c711_cellToClusterDEta
std::vector< float > * m_el_Phi
std::vector< std::vector< double > > * m_c_channelShapeDer
Gaudi::Property< bool > m_doLArEMBHitsDump
float m_e_outOfTimePileUp
std::vector< int > * m_c_clusterChannelIndex
Gaudi::Property< float > m_z0Tag
void bookDatabaseBranches(TTree *tree)
std::vector< double > * m_zee_px
std::vector< float > * m_ph_eta
std::vector< double > * m_zee_deltaR
std::vector< int > * m_c711_clusterCellIndex
std::vector< std::vector< float > > * m_lb_bcidLuminosity
std::vector< bool > * m_c_channelBad
std::vector< int > * m_c711_rawChannelLayer
std::vector< float > * m_c711_channelOfflHVScale
std::vector< double > * m_hits_energyConv
std::vector< double > * m_c_cellTime
std::vector< float > * m_c711_rawChannelAmplitude
std::vector< int > * m_c711_clusterIndex
std::vector< float > * m_c_rawChannelProv
std::vector< float > * m_el_e277
std::vector< int > * m_c711_cellGain
std::vector< float > * m_el_rhad
std::vector< double > * m_c711_clusterTime
std::vector< float > * m_c711_rawChannelQuality
std::vector< double > * m_vtx_d0sig
std::vector< int > * m_mc_vert_status
std::vector< std::vector< double > > * m_c_channelOFCb
std::vector< int > * m_c711_clusterIndex_rawChLvl
std::vector< float > * m_mc_vert_phi
int m_c_clusterIndexCounter
std::vector< std::vector< double > > * m_c_channelOFCa
std::vector< int > * m_mc_part_pdgId
std::vector< float > * m_c711_clusterRawChannelIndex
std::vector< float > * m_c_rawChannelAmplitude
std::vector< float > * m_mc_vert_z
std::vector< float > * m_c711_rawChannelPed
std::vector< double > * m_c_cellPhi
std::vector< int > * m_c711_electronIndex_clusterLvl
std::vector< float > * m_vtx_delta_z0_sin
std::vector< double > * m_c_cellEnergy
std::vector< std::vector< float > > * m_c711_channelDigits
int getCaloRegionIndex(const CaloCell *cell)
std::vector< double > * m_c711_channelOFCTimeOffset
std::vector< int > * m_c_clusterIndex_chLvl
std::vector< float > * m_mc_vert_y
std::vector< double > * m_zee_pt
std::vector< float > * m_hits_sampFrac
std::vector< int > * m_c_cellLayer
std::vector< double > * m_c_clusterPt
bool isGoodProbeElectron(const xAOD::Electron *el)
std::vector< float > * m_c_rawChannelPed
std::vector< float > * m_mc_part_pt
std::vector< int > * m_c_clusterIndex
std::vector< double > * m_c_cellToClusterDPhi
std::vector< float > * m_c_channelNoise
std::vector< int > * m_hits_clusterChannelIndex
std::vector< float > * m_c711_channelPed
double deltaPhi(double phi1, double phi2)
std::vector< double > * m_c711_clusterEta
std::vector< float > * m_el_f1
std::vector< float > * m_c_clusterRawChannelIndex
std::vector< float > * m_el_Pt
std::vector< float > * m_c711_channelEffectiveSigma
std::vector< int > * m_c_clusterCellIndex
bool isTagElectron(const xAOD::Electron *electron)
std::vector< float > * m_ph_pt
std::vector< float > * m_c_channelEffectiveSigma
std::vector< unsigned int > * m_c_channelHashMap
bool trackSelectionElectrons(const xAOD::Electron *electron, SG::ReadHandle< xAOD::VertexContainer > &primVertexCnt, SG::ReadHandle< xAOD::EventInfo > &ei)
std::vector< int > * m_c711_clusterChannelIndex
std::vector< int > * m_c_rawChannelLayer
std::vector< double > * m_c711_cellDPhi
std::vector< int > * m_c711_channelLayer
std::vector< std::vector< float > > * m_c_channelDigits
std::vector< double > * m_c_cellEta
std::vector< double > * m_c_cellDEta
std::vector< float > * m_c711_channelMinBiasAvg
std::vector< float > * m_c711_rawChannelTime
std::vector< double > * m_c711_cellTime
std::vector< std::vector< double > > * m_c711_channelShapeDer
std::vector< float > * m_ph_phi
std::vector< double > * m_hits_cellEta
Gaudi::Property< bool > m_doTruthPartDump
std::vector< float > * m_c_channelOfflEneRescaler
std::vector< double > * m_zee_M
std::vector< float > * m_c711_channelDSPThreshold
std::vector< double > * m_zee_pz
std::vector< double > * m_c711_clusterPhi
std::vector< std::vector< int > > * m_c711_rawChannelChInfo
std::vector< double > * m_c_cellDPhi
std::vector< float > * m_el_rhad1
std::vector< float > * m_el_weta1
unsigned int m_e_runNumber
std::vector< bool > * m_c711_channelBad
EventReaderBaseAlg(const std::string &name, ISvcLocator *pSvcLocator)
std::vector< float > * m_el_et
std::vector< double > * m_c711_clusterPt
bool isEtaOutsideLArCrack(float absEta)
std::vector< std::vector< int > > * m_c711_channelChInfo
std::vector< float > * m_vtx_z
std::vector< int > * m_lb_lumiblock
int * m_c711_clusterIndexCounter
std::vector< int > * m_c_channelLayer
std::vector< double > * m_zee_T
std::vector< int > * m_c711_clusterIndex_cellLvl
std::vector< double > * m_c_clusterPhi
std::vector< double > * m_c711_clusterEnergy
std::vector< int > * m_el_index
std::vector< std::vector< int > > * m_c_rawChannelChInfo
std::vector< double > * m_c711_cellPhi
std::vector< double > * m_c711_cellEta
std::vector< int > * m_mc_part_status
Gaudi::Property< bool > m_doTagAndProbe
int * m_c711_cellIndexCounter
std::vector< std::vector< double > > * m_c711_channelOFCa
Gaudi::Property< float > m_etMinTag
Gaudi::Property< bool > m_isMC
std::vector< int > * m_mc_vert_uniqueID
std::vector< double > * m_hits_energy
std::vector< float > * m_c_channelADC2MEV1
std::vector< float > * m_mc_part_eta
std::vector< float > * m_mc_part_energy
std::vector< std::vector< double > > * m_c711_channelShape
std::vector< float > * m_el_Eta
std::vector< float > * m_c_channelOfflHVScale
std::vector< double > * m_c_channelTime
std::vector< double > * m_c711_cellDEta
Gaudi::Property< bool > m_getLArCalibConstants
std::vector< int > * m_c_clusterIndex_cellLvl
std::vector< double > * m_c_clusterTime
void bookBranches(TTree *tree)
Gaudi::Property< std::string > m_offProbeTightness
Define the PID for tag electron.
virtual StatusCode finalize() override
std::vector< float > * m_c_channelMinBiasAvg
std::vector< float > * m_mc_vert_time
std::vector< int > * m_c711_clusterIndex_chLvl
std::vector< float > * m_c_channelDSPThreshold
std::vector< float > * m_c711_channelNoise
std::vector< double > * m_c_clusterEta
std::vector< int > * m_c_cellGain
std::vector< float > * m_mc_part_phi
std::vector< double > * m_c711_channelEnergy
std::vector< float > * m_c_channelADC2MEV0
std::vector< int > * m_c_electronIndex_clusterLvl
std::vector< float > * m_mc_part_m
std::vector< double > * m_zee_E
std::vector< std::vector< double > > * m_c711_channelOFCb
std::vector< float > * m_mc_vert_x
std::vector< float > * m_c711_channelADC2MEV0
std::vector< float > * m_c711_channelOfflEneRescaler
std::vector< float > * m_vtx_deltaZ0
std::vector< double > * m_c711_cellToClusterDPhi
std::vector< int > * m_hits_sampling
std::vector< std::vector< int > > * m_c_channelChInfo
std::vector< float > * m_c_rawChannelDSPThreshold
std::vector< float > * m_vtx_y
std::vector< double > * m_c_channelEnergy
std::vector< float > * m_el_rphi
Gaudi::Property< bool > m_doElecSelectByTrackOnly
Gaudi::Property< bool > m_doPhotonDump
std::vector< double > * m_c_channelOFCTimeOffset
std::vector< unsigned int > * m_c711_rawChannelIdMap
std::vector< float > * m_el_eratio
Gaudi::Property< float > m_etMinProbe
define the Pid of Probe from the user
std::vector< unsigned int > * m_hits_hash
std::vector< float > * m_c_rawChannelTime
Gaudi::Property< bool > m_noBadCells
std::vector< float > * m_ph_m
std::vector< float > * m_c711_rawChannelDSPThreshold
std::vector< float > * m_mc_vert_eta
std::vector< float > * m_c711_rawChannelProv
std::vector< int > * m_mc_part_uniqueID
std::vector< float > * m_el_f3
std::vector< float > * m_el_reta
std::vector< unsigned int > * m_c711_channelChannelIdMap
std::vector< int > * m_hits_clusterIndex_chLvl
std::vector< float > * m_mc_vert_perp
std::vector< float > * m_c711_channelADC2MEV1
Gaudi::Property< std::string > m_offTagTightness
virtual StatusCode execute() override
double deltaR(double eta, double phi)
bool eOverPElectron(const xAOD::Electron *electron)
std::vector< float > * m_el_weta2
std::vector< float > * m_el_eoverp
std::vector< float > * m_el_m
std::vector< double > * m_c_cellToClusterDEta
std::vector< unsigned int > * m_c_rawChannelIdMap
std::vector< double > * m_hits_time
double fixPhi(double phi)
std::vector< unsigned int > * m_c711_channelHashMap
virtual ~EventReaderBaseAlg() override
float z0() const
Returns the parameter.
float theta() const
Returns the parameter, which has range 0 to .
float vz() const
The z origin for the parameters.
virtual double pt() const override final
The transverse momentum ( ) of the particle.
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
const uint32_t BADCLUSELECTRON
double d0significance(const xAOD::TrackParticle *tp, double d0_uncert_beam_spot_2)
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.
Electron_v1 Electron
Definition of the current "egamma version".