|
ATLAS Offline Software
|
#include <PixelClusterOnTrackTool.h>
|
| PixelClusterOnTrackTool (const std::string &, const std::string &, const IInterface *) |
| AlgTool constructor. More...
|
|
virtual | ~PixelClusterOnTrackTool () |
|
virtual StatusCode | initialize () override |
| AlgTool initialisation. More...
|
|
virtual StatusCode | finalize () override |
| AlgTool termination. More...
|
|
virtual InDet::PixelClusterOnTrack * | correct (const Trk::PrepRawData &, const Trk::TrackParameters &, const EventContext &ctx=Gaudi::Hive::currentContext()) const override |
| produces a PixelClusterOnTrack (object factory!). More...
|
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysInitialize () override |
| Perform system initialization for an algorithm. More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
|
void | correctBow (const Identifier &, Amg::Vector2D &locpos, const double tanphi, const double taneta, const EventContext &ctx) const |
|
InDet::PixelClusterOnTrack * | correctDefault (const Trk::PrepRawData &, const Trk::TrackParameters &, const EventContext &ctx) const |
| The correct method produces a PixelClusterOnTrack using the measured PixelCluster and the track prediction. More...
|
|
InDet::PixelClusterOnTrack * | correctNN (const Trk::PrepRawData &, const Trk::TrackParameters &, const EventContext &ctx) const |
|
bool | getErrorsDefaultAmbi (const InDet::PixelCluster *, const Trk::TrackParameters &, Amg::Vector2D &, Amg::MatrixX &) const |
|
bool | getErrorsTIDE_Ambi (const InDet::PixelCluster *, const Trk::TrackParameters &, Amg::Vector2D &, Amg::MatrixX &) const |
|
InDet::PixelClusterOnTrack * | correct (const Trk::PrepRawData &, const Trk::TrackParameters &, const InDet::PixelClusterStrategy) const |
|
const Trk::ClusterSplitProbabilityContainer::ProbabilityInfo & | getClusterSplittingProbability (const InDet::PixelCluster *pix) const |
|
void | renounceArray (SG::VarHandleKeyArray &handlesArray) |
| remove all handles from I/O resolution More...
|
|
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. More...
|
|
|
SG::ReadCondHandleKey< PixelDistortionData > | m_distortionKey {this, "PixelDistortionData", "PixelDistortionData", "Output readout distortion data"} |
|
ToolHandle< ISiLorentzAngleTool > | m_lorentzAngleTool {this, "LorentzAngleTool", "SiLorentzAngleTool", "Tool to retrieve Lorentz angle"} |
|
SG::ReadCondHandleKey< PixelCalib::PixelOfflineCalibData > | m_clusterErrorKey {this, "PixelOfflineCalibData", "PixelOfflineCalibData", "Output key of pixel cluster"} |
|
SG::ReadCondHandleKey< RIO_OnTrackErrorScaling > | m_pixelErrorScalingKey {this,"PixelErrorScalingKey", "/Indet/TrkErrorScalingPixel", "Key for pixel error scaling conditions data."} |
|
BooleanProperty | m_disableDistortions |
| toolhandle for central error scaling flag storing if errors need scaling or should be kept nominal More...
|
|
IntegerProperty | m_positionStrategy |
|
std::atomic_int | m_errorStrategy {2} |
|
IntegerProperty | m_errorStrategyProperty {this, "ErrorStrategy", 2, "Which calibration of cluster position errors"} |
|
const PixelID * | m_pixelid = nullptr |
| Flag controlling how module distortions are taken into account: More...
|
|
BooleanProperty | m_applyNNcorrectionProperty {this, "applyNNcorrection", false} |
| Enable NN based calibration (do only if NN calibration is applied) More...
|
|
bool | m_applyNNcorrection = false |
|
BooleanProperty | m_NNIBLcorrection {this, "NNIBLcorrection", false} |
|
bool | m_IBLAbsent = true |
|
ToolHandle< NnClusterizationFactory > | m_NnClusterizationFactory |
| NN clusterizationi factory for NN based positions and errors. More...
|
|
ServiceHandle< IIBLParameterSvc > | m_IBLParameterSvc {this, "IBLParameterSvc", "IBLParameterSvc"} |
|
BooleanProperty | m_doNotRecalibrateNN {this, "doNotRecalibrateNN", false} |
|
BooleanProperty | m_noNNandBroadErrors {this, "noNNandBroadErrors", false} |
|
BooleanProperty | m_usingTIDE_Ambi {this, "RunningTIDE_Ambi", false} |
| Enable different treatment of cluster errors based on NN information (do only if TIDE ambi is run) More...
|
|
SG::ReadHandleKey< InDet::PixelGangedClusterAmbiguities > | m_splitClusterMapKey {this, "SplitClusterAmbiguityMap", ""} |
|
SG::ReadHandleKey< Trk::ClusterSplitProbabilityContainer > | m_clusterSplitProbContainer {this, "ClusterSplitProbabilityName", "",""} |
|
double | m_calphi [s_nbinphi] {} |
|
double | m_caleta [s_nbineta][3] {} |
|
double | m_calerrphi [s_nbinphi][3] {} |
|
double | m_calerreta [s_nbineta][3] {} |
|
double | m_phix [s_nbinphi+1] {} |
|
double | m_etax [s_nbineta+1] {} |
|
StoreGateSvc_t | m_evtStore |
| Pointer to StoreGate (event store by default) More...
|
|
StoreGateSvc_t | m_detStore |
| Pointer to StoreGate (detector store by default) More...
|
|
std::vector< SG::VarHandleKeyArray * > | m_vhka |
|
bool | m_varHandleArraysDeclared |
|
Definition at line 61 of file PixelClusterOnTrackTool.h.
◆ StoreGateSvc_t
◆ PixelClusterOnTrackTool()
InDet::PixelClusterOnTrackTool::PixelClusterOnTrackTool |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
◆ ~PixelClusterOnTrackTool()
InDet::PixelClusterOnTrackTool::~PixelClusterOnTrackTool |
( |
| ) |
|
|
virtualdefault |
◆ correct() [1/2]
◆ correct() [2/2]
◆ correctBow()
◆ correctDefault()
The correct method produces a PixelClusterOnTrack using the measured PixelCluster and the track prediction.
Definition at line 178 of file PixelClusterOnTrackTool.cxx.
182 const double TOPHAT_SIGMA = 1. / std::sqrt(12.);
211 if (
pix->rdoList().empty()) {
212 ATH_MSG_WARNING(
"Pixel RDO-list size is 0, check integrity of pixel clusters! stop ROT creation.");
223 float trkphicomp = my_track.dot(my_phiax);
224 float trketacomp = my_track.dot(my_etaax);
225 float trknormcomp = my_track.dot(my_normal);
226 double bowphi = std::atan2(trkphicomp, trknormcomp);
227 double boweta = std::atan2(trketacomp, trknormcomp);
228 float etatrack = trackPar.
eta();
234 if (bowphi >
M_PI *0.5) {
237 if (bowphi < -
M_PI *0.5) {
249 double PixTrkPt = trackPar.
pT();
250 double PixTrkEta = trackPar.
eta();
251 ATH_MSG_VERBOSE(
"tanl = " << tanl <<
" readout side is " << readoutside <<
252 " module " << PixEtaModule <<
" " << PixPhiModule <<
253 " track pt, eta = " << PixTrkPt <<
" " << PixTrkEta <<
254 " track momentum phi, norm = " << trkphicomp <<
" " <<
255 trknormcomp <<
" bowphi = " << bowphi <<
" angle = " <<
angle);
257 float omegaphi =
pix->omegax();
258 float omegaeta =
pix->omegay();
259 double localphi = -9999.;
260 double localeta = -9999.;
262 const std::vector<Identifier> & rdos =
pix->rdoList();
268 for (
const auto & rId:rdos) {
277 meanpos = meanpos / rdos.size();
289 int nrows = rowmax - rowmin + 1;
290 int ncol = colmax - colmin + 1;
301 ang = 180 *
angle * M_1_PI;
304 delta = offlineCalibData->getPixelChargeInterpolationParameters()->getDeltaXbarrel(nrows, ang, 1);
316 ATH_MSG_ERROR(
"bin out of range in line " << __LINE__ <<
" of PixelClusterOnTrackTool.cxx.");
320 if (offlineCalibData->getPixelChargeInterpolationParameters()->getVersion()<-1) {
321 delta = offlineCalibData->getPixelChargeInterpolationParameters()->getDeltaXbarrel(nrows, ang, 0);
324 localphi += delta * (omegaphi - 0.5);
326 double thetaloc = -999.;
327 if (boweta > -0.5 *
M_PI && boweta <
M_PI / 2.) {
328 thetaloc = M_PI_2 - boweta;
329 }
else if (boweta > M_PI_2 && boweta <
M_PI) {
330 thetaloc = 1.5 *
M_PI - boweta;
332 thetaloc = -M_PI_2 - boweta;
334 double etaloc = -1 *
log(
tan(thetaloc * 0.5));
336 delta = offlineCalibData->getPixelChargeInterpolationParameters()->getDeltaYbarrel(ncol, etaloc, 1);
338 etaloc = std::abs(etaloc);
349 }
else if (ncol ==
bin + 1) {
351 }
else if (ncol ==
bin + 2) {
357 ATH_MSG_ERROR(
"bin out of range in line " << __LINE__ <<
" of PixelClusterOnTrackTool.cxx.");
360 if (offlineCalibData->getPixelChargeInterpolationParameters()->getVersion()<-1) {
361 delta = offlineCalibData->getPixelChargeInterpolationParameters()->getDeltaYbarrel(ncol, std::abs(etaloc), 0);
364 localeta += delta * (omegaeta - 0.5);
368 double deltax = offlineCalibData->getPixelChargeInterpolationParameters()->getDeltaXendcap();
369 double deltay = offlineCalibData->getPixelChargeInterpolationParameters()->getDeltaYendcap();
370 localphi += deltax * (omegaphi - 0.5);
371 localeta += deltay * (omegaeta - 0.5);
379 localphi += deltax * (omegaphi - 0.5);
380 localeta += deltay * (omegaeta - 0.5);
386 localphi = meanpos.xPhi() + shift;
387 localeta = meanpos.xEta();
399 if (std::abs(
angle) > 1) {
403 ATH_MSG_VERBOSE(
"Shallow track with tanl = " << tanl <<
" bowphi = " <<
404 bowphi <<
" angle = " <<
angle <<
" width.z = " <<
width.z() <<
405 " errphi = " << errphi <<
" erreta = " << erreta);
407 errphi =
width.phiR() * TOPHAT_SIGMA;
408 erreta =
width.z() * TOPHAT_SIGMA;
410 errphi = (
width.phiR() / nrows) * TOPHAT_SIGMA;
411 erreta = (
width.z() / ncol) * TOPHAT_SIGMA;
415 int ibin = offlineCalibData->getPixelClusterOnTrackErrorData()->getBarrelBinPhi(ang, nrows);
416 errphi = offlineCalibData->getPixelClusterOnTrackErrorData()->getPixelBarrelPhiError(ibin);
419 errphi =
width.phiR() * TOPHAT_SIGMA;
428 }
else if (nrows == 2) {
434 ATH_MSG_ERROR(
"bin out of range in line " << __LINE__ <<
" of PixelClusterOnTrackTool.cxx.");
440 int ibin = offlineCalibData->getPixelClusterOnTrackErrorData()->getBarrelBinEta(std::abs(etatrack), ncol, nrows);
441 erreta = offlineCalibData->getPixelClusterOnTrackErrorData()->getPixelBarrelEtaError(ibin);
443 double etaloc = std::abs(etatrack);
445 erreta =
width.z() * TOPHAT_SIGMA;
452 ATH_MSG_ERROR(
"bin out of range in line " << __LINE__ <<
" of PixelClusterOnTrackTool.cxx.");
456 }
else if (ncol ==
bin + 1) {
458 }
else if (ncol ==
bin + 2) {
461 erreta =
width.z() * TOPHAT_SIGMA;
467 int ibin = offlineCalibData->getPixelClusterErrorData()->getEndcapBin(ncol, nrows);
468 errphi = offlineCalibData->getPixelClusterErrorData()->getPixelEndcapPhiError(ibin);
469 erreta = offlineCalibData->getPixelClusterErrorData()->getPixelEndcapRError(ibin);
471 if (errphi > erreta) {
472 erreta =
width.z() * TOPHAT_SIGMA;
493 cov(0, 0) = errphi * errphi;
496 cov(1, 1) = erreta * erreta;
504 cov = Trk::ErrorScalingCast<PixelRIO_OnTrackErrorScaling>(*error_scaling)
512 glob,
pix->gangedPixel(), isbroad);
◆ correctNN()
Definition at line 547 of file PixelClusterOnTrackTool.cxx.
557 if (pixelPrepCluster ==
nullptr) {
564 ATH_MSG_WARNING(
"Cannot access detector element. Aborting cluster correction...");
577 float trkphicomp = my_track.dot(my_phiax);
578 float trketacomp = my_track.dot(my_etaax);
579 float trknormcomp = my_track.dot(my_normal);
580 double bowphi = std::atan2(trkphicomp, trknormcomp);
581 double boweta = std::atan2(trketacomp, trknormcomp);
601 if (!
getErrorsTIDE_Ambi(pixelPrepCluster, trackPar, finalposition, finalerrormatrix)) {
613 <<
" +/- " << std::sqrt(pixelPrepCluster->
localCovariance()(1, 1)) <<
"\n"
614 <<
" Final position x: " << finalposition[0]
615 <<
" +/- " << std::sqrt(finalerrormatrix(0, 0))
616 <<
" y: " << finalposition[1] <<
" +/- "
617 <<std::sqrt(finalerrormatrix(1, 1)) );
623 float trkphicomp = my_track.dot(my_phiax);
624 float trketacomp = my_track.dot(my_etaax);
625 float trknormcomp = my_track.dot(my_normal);
626 double bowphi = std::atan2(trkphicomp, trknormcomp);
627 double boweta = std::atan2(trketacomp, trknormcomp);
638 cov = Trk::ErrorScalingCast<PixelRIO_OnTrackErrorScaling>(*error_scaling)
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ extraDeps_update_handler()
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
◆ finalize()
StatusCode InDet::PixelClusterOnTrackTool::finalize |
( |
| ) |
|
|
overridevirtual |
◆ getClusterSplittingProbability()
◆ getErrorsDefaultAmbi()
Definition at line 659 of file PixelClusterOnTrackTool.cxx.
663 std::vector<Amg::Vector2D> vectorOfPositions;
664 int numberOfSubclusters = 1;
665 vectorOfPositions.push_back(pixelPrepCluster->
localPosition());
669 InDet::PixelGangedClusterAmbiguities::const_iterator mapBegin = splitClusterMap->begin();
670 InDet::PixelGangedClusterAmbiguities::const_iterator mapEnd = splitClusterMap->end();
671 for (InDet::PixelGangedClusterAmbiguities::const_iterator mapIter = mapBegin; mapIter != mapEnd; ++mapIter) {
674 if (
first == pixelPrepCluster &&
second != pixelPrepCluster) {
675 ATH_MSG_DEBUG(
"Found additional split cluster in ambiguity map (+=1).");
676 numberOfSubclusters += 1;
682 if (pixelAddCluster ==
nullptr) {
683 ATH_MSG_WARNING(
"Pixel ambiguity map has empty pixel cluster. Please DEBUG!");
686 vectorOfPositions.push_back(pixelAddCluster->
localPosition());
699 "Parameters are not at a plane ! Aborting cluster correction... ");
703 std::vector<Amg::Vector2D> allLocalPositions;
704 std::vector<Amg::MatrixX> allErrorMatrix;
710 numberOfSubclusters);
712 if (allLocalPositions.empty()) {
713 ATH_MSG_DEBUG(
" Cluster cannot be treated by NN. Giving back to default clusterization " );
718 if (allLocalPositions.size() !=
size_t(numberOfSubclusters)) {
719 ATH_MSG_WARNING(
"Returned position vector size " << allLocalPositions.size() <<
720 " not according to expected number of subclusters: " << numberOfSubclusters <<
". Abort cluster correction..." );
728 if (numberOfSubclusters == 1) {
729 finalposition = allLocalPositions[0];
730 finalerrormatrix = allErrorMatrix[0];
733 else if (numberOfSubclusters == 2) {
735 square(vectorOfPositions[0][0] - allLocalPositions[0][0]) / allErrorMatrix[0](0, 0) +
736 square(vectorOfPositions[1][0] - allLocalPositions[1][0]) / allErrorMatrix[1](0, 0) +
737 square(vectorOfPositions[0][1] - allLocalPositions[0][1]) / allErrorMatrix[0](1, 1) +
738 square(vectorOfPositions[1][1] - allLocalPositions[1][1]) / allErrorMatrix[1](1, 1);
741 square(vectorOfPositions[1][0] - allLocalPositions[0][0]) / allErrorMatrix[0](0, 0) +
742 square(vectorOfPositions[0][0] - allLocalPositions[1][0]) / allErrorMatrix[1](0, 0) +
743 square(vectorOfPositions[1][1] - allLocalPositions[0][1]) / allErrorMatrix[0](1, 1) +
744 square(vectorOfPositions[0][1] - allLocalPositions[1][1]) / allErrorMatrix[1](1, 1);
747 " Old pix (1) x: " << vectorOfPositions[0][0] <<
" y: " << vectorOfPositions[0][1] <<
"\n"
748 <<
" Old pix (2) x: " << vectorOfPositions[1][0] <<
" y: " << vectorOfPositions[1][1] <<
"\n"
749 <<
" Pix (1) x: " << allLocalPositions[0][0] <<
" +/- " << std::sqrt(allErrorMatrix[0](0, 0))
750 <<
" y: " << allLocalPositions[0][1] <<
" +/- " << std::sqrt(allErrorMatrix[0](1, 1)) <<
"\n"
751 <<
" Pix (2) x: " << allLocalPositions[1][0] <<
" +/- " << std::sqrt(allErrorMatrix[1](0, 0))
752 <<
" y: " << allLocalPositions[1][1] <<
" +/- " << std::sqrt(allErrorMatrix[1](1, 1)) <<
"\n"
753 <<
" Old (1) new (1) dist: " << std::sqrt(distancesq1) <<
" Old (1) new (2) " << std::sqrt(distancesq2) );
756 if (distancesq1 < distancesq2) {
757 finalposition = allLocalPositions[0];
758 finalerrormatrix = allErrorMatrix[0];
760 finalposition = allLocalPositions[1];
761 finalerrormatrix = allErrorMatrix[1];
766 else if (numberOfSubclusters == 3) {
769 distances[0] =
distance(vectorOfPositions, allLocalPositions, allErrorMatrix, 0, 1, 2);
770 distances[1] =
distance(vectorOfPositions, allLocalPositions, allErrorMatrix, 0, 2, 1);
771 distances[2] =
distance(vectorOfPositions, allLocalPositions, allErrorMatrix, 1, 0, 2);
772 distances[3] =
distance(vectorOfPositions, allLocalPositions, allErrorMatrix, 1, 2, 0);
773 distances[4] =
distance(vectorOfPositions, allLocalPositions, allErrorMatrix, 2, 0, 1);
774 distances[5] =
distance(vectorOfPositions, allLocalPositions, allErrorMatrix, 2, 1, 0);
776 int smallestDistanceIndex = -10;
777 double minDistance = 1e10;
779 for (
int i = 0;
i < 6;
i++) {
782 if (distances[
i] < minDistance) {
783 minDistance = distances[
i];
784 smallestDistanceIndex =
i;
788 ATH_MSG_DEBUG(
" The minimum distance is : " << minDistance <<
" for index: " << smallestDistanceIndex);
790 if (smallestDistanceIndex == 0 || smallestDistanceIndex == 1) {
791 finalposition = allLocalPositions[0];
792 finalerrormatrix = allErrorMatrix[0];
794 if (smallestDistanceIndex == 2 || smallestDistanceIndex == 4) {
795 finalposition = allLocalPositions[1];
796 finalerrormatrix = allErrorMatrix[1];
798 if (smallestDistanceIndex == 3 || smallestDistanceIndex == 5) {
799 finalposition = allLocalPositions[2];
800 finalerrormatrix = allErrorMatrix[2];
◆ getErrorsTIDE_Ambi()
Definition at line 807 of file PixelClusterOnTrackTool.cxx.
812 std::vector<Amg::Vector2D> vectorOfPositions;
813 int numberOfSubclusters = 1;
816 numberOfSubclusters = 1 + splitClusterMap->count(pixelPrepCluster);
818 if (splitClusterMap->count(pixelPrepCluster) == 0 && splitProb.
isSplit()) {
819 numberOfSubclusters = 2;
821 if (splitClusterMap->count(pixelPrepCluster) != 0 && !splitProb.
isSplit()) {
822 numberOfSubclusters = 1;
829 ATH_MSG_WARNING(
"Parameters are not at a plane surface ! Aborting cluster "
834 std::vector<Amg::Vector2D> allLocalPositions;
835 std::vector<Amg::MatrixX> allErrorMatrix;
841 numberOfSubclusters);
843 if (allLocalPositions.empty()) {
845 " Cluster cannot be treated by NN. Giving back to default clusterization, too big: " <<
850 if (allLocalPositions.size() !=
size_t(numberOfSubclusters)) {
852 "Returned position vector size " << allLocalPositions.size() <<
" not according to expected number of subclusters: " << numberOfSubclusters <<
853 ". Abort cluster correction...");
860 if (numberOfSubclusters == 1) {
861 finalposition = allLocalPositions[0];
862 finalerrormatrix = allErrorMatrix[0];
870 if (trackPar.covariance()) {
871 localerr =
Amg::Vector2D(std::sqrt((*trackPar.covariance())(0, 0)), std::sqrt((*trackPar.covariance())(1, 1)));
874 double minDistance(1e300);
877 for (
unsigned int i(0);
i < allLocalPositions.size(); ++
i) {
879 square(localpos[0] - allLocalPositions[
i][0]) / localerr[0]
880 + square(localpos[1] - allLocalPositions[
i][1]) / localerr[1];
888 finalposition = allLocalPositions[
index];
889 finalerrormatrix = allErrorMatrix[
index];
◆ initialize()
StatusCode InDet::PixelClusterOnTrackTool::initialize |
( |
| ) |
|
|
overridevirtual |
AlgTool initialisation.
UGLY!
Definition at line 74 of file PixelClusterOnTrackTool.cxx.
109 constexpr
double phimin=-0.27, phimax=0.27;
111 constexpr
double etacen[
s_nbineta]={-0.,1.,1.55,1.9,2.15,2.35};
120 return StatusCode::SUCCESS;
◆ inputHandles()
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()
static const InterfaceID& Trk::IRIO_OnTrackCreator::interfaceID |
( |
| ) |
|
|
inlinestaticinherited |
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
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.
◆ renounce()
◆ renounceArray()
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_applyNNcorrection
bool InDet::PixelClusterOnTrackTool::m_applyNNcorrection = false |
|
private |
◆ m_applyNNcorrectionProperty
BooleanProperty InDet::PixelClusterOnTrackTool::m_applyNNcorrectionProperty {this, "applyNNcorrection", false} |
|
private |
◆ m_calerreta
double InDet::PixelClusterOnTrackTool::m_calerreta[s_nbineta][3] {} |
|
private |
◆ m_calerrphi
double InDet::PixelClusterOnTrackTool::m_calerrphi[s_nbinphi][3] {} |
|
private |
◆ m_caleta
double InDet::PixelClusterOnTrackTool::m_caleta[s_nbineta][3] {} |
|
private |
◆ m_calphi
double InDet::PixelClusterOnTrackTool::m_calphi[s_nbinphi] {} |
|
private |
◆ m_clusterErrorKey
◆ m_clusterSplitProbContainer
◆ m_detStore
◆ m_disableDistortions
BooleanProperty InDet::PixelClusterOnTrackTool::m_disableDistortions |
|
private |
Initial value:{this, "DisableDistortions", false,
"Disable simulation of module distortions"}
toolhandle for central error scaling flag storing if errors need scaling or should be kept nominal
Definition at line 142 of file PixelClusterOnTrackTool.h.
◆ m_distortionKey
◆ m_doNotRecalibrateNN
BooleanProperty InDet::PixelClusterOnTrackTool::m_doNotRecalibrateNN {this, "doNotRecalibrateNN", false} |
|
private |
◆ m_errorStrategy
std::atomic_int InDet::PixelClusterOnTrackTool::m_errorStrategy {2} |
|
mutableprivate |
◆ m_errorStrategyProperty
IntegerProperty InDet::PixelClusterOnTrackTool::m_errorStrategyProperty {this, "ErrorStrategy", 2, "Which calibration of cluster position errors"} |
|
private |
◆ m_etax
double InDet::PixelClusterOnTrackTool::m_etax[s_nbineta+1] {} |
|
private |
◆ m_evtStore
◆ m_IBLAbsent
bool InDet::PixelClusterOnTrackTool::m_IBLAbsent = true |
|
private |
◆ m_IBLParameterSvc
◆ m_lorentzAngleTool
◆ m_NnClusterizationFactory
Initial value:{this, "NnClusterizationFactory",
"InDet::NnClusterizationFactory/NnClusterizationFactory"}
NN clusterizationi factory for NN based positions and errors.
Definition at line 173 of file PixelClusterOnTrackTool.h.
◆ m_NNIBLcorrection
BooleanProperty InDet::PixelClusterOnTrackTool::m_NNIBLcorrection {this, "NNIBLcorrection", false} |
|
private |
◆ m_noNNandBroadErrors
BooleanProperty InDet::PixelClusterOnTrackTool::m_noNNandBroadErrors {this, "noNNandBroadErrors", false} |
|
private |
◆ m_phix
double InDet::PixelClusterOnTrackTool::m_phix[s_nbinphi+1] {} |
|
private |
◆ m_pixelErrorScalingKey
◆ m_pixelid
const PixelID* InDet::PixelClusterOnTrackTool::m_pixelid = nullptr |
|
private |
Flag controlling how module distortions are taken into account:
case 0 --—> No distorsions implemented;
case 1 --—> Set curvature (in 1/meter) and twist (in radiant) equal for all modules;
case 2 --—> Read curvatures and twists from textfile containing Survey data;
case 3 --—> Set curvature and twist from Gaussian random generator with mean and RMS coming from Survey data;
case 4 --—> Read curvatures and twists from database (not ready yet); identifier-helper
Definition at line 164 of file PixelClusterOnTrackTool.h.
◆ m_positionStrategy
IntegerProperty InDet::PixelClusterOnTrackTool::m_positionStrategy |
|
private |
Initial value:{this, "PositionStrategy", 1,
"Which calibration of cluster positions"}
Definition at line 144 of file PixelClusterOnTrackTool.h.
◆ m_splitClusterMapKey
◆ m_usingTIDE_Ambi
BooleanProperty InDet::PixelClusterOnTrackTool::m_usingTIDE_Ambi {this, "RunningTIDE_Ambi", false} |
|
private |
Enable different treatment of cluster errors based on NN information (do only if TIDE ambi is run)
Definition at line 182 of file PixelClusterOnTrackTool.h.
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ s_nbineta
constexpr int InDet::PixelClusterOnTrackTool::s_nbineta =6 |
|
staticconstexprprivate |
◆ s_nbinphi
constexpr int InDet::PixelClusterOnTrackTool::s_nbinphi =9 |
|
staticconstexprprivate |
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
int phi_index(const Identifier &id) const
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Scalar phi() const
phi method
Eigen::Matrix< double, 2, 1 > Vector2D
virtual const Surface & associatedSurface() const override=0
Access to the Surface associated to the Parameters.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Scalar theta() const
theta method
const Amg::Vector3D & etaAxis() const
const Amg::MatrixX & localCovariance() const
return const ref to the error matrix
constexpr virtual SurfaceType surfaceType() const override=0
Returns the Surface Type enum for the surface used to define the derived class.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
int readoutSide() const
ReadoutSide.
virtual bool type(PrepRawDataType type) const =0
Interface method checking the type.
#define ATH_MSG_VERBOSE(x)
const std::string & key() const
Return the StoreGate ID for the referenced object.
virtual IdentifierHash identifyHash() const override final
identifier hash (inline)
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
SiLocalPosition positionFromColumnRow(const int column, const int row) const
Given row and column index of a diode, return position of diode center ALTERNATIVE/PREFERED way is to...
IdentifierHash wafer_hash(Identifier wafer_id) const
wafer hash from id
double angle(const GeoTrf::Vector2D &a, const GeoTrf::Vector2D &b)
int eta_index(const Identifier &id) const
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
constexpr virtual ParametersType type() const override=0
Return the ParametersType enum.
virtual const Amg::Vector3D & normal() const override final
Get reconstruction local normal axes in global frame.
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...
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Amg::Vector2D localPosition() const
Access method for the local coordinates, local parameter definitions differ for each surface type.
int eta_module(const Identifier &id) const
double pT() const
Access method for transverse momentum.
bool gangedPixel() const
return the flag of this cluster containing a gangedPixel
const Amg::Vector2D & localPosition() const
return the local position reference
StatusCode initialize(bool used=true)
Eigen::Matrix< double, 3, 1 > Vector3D
bool isTooBigToBeSplit() const
const Amg::Vector3D & momentum() const
Access method for the momentum.
const Amg::Vector3D & globalPosition() const
return global position reference
#define ATH_MSG_WARNING(x)
HepGeom::Point3D< double > globalPosition(const HepGeom::Point3D< double > &localPos) const
transform a reconstruction local position into a global position (inline):
const Amg::Vector3D & phiAxis() const
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
double eta() const
Access method for pseudorapidity - from momentum.
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
virtual const SiDetectorDesign & design() const override final
access to the local description (inline):
int phi_module(const Identifier &id) const
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
static const ProbabilityInfo & getNoSplitProbability()
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
virtual Identifier identify() const override final
identifier of this detector element (inline)
Vertex centroid(const Polygon &p)
virtual const TrkDetElementBase * detectorElement() const =0
return the detector element corresponding to this PRD The pointer will be zero if the det el is not d...