ATLAS Offline Software
Loading...
Searching...
No Matches
InDet::ClusterMakerTool Class Reference

#include <ClusterMakerTool.h>

Inheritance diagram for InDet::ClusterMakerTool:
Collaboration diagram for InDet::ClusterMakerTool:

Public Member Functions

 ClusterMakerTool (const std::string &type, const std::string &name, const IInterface *parent)
 ~ClusterMakerTool ()=default
StatusCode initialize ()
PixelCluster pixelCluster (const Identifier &clusterID, const Amg::Vector2D &localPos, std::vector< Identifier > &&rdoList, const int lvl1a, std::vector< int > &&totList, const SiWidth &width, const InDetDD::SiDetectorElement *element, bool ganged, int errorStrategy, const PixelID &pixelID, bool split, double splitProb1, double splitProb2, const PixelChargeCalibCondData *calibData, const PixelCalib::PixelOfflineCalibData *offlineCalibData, const EventContext &ctx) const
xAOD::PixelClusterxAODpixelCluster (xAOD::PixelCluster &cluster, const Amg::Vector2D &localPos, const std::vector< Identifier > &rdoList, const int lvl1a, const std::vector< int > &totList, const SiWidth &width, const InDetDD::SiDetectorElement *element, bool ganged, int errorStrategy, const PixelID &pixelID, bool split, double splitProb1, double splitProb2, const PixelChargeCalibCondData *calibData, const PixelCalib::PixelOfflineCalibData *offlineCalibData, const EventContext &ctx) const
SCT_Cluster sctCluster (const Identifier &clusterID, const Amg::Vector2D &localPos, std::vector< Identifier > &&rdoList, const SiWidth &width, const InDetDD::SiDetectorElement *element, int errorStrategy) const
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Static Public Member Functions

static const InterfaceID & interfaceID ()

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

template<typename ClusterType, typename IdentifierVec, typename ToTList>
ClusterType makePixelCluster (const Identifier &clusterID, const Amg::Vector2D &localPos, IdentifierVec &&rdoList, const int lvl1a, ToTList &&totList, const SiWidth &width, const InDetDD::SiDetectorElement *element, bool ganged, int errorStrategy, const PixelID &pixelID, bool split, double splitProb1, double splitProb2, const PixelChargeCalibCondData *calibData, const PixelCalib::PixelOfflineCalibData *offlineCalibData, const EventContext &ctx, xAOD::PixelCluster *cluster=nullptr) const
double getPixelCTBPhiError (int layer, int phi, int PhiClusterSize) const
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

ToolHandle< ISiLorentzAngleToolm_pixelLorentzAngleTool {this, "PixelLorentzAngleTool", "SiLorentzAngleTool/PixelLorentzAngleTool", "Tool to retreive Lorentz angle of Pixel"}
ToolHandle< ISiLorentzAngleToolm_sctLorentzAngleTool {this, "SCTLorentzAngleTool", "SiLorentzAngleTool/SCTLorentzAngleTool", "Tool to retreive Lorentz angle of SCT"}
bool m_forceErrorStrategy1B {false}
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default).
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default).
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 55 of file ClusterMakerTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ ClusterMakerTool()

InDet::ClusterMakerTool::ClusterMakerTool ( const std::string & type,
const std::string & name,
const IInterface * parent )

Definition at line 135 of file ClusterMakerTool.cxx.

137 :
138 AthAlgTool(t,n,p)
139{
140 declareInterface<ClusterMakerTool>(this);
141}
AthAlgTool()
Default constructor:

◆ ~ClusterMakerTool()

InDet::ClusterMakerTool::~ClusterMakerTool ( )
default

Member Function Documentation

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ getPixelCTBPhiError()

double InDet::ClusterMakerTool::getPixelCTBPhiError ( int layer,
int phi,
int PhiClusterSize ) const
private

Definition at line 583 of file ClusterMakerTool.cxx.

