|
ATLAS Offline Software
|
Go to the documentation of this file.
17 #include "GaudiKernel/SystemOfUnits.h"
27 bool thereIsACentrCell =
false;
32 float clusEta = cluster->
eta();
33 float clusPhi = cluster->
phi();
34 float energymax = -999999.;
36 for (; cellIter != cellIterEnd; cellIter++) {
45 if (std::abs(
eta - clusEta) < 0.025 &&
50 cellCentrId = cellIter->
ID();
51 thereIsACentrCell =
true;
54 return thereIsACentrCell;
58 const std::vector<IdentifierHash>& neighbourList,
62 std::vector<IdentifierHash>::const_iterator
it =
63 std::find(neighbourList.begin(), neighbourList.end(), hashId);
64 return (
it != neighbourList.end());
67 std::vector<IdentifierHash>
72 std::vector<IdentifierHash> neighbourList;
84 iflag |= (0x1 << parameter);
88 template <
typename ...T>
90 const ToolHandle<ICaloAffectedTool> &affectedTool,
95 const int &problemType,
101 value |= affectedTool->isAffected(
114 void coreCellHelper(
const bool isMissing,
const bool isMasked,
115 const bool isSporadicNoise,
const bool isAffected,
116 const bool isHighQ,
unsigned int& iflag) {
124 void missingHelper(
const bool isPresampler,
const bool isL1,
125 const bool isStripCoreCell,
const bool isL2,
const bool isL3,
126 unsigned int& iflag) {
131 if (isStripCoreCell) {
141 void maskedHelper(
const bool isPresampler,
const bool isL1,
142 const bool isStripCoreCell,
const bool isL2,
const bool isL3,
143 unsigned int& iflag) {
156 void affectedHelper(
const bool isPresampler,
const bool isL1,
const bool isL2,
157 const bool isL3,
unsigned int& iflag) {
172 const std::string&
name,
175 , m_emHelper(nullptr)
176 , m_calocellId(nullptr)
178 declareInterface<IegammaOQFlagsBuilder>(
this);
193 return StatusCode::SUCCESS;
199 return StatusCode::SUCCESS;
209 return StatusCode::SUCCESS;
211 if (cluster->
size() == 0) {
212 return StatusCode::SUCCESS;
215 const float clusterEta = cluster->
eta();
222 if (etaSize == 0 && phiSize == 0) {
233 unsigned int iflag =
eg.OQ();
245 double energyCellMax = 0;
248 bool foundCentralCell = findCentralCell(cluster, cellCentrId);
249 if (foundCentralCell) {
251 std::vector<IdentifierHash> neighbourList =
260 for (; cellIter != cellIterEnd; cellIter++) {
266 if (
cell->caloDDE()->is_tile()) {
273 const bool isHighQ =
qual >= 4000;
276 const bool isMissing = ((
cell->provenance() & 0x0A00) == 0x0A00);
277 const bool isMasked = ((
cell->provenance() & 0x0A00) == 0x0800);
288 if ((
cell->provenance() & 0x2000) && !(
cell->provenance() & 0x0800)) {
290 if (
cell->e() > energyCellMax) {
291 energyCellMax =
cell->e();
299 bool isStripCoreCell =
false;
301 std::abs(
eta - clusterEta) < 0.025 / 2.) {
302 isStripCoreCell =
true;
313 const bool isAffected =
319 const bool isSporadicNoise =
323 coreCellHelper(isMissing, isMasked, isSporadicNoise, isAffected,
328 missingHelper(isPresampler, isL1, isStripCoreCell, isL2, isL3, iflag);
331 maskedHelper(isPresampler, isL1, isStripCoreCell, isL2, isL3, iflag);
334 affectedHelper(isPresampler, isL1, isL2, isL3, iflag);
343 double egammaLArQCleaning = 0;
345 egammaLArQCleaning = badE / totE;
353 double ratioCell = 0;
355 ratioCell = energyCellMax / totE;
371 ATH_MSG_WARNING(
"Do not have affected regions info, is this expected ?");
375 deta = 0.5 * 0.025 * etaSize;
376 dphi = 0.5 * 0.025 * phiSize;
378 bool isNonNominalHVPS = chainIsAffected(
388 bool isDeadHVPS = chainIsAffected(
400 deta = 0.5 * 0.025 * 3.;
401 dphi = 0.5 * 0.025 * 3.;
402 bool isDeadHVS2Core = chainIsAffected(
414 deta = 0.5 * 0.025 * etaSize;
415 dphi = 0.5 * 0.025 * phiSize;
417 bool isNonNominalHVS1S2S3 = chainIsAffected(
432 bool isDeadHVS1S2S3Edge = chainIsAffected(
449 return StatusCode::SUCCESS;
def retrieve(aClass, aKey=None)
@ MissingFEBCellEdgePS
Missing FEB in the edge of the cluster.
virtual double phi() const
The azimuthal angle ( ) of the particle.
bool shortProblem() const
std::vector< CaloAffectedRegionInfo > CaloAffectedRegionInfoVec
flt_t time() const
Access cluster time.
SG::ReadCondHandleKey< CaloAffectedRegionInfoVec > m_affKey
const_cell_iterator cell_begin() const
Iterator of the underlying CaloClusterCellLink (const version)
@ AffectedCellCore
Affected cell in the core of the cluster.
IdentifierHash calo_cell_hash(const Identifier cellId) const
create hash id from 'global' cell id
Scalar phi() const
phi method
@ LArQCleaning
Cleaning based on LArQ factor--> sum[ E(Q>4000)/E].
std::string find(const std::string &s)
return a remapped string
bool unstableNoiseLG() const
ToolHandle< ICaloAffectedTool > m_affectedTool
@ HighQEdge
High quality factor cell in the edge of the cluster.
Scalar eta() const
pseudorapidity method
@ HECHighQ
High quality factor cell in the HEC.
StatusCode finalize()
finalize method
@ AffectedCellEdgeS2
Affected middle cell in the edge of the cluster.
@ MaskedCellEdgePS
Masked presampler cell in the edge of the cluster.
Conditions-Data class holding LAr Bad Channel or Bad Feb information.
Gaudi::Property< double > m_LArQCut
@ MissingFEBCellEdgeS1
Missing FEB in the edge of the cluster.
bool sporadicBurstNoise() const
@ BadS1Core
Missing FEB or masked cell in S1 core (corresponding to the 8 strips in front of the core of the clus...
Gaudi::Property< double > m_QCellSporCut
@ MissingFEBCellEdgeS2
Missing FEB in the edge of the cluster.
const CaloCell_ID * m_calocellId
SG::ReadCondHandleKey< LArBadChannelCont > m_bcContKey
Handle to bad-channel CDO.
@ NonNominalHVPS
Non Nominal High Voltage in the EM Presampler.
@ MaskedCellEdgeS1
Masked strip cell in the edge of the cluster.
LArBC_t offlineStatus(const Identifier id) const
Query the status of a particular channel by offline ID This is the main client access method.
virtual StatusCode execute(const EventContext &ctx, xAOD::Egamma &egamma) const
standard execute method
const LArEM_ID * m_emHelper
Gaudi::Property< double > m_QCellHECCut
Gaudi::Property< double > m_RcellCut
@ DeadHVPS
Dead High Voltage in the EM Presampler.
@ AffectedCellEdgeS1
Affected strip cell in the edge of the cluster.
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
@ MissingFEBCellEdgeS3
Missing FEB in the edge of the cluster.
bool unstableNoiseHG() const
Gaudi::Property< double > m_TCut
bool isBarrel(const xAOD::Egamma *eg)
return true if the cluster is in the barrel
Description of a calorimeter cluster.
double deltaPhi(double phiA, double phiB)
delta Phi in range [-pi,pi[
@ HighQCore
High quality factor cell in the core of the cluster.
@ MaskedCellEdgeS2
Masked middle cell in the edge of the cluster.
unsigned int getClusterEtaSize() const
Get eta size from cluster size.
virtual double eta() const
The pseudorapidity ( ) of the particle.
::StatusCode StatusCode
StatusCode definition for legacy code.
bool unstableNoiseMG() const
@ NonNominalHVS1S2S3
Non Nominal High Voltage in the EM strips, middle and back.
size_t size() const
size method (forwarded from CaloClusterCellLink obj)
@ AffectedCellEdgeS3
Affected back cell in the edge of the cluster.
Helper class for offline cell identifiers.
egammaOQFlagsBuilder(const std::string &type, const std::string &name, const IInterface *parent)
Default constructor.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
unsigned int getClusterPhiSize() const
Get phi size from cluster size.
@ MissingFEBCellCore
Missing FEB in the core of the cluster.
SG::ReadHandleKey< CaloCellContainer > m_cellsKey
bool peculiarCalibrationLine() const
int get_neighbours(const IdentifierHash id, const LArNeighbours::neighbourOption &option, std::vector< IdentifierHash > &neighbourList) const
access to hashes for neighbours return == 0 for neighbours found option = prevInPhi,...
StatusCode initialize(bool used=true)
StatusCode initialize()
initialize method
Identifier ID() const
get ID (from cached data member) non-virtual and inline for fast access
@ DeadHVS1S2S3Edge
Dead High Voltage in the EM strips, middle and back affecting the edge of the cluster.
@ SporadicNoiseLowQEdge
Sporadic noisy cell in the edge of the cluster.
@ AffectedCellEdgePS
Affected presampler cell in the edge of the cluster.
@ HighRcell
High R_cell -—> Energy of the most energetic cell / total energy of the cluster.
Data object for each calorimeter readout cell.
#define ATH_MSG_WARNING(x)
const_cell_iterator cell_end() const
@ OutTime
Out of time cell.
@ MaskedCellEdgeS3
Masked back cell in the edge of the cluster.
Helper class for LArEM offline identifiers.
Handle class for reading from StoreGate.
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
const_iterator to loop over cells belonging to a cluster
@ SporadicNoiseLowQCore
Sporadic noisy cell in the core of the cluster.
@ DeadHVS1S2S3Core
Dead High Voltage in the EM strips, middle and back affecting the core of the cluster.
virtual double e() const
The total energy of the particle.
Gaudi::Property< double > m_QCellCut
Gaudi::Property< double > m_TCutVsE
@ MaskedCellCore
Masked cell in the core of the cluster.