25 const std::string &
name,
26 const IInterface *
parent) :
29 declareInterface<IPixelClusterSplitter>(
this);
37 return StatusCode::FAILURE;
41 return StatusCode::SUCCESS;
45 return StatusCode::SUCCESS;
54 const std::vector<Identifier>& rdos = origCluster.
rdoList();
55 const std::vector<int>& totList = origCluster.
totList();
58 std::vector<int> lvl1group(rdos.size(),origCluster.
LVL1A());
60 std::vector<Amg::Vector2D> allLocalPositions;
61 std::vector<Amg::MatrixX> allErrorMatrix;
62 std::vector<Amg::MatrixX> errorMatrix;
64 if ((errorMatrix.size()!=2) or (localPosition.size()!=2)){
65 throw std::length_error(
"Position and error vector sizes *must* be 2 in TruthPixelClusterSplitter::splitCluster");
67 std::vector<InDet::PixelClusterParts> allMultiPClusters;
68 allMultiPClusters.emplace_back(rdos,totList,lvl1group,localPosition.at(0),errorMatrix.at(0));
69 allMultiPClusters.emplace_back(rdos,totList,lvl1group,localPosition.at(1),errorMatrix.at(1));
70 return allMultiPClusters;
82 if (element==
nullptr) {
103 ATH_MSG_VERBOSE(
" Cluster not on b-layer. Return empty object-->back to default clustering." );
110 const std::vector<Identifier>& rdos = origCluster.
rdoList();
111 const std::vector<int>& totList = origCluster.
totList();
114 std::vector<int> lvl1group(rdos.size(),origCluster.
LVL1A());
121 double splitProb3=splitProb3rel/(splitProb3rel+splitProb2);
123 ATH_MSG_VERBOSE(
" SplitProb -->2 " << splitProb2 <<
" SplitProb -->3 " << splitProb3 );
142 std::vector<Amg::Vector2D> allLocalPositions;
143 std::vector<Amg::MatrixX> allErrorMatrix;
145 std::vector<InDet::PixelClusterParts> allMultiPClusters;
149 std::vector<Amg::MatrixX> errorMatrix;
152 if ((errorMatrix.size()!=1) or (localPosition.size()!=1))
154 throw std::length_error(
"Position and error vector sizes *must* be 1 in TruthPixelClusterSplitter::splitCluster");
156 allMultiPClusters.emplace_back(rdos,totList,lvl1group,localPosition.at(0),errorMatrix.at(0));
158 else if (nParticles==2)
161 std::vector<Amg::MatrixX> errorMatrix;
164 if ((errorMatrix.size()!=2) or localPosition.size()!=2)
166 throw std::length_error(
"Position and error vector sizes *must* be 2 in TruthPixelClusterSplitter::splitCluster");
169 allMultiPClusters.emplace_back(rdos,totList,lvl1group,localPosition.at(0),errorMatrix.at(0));
170 allMultiPClusters.emplace_back(rdos,totList,lvl1group,localPosition.at(1),errorMatrix.at(1));
172 else if (nParticles==3)
175 std::vector<Amg::MatrixX> errorMatrix;
178 if ((errorMatrix.size()!=3) or (localPosition.size()!=3))
180 throw std::length_error(
"Position and error vector sizes *must* be 3 in TruthPixelClusterSplitter::splitCluster");
182 allMultiPClusters.emplace_back(rdos,totList,lvl1group,localPosition.at(0),errorMatrix.at(0));
183 allMultiPClusters.emplace_back(rdos,totList,lvl1group,localPosition.at(1),errorMatrix.at(1));
184 allMultiPClusters.emplace_back(rdos,totList,lvl1group,localPosition.at(2),errorMatrix.at(2));
187 return allMultiPClusters;