584 {
585
586 double sigmaL0Phi1[3] = { 8.2*micrometer, 9.7*micrometer, 14.6*micrometer};
587 double sigmaL1Phi1[3] = {14.6*micrometer, 9.3*micrometer, 14.6*micrometer};
588 double sigmaL2Phi1[3] = {14.6*micrometer, 8.6*micrometer, 14.6*micrometer};
589 double sigmaL0Phi0[3] = {14.6*micrometer, 13.4*micrometer, 13.0*micrometer};
590 double sigmaL1Phi0[3] = {14.6*micrometer, 8.5*micrometer, 11.0*micrometer};
591 double sigmaL2Phi0[3] = {14.6*micrometer, 11.6*micrometer, 9.3*micrometer};
592
593 if(phiClusterSize > 3) return 14.6*micrometer;
594
595 if(layer == 0 && phi == 0) return sigmaL0Phi0[phiClusterSize-1];
596 if(layer == 1 && phi == 0) return sigmaL1Phi0[phiClusterSize-1];
597 if(layer == 2 && phi == 0) return sigmaL2Phi0[phiClusterSize-1];
598 if(layer == 0 && phi == 1) return sigmaL0Phi1[phiClusterSize-1];
599 if(layer == 1 && phi == 1) return sigmaL1Phi1[phiClusterSize-1];
600 if(layer == 2 && phi == 1) return sigmaL2Phi1[phiClusterSize-1];
601
602 // shouldn't really happen...
603 ATH_MSG_WARNING("Unexpected layer and phi numbers: layer = "
604 << layer << " and phi = " << phi);
605 return 14.6*micrometer;
606
607}
Scalar phi() const
phi method
#define ATH_MSG_WARNING(x)

◆ initialize()

StatusCode InDet::ClusterMakerTool::initialize ( )

Definition at line 145 of file ClusterMakerTool.cxx.

145 {
146 // Code entered here will be executed once at program start.
147
148 ATH_MSG_DEBUG ( name() << " initialize()" );
149
150 if (not m_pixelLorentzAngleTool.empty()) {
152 } else {
153 m_pixelLorentzAngleTool.disable();
154 }
155 if (not m_sctLorentzAngleTool.empty()) {
157 } else {
158 m_sctLorentzAngleTool.disable();
159 }
160
161
162 return StatusCode::SUCCESS;
163}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x)
ToolHandle< ISiLorentzAngleTool > m_sctLorentzAngleTool
ToolHandle< ISiLorentzAngleTool > m_pixelLorentzAngleTool

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ interfaceID()

const InterfaceID & InDet::ClusterMakerTool::interfaceID ( )
inlinestatic

Definition at line 67 of file ClusterMakerTool.h.

67{ return IID_ClusterMakerTool; };
static const InterfaceID IID_ClusterMakerTool("InDet::ClusterMakerTool", 1, 0)

◆ makePixelCluster()

template<typename ClusterType, typename IdentifierVec, typename ToTList>
ClusterType InDet::ClusterMakerTool::makePixelCluster ( const Identifier & clusterID,
const Amg::Vector2D & localPos,
IdentifierVec && rdoList,
const int lvl1a,
ToTList && totList,
const SiWidth & width,
const InDetDD::SiDetectorElement * element,
bool ganged,
int errorStrategy,
const PixelID & pixelID,
bool split,
double splitProb1,
double splitProb2,
const PixelChargeCalibCondData * calibData,
const PixelCalib::PixelOfflineCalibData * offlineCalibData,
const EventContext & ctx,
xAOD::PixelCluster * cluster = nullptr ) const
private

Definition at line 187 of file ClusterMakerTool.cxx.

