 |
ATLAS Offline Software
|
#include <NnClusterizationFactory.h>
|
| | NnClusterizationFactory (const std::string &name, const std::string &n, const IInterface *p) |
| |
| | ~NnClusterizationFactory ()=default |
| |
| virtual StatusCode | initialize () override |
| |
| virtual StatusCode | finalize () override |
| |
| std::vector< double > | estimateNumberOfParticles (const InDet::PixelCluster &pCluster, Amg::Vector3D &beamSpotPosition) const |
| |
| std::vector< double > | estimateNumberOfParticles (const InDet::PixelCluster &pCluster, const Trk::Surface &pixelSurface, const Trk::TrackParameters &trackParsAtSurface) const |
| |
| std::vector< Amg::Vector2D > | estimatePositions (const InDet::PixelCluster &pCluster, Amg::Vector3D &beamSpotPosition, std::vector< Amg::MatrixX > &errors, int numberSubClusters) const |
| |
| std::vector< Amg::Vector2D > | estimatePositions (const InDet::PixelCluster &pCluster, const Trk::Surface &pixelSurface, const Trk::TrackParameters &trackParsAtSurface, std::vector< Amg::MatrixX > &errors, int numberSubClusters) const |
| |
| 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, V, H > &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 |
| |
|
| std::vector< double > | estimateNumberOfParticlesTTN (const TTrainedNetworkCollection &nn_collection, const std::vector< double > &inputData) const |
| |
| std::vector< double > | estimateNumberOfParticlesLWTNN (NnClusterizationFactory::InputVector &input) const |
| |
| std::vector< Amg::Vector2D > | estimatePositionsTTN (const TTrainedNetworkCollection &nn_collection, const std::vector< double > &inputData, const NNinput &input, const InDet::PixelCluster &pCluster, int numberSubClusters, std::vector< Amg::MatrixX > &errors) const |
| |
| std::vector< Amg::Vector2D > | estimatePositionsLWTNN (NnClusterizationFactory::InputVector &input, NNinput &rawInput, const InDet::PixelCluster &pCluster, int numberSubClusters, std::vector< Amg::MatrixX > &errors) const |
| |
| double | correctedRMSY (double posPixels, std::vector< float > &pitches) const |
| |
| NNinput | createInput (const InDet::PixelCluster &pCluster, Amg::Vector3D &beamSpotPosition, double &tanl) const |
| |
| void | addTrackInfoToInput (NNinput &input, const Trk::Surface &pixelSurface, const Trk::TrackParameters &trackParsAtSurface, const double tanl) const |
| |
| std::vector< double > | assembleInputRunI (NNinput &input) const |
| |
| std::vector< double > | assembleInputRunII (NNinput &input) const |
| |
| InputVector | eigenInput (NNinput &input) const |
| |
| std::vector< Amg::Vector2D > | getPositionsFromOutput (std::vector< double > &output, const NNinput &input, const InDet::PixelCluster &pCluster) const |
| |
| void | getErrorMatrixFromOutput (std::vector< double > &outputX, std::vector< double > &outputY, std::vector< Amg::MatrixX > &errorMatrix, int nParticles) const |
| |
| size_t | calculateVectorDimension (const bool useTrackInfo) const |
| |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &) |
| | specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
| |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &) |
| | specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
| |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &) |
| | specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
| |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &) |
| | specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
| |
|
| Gaudi::Property< std::vector< std::string > > | m_nnOrder |
| |
| unsigned int | m_nParticleNNId {} |
| |
| std::vector< std::vector< unsigned int > > | m_NNId {} |
| |
| std::vector< double >(InDet::NnClusterizationFactory::* | m_assembleInput )(NNinput &input) const |
| |
| ReturnType(::TTrainedNetwork::* | m_calculateOutput )(const InputType &input) const |
| |
| ToolHandle< ISiLorentzAngleTool > | m_pixelLorentzAngleTool {this, "PixelLorentzAngleTool", "SiLorentzAngleTool/PixelLorentzAngleTool", "Tool to retreive Lorentz angle of Pixel"} |
| |
| SG::ReadCondHandleKey< PixelChargeCalibCondData > | m_chargeDataKey {this, "PixelChargeCalibCondData", "PixelChargeCalibCondData", "Output key"} |
| |
| SG::ReadCondHandleKey< TTrainedNetworkCollection > | m_readKeyWithoutTrack {this, "NnCollectionReadKey", "PixelClusterNN", "The conditions store key for the pixel cluster NNs"} |
| |
| SG::ReadCondHandleKey< TTrainedNetworkCollection > | m_readKeyWithTrack |
| |
| SG::ReadCondHandleKey< LWTNNCollection > | m_readKeyJSON |
| |
| Gaudi::Property< std::size_t > | m_outputNodesPos1 |
| |
| Gaudi::Property< std::vector< std::size_t > > | m_outputNodesPos2 |
| |
| Gaudi::Property< std::vector< std::size_t > > | m_outputNodesPos3 |
| |
| Gaudi::Property< unsigned int > | m_maxSubClusters {this, "MaxSubClusters", 3, "Maximum number of sub cluster supported by the networks." } |
| |
| Gaudi::Property< double > | m_correctLorShiftBarrelWithoutTracks {this, "correctLorShiftBarrelWithoutTracks",0.,"Lorentz shift correction factor when evaluating NN without track input."} |
| |
| Gaudi::Property< double > | m_correctLorShiftBarrelWithTracks {this, "correctLorShiftBarrelWithTracks",0.,"Lorentz shift correction factor when evaluating NN with track input."} |
| |
| Gaudi::Property< bool > | m_useToT {this, "useToT",true,"Use Tot rather than charge." } |
| |
| Gaudi::Property< bool > | m_addIBL {this, "addIBL", false, "Also apply to clusters in IBL." } |
| |
| Gaudi::Property< bool > | m_doRunI {this, "doRunI", false, "Use runI style network (outputs are not normalised; add pitches; use charge if not m_useToT)"} |
| |
| Gaudi::Property< bool > | m_useTTrainedNetworks {this, "useTTrainedNetworks", false, "Use earlier (release-21-like) neural networks stored in ROOT files and accessed via TTrainedNetowrk."} |
| |
| Gaudi::Property< bool > | m_useRecenteringNNWithouTracks {this, "useRecenteringNNWithoutTracks",false,"Recenter x position when evaluating NN without track input."} |
| |
| Gaudi::Property< bool > | m_useRecenteringNNWithTracks {this, "useRecenteringNNWithTracks",false,"Recenter x position when evaluating NN with track input."} |
| |
| Gaudi::Property< unsigned int > | m_sizeX {this, "sizeX",7,"Size of pixel matrix along X"} |
| |
| Gaudi::Property< unsigned int > | m_sizeY {this, "sizeY",7,"Size of pixel matrix along Y"} |
| |
| 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 89 of file NnClusterizationFactory.h.
◆ InputType
◆ InputVector
◆ ReturnType
◆ StoreGateSvc_t
◆ ENetworkType
◆ NnClusterizationFactory()
| InDet::NnClusterizationFactory::NnClusterizationFactory |
( |
const std::string & |
name, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
◆ ~NnClusterizationFactory()
| InDet::NnClusterizationFactory::~NnClusterizationFactory |
( |
| ) |
|
|
default |
◆ addTrackInfoToInput()
Definition at line 740 of file NnClusterizationFactory.cxx.
744 input.useTrackInfo=
true;
747 localIntersection *= 0.250/
cos(localIntersection.theta());
748 float trackDeltaX = (
float)localIntersection.x();
749 float trackDeltaY = (
float)localIntersection.y();
750 input.theta=std::atan2(trackDeltaY,0.250);
751 input.phi=std::atan2(trackDeltaX,0.250);
◆ assembleInputRunI()
| std::vector< double > InDet::NnClusterizationFactory::assembleInputRunI |
( |
NNinput & |
input | ) |
const |
|
private |
Definition at line 176 of file NnClusterizationFactory.cxx.
178 const auto invalidValue{std::numeric_limits<double>::quiet_NaN()};
179 std::vector<double> inputData(vectorSize, invalidValue);
180 size_t vectorIndex{0};
191 const double rawPitch(
input.vectorOfPitchesY[
s]);
193 if (std::isnan(normPitch)){
196 inputData[vectorIndex++] = normPitch;
200 if (
input.useTrackInfo){
◆ assembleInputRunII()
| std::vector< double > InDet::NnClusterizationFactory::assembleInputRunII |
( |
NNinput & |
input | ) |
const |
|
private |
Definition at line 154 of file NnClusterizationFactory.cxx.
156 const auto invalidValue{std::numeric_limits<double>::quiet_NaN()};
157 std::vector<double> inputData(vectorSize, invalidValue);
158 size_t vectorIndex{0};
161 inputData[vectorIndex++] =
input.matrixOfToT[
u][
s];
165 inputData[vectorIndex++] =
input.vectorOfPitchesY[
s];
167 inputData[vectorIndex++] =
input.ClusterPixLayer;
168 inputData[vectorIndex++] =
input.ClusterPixBarrelEC;
169 inputData[vectorIndex++] =
input.phi;
170 inputData[vectorIndex++] =
input.theta;
171 if (not
input.useTrackInfo) inputData[vectorIndex] =
input.etaModule;
◆ calculateVectorDimension()
| size_t InDet::NnClusterizationFactory::calculateVectorDimension |
( |
const bool |
useTrackInfo | ) |
const |
|
private |
◆ correctedRMSX()
| double InDet::NnClusterizationFactory::correctedRMSX |
( |
double |
posPixels | ) |
|
|
staticprivate |
◆ correctedRMSY()
| double InDet::NnClusterizationFactory::correctedRMSY |
( |
double |
posPixels, |
|
|
std::vector< float > & |
pitches |
|
) |
| const |
|
private |
Definition at line 563 of file NnClusterizationFactory.cxx.
565 double p = posPixels + (
m_sizeY - 1) * 0.5;
567 double p_center = -100;
570 if (
p >=
i and
p <= (
i + 1)) p_Y = p_actual + (
p -
i + 0.5) * pitches.at(
i);
571 if (
i == (
m_sizeY - 1) / 2) p_center = p_actual + 0.5 * pitches.at(
i);
572 p_actual += pitches.at(
i);
574 return std::abs(p_Y - p_center);
◆ createInput()
Definition at line 759 of file NnClusterizationFactory.cxx.
780 const PixelID& pixelID = *pixelIDp;
784 ATH_MSG_ERROR(
"Dynamic cast failed at line "<<__LINE__<<
" of NnClusterizationFactory.cxx.");
789 const std::vector<Identifier>& rdos = pCluster.
rdoList();
790 const size_t rdoSize = rdos.size();
792 const std::vector<float>& chList = pCluster.
chargeList();
793 const std::vector<int>& totList = pCluster.
totList();
794 std::vector<float> chListRecreated{};
795 chListRecreated.reserve(rdoSize);
797 std::vector<int>::const_iterator
tot = totList.begin();
798 std::vector<Identifier>::const_iterator rdosBegin = rdos.begin();
799 std::vector<Identifier>::const_iterator rdosEnd = rdos.end();
800 std::vector<int> totListRecreated{};
801 totListRecreated.reserve(rdoSize);
802 std::vector<int>::const_iterator totRecreated = totListRecreated.begin();
807 for ( ; rdosBegin!= rdosEnd and
tot != totList.end(); ++
tot, ++rdosBegin, ++totRecreated ){
813 std::array<InDetDD::PixelDiodeTree::CellIndexType,2> diode_idx
818 auto diode_type = design->getDiodeType(si_param);
820 && design->numberOfConnectedCells( design->readoutIdOfCell(
InDetDD::SiCellId(diode_idx[0],diode_idx[1])))>1) {
824 float charge = calibData->
getCharge(diode_type, moduleHash, feValue, tot0);
825 chListRecreated.push_back(
charge);
826 totListRecreated.push_back(tot0);
829 rdosBegin = rdos.begin();
830 rdosEnd = rdos.end();
832 tot = totList.begin();
833 totRecreated = totListRecreated.begin();
835 std::vector<float>::const_iterator
charge = chListRecreated.begin();
836 std::vector<float>::const_iterator chargeEnd = chListRecreated.end();
837 tot = totListRecreated.begin();
838 std::vector<int>::const_iterator totEnd = totListRecreated.end();
845 for (; (rdosBegin!= rdosEnd) and (
charge != chargeEnd) and (
tot != totEnd); ++rdosBegin, ++
charge, ++
tot){
851 sumOfWeightedPositions += (*charge)*siLocalPosition;
852 sumOfTot += (*charge);
854 sumOfWeightedPositions += ((
double)(*
tot))*siLocalPosition;
863 sumOfWeightedPositions /= sumOfTot;
866 InDetDD::SiCellId cellIdWeightedPosition=design->cellIdOfPosition(sumOfWeightedPositions);
868 if (!cellIdWeightedPosition.
isValid()){
871 int columnWeightedPosition=cellIdWeightedPosition.
etaIndex();
872 int rowWeightedPosition=cellIdWeightedPosition.
phiIndex();
873 ATH_MSG_VERBOSE(
" weighted pos row: " << rowWeightedPosition <<
" col: " << columnWeightedPosition );
874 int centralIndexX=(
m_sizeX-1)/2;
875 int centralIndexY=(
m_sizeY-1)/2;
876 if (std::abs(rowWeightedPosition-rowMin)>centralIndexX or
877 std::abs(rowWeightedPosition-rowMax)>centralIndexX){
878 ATH_MSG_VERBOSE(
" Cluster too large rowMin" << rowMin <<
" rowMax " << rowMax <<
" centralX " << centralIndexX);
881 if (std::abs(columnWeightedPosition-colMin)>centralIndexY or
882 std::abs(columnWeightedPosition-colMax)>centralIndexY){
883 ATH_MSG_VERBOSE(
" Cluster too large colMin" << colMin <<
" colMax " << colMax <<
" centralY " << centralIndexY);
891 rdosBegin = rdos.begin();
892 charge = chListRecreated.begin();
893 chargeEnd = chListRecreated.end();
894 tot = totListRecreated.begin();
895 ATH_MSG_VERBOSE(
" Putting together the n. " << rdos.size() <<
" rdos into a matrix." );
900 for (;(
charge != chargeEnd) and (rdosBegin!= rdosEnd); ++rdosBegin, ++
charge, ++
tot){
902 unsigned int absrow = pixelID.
phi_index(rId)-rowWeightedPosition+centralIndexX;
903 unsigned int abscol = pixelID.
eta_index(rId)-columnWeightedPosition+centralIndexY;
914 double pitchY = diodeParameters.
width().
xEta();
922 input.matrixOfToT[absrow][abscol]*=3;
926 if ( (
input.ClusterPixLayer==0) and (
input.ClusterPixBarrelEC==0)){
927 input.matrixOfToT[absrow][abscol]*=3;
932 if (std::abs(pitchY-0.4)>1
e-5){
933 input.vectorOfPitchesY[abscol]=pitchY;
938 input.useTrackInfo=
false;
946 float trkphicomp = my_track.dot(my_phiax);
947 float trketacomp = my_track.dot(my_etaax);
948 float trknormcomp = my_track.dot(my_normal);
949 double bowphi = std::atan2(trkphicomp,trknormcomp);
950 double boweta = std::atan2(trketacomp,trknormcomp);
952 if(bowphi > M_PI_2) bowphi -=
M_PI;
953 if(bowphi < -M_PI_2) bowphi +=
M_PI;
954 int readoutside = design->readoutSide();
958 if (boweta>M_PI_2) boweta-=
M_PI;
959 if (boweta<-M_PI_2) boweta+=
M_PI;
962 input.rowWeightedPosition=rowWeightedPosition;
963 input.columnWeightedPosition=columnWeightedPosition;
964 ATH_MSG_VERBOSE(
" RowWeightedPosition: " << rowWeightedPosition <<
" ColWeightedPosition: " << columnWeightedPosition );
◆ 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()
◆ eigenInput()
Definition at line 212 of file NnClusterizationFactory.cxx.
220 Eigen::VectorXd valuesVector( vecSize );
226 for (
const auto & xvec:
input.matrixOfToT){
227 for (
const auto & xyElement : xvec){
228 valuesVector[location++] = xyElement;
231 for (
const auto & pitch :
input.vectorOfPitchesY) {
232 valuesVector[location++] = pitch;
234 valuesVector[location] =
input.ClusterPixLayer;
236 valuesVector[location] =
input.ClusterPixBarrelEC;
238 valuesVector[location] =
input.phi;
240 valuesVector[location] =
input.theta;
242 if (!
input.useTrackInfo) {
243 valuesVector[location] =
input.etaModule;
248 std::vector<Eigen::VectorXd> vectorOfEigen;
249 vectorOfEigen.push_back(valuesVector);
250 return vectorOfEigen;
◆ estimateNumberOfParticles() [1/2]
◆ estimateNumberOfParticles() [2/2]
◆ estimateNumberOfParticlesLWTNN()
Definition at line 325 of file NnClusterizationFactory.cxx.
326 std::vector<double>
result(3,0.0);
328 if (!lwtnn_collection.isValid()) {
332 if (lwtnn_collection->empty()){
344 const auto inverseSum = 1./(num0+num1+num2);
345 result[0] = num0 * inverseSum;
346 result[1] = num1 * inverseSum;
347 result[2] = num2 * inverseSum;
◆ estimateNumberOfParticlesTTN()
| std::vector< double > InDet::NnClusterizationFactory::estimateNumberOfParticlesTTN |
( |
const TTrainedNetworkCollection & |
nn_collection, |
|
|
const std::vector< double > & |
inputData |
|
) |
| const |
|
private |
Definition at line 302 of file NnClusterizationFactory.cxx.
305 std::vector<double> resultNN_TTN{};
312 ATH_MSG_FATAL(
"NnClusterizationFactory::estimateNumberOfParticlesTTN: nullptr returned for TrainedNetwork");
317 ATH_MSG_VERBOSE(
" TTN Prob of n. particles (1): " << resultNN_TTN[0] <<
318 " (2): " << resultNN_TTN[1] <<
319 " (3): " << resultNN_TTN[2]);
◆ estimatePositions() [1/2]
◆ estimatePositions() [2/2]
◆ estimatePositionsLWTNN()
Definition at line 474 of file NnClusterizationFactory.cxx.
480 if (not lwtnn_collection.isValid()) {
484 if (lwtnn_collection->empty()){
490 std::vector<double> positionValues{};
491 std::vector<Amg::MatrixX> errorMatrices;
492 errorMatrices.reserve(numberSubClusters);
493 positionValues.reserve(numberSubClusters * 2);
494 std::size_t outputNode(0);
495 for (
int cluster = 1; cluster < numberSubClusters+1; cluster++) {
498 const auto pNetwork = lwtnn_collection->find(numberSubClusters);
499 const bool validGraph = (pNetwork != lwtnn_collection->end()) and (pNetwork->second !=
nullptr);
500 if (not validGraph) {
501 std::string infoMsg =
"Acceptable numbers of subclusters for the lwtnn collection:\n ";
502 for (
const auto & pair: **lwtnn_collection){
505 infoMsg +=
"\nNumber of subclusters requested : "+
std::to_string(numberSubClusters);
507 ATH_MSG_FATAL(
"estimatePositionsLWTNN: No lwtnn network found for the number of clusters.\n"
508 <<
" If you are outside the valid range for an lwtnn-based configuration, please run with useNNTTrainedNetworks instead.\n Key = "
512 if(numberSubClusters==1) {
514 }
else if(numberSubClusters==2) {
516 }
else if(numberSubClusters==3) {
519 ATH_MSG_FATAL(
"Cannot evaluate LWTNN networks with " << numberSubClusters <<
" numberSubClusters" );
526 Eigen::VectorXd position = lwtnn_collection->at(numberSubClusters)->compute(
input, {}, outputNode);
527 ATH_MSG_DEBUG(
"Testing for numberSubClusters " << numberSubClusters <<
" and cluster " << cluster);
528 for (
int i=0;
i<position.rows();
i++) {
531 positionValues.push_back(position[1]);
532 positionValues.push_back(position[2]);
535 const float rawRmsX = std::sqrt(1.0/position[3]);
536 const float rawRmsY = std::sqrt(1.0/position[4]);
539 const double rmsY =
correctedRMSY(rawRmsY, rawInput.vectorOfPitchesY);
540 ATH_MSG_DEBUG(
" Estimated RMS errors (1) x: " << rmsX <<
", y: " << rmsY);
546 errorMatrices.push_back(erm);
550 errors=std::move(errorMatrices);
◆ estimatePositionsTTN()
Definition at line 413 of file NnClusterizationFactory.cxx.
420 std::vector<Amg::Vector2D> allPositions{};
421 const auto endNnIdx = nn_collection.size();
422 if (numberSubClusters>0 and
static_cast<unsigned int>(numberSubClusters) <
m_maxSubClusters) {
423 const auto subClusterIndex = numberSubClusters-1;
428 if (not(networkIndex < endNnIdx)){
429 ATH_MSG_FATAL(
"estimatePositionsTTN: Requested collection index, "<< networkIndex <<
" is out of range.");
432 auto *
const pNetwork = nn_collection[networkIndex].get();
435 assert( position1P.size() % 2 == 0);
436 for (
unsigned int i=0;
i<position1P.size()/2 ; ++
i) {
440 std::vector<double> inputDataNew=inputData;
441 inputDataNew.reserve( inputDataNew.size() + numberSubClusters*2);
442 assert(
static_cast<unsigned int>(numberSubClusters*2) <= position1P.size() );
443 for (
unsigned int i=0; i<static_cast<unsigned int>(numberSubClusters*2); ++
i) {
444 inputDataNew.push_back(position1P[
i]);
450 if ((not (xNetworkIndex < endNnIdx)) or (not (yNetworkIndex < endNnIdx))){
451 ATH_MSG_FATAL(
"estimatePositionsTTN: A requested collection index, "<< xNetworkIndex <<
" or "<< yNetworkIndex <<
"is out of range.");
454 auto *pxNetwork = nn_collection.at(xNetworkIndex).get();
455 auto *pyNetwork = nn_collection.at(yNetworkIndex).get();
460 std::vector<Amg::MatrixX> errorMatrices1;
462 allPositions.reserve( allPositions.size() + myPosition1.size());
464 for (
unsigned int i=0;
i<myPosition1.size();
i++){
465 allPositions.push_back(myPosition1[
i]);
466 errors.push_back(errorMatrices1[
i]);
◆ 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()
| virtual StatusCode InDet::NnClusterizationFactory::finalize |
( |
| ) |
|
|
inlineoverridevirtual |
◆ getErrorMatrixFromOutput()
| void InDet::NnClusterizationFactory::getErrorMatrixFromOutput |
( |
std::vector< double > & |
outputX, |
|
|
std::vector< double > & |
outputY, |
|
|
std::vector< Amg::MatrixX > & |
errorMatrix, |
|
|
int |
nParticles |
|
) |
| const |
|
private |
Definition at line 578 of file NnClusterizationFactory.cxx.
582 int sizeOutputX=outputX.size()/nParticles;
583 int sizeOutputY=outputY.size()/nParticles;
590 errorMatrix.reserve( errorMatrix.size() + nParticles);
591 for (
int i=0;
i<nParticles;
i++){
593 for (
int u=0;
u<sizeOutputX;
u++){
594 sumValuesX+=outputX[
i*sizeOutputX+
u];
597 for (
int u=0;
u<sizeOutputY;
u++){
598 sumValuesY+=outputY[
i*sizeOutputY+
u];
600 ATH_MSG_VERBOSE(
" minimumX: " << minimumX <<
" maximumX: " << maximumX <<
" sizeOutputX " << sizeOutputX);
601 ATH_MSG_VERBOSE(
" minimumY: " << minimumY <<
" maximumY: " << maximumY <<
" sizeOutputY " << sizeOutputY);
603 for (
int u=0;
u<sizeOutputX;
u++){
604 RMSx+=outputX[
i*sizeOutputX+
u]/sumValuesX*
std::pow(minimumX+(maximumX-minimumX)/(
double)(sizeOutputX-2)*(
u-1./2.),2);
606 RMSx=std::sqrt(RMSx);
608 double intervalErrorX=3*RMSx;
610 int minBinX=(
int)(1+(-intervalErrorX-minimumX)/(maximumX-minimumX)*(
double)(sizeOutputX-2));
611 int maxBinX=(
int)(1+(intervalErrorX-minimumX)/(maximumX-minimumX)*(
double)(sizeOutputX-2));
612 if (maxBinX>sizeOutputX-1) maxBinX=sizeOutputX-1;
613 if (minBinX<0) minBinX=0;
616 for (
int u=minBinX;
u<maxBinX+1;
u++){
617 RMSx+=outputX[
i*sizeOutputX+
u]/sumValuesX*
std::pow(minimumX+(maximumX-minimumX)/(
double)(sizeOutputX-2)*(
u-1./2.),2);
619 RMSx=std::sqrt(RMSx);
621 for (
int u=0;
u<sizeOutputY;
u++){
622 RMSy+=outputY[
i*sizeOutputY+
u]/sumValuesY*
std::pow(minimumY+(maximumY-minimumY)/(
double)(sizeOutputY-2)*(
u-1./2.),2);
624 RMSy=std::sqrt(RMSy);
626 double intervalErrorY=3*RMSy;
628 int minBinY=(
int)(1+(-intervalErrorY-minimumY)/(maximumY-minimumY)*(
double)(sizeOutputY-2));
629 int maxBinY=(
int)(1+(intervalErrorY-minimumY)/(maximumY-minimumY)*(
double)(sizeOutputY-2));
630 if (maxBinY>sizeOutputY-1) maxBinY=sizeOutputY-1;
631 if (minBinY<0) minBinY=0;
634 for (
int u=minBinY;
u<maxBinY+1;
u++){
635 RMSy+=outputY[
i*sizeOutputY+
u]/sumValuesY*
std::pow(minimumY+(maximumY-minimumY)/(
double)(sizeOutputY-2)*(
u-1./2.),2);
637 RMSy=std::sqrt(RMSy);
638 ATH_MSG_VERBOSE(
"Computed error, sigma(X) " << RMSx <<
" sigma(Y) " << RMSy );
643 errorMatrix.push_back(erm);
◆ getPositionsFromOutput()
Definition at line 649 of file NnClusterizationFactory.cxx.
657 ATH_MSG_ERROR(
"Dynamic cast failed at line "<<__LINE__<<
" of NnClusterizationFactory.cxx.");
660 int numParticles=
output.size()/2;
661 int columnWeightedPosition=
input.columnWeightedPosition;
662 int rowWeightedPosition=
input.rowWeightedPosition;
663 ATH_MSG_VERBOSE(
" REF POS columnWeightedPos: " << columnWeightedPosition <<
" rowWeightedPos: " << rowWeightedPosition );
664 bool applyRecentering=
false;
666 applyRecentering=
true;
669 applyRecentering=
true;
671 std::vector<Amg::Vector2D> positions;
672 for (
int u=0;
u<numParticles;
u++){
679 posXid=
output[2*
u]+rowWeightedPosition;
680 posYid=
output[2*
u+1]+columnWeightedPosition;
682 ATH_MSG_VERBOSE(
" N. particle: " <<
u <<
" idx posX " << posXid <<
" posY " << posYid );
684 const auto & [posXid_int, coercedX]=coerceToIntRange(posXid+0.5);
685 const auto & [posYid_int, coercedY]=coerceToIntRange(posYid+0.5);
686 if (coercedX or coercedY){
687 ATH_MSG_WARNING(
"X or Y position value has been limited in range; original values are (" << posXid<<
", "<<posYid<<
")");
690 ATH_MSG_VERBOSE(
" N. particle: " <<
u <<
" TO INTEGER idx posX " << posXid_int <<
" posY " << posYid_int );
692 InDetDD::SiCellId cellIdOfPositionDiscrete=design->cellIdOfPosition(siLocalPositionDiscrete);
693 if ( not cellIdOfPositionDiscrete.
isValid()){
694 ATH_MSG_WARNING(
" Cell is outside validity region with index Y: " << posYid_int <<
" and index X: " << posXid_int <<
". Not foreseen... " );
697 double pitchY = diodeParameters.
width().
xEta();
698 double pitchX = diodeParameters.
width().
xPhi();
699 ATH_MSG_VERBOSE(
" Translated weighted position : " << siLocalPositionDiscrete.xPhi()
700 <<
" Translated weighted position : " << siLocalPositionDiscrete.xEta() );
702 InDetDD::SiLocalPosition siLocalPositionDiscreteOneRowMoreOneColumnMore(design->positionFromColumnRow(posYid_int+1,posXid_int+1));
703 ATH_MSG_VERBOSE(
" Translated weighted position +1col +1row phi: " << siLocalPositionDiscreteOneRowMoreOneColumnMore.xPhi()
704 <<
" Translated weighted position +1col +1row eta: " << siLocalPositionDiscreteOneRowMoreOneColumnMore.xEta() );
707 pitchX*(posXid-(
double)posXid_int));
709 if (
input.ClusterPixBarrelEC == 0){
710 if (not
input.useTrackInfo){
718 siLocalPosition(siLocalPositionDiscrete.xEta()+pitchY*(posYid-(
double)posYid_int),
719 siLocalPositionDiscrete.xPhi()+pitchX*(posXid-(
double)posXid_int)+lorentzShift);
720 ATH_MSG_VERBOSE(
" Translated final position phi: " << siLocalPosition.xPhi() <<
" eta: " << siLocalPosition.xEta() );
721 const auto halfWidth{design->width()*0.5};
722 if (siLocalPositionDiscrete.xPhi() > halfWidth){
725 ATH_MSG_WARNING(
" Corrected out of boundary cluster from x(phi): " << siLocalPositionDiscrete.xPhi()+pitchX*(posXid-(
double)posXid_int)
726 <<
" to: " << halfWidth-1
e-6);
727 }
else if (siLocalPositionDiscrete.xPhi() < -halfWidth) {
730 ATH_MSG_WARNING(
" Corrected out of boundary cluster from x(phi): " << siLocalPositionDiscrete.xPhi()+pitchX*(posXid-(
double)posXid_int)
731 <<
" to: " << -halfWidth+1
e-6);
733 positions.emplace_back(siLocalPosition);
◆ initialize()
| StatusCode InDet::NnClusterizationFactory::initialize |
( |
| ) |
|
|
overridevirtual |
Definition at line 67 of file NnClusterizationFactory.cxx.
82 std::smatch match_result;
83 for(
const std::string &nn_name :
m_nnOrder) {
85 for (
unsigned int network_i=0; network_i<
kNNetworkTypes; ++network_i) {
86 if (std::regex_match( nn_name, match_result,
m_nnNames[network_i])) {
92 ATH_MSG_ERROR(
"Regex and match group of particle multiplicity do not coincide (groups=" << match_result.size()
94 <<
"; type=" << network_i <<
")");
97 if (n_particles<=0 or
static_cast<unsigned int>(n_particles)>
m_maxSubClusters) {
100 return StatusCode::FAILURE;
102 if (
static_cast<unsigned int>(n_particles)>=
m_NNId[network_i-1].
size()) {
103 m_NNId[network_i-1].resize( n_particles );
105 m_NNId[network_i-1][n_particles-1] = nn_id;
108 m_NNId[network_i-1].resize(1);
110 m_NNId[network_i-1][0] = nn_id;
119 ATH_MSG_ERROR(
"No NN specified to estimate the number of particles.");
120 return StatusCode::FAILURE;
124 unsigned int type_i=0;
125 for (std::vector<unsigned int> &nn_id :
m_NNId) {
129 return StatusCode::FAILURE;
133 return StatusCode::FAILURE;
135 unsigned int n_particles=0;
136 for (
unsigned int &a_nn_id : nn_id ) {
138 if ((a_nn_id==0) or (a_nn_id>
m_nnOrder.size())) {
140 return StatusCode::FAILURE;
149 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& InDet::NnClusterizationFactory::interfaceID |
( |
| ) |
|
|
inlinestatic |
◆ 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_addIBL
| Gaudi::Property<bool> InDet::NnClusterizationFactory::m_addIBL {this, "addIBL", false, "Also apply to clusters in IBL." } |
|
private |
◆ m_assembleInput
| std::vector<double>(InDet::NnClusterizationFactory:: * InDet::NnClusterizationFactory::m_assembleInput) (NNinput &input) const |
|
inlineprivate |
◆ m_calculateOutput
◆ m_chargeDataKey
◆ m_correctLorShiftBarrelWithoutTracks
| Gaudi::Property<double> InDet::NnClusterizationFactory::m_correctLorShiftBarrelWithoutTracks {this, "correctLorShiftBarrelWithoutTracks",0.,"Lorentz shift correction factor when evaluating NN without track input."} |
|
private |
◆ m_correctLorShiftBarrelWithTracks
| Gaudi::Property<double> InDet::NnClusterizationFactory::m_correctLorShiftBarrelWithTracks {this, "correctLorShiftBarrelWithTracks",0.,"Lorentz shift correction factor when evaluating NN with track input."} |
|
private |
◆ m_detStore
◆ m_doRunI
| Gaudi::Property<bool> InDet::NnClusterizationFactory::m_doRunI {this, "doRunI", false, "Use runI style network (outputs are not normalised; add pitches; use charge if not m_useToT)"} |
|
private |
◆ m_evtStore
◆ m_maxSubClusters
| Gaudi::Property<unsigned int> InDet::NnClusterizationFactory::m_maxSubClusters {this, "MaxSubClusters", 3, "Maximum number of sub cluster supported by the networks." } |
|
private |
◆ m_NNId
| std::vector< std::vector<unsigned int> > InDet::NnClusterizationFactory::m_NNId {} |
|
private |
◆ m_nnNames
◆ m_nnOrder
| Gaudi::Property< std::vector<std::string> > InDet::NnClusterizationFactory::m_nnOrder |
|
private |
Initial value:{this, "NetworkOrder", {
"NumberParticles",
"ImpactPoints1P",
"ImpactPoints2P",
"ImpactPoints3P",
"ImpactPointErrorsX1",
"ImpactPointErrorsX2",
"ImpactPointErrorsX3",
"ImpactPointErrorsY1",
"ImpactPointErrorsY2",
"ImpactPointErrorsY3"},
"The order in which the networks will appear in the TTrainedNetworkCollection"}
Definition at line 192 of file NnClusterizationFactory.h.
◆ m_nParticleGroup
| constexpr std::array<unsigned int, kNNetworkTypes> InDet::NnClusterizationFactory::m_nParticleGroup {0U,1U,1U,1U} |
|
staticconstexprprivate |
◆ m_nParticleNNId
| unsigned int InDet::NnClusterizationFactory::m_nParticleNNId {} |
|
private |
◆ m_outputNodesPos1
| Gaudi::Property< std::size_t > InDet::NnClusterizationFactory::m_outputNodesPos1 |
|
private |
Initial value:{this, "OutputNodePos1", 7,
"Output node for the 1 position networks (LWTNN)"}
Definition at line 258 of file NnClusterizationFactory.h.
◆ m_outputNodesPos2
| Gaudi::Property< std::vector<std::size_t> > InDet::NnClusterizationFactory::m_outputNodesPos2 |
|
private |
Initial value:{this, "OutputNodePos2", { 10, 11 },
"List of output nodes for the 2 position network (LWTNN)"}
Definition at line 262 of file NnClusterizationFactory.h.
◆ m_outputNodesPos3
| Gaudi::Property< std::vector<std::size_t> > InDet::NnClusterizationFactory::m_outputNodesPos3 |
|
private |
Initial value:{this, "OutputNodePos3", { 13, 14, 15 },
"List of output nodes for the 3 position networks (LWTNN)"}
Definition at line 266 of file NnClusterizationFactory.h.
◆ m_pixelLorentzAngleTool
◆ m_readKeyJSON
Initial value:{this, "NnCollectionJSONReadKey", "PixelClusterNNJSON",
"The conditions key for the pixel cluster NNs configured via JSON file and accessed with lwtnn"}
Definition at line 250 of file NnClusterizationFactory.h.
◆ m_readKeyWithoutTrack
◆ m_readKeyWithTrack
Initial value:{this, "NnCollectionWithTrackReadKey", "PixelClusterNNWithTrack",
"The conditions store key for the pixel cluster NNs which needs tracks as input"}
Definition at line 246 of file NnClusterizationFactory.h.
◆ m_sizeX
| Gaudi::Property<unsigned int> InDet::NnClusterizationFactory::m_sizeX {this, "sizeX",7,"Size of pixel matrix along X"} |
|
private |
◆ m_sizeY
| Gaudi::Property<unsigned int> InDet::NnClusterizationFactory::m_sizeY {this, "sizeY",7,"Size of pixel matrix along Y"} |
|
private |
◆ m_useRecenteringNNWithouTracks
| Gaudi::Property<bool> InDet::NnClusterizationFactory::m_useRecenteringNNWithouTracks {this, "useRecenteringNNWithoutTracks",false,"Recenter x position when evaluating NN without track input."} |
|
private |
◆ m_useRecenteringNNWithTracks
| Gaudi::Property<bool> InDet::NnClusterizationFactory::m_useRecenteringNNWithTracks {this, "useRecenteringNNWithTracks",false,"Recenter x position when evaluating NN with track input."} |
|
private |
◆ m_useToT
| Gaudi::Property<bool> InDet::NnClusterizationFactory::m_useToT {this, "useToT",true,"Use Tot rather than charge." } |
|
private |
◆ m_useTTrainedNetworks
| Gaudi::Property<bool> InDet::NnClusterizationFactory::m_useTTrainedNetworks {this, "useTTrainedNetworks", false, "Use earlier (release-21-like) neural networks stored in ROOT files and accessed via TTrainedNetowrk."} |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ s_nnTypeNames
| constexpr std::array<std::string_view, kNNetworkTypes> InDet::NnClusterizationFactory::s_nnTypeNames |
|
staticconstexprprivate |
The documentation for this class was generated from the following files:
Gaudi::Property< unsigned int > m_sizeX
double norm_etaModule(const double input)
std::vector< Double_t > calculateOutputValues(std::vector< Double_t > &input) const
int phi_index(const Identifier &id) const
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Gaudi::Property< bool > m_addIBL
static constexpr std::array< unsigned int, kNNetworkTypes > m_nParticleGroup
SG::ReadCondHandleKey< PixelChargeCalibCondData > m_chargeDataKey
Gaudi::Property< std::size_t > m_outputNodesPos1
double norm_rawToT(const double input)
std::vector< std::vector< unsigned int > > m_NNId
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Eigen::Matrix< double, 2, 1 > Vector2D
double norm_pitch(const double input, bool addIBL=false)
bool isValid() const
Test if its in a valid state.
std::vector< Amg::Vector2D > estimatePositionsTTN(const TTrainedNetworkCollection &nn_collection, const std::vector< double > &inputData, const NNinput &input, const InDet::PixelCluster &pCluster, int numberSubClusters, std::vector< Amg::MatrixX > &errors) const
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
const std::vector< Identifier > & rdoList() const
return the List of rdo identifiers (pointers)
double norm_phi(const double input)
Gaudi::Property< unsigned int > m_maxSubClusters
int phiIndex() const
Get phi index. Equivalent to strip().
InputVector eigenInput(NNinput &input) const
#define ATH_MSG_VERBOSE(x)
const std::string & key() const
Return the StoreGate ID for the referenced object.
std::string to_string(const SectorProjector proj)
static const std::array< std::regex, kNNetworkTypes > m_nnNames
double norm_theta(const double input)
void addTrackInfoToInput(NNinput &input, const Trk::Surface &pixelSurface, const Trk::TrackParameters &trackParsAtSurface, const double tanl) const
std::vector< Amg::Vector2D > estimatePositionsLWTNN(NnClusterizationFactory::InputVector &input, NNinput &rawInput, const InDet::PixelCluster &pCluster, int numberSubClusters, std::vector< Amg::MatrixX > &errors) const
const std::vector< int > & totList() const
@ u
Enums for curvilinear frames.
virtual IdentifierHash identifyHash() const override final
identifier hash (inline)
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module) const
For a single crystal.
std::vector< double >(InDet::NnClusterizationFactory::* m_assembleInput)(NNinput &input) const
virtual void setOwner(IDataHandleHolder *o)=0
std::vector< double > assembleInputRunI(NNinput &input) const
double xPhi() const
position along phi direction:
Gaudi::Property< bool > m_useTTrainedNetworks
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
SG::ReadCondHandleKey< LWTNNCollection > m_readKeyJSON
static double correctedRMSX(double posPixels)
std::vector< Amg::Vector2D > getPositionsFromOutput(std::vector< double > &output, const NNinput &input, const InDet::PixelCluster &pCluster) const
int etaIndex() const
Get eta index.
IdentifierHash wafer_hash(Identifier wafer_id) const
wafer hash from id
double norm_layerNumber(const double input)
void getErrorMatrixFromOutput(std::vector< double > &outputX, std::vector< double > &outputY, std::vector< Amg::MatrixX > &errorMatrix, int nParticles) const
double xEta() const
position along eta direction:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
double angle(const GeoTrf::Vector2D &a, const GeoTrf::Vector2D &b)
double back_posY(const double input)
SG::ReadCondHandleKey< TTrainedNetworkCollection > m_readKeyWithTrack
DVec calculateNormalized(const DVec &input) const
double norm_ToT(const double input)
int eta_index(const Identifier &id) const
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
static constexpr std::array< std::string_view, kNNetworkTypes > s_nnTypeNames
double norm_layerType(const double input)
std::vector< double > estimateNumberOfParticlesTTN(const TTrainedNetworkCollection &nn_collection, const std::vector< double > &inputData) 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...
virtual void renounce()=0
double norm_phiBS(const double input)
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Identifier identify() const
return the identifier
SG::ReadCondHandleKey< TTrainedNetworkCollection > m_readKeyWithoutTrack
int layer_disk(const Identifier &id) const
Gaudi::Property< bool > m_useRecenteringNNWithTracks
int eta_module(const Identifier &id) const
double errorHalfIntervalY(const int nParticles)
unsigned int m_nParticleNNId
Gaudi::Property< bool > m_useToT
const Amg::Vector2D & localPosition() const
return the local position reference
double correctedRMSY(double posPixels, std::vector< float > &pitches) const
double charge(const T &p)
Gaudi::Property< double > m_correctLorShiftBarrelWithoutTracks
StatusCode initialize(bool used=true)
std::vector< double > estimateNumberOfParticlesLWTNN(NnClusterizationFactory::InputVector &input) const
Eigen::Matrix< double, 3, 1 > Vector3D
ToolHandle< ISiLorentzAngleTool > m_pixelLorentzAngleTool
double back_posX(const double input, const bool recenter=false)
double errorHalfIntervalX(const int nParticles)
const Amg::Vector3D & momentum() const
Access method for the momentum.
bool empty() const noexcept
Gaudi::Property< std::vector< std::size_t > > m_outputNodesPos3
Gaudi::Property< double > m_correctLorShiftBarrelWithTracks
Gaudi::Property< unsigned int > m_sizeY
Helper class to access parameters of a diode.
ReturnType(::TTrainedNetwork::* m_calculateOutput)(const InputType &input) const
std::vector< double > assembleInputRunII(NNinput &input) const
#define ATH_MSG_WARNING(x)
Gaudi::Property< bool > m_useRecenteringNNWithouTracks
Gaudi::Property< std::vector< std::string > > m_nnOrder
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
size_t calculateVectorDimension(const bool useTrackInfo) const
const SiLocalPosition & width() const
width of the diodes:
Gaudi::Property< std::vector< std::size_t > > m_outputNodesPos2
float getCharge(InDetDD::PixelDiodeType type, unsigned int moduleHash, unsigned int FE, float ToT) const
Gaudi::Property< bool > m_doRunI
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.
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):
std::vector< Eigen::VectorXd > InputVector
constexpr int pow(int base, int exp) noexcept
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.
NNinput createInput(const InDet::PixelCluster &pCluster, Amg::Vector3D &beamSpotPosition, double &tanl) const
double norm_thetaBS(const double input)
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
const std::vector< float > & chargeList() const