31 return StatusCode::FAILURE;
43 return StatusCode::SUCCESS;
51 return StatusCode::RECOVERABLE;
53 ATH_MSG_DEBUG(
"Pixel Cluster container found: " << pixel_container->size() <<
" collections" );
62 typedef InDet::PixelClusterContainer::const_iterator ClusterIter;
63 ClusterIter itrCluster;
64 ClusterIter itrClubeg=pixel_container->begin();
65 ClusterIter itrCluend=pixel_container->end();
66 for( itrCluster=itrClubeg;itrCluster!=itrCluend;++itrCluster){
67 const InDet::PixelClusterCollection* ClusterCollection(*itrCluster);
68 if (!ClusterCollection)
continue;
71 const std::vector<Identifier>& RDOs = theCluster->
rdoList();
72 const std::vector<int>& ToTs = theCluster->
totList();
73 const std::vector<float>& Charges = theCluster->
chargeList();
75 ATH_MSG_DEBUG(
"cluster RDOs , size, ToTs, size, Charges, size "<< RDOs <<
" "<<RDOs.size()<<
" "<< ToTs<<
" " <<ToTs.size()<<
" "<<Charges<<
" "<<Charges.size());
80 return StatusCode::FAILURE;
89 return StatusCode::FAILURE;
91 const PixelID& pixelID = *pixelIDp;
95 if(ToTs.size()==0 && Charges.size()!=0){
97 auto biggest_charge = std::max_element(std::begin(Charges), std::end(Charges));
98 ATH_MSG_DEBUG(
"Max element of Charges is " << *biggest_charge);
99 if(*biggest_charge==0.)
return StatusCode::SUCCESS;
102 std::vector<int> totList;
104 for (
int i=0; i<nRDO; i++) {
106 int Charge=Charges[i];
112 int totInt = calibData->
getToT(
type, moduleHash, FE, Charges[i]);
116 if ( totInt >= overflowIBLToT ) totInt = overflowIBLToT;
117 msg(MSG::DEBUG) <<
"barrel_ec = " << pixelID.
barrel_ec(pixid) <<
" layer_disque = " << pixelID.
layer_disk(pixid) <<
" ToT = " << tot0 <<
" Real ToT = " << totInt <<
endmsg;
120 totList.push_back( totInt ) ;
121 ATH_MSG_DEBUG(
"from Charge --> ToT " << Charge <<
" "<< totInt);
125 theNonConstCluster->setToTList (std::move (totList));
133 return StatusCode::SUCCESS;
139 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.
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()
StatusCode execute(const EventContext &ctx)
Execute method.
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)