|
ATLAS Offline Software
|
Go to the documentation of this file.
23 ISvcLocator* pSvcLocator )
25 m_cellsName(
"AllCalo" ), m_outputCellsName(
"SelectedCells" ),
26 m_maxNCells( 0 ),m_cellEnergyThreshold( 0. ),
32 m_caloSelection( false ),
33 m_caloSamplingSelection( false ) {
59 "number of cells you want" );
82 return StatusCode::SUCCESS;
85 <<
" More than " << nSubCalo <<
" calo specified. "
86 <<
"Must be wrong. Stop.";
87 return StatusCode::FAILURE;
94 <<
"Invalid calo specification:"
96 return StatusCode::FAILURE;
109 return StatusCode::SUCCESS;
112 <<
" More than " << nCaloSamplings <<
" calo samplings specified. "
113 <<
"Must be wrong. Stop.";
114 return StatusCode::FAILURE;
121 <<
"Invalid calo sampling specification:"
123 return StatusCode::FAILURE;
130 return StatusCode::SUCCESS;
141 const CONTAINER* cellcoll =
nullptr;
149 CONTAINER::const_iterator f_cell = cellcoll->begin();
150 CONTAINER::const_iterator l_cell = cellcoll->end();
154 bool useNoiseCut =
false;
157 for( ; f_cell != l_cell; ++f_cell ) {
163 const unsigned int iCaloNum =
164 static_cast< unsigned int >(
cell->caloDDE()->getSubCalo() );
165 std::vector< unsigned int >::const_iterator theFound =
172 const unsigned int iCaloSampling =
173 static_cast< unsigned int >(
cell->caloDDE()->getSampling() );
174 std::vector< unsigned int >::const_iterator theFound =
179 const float e =
cell->energy();
187 static const double epsilon = 0.001;
189 if( std::abs(
th ) > epsilon ) {
191 if( ! (
e >
th ) )
continue;
192 }
else if(
th < 0. ) {
193 if( ! ( std::abs(
e ) > std::abs(
th ) ) )
continue;
199 float sigma = caloNoise->getNoise(
cell->ID(),
cell->gain() );
217 return StatusCode::SUCCESS;
int m_maxNCells
Maximum number of cells to accept.
def retrieve(aClass, aKey=None)
CaloCellFilterAlg(const std::string &name, ISvcLocator *pSvcLocator)
Regular Gaudi Algorithm constructor.
std::string find(const std::string &s)
return a remapped string
float m_cellEnergyThreshold
threshold on cell energy for ntuple
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
DataVector adapter that acts like it holds const pointers.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
const LArFCAL_ID * m_fcalid
std::string m_outputCellsName
output Cell container
bool empty() const
Test if the key is blank.
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode execute()
Function executed for each event.
SG::ReadCondHandleKey< CaloNoise > m_caloNoiseKey
Key of the CaloNoise Conditions data object.
::StatusCode StatusCode
StatusCode definition for legacy code.
float m_sigmaCut
cut on abs(E)/sigmaNoise (no cut if <0 )
#define CHECK(...)
Evaluate an expression and check for errors.
Helpers for checking error return status codes and reporting errors.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
StatusCode initialize(bool used=true)
Container class for CaloCell.
#define REPORT_MESSAGE(LVL)
Report a message.
Data object for each calorimeter readout cell.
const LArHEC_ID * m_hecid
#define ATH_MSG_WARNING(x)
DataVector adapter that acts like it holds const pointers.
std::string m_cellsName
Cell container.
std::vector< unsigned int > m_caloNums
which calo to treat
virtual StatusCode initialize()
Function executed before the event loop starts.
bool m_caloSamplingSelection
std::vector< unsigned int > m_caloSamplings
which calo samplings to treat