|
ATLAS Offline Software
|
Go to the documentation of this file.
31 return StatusCode::SUCCESS;
40 navInColl = readHandleTower.
cptr();
44 cellColl = readHandleCell.
cptr();
52 for(
const auto *towerItr : *navInColl)
66 towerItr->fillToken(cellToken,
double(1.));
71 if ( cellToken.
size() == 0 )
continue;
81 double cell_E_w=(*cellItr)->energy()*geoWeight;
85 cl->addCell(iCell,geoWeight);
88 eta_cl+=cell_E_w*(*cellItr)->eta();
89 phi_cl+=cell_E_w*(*cellItr)->phi();
90 E2_cl+=cell_E_w*cell_E_w;
91 time_cl+=cell_E_w*cell_E_w*(*cellItr)->time();
94 samplingPattern |= (0x1U<<
sample);
97 float eta0=towerItr->eta();
98 float phi0=towerItr->phi();
118 if(E2_cl < 1
e-8) time_cl=0.;
128 cl->setRawEta(eta_cl);
129 cl->setRawPhi(phi_cl);
133 cl->setAltEta(eta_cl);
134 cl->setAltPhi(phi_cl);
138 cl->setCalEta(eta_cl);
139 cl->setCalPhi(phi_cl);
143 cl->setTime(time_cl);
144 cl->setSamplingPattern(samplingPattern);
147 << std::setw(15) <<
cl->e()
148 << std::setw(15) <<
cl->eta()
149 << std::setw(15) <<
cl->phi() );
153 return StatusCode::SUCCESS;
158 return StatusCode::SUCCESS;
166 clusCollIter!= clusColl->
end(); ++clusCollIter)
178 ATH_MSG_ERROR(
"Can't get valid links to CaloCells (CaloClusterCellLink)!");
179 return StatusCode::FAILURE;
182 unsigned int ncells=0;
194 double cell_E_w=pCell->
energy();
197 eta_cl+=cell_E_w*pCell->
eta();
198 phi_cl+=cell_E_w*pCell->
phi();
208 << std::setw(15) <<
cl->e()
209 << std::setw(15) <<
cl->eta()
210 << std::setw(15) <<
cl->phi()
211 << std::setw(15) << E_cl
212 << std::setw(15) << eta_cl
213 << std::setw(15) << phi_cl
214 << std::setw(15) << ncells
215 << std::setw(15) <<
sumw );
217 return StatusCode::SUCCESS;
static std::unique_ptr< xAOD::CaloCluster > makeCluster(const CaloCellContainer *cellCont)
Creates a valid CaloCluster with a private Aux-Store and CellLink container.
StatusCode dumpClusters(xAOD::CaloClusterContainer *clusColl)
virtual StatusCode finalize()
virtual double phi() const override final
get phi (through CaloDetDescrElement)
static StatusCode AddContainerWriteHandle(SG::WriteHandle< xAOD::CaloClusterContainer > &clusColl)
Creates a new xAOD::CaloClusterContainer in the given WriteHandle + CaloClusterAuxContainer and recor...
const_pointer_type cptr()
Dereference the pointer.
SG::ReadHandleKey< INavigable4MomentumCollection > m_towerContainerKey
Name of input CaloTowerContainer, e.g CmbTower.
bool inTowerBoundary(float eta0, float phi0, float eta, float phi)
virtual StatusCode initialize()
#define ATH_MSG_VERBOSE(x)
__HOSTDEV__ double Phi_mpi_pi(double)
SG::WriteHandleKey< xAOD::CaloClusterContainer > m_outputKey
Name of output CaloClusterContainer, e.g. HIClusters.
double energy() const
get energy (data member)
An algorithm that can be simultaneously executed in multiple threads.
SG::ReadHandleKey< CaloCellContainer > m_cellContainerKey
Name of input CaloCellContainer, e.g. AllCalo.
Bookkeeping of cells that make up a cluster Simplified replacement for CaloCellLink,...
Handle class for recording to StoreGate.
Description of a calorimeter cluster.
(Non-const) Iterator class for DataVector/DataList.
::StatusCode StatusCode
StatusCode definition for legacy code.
HIClusterMaker(const std::string &name, ISvcLocator *pSvcLocator)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
void prefetchNext(Iter iter, Iter endIter)
Prefetch next object in sequence.
const_iterator begin() const
value_type push_back(value_type pElem)
Add an element to the end of the collection.
Container class for CaloCell.
const_iterator end() const
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
Gaudi::Property< float > m_EminMoment
For clusters w/ E less than this, set their eta/phi to tower eta/phi.
Data object for each calorimeter readout cell.
int findIndex(const IdentifierHash theHash) const
Return index of the cell with a given hash.
CHILDPAR getParameter(const_child_ptr data) const
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...
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
virtual StatusCode execute(const EventContext &ctx) const
virtual double eta() const override final
get eta (through CaloDetDescrElement)
Functions to prefetch blocks of memory.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.