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() ) {
66 if (sc3.isFailure() ) {
67 if (
msgLvl(MSG::WARNING))
msg(MSG::WARNING) <<
"Collection CaloCalTopoCluster (for non-calib) not found in SG " <<
endmsg;
70 if ( FormatTool->AddToEvent(
dataTypeName(),
"BasicEnergyCaloCalTopoCluster", &
data).isFailure()){
71 if (
msgLvl(MSG::WARNING))
msg(MSG::WARNING) <<
"Collection CaloCalTopoCluster (for non-calib) not found in SG " <<
endmsg;
80 if (
msgLvl(MSG::WARNING))
msg(MSG::WARNING) <<
81 "Unable to retrieve iterator for AODCaloCluster collection" <<
endmsg;
87 std::string::size_type position =
iterator.key().find(
"HLTAutoKey",0);
97 if (
msgLvl(MSG::WARNING))
msg(MSG::WARNING) <<
"Collection " <<
iterator.key() <<
" not found in SG " <<
endmsg;
106 std::vector<std::string>::const_iterator keyIter;
109 if (!
sc.isFailure()) {
112 if ( FormatTool->AddToEvent(
dataTypeName(), (*keyIter), &
data).isFailure()){
113 if (
msgLvl(MSG::WARNING))
msg(MSG::WARNING) <<
"Collection " << (*keyIter) <<
" not found in SG " <<
endmsg;
121 return StatusCode::SUCCESS;
146 std::string
label=
"";
149 float eInSample = 0.;
150 float eInSampleFull = 0.;
152 float rawemfrac = 0.;
156 std::string tagCells;
157 tagCells =
"cells multiple=\"1.0\"";
160 for (; itr != ccc->
end(); ++itr) {
177 emfrac = eInSample/eInSampleFull;
180 if ( emfrac > 1.0 ) emfrac = 1.;
181 if ( emfrac < 0.0 ) emfrac = 0.;
182 emfracVec.push_back( emfrac );
184 label =
"AllMeV_SumEMSampl=" +
DataType( eInSample ).toString() +
185 "_SumAllSampl=" +
DataType( eInSampleFull ).toString() +
186 "_basicEnergy=" +
DataType( (*itr)->getBasicEnergy()).toString() +
187 "_calcEMFrac=" +
DataType( rawemfrac ).toString()+
188 "_outEMFrac=" +
DataType( emfrac ).toString();
192 labelVec.push_back(
label );