31 return StatusCode::FAILURE;
43 return StatusCode::SUCCESS;
47 const EventContext &ctx = Gaudi::Hive::currentContext();
52 return StatusCode::RECOVERABLE;
54 ATH_MSG_DEBUG(
"Pixel Cluster container found: " << pixel_container->size() <<
" collections" );
63 typedef InDet::PixelClusterContainer::const_iterator ClusterIter;
64 ClusterIter itrCluster;
65 ClusterIter itrClubeg=pixel_container->begin();
66 ClusterIter itrCluend=pixel_container->end();
67 for( itrCluster=itrClubeg;itrCluster!=itrCluend;++itrCluster){
68 const InDet::PixelClusterCollection* ClusterCollection(*itrCluster);
69 if (!ClusterCollection)
continue;
72 const std::vector<Identifier>& RDOs = theCluster->
rdoList();
73 const std::vector<int>& ToTs = theCluster->
totList();
74 const std::vector<float>& Charges = theCluster->
chargeList();
76 ATH_MSG_DEBUG(
"cluster RDOs , size, ToTs, size, Charges, size "<< RDOs <<
" "<<RDOs.size()<<
" "<< ToTs<<
" " <<ToTs.size()<<
" "<<Charges<<
" "<<Charges.size());
81 return StatusCode::FAILURE;
90 return StatusCode::FAILURE;
92 const PixelID& pixelID = *pixelIDp;
96 if(ToTs.size()==0 && Charges.size()!=0){
98 auto biggest_charge = std::max_element(std::begin(Charges), std::end(Charges));
99 ATH_MSG_DEBUG(
"Max element of Charges is " << *biggest_charge);
100 if(*biggest_charge==0.)
return StatusCode::SUCCESS;
103 std::vector<int> totList;
105 for (
int i=0; i<nRDO; i++) {
107 int Charge=Charges[i];
113 int totInt = calibData->
getToT(
type, moduleHash, FE, Charges[i]);
117 if ( totInt >= overflowIBLToT ) totInt = overflowIBLToT;
118 msg(MSG::DEBUG) <<
"barrel_ec = " << pixelID.
barrel_ec(pixid) <<
" layer_disque = " << pixelID.
layer_disk(pixid) <<
" ToT = " << tot0 <<
" Real ToT = " << totInt <<
endmsg;
121 totList.push_back( totInt ) ;
122 ATH_MSG_DEBUG(
"from Charge --> ToT " << Charge <<
" "<< totInt);
126 theNonConstCluster->setToTList (std::move (totList));
134 return StatusCode::SUCCESS;
140 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
This file defines the class for a collection of AttributeLists where each one is associated with a ch...
This is an Identifier helper class for the Pixel subdetector.
Define macros for attributes used to control the static checker.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
DataModel_detail::const_iterator< DataVector > const_iterator
Standard const_iterator.
This is a "hash" representation of an Identifier.
Class to hold geometrical description of a silicon detector element.
const AtlasDetectorID * getIdHelper() const
Returns the id helper (inline)
const std::vector< int > & totList() const
const std::vector< float > & chargeList() const
virtual const InDetDD::SiDetectorElement * detectorElement() const override final
return the detector element corresponding to this PRD The pointer will be zero if the det el is not d...
constexpr int getFEI4OverflowToT() const
float getToT(InDetDD::PixelDiodeType type, unsigned int moduleHash, unsigned int FE, float Q) const
ServiceHandle< InDetDD::IPixelReadoutManager > m_pixelReadout
SG::ReadHandleKey< InDet::PixelClusterContainer > m_pixelsClustersKey
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_pixelDetEleCollKey
ServiceHandle< IIBLParameterSvc > m_IBLParameterSvc
SG::ReadCondHandleKey< PixelChargeCalibCondData > m_chargeDataKey
~PixelChargeToTConversion()
PixelChargeToTConversion(const std::string &name, ISvcLocator *pSvcLocator)
This is an Identifier helper class for the Pixel subdetector.
int layer_disk(const Identifier &id) const
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module) const
For a single crystal.
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
IdentifierHash wafer_hash(Identifier wafer_id) const
wafer hash from id
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const std::vector< Identifier > & rdoList() const
return the List of rdo identifiers (pointers)