7 #include "CaloEvent/CaloClusterContainer.h"
10 #include "CaloGeoHelpers/CaloSampling.h"
12 #include "CLHEP/Units/SystemOfUnits.h"
24 m_typeName(
"Cluster"){
27 declareInterface<IDataRetriever>(
this);
30 "Collection to be first in output, shown in Atlantis without switching");
32 "Other collections to be retrieved. If list left empty, all available retrieved");
51 if (
sc.isFailure() ) {
64 ATH_MSG_DEBUG(
"Trying to retrieve CaloCalTopoCluster (for non-calib)" );
66 if (sc3.isFailure() ) {
67 ATH_MSG_WARNING(
"Collection CaloCalTopoCluster (for non-calib) not found in SG " );
70 if ( FormatTool->AddToEvent(
dataTypeName(),
"BasicEnergyCaloCalTopoCluster", &
data).isFailure()){
71 ATH_MSG_WARNING(
"Collection CaloCalTopoCluster (for non-calib) not found in SG " );
80 ATH_MSG_WARNING(
"Unable to retrieve iterator for AODCaloCluster collection" );
85 std::string::size_type position =
iterator.key().find(
"HLTAutoKey",0);
103 std::vector<std::string>::const_iterator keyIter;
106 if (!
sc.isFailure()) {
109 if ( FormatTool->AddToEvent(
dataTypeName(), (*keyIter), &
data).isFailure()){
118 return StatusCode::SUCCESS;
143 std::string
label=
"";
146 float eInSample = 0.;
147 float eInSampleFull = 0.;
149 float rawemfrac = 0.;
153 std::string tagCells;
154 tagCells =
"cells multiple=\"1.0\"";
157 for (; itr != ccc->
end(); ++itr) {
174 emfrac = eInSample/eInSampleFull;
177 if ( emfrac > 1.0 ) emfrac = 1.;
178 if ( emfrac < 0.0 ) emfrac = 0.;
179 emfracVec.push_back( emfrac );
181 label =
"AllMeV_SumEMSampl=" +
DataType( eInSample ).toString() +
182 "_SumAllSampl=" +
DataType( eInSampleFull ).toString() +
183 "_basicEnergy=" +
DataType( (*itr)->getBasicEnergy()).toString() +
184 "_calcEMFrac=" +
DataType( rawemfrac ).toString()+
185 "_outEMFrac=" +
DataType( emfrac ).toString();
189 labelVec.push_back(
label );
195 phi.emplace_back((*itr)->phi());
196 eta.emplace_back((*itr)->eta());
200 et.emplace_back( (((*itr)->getBasicEnergy()/
CLHEP::GeV)*((*itr)->sinTh())) );
204 cells.emplace_back(
"0" );
205 idVec.emplace_back( ++
id );
211 DataMap[
"phi"] = std::move(phi);
212 DataMap[
"eta"] = std::move(eta);
216 DataMap[
"id"] = std::move(idVec);
217 DataMap[
"emfrac"] = std::move(emfracVec);
218 DataMap[
"label"] = std::move(labelVec);
222 <<
" retrieved with " <<
nEntries <<
" entries");