|
ATLAS Offline Software
|
Go to the documentation of this file.
22 const double emfrac_a = s_acc_emfraction(*
a);
23 const double emfrac_b = s_acc_emfraction(*
b);
24 return (
a->et() * emfrac_a) > (
b->et() * emfrac_b);
28 double eg_tilegap = 0;
33 for (; cell_itr != cell_end; ++cell_itr) {
35 if (!
cell) {
continue; }
38 if (!dde) {
continue; }
42 double ddAbsEta = std::abs(dde->
eta_raw());
43 if (ddAbsEta > 1.4 && ddAbsEta < 1.6) {
52 bool checkIfValidForCentral(
58 return aeta <= etaCut && clusterE >= ECut;
61 bool checkIfValidForFwd(
66 bool doForwardClusters,
69 if (doForwardClusters) {
72 const double clusterET = clus->
et();
78 return aeta >= etaCut && clusterET >= ETCut;
81 return aetaLC >= etaCut && clusterETLC >= ETCut;
90 ISvcLocator* pSvcLocator):
108 return StatusCode::SUCCESS;
112 ATH_MSG_INFO(
"=====> Selected Topo cluster statistics ===========");
120 ATH_MSG_INFO(
"===================================================");
122 return StatusCode::SUCCESS;
133 std::unique_ptr<xAOD::CaloClusterContainer>,
134 std::unique_ptr<xAOD::ShallowAuxContainer>
138 std::move(inputShallowcopy.first),
139 std::move(inputShallowcopy.second)
144 auto viewCopy = std::make_unique<ConstDataVector<xAOD::CaloClusterContainer>>(
SG::VIEW_ELEMENTS);
148 std::unique_ptr<ConstDataVector<xAOD::CaloClusterContainer>> fwdViewCopy;
156 fwdViewCopy = std::make_unique<ConstDataVector<xAOD::CaloClusterContainer>>(
SG::VIEW_ELEMENTS);
170 "->CHECKING Cluster at eta,phi,et " <<
171 clus->
eta() <<
" , " <<
172 clus->
phi() <<
" , " <<
177 s_acc_emfraction(*clus) = 0.0;
179 const double clusterE = clus->
e();
180 const double aeta = std::abs(clus->
eta());
182 const bool valid_for_central = checkIfValidForCentral(aeta,
m_etaCut, clusterE,
m_ECut);
184 if (valid_for_central) {
185 ++buff_CentralPassPreSelection;
186 }
else if (valid_for_fwd) {
187 ++buff_FwdPassPreSelection;
192 const bool valid_for_both = valid_for_central && valid_for_fwd;
193 if (valid_for_both) {
194 ++buff_FwdPassPreSelection;
195 ++buff_SharedPassPreSelection;
200 ++buff_FwdPassSelection;
204 double eg_tilegap = 0;
205 if (valid_for_central) {
206 if (aeta > 1.35 && aeta < 1.65 && clusterE > 0) {
207 eg_tilegap += addTileGapCellsEnergy(clus);
214 s_acc_emfraction(*clus) = emfrac;
217 "-->Selected Cluster at eta,phi,et,EMFraction " << clus->
eta() <<
218 " , " << clus->
phi() <<
219 " , " << clus->
et() <<
223 if (valid_for_central) {
224 viewCopy->push_back(clus);
225 ++buff_CentralPassSelection;
229 fwdViewCopy->push_back(clus);
230 ++buff_FwdPassSelection;
233 if (valid_for_both) {
234 ++buff_SharedPassSelection;
240 std::sort(viewCopy->begin(), viewCopy->end(),
greater);
243 "Cloned container has size: " << viewCopy->size() <<
244 " selected out of : " << inputTopoclusters->
size()
251 std::sort(fwdViewCopy->begin(), fwdViewCopy->end(),
greater);
255 "Cloned fwd container has size: " << fwdViewCopy->size() <<
256 " selected out of : " << inputTopoclusters->
size()
259 ATH_CHECK(outputFwdTopoclusters.record(std::move(fwdViewCopy)));
262 return StatusCode::SUCCESS;
Gaudi::Accumulators::Counter m_FwdPassPreSelection
virtual double phi() const
The azimuthal angle ( ) of the particle.
Helper class to provide type-safe access to aux data.
Gaudi::Property< double > m_fwdEtaCut
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
egammaTopoClusterCopier(const std::string &name, ISvcLocator *pSvcLocator)
Gaudi::Property< float > m_etaCut
const std::string & key() const
Return the StoreGate ID for the referenced object.
bool empty() const
Test if the key is blank.
bool m_doForwardClusters
Private member flag to copy forward clusters.
SG::WriteHandleKey< ConstDataVector< xAOD::CaloClusterContainer > > m_outputFwdTopoCollection
bool greater(double a, double b)
Compare two FP numbers, working around x87 precision issues.
weight_t weight() const
Accessor for weight associated to this cell.
float eta_raw() const
cell eta_raw
An algorithm that can be simultaneously executed in multiple threads.
virtual StatusCode execute(const EventContext &ctx) const override final
Gaudi::Accumulators::Counter m_FwdPassSelection
SG::WriteHandleKey< xAOD::CaloClusterContainer > m_outputTopoCollectionShallow
Handle class for recording to StoreGate.
Description of a calorimeter cluster.
virtual double eta() const
The pseudorapidity ( ) of the particle.
Gaudi::Accumulators::Counter m_AllClusters
::StatusCode StatusCode
StatusCode definition for legacy code.
const CaloCluster_v1 * getSisterCluster() const
Get a pointer to a 'sister' cluster (eg the non-calibrated counterpart)
Gaudi::Property< float > m_EMFracCut
virtual StatusCode finalize() override final
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Gaudi::Accumulators::Counter m_SharedPassPreSelection
Gaudi::Property< float > m_ECut
virtual StatusCode initialize() override final
const_cell_iterator cell_cend() const
bool isFCAL(const xAOD::CaloCluster *cluster)
return true if the cluster (or the majority of its energy) is in the FCAL0
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_inputTopoCollection
std::pair< std::unique_ptr< T >, std::unique_ptr< ShallowAuxContainer > > shallowCopyContainer(const T &cont, [[maybe_unused]] const EventContext &ctx)
Function making a shallow copy of a constant container.
SG::WriteHandleKey< ConstDataVector< xAOD::CaloClusterContainer > > m_outputTopoCollection
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
Data object for each calorimeter readout cell.
CaloCell_ID::CaloSample getSampling() const
cell sampling
Gaudi::Accumulators::Counter m_CentralPassSelection
Gaudi::Property< double > m_fwdETCut
Gaudi::Property< bool > m_hasITk
Private member flag to do the track matching.
float energyBE(const unsigned layer) const
Get the energy in one layer of the EM Calo.
const_cell_iterator cell_cbegin() const
Handle class for reading from StoreGate.
const_iterator to loop over cells belonging to a cluster
size_type size() const noexcept
Returns the number of elements in the collection.
virtual double e() const
The total energy of the particle.
Gaudi::Accumulators::Counter m_CentralPassPreSelection
Gaudi::Accumulators::Counter m_SharedPassSelection