204 {
205
206 ATH_MSG_VERBOSE("ClusterMakerTool called, number ");
207 if ( errorStrategy==2 && m_forceErrorStrategy1B ) errorStrategy=1;
208
209 // Fill vector of charges and compute charge balance
210 const InDetDD::PixelModuleDesign* design = (dynamic_cast<const InDetDD::PixelModuleDesign*>(&element->design()));
211 if (not design){
212 throw std::runtime_error( "Dynamic cast failed for design in ClusterMakerTool.cxx");
213 }
214 int rowMin = design->rows();
215 int rowMax = 0;
216 int colMin = design->columns();
217 int colMax = 0;
218 float qRowMin = 0; float qRowMax = 0;
219 float qColMin = 0; float qColMax = 0;
220 std::vector<float> chargeList;
221 int nRDO=rdoList.size();
222 if (calibData) {
223 chargeList.reserve(nRDO);
224 IdentifierHash moduleHash = element->identifyHash(); // wafer hash
225 for (int i=0; i<nRDO; i++) {
226 Identifier pixid=rdoList[i];
227 int ToT=totList[i];
228
229 float charge = ToT;
230 assert( element->identifyHash() == pixelID.wafer_hash(pixelID.wafer_id(pixid)));
231 std::array<InDetDD::PixelDiodeTree::CellIndexType,2> diode_idx
233 pixelID.eta_index(pixid));
234 InDetDD::PixelDiodeTree::DiodeProxy si_param ( design->diodeProxyFromIdx(diode_idx));
235 std::uint32_t feValue = design->getFE(si_param);
236 auto diode_type = design->getDiodeType(si_param);
237 if ( design->getReadoutTechnology() == InDetDD::PixelReadoutTechnology::FEI3
238 && design->numberOfConnectedCells( design->readoutIdOfCell(InDetDD::SiCellId(diode_idx[0],diode_idx[1])))>1) {
240 }
241
242 charge = calibData->getCharge(diode_type, moduleHash, feValue, ToT);
243 if (design->getReadoutTechnology() != InDetDD::PixelReadoutTechnology::RD53 && (moduleHash<12 || moduleHash>2035)) {
244 charge = ToT/8.0*(8000.0-1200.0)+1200.0;
245 }
246 chargeList.push_back(charge);
247 }
248 }
249
250 for (int i=0; i<nRDO; i++) {
251 Identifier pixid=rdoList[i];
252 int ToT=totList[i];
253
254 float charge = ToT;
255 if (calibData) { charge=chargeList[i]; }
256
257 // std::cout << "tot, charge = " << ToT << " " << charge << std::endl;
258 int row = pixelID.phi_index(pixid);
259 int col = pixelID.eta_index(pixid);
260 if (row == rowMin) qRowMin += charge;
261 if (row < rowMin){
262 rowMin = row;
263 qRowMin = charge;
264 }
265
266 if (row == rowMax) qRowMax += charge;
267 if (row > rowMax){
268 rowMax = row;
269 qRowMax = charge;
270 }
271 if (col == colMin) qColMin += charge;
272 if (col < colMin){
273 colMin = col;
274 qColMin = charge;
275 }
276
277 if (col == colMax) qColMax += charge;
278 if (col > colMax){
279 colMax = col;
280 qColMax = charge;
281 }
282 }
283
284 Identifier newClusterID = pixelID.pixel_id(pixelID.wafer_id(clusterID),rowMin,colMin);
285 // Compute omega for charge interpolation correction (if required)
286 // Two pixels may have charge=0 (very rarely, hopefully)
287 float omegax = -1;
288 float omegay = -1;
289 if(qRowMin+qRowMax > 0) omegax = qRowMax/float(qRowMin+qRowMax);
290 if(qColMin+qColMax > 0) omegay = qColMax/float(qColMin+qColMax);
291
292 ATH_MSG_VERBOSE("omega = " << omegax << " " << omegay);
293
294// ask for Lorentz correction, get global position
295 double shift = m_pixelLorentzAngleTool->getLorentzShift(element->identifyHash(), ctx);
296 Amg::Vector2D locpos(localPos[Trk::locX]+shift, localPos[Trk::locY]);
297// find global position of element
298 const Amg::Transform3D& T = element->surface().transform();
299 double Ax[3] = {T(0,0),T(1,0),T(2,0)};
300 double Ay[3] = {T(0,1),T(1,1),T(2,1)};
301 double R [3] = {T(0,3),T(1,3),T(2,3)};
302
303 const Amg::Vector2D& M = locpos;
304 Amg::Vector3D globalPos(M[0]*Ax[0]+M[1]*Ay[0]+R[0],M[0]*Ax[1]+M[1]*Ay[1]+R[1],M[0]*Ax[2]+M[1]*Ay[2]+R[2]);
305
306 // error matrix
307 const Amg::Vector2D& colRow = width.colRow();// made ref to avoid
308 // unnecessary copy EJWM
309 auto errorMatrix = Amg::MatrixX(2,2);
310 errorMatrix.setIdentity();
311
312 // switches are more readable **OPT**
313 // actually they're slower as well (so I'm told) so perhaps
314 // this should be re-written at some point EJWM
315 double eta = std::abs(globalPos.eta());
316 double zPitch = width.z()/colRow.y();
317
318 const AtlasDetectorID* aid = element->getIdHelper();
319
321 throw std::runtime_error( "Wrong helper type in ClusterMakerTool.cxx.");
322 }
323 const PixelID* pid = static_cast<const PixelID*>(aid);
324 int layer = pid->layer_disk(clusterID);
325 int phimod = pid->phi_module(clusterID);
326 switch (errorStrategy){
327 case 0:
328 errorMatrix.fillSymmetric(0,0,square(width.phiR())*ONE_TWELFTH);
329 errorMatrix.fillSymmetric(1,1,square(width.z())*ONE_TWELFTH);
330 break;
331 case 1:
332 errorMatrix.fillSymmetric(0,0,square(width.phiR()/colRow.x())*ONE_TWELFTH);
333 errorMatrix.fillSymmetric(1,1,square(width.z()/colRow.y())*ONE_TWELFTH);
334 break;
335 case 2:
336 // use parameterization only if the cluster does not
337 // contain long pixels or ganged pixels
338 // Also require calibration service is available....
339 if (!ganged && zPitch>399*micrometer && zPitch<401*micrometer) {
340 if (offlineCalibData) {
341 if (element->isBarrel()) {
342 int ibin = offlineCalibData->getPixelClusterErrorData()->getBarrelBin(eta,int(colRow.y()),int(colRow.x()));
343 double phiError = offlineCalibData->getPixelClusterErrorData()->getPixelBarrelPhiError(ibin);
344 double etaError = offlineCalibData->getPixelClusterErrorData()->getPixelBarrelEtaError(ibin);
345 errorMatrix.fillSymmetric(0,0,pow(phiError,2));
346 errorMatrix.fillSymmetric(1,1,pow(etaError,2));
347 }
348 else {
349 int ibin = offlineCalibData->getPixelClusterErrorData()->getEndcapBin(int(colRow.y()),int(colRow.x()));
350 double phiError = offlineCalibData->getPixelClusterErrorData()->getPixelEndcapPhiError(ibin);
351 double etaError = offlineCalibData->getPixelClusterErrorData()->getPixelEndcapRError(ibin);
352 errorMatrix.fillSymmetric(0,0,square(phiError));
353 errorMatrix.fillSymmetric(1,1,square(etaError));
354 }
355 }
356 }else{// cluster with ganged and/or long pixels
357 errorMatrix.fillSymmetric(0,0,square(width.phiR()/colRow.x())*ONE_TWELFTH);
358 errorMatrix.fillSymmetric(1,1,square(zPitch)*ONE_TWELFTH);
359 }
360 break;
361
362 case 10:
363 errorMatrix.fillSymmetric(0,0,square( getPixelCTBPhiError(layer,phimod,int(colRow.x()))));
364 errorMatrix.fillSymmetric(1,1,square(width.z()/colRow.y())*ONE_TWELFTH);
365 break;
366
367 default:
368 errorMatrix.fillSymmetric(0,0,square(width.phiR()/colRow.x())*ONE_TWELFTH);
369 errorMatrix.fillSymmetric(1,1,square(width.z()/colRow.y())*ONE_TWELFTH);
370 break;
371 }
372
373 //1) We want to move always for the Trk::PixelCluster
374 //2) We forward the rdoList and chargeList that could have be passed
375 // different ways.
376 //
377 static_assert(std::is_same_v<ClusterType, PixelCluster> ||
378 std::is_same_v<std::remove_pointer_t<ClusterType>,
380 "Not an InDet::PixelCluster or xAOD::PixelCluster");
381 if constexpr (std::is_same<ClusterType, InDet::PixelCluster>::value) {
382 return newInDetpixelCluster(newClusterID, locpos,
383 globalPos,
384 std::forward<IdentifierVec>(rdoList),
385 lvl1a,
386 std::forward<ToTList>(totList),
387 std::move(chargeList),
388 width,
389 element,
390 std::move(errorMatrix),
391 omegax,
392 omegay,
393 split,
394 splitProb1,
395 splitProb2);
396 } else{
397 return AddNewxAODpixelCluster(*cluster)(newClusterID,
398 locpos,
399 globalPos,
400 std::forward<IdentifierVec>(rdoList),
401 lvl1a,
402 std::forward<ToTList>(totList),
403 chargeList,
404 width,
405 element,
406 errorMatrix,
407 split,
408 splitProb1,
409 splitProb2);
410 }
411}
Scalar eta() const
pseudorapidity method
#define ATH_MSG_VERBOSE(x)
double charge(const T &p)
Definition AtlasPID.h:1003
const double width
virtual HelperType helper() const
Type of helper, defaulted to 'Unimplemented'.
static constexpr std::array< PixelDiodeTree::CellIndexType, 2 > makeCellIndex(T local_x_idx, T local_y_idx)
Create a 2D cell index from the indices in local-x (phi, row) and local-y (eta, column) direction.
virtual const SiDetectorDesign & design() const override final
access to the local description (inline):
virtual IdentifierHash identifyHash() const override final
identifier hash (inline)
const AtlasDetectorID * getIdHelper() const
Returns the id helper (inline).
Trk::Surface & surface()
Element Surface.
double getPixelCTBPhiError(int layer, int phi, int PhiClusterSize) const
int getBarrelBin(double eta, int etaClusterSize, int phiClusterSize) const
int getEndcapBin(int etaClusterSize, int phiClusterSize) const
PixelClusterErrorData * getPixelClusterErrorData()
float getCharge(InDetDD::PixelDiodeType type, unsigned int moduleHash, unsigned int FE, float ToT) const
int eta_index(const Identifier &id) const
Definition PixelID.h:640
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module) const
For a single crystal.
Definition PixelID.h:355
Identifier pixel_id(int barrel_ec, int layer_disk, int phi_module, int eta_module, int phi_index, int eta_index) const
For an individual pixel.
Definition PixelID.h:423
IdentifierHash wafer_hash(Identifier wafer_id) const
wafer hash from id
Definition PixelID.h:378
int phi_index(const Identifier &id) const
Definition PixelID.h:634
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.
std::vector< std::string > split(const std::string &s, const std::string &t=":")
Definition hcg.cxx:179
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 2, 1 > Vector2D
Eigen::Matrix< double, 3, 1 > Vector3D
double R(const INavigable4Momentum *p1, const double v_eta, const double v_phi)
phimod(flags, cells_name, *args, **kw)
float etaError(const U &p)
row
Appending html table to final .html summary file.
virtual void shift(size_t pos, ptrdiff_t offs) override
Shift the elements of the container.
@ layer
Definition HitInfo.h:79
unsigned long long T
@ locY
local cartesian
Definition ParamDefs.h:38
@ locX
Definition ParamDefs.h:37
constexpr int pow(int x)
Definition conifer.h:27
PixelCluster_v1 PixelCluster
Define the version of the pixel cluster class.

