ATLAS Offline Software
Functions
DerivationFramework::CellsInCone Namespace Reference

Functions

void egammaSelect (xAOD::CaloCluster *inputCl, const CaloCellContainer *inputcells, const CaloDetDescrManager *caloMgr, const xAOD::Egamma *eg, const double dr)
 

Function Documentation

◆ egammaSelect()

void DerivationFramework::CellsInCone::egammaSelect ( xAOD::CaloCluster inputCl,
const CaloCellContainer inputcells,
const CaloDetDescrManager caloMgr,
const xAOD::Egamma eg,
const double  dr 
)

Definition at line 13 of file CellsInCone.cxx.

19 {
20 
21  std::vector<const CaloCell*> cells;
22  cells.reserve(100);
23  CaloCellList myList(caloMgr, inputcells);
24 
25  double egEta = eg->caloCluster()->etaBE(2);
26  double egPhi = eg->caloCluster()->phiBE(2);
27  std::vector<CaloSampling::CaloSample> samples = {
39  };
40 
41  for (auto samp : samples) {
42  myList.select(egEta, egPhi, dr, samp);
43  cells.insert(cells.end(), myList.begin(), myList.end());
44  }
45 
46  for (const auto* cell : cells) {
47  if (!cell || !cell->caloDDE())
48  continue;
49  int index = inputcells->findIndex(cell->caloDDE()->calo_hash());
50  if (index == -1)
51  continue;
52  inputCl->addCell(index, 1.);
53  }
54 }
RunTileCalibRec.cells
cells
Definition: RunTileCalibRec.py:271
CaloCell_ID_FCS::TileExt2
@ TileExt2
Definition: FastCaloSim_CaloCell_ID.h:39
CaloCellList
Definition: CaloCellList.h:40
constants.EMB1
int EMB1
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:53
ReadCellNoiseFromCool.cell
cell
Definition: ReadCellNoiseFromCool.py:53
ParticleTest.eg
eg
Definition: ParticleTest.py:29
index
Definition: index.py:1
CaloCell_ID_FCS::TileExt0
@ TileExt0
Definition: FastCaloSim_CaloCell_ID.h:37
CaloCell_ID_FCS::TileBar1
@ TileBar1
Definition: FastCaloSim_CaloCell_ID.h:32
python.TurnDataReader.dr
dr
Definition: TurnDataReader.py:112
CaloCell_ID_FCS::HEC2
@ HEC2
Definition: FastCaloSim_CaloCell_ID.h:29
CaloCell_ID_FCS::TileGap3
@ TileGap3
Definition: FastCaloSim_CaloCell_ID.h:36
CaloCell_ID_FCS::HEC1
@ HEC1
Definition: FastCaloSim_CaloCell_ID.h:28
constants.EMB2
int EMB2
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:54
CaloCell_ID_FCS::TileBar0
@ TileBar0
Definition: FastCaloSim_CaloCell_ID.h:31
CaloCell_ID_FCS::TileGap2
@ TileGap2
Definition: FastCaloSim_CaloCell_ID.h:35
constants.EME1
int EME1
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:55
CaloCell_ID_FCS::TileGap1
@ TileGap1
Definition: FastCaloSim_CaloCell_ID.h:34
CaloCell_ID_FCS::TileExt1
@ TileExt1
Definition: FastCaloSim_CaloCell_ID.h:38
CaloCell_ID_FCS::EME3
@ EME3
Definition: FastCaloSim_CaloCell_ID.h:26
CaloCell_ID_FCS::HEC0
@ HEC0
Definition: FastCaloSim_CaloCell_ID.h:27
CaloCell_ID_FCS::PreSamplerE
@ PreSamplerE
Definition: FastCaloSim_CaloCell_ID.h:23
CaloCell_ID_FCS::PreSamplerB
@ PreSamplerB
Definition: FastCaloSim_CaloCell_ID.h:19
xAOD::CaloCluster_v1::addCell
bool addCell(const unsigned index, const double weight)
Method to add a cell to the cluster (Beware: Kinematics not updated!)
Definition: CaloCluster_v1.h:771
CaloCellContainer::findIndex
int findIndex(const IdentifierHash theHash) const
Return index of the cell with a given hash.
Definition: CaloCellContainer.cxx:363
CaloCell_ID_FCS::HEC3
@ HEC3
Definition: FastCaloSim_CaloCell_ID.h:30
CaloCell_ID_FCS::EMB3
@ EMB3
Definition: FastCaloSim_CaloCell_ID.h:22
CaloCell_ID_FCS::TileBar2
@ TileBar2
Definition: FastCaloSim_CaloCell_ID.h:33
constants.EME2
int EME2
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:56