◆ msg()

MsgStream & AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ pixelCluster()

PixelCluster InDet::ClusterMakerTool::pixelCluster ( const Identifier & clusterID,
const Amg::Vector2D & localPos,
std::vector< Identifier > && rdoList,
const int lvl1a,
std::vector< int > && totList,
const SiWidth & width,
const InDetDD::SiDetectorElement * element,
bool ganged,
int errorStrategy,
const PixelID & pixelID,
bool split,
double splitProb1,
double splitProb2,
const PixelChargeCalibCondData * calibData,
const PixelCalib::PixelOfflineCalibData * offlineCalibData,
const EventContext & ctx ) const

Definition at line 413 of file ClusterMakerTool.cxx.

430{
432 clusterID,
433 localPos,
434 std::move(rdoList),
435 lvl1a,
436 std::move(totList),
437 width,
438 element,
439 ganged,
440 errorStrategy,
441 pixelID,
442 split,
443 splitProb1,
444 splitProb2,
445 calibData,
446 offlineCalibData,
447 ctx);
448}
ClusterType makePixelCluster(const Identifier &clusterID, const Amg::Vector2D &localPos, IdentifierVec &&rdoList, const int lvl1a, ToTList &&totList, const SiWidth &width, const InDetDD::SiDetectorElement *element, bool ganged, int errorStrategy, const PixelID &pixelID, bool split, double splitProb1, double splitProb2, const PixelChargeCalibCondData *calibData, const PixelCalib::PixelOfflineCalibData *offlineCalibData, const EventContext &ctx, xAOD::PixelCluster *cluster=nullptr) const

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ sctCluster()

SCT_Cluster InDet::ClusterMakerTool::sctCluster ( const Identifier & clusterID,
const Amg::Vector2D & localPos,
std::vector< Identifier > && rdoList,
const SiWidth & width,
const InDetDD::SiDetectorElement * element,
int errorStrategy ) const

Definition at line 504 of file ClusterMakerTool.cxx.

510{
511
512 double shift =
513 m_sctLorentzAngleTool->getLorentzShift(element->identifyHash(), Gaudi::Hive::currentContext());
514 Amg::Vector2D locpos(localPos[Trk::locX] + shift, localPos[Trk::locY]);
515
516 // error matrix
517 const Amg::Vector2D& colRow = width.colRow(); // made ref to avoid
518 // unnecessary copy EJWM
519
520 auto errorMatrix = Amg::MatrixX(2,2);
521 errorMatrix.setIdentity();
522
523 // switches are more readable **OPT**
524 // actually they're slower as well (so I'm told) so perhaps
525 // this should be re-written at some point EJWM
526
527 switch (errorStrategy){
528 case 0:
529 errorMatrix.fillSymmetric(0,0,square(width.phiR())*ONE_TWELFTH);
530 errorMatrix.fillSymmetric(1,1,square(width.z())*ONE_TWELFTH);
531 break;
532 case 1:
533 // mat(1,1) = pow(width.phiR()/colRow.x(),2)/12;
534 // single strip - resolution close to pitch/sqrt(12)
535 // two-strip hits: better resolution, approx. 40% lower
536 if(colRow.x() == 1){
537 errorMatrix.fillSymmetric(0,0,square(1.05*width.phiR())*ONE_TWELFTH);
538 }
539 else if(colRow.x() == 2){
540 errorMatrix.fillSymmetric(0,0,square(0.27*width.phiR())*ONE_TWELFTH);
541 }
542 else{
543 errorMatrix.fillSymmetric(0,0,square(width.phiR())*ONE_TWELFTH);
544 }
545 errorMatrix.fillSymmetric(1,1,square(width.z()/colRow.y())*ONE_TWELFTH);
546 break;
547 default:
548 // single strip - resolution close to pitch/sqrt(12)
549 // two-strip hits: better resolution, approx. 40% lower
550 if(colRow.x() == 1){
551 errorMatrix.fillSymmetric(0,0,square(width.phiR())*ONE_TWELFTH);
552 }
553 else if(colRow.x() == 2){
554 errorMatrix.fillSymmetric(0,0,square(0.27*width.phiR())*ONE_TWELFTH);
555 }
556 else{
557 errorMatrix.fillSymmetric(0,0,square(width.phiR())*ONE_TWELFTH);
558 }
559 errorMatrix.fillSymmetric(1,1,square(width.z()/colRow.y())*ONE_TWELFTH);
560 break;
561 }
562
563 auto designShape = element->design().shape();
564 // rotation for endcap SCT
565 if(designShape == InDetDD::Trapezoid || designShape == InDetDD::Annulus) {
566 double sn = element->sinStereoLocal(localPos);
567 double sn2 = sn*sn;
568 double cs2 = 1.-sn2;
569 double w = element->phiPitch(localPos)/element->phiPitch();
570 double v0 = (errorMatrix)(0,0)*w*w;
571 double v1 = (errorMatrix)(1,1);
572 errorMatrix.fillSymmetric(0,0,cs2*v0+sn2*v1);
573 errorMatrix.fillSymmetric(0,1,sn*sqrt(cs2)*(v0-v1));
574 errorMatrix.fillSymmetric(1,1,sn2*v0+cs2*v1);
575 } //else if (designShape == InDetDD::PolarAnnulus) {// Polar rotation for endcap}
576
577 return SCT_Cluster(clusterID, locpos, std::move(rdoList), width, element, std::move(errorMatrix));
578
579}
virtual DetectorShape shape() const
Shape of element.
double phiPitch() const
Pitch (inline methods).
double sinStereoLocal(const Amg::Vector2D &localPos) const
Angle of strip in local frame with respect to the etaAxis.

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, and AthCheckedComponent<::AthAlgTool >.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

◆ xAODpixelCluster()

xAOD::PixelCluster * InDet::ClusterMakerTool::xAODpixelCluster ( xAOD::PixelCluster & cluster,
const Amg::Vector2D & localPos,
const std::vector< Identifier > & rdoList,
const int lvl1a,
const std::vector< int > & totList,
const SiWidth & width,
const InDetDD::SiDetectorElement * element,
bool ganged,
int errorStrategy,
const PixelID & pixelID,
bool split,
double splitProb1,
double splitProb2,
const PixelChargeCalibCondData * calibData,
const PixelCalib::PixelOfflineCalibData * offlineCalibData,
const EventContext & ctx ) const

Definition at line 450 of file ClusterMakerTool.cxx.

467{
469 Identifier(),
470 localPos,
471 rdoList,
472 lvl1a,
473 totList,
474 width,
475 element,
476 ganged,
477 errorStrategy,
478 pixelID,
479 split,
480 splitProb1,
481 splitProb2,
482 calibData,
483 offlineCalibData,
484 ctx,
485 &cluster);
486}

Member Data Documentation

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default).

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default).

Definition at line 390 of file AthCommonDataStore.h.

◆ m_forceErrorStrategy1B

bool InDet::ClusterMakerTool::m_forceErrorStrategy1B {false}
private

Definition at line 172 of file ClusterMakerTool.h.

172{false};

◆ m_pixelLorentzAngleTool

ToolHandle<ISiLorentzAngleTool> InDet::ClusterMakerTool::m_pixelLorentzAngleTool {this, "PixelLorentzAngleTool", "SiLorentzAngleTool/PixelLorentzAngleTool", "Tool to retreive Lorentz angle of Pixel"}
private

Definition at line 166 of file ClusterMakerTool.h.

167{this, "PixelLorentzAngleTool", "SiLorentzAngleTool/PixelLorentzAngleTool", "Tool to retreive Lorentz angle of Pixel"};

◆ m_sctLorentzAngleTool

ToolHandle<ISiLorentzAngleTool> InDet::ClusterMakerTool::m_sctLorentzAngleTool {this, "SCTLorentzAngleTool", "SiLorentzAngleTool/SCTLorentzAngleTool", "Tool to retreive Lorentz angle of SCT"}
private

Definition at line 169 of file ClusterMakerTool.h.

170{this, "SCTLorentzAngleTool", "SiLorentzAngleTool/SCTLorentzAngleTool", "Tool to retreive Lorentz angle of SCT"};

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files: