78 return StatusCode::SUCCESS;
83 const EventContext& ctx = Gaudi::Hive::currentContext();
92 cellContainer = caloCells.
cptr();
110 std::map<const xAOD::IParticle*, std::vector<const CaloCell*>> muonCellsMap;
114 std::vector<const CaloCell*>
cells;
116 std::vector< float > cells_mu_x;
117 std::vector< float > cells_mu_y;
118 std::vector< float > cells_mu_z;
119 std::vector< float > cells_mu_eta;
120 std::vector< float > cells_mu_phi;
122 std::vector< float > cells_to_mu_dx;
123 std::vector< float > cells_to_mu_dy;
124 std::vector< float > cells_to_mu_dz;
125 std::vector< float > cells_to_mu_deta;
126 std::vector< float > cells_to_mu_dphi;
128 std::vector< float > cells_mu_dx;
129 std::vector< float > cells_mu_dedx;
137 selected_mu(*
mu) = 0;
143 if (mu_track && mu_cluster && mu_cluster->
getCellLinks()) {
145 float e_trk_in_isocone(0.0);
146 std::vector<const xAOD::TrackParticle*> tracks_in_cone;
149 if (
track != mu_track) e_trk_in_isocone +=
track->e();
152 econe_mu(*
mu) = e_trk_in_isocone;
155 selected_mu(*
mu) = 0;
159 selected_mu(*
mu) = 1;
162 bool addAdditionalGapCrackCells =
false;
167 addAdditionalGapCrackCells =
true;
174 if (addAdditionalGapCrackCells) {
176 if (coordinates.size() == 5 ) {
177 double eta = coordinates[3];
178 double phi = coordinates[4];
193 std::vector<double> coordinates =
m_trackInCalo->getXYZEtaPhiInCellSampling(mu_track,
cell);
195 if (coordinates.size() == 5 ) {
198 cells_mu_dx.push_back( path_length );
199 cells_mu_dedx.push_back( (path_length > 0 ? (
cell->energy() / path_length) : -1.0) );
201 cells_mu_x.push_back(coordinates[0]);
202 cells_mu_y.push_back(coordinates[1]);
203 cells_mu_z.push_back(coordinates[2]);
204 cells_mu_eta.push_back(coordinates[3]);
205 cells_mu_phi.push_back(coordinates[4]);
207 cells_to_mu_dx.push_back(
cell->x() - coordinates[0]);
208 cells_to_mu_dy.push_back(
cell->y() - coordinates[1]);
209 cells_to_mu_dz.push_back(
cell->z() - coordinates[2]);
210 cells_to_mu_deta.push_back(
cell->eta() - coordinates[3]);
215 cells_mu_dx.push_back( 0.0 );
216 cells_mu_dedx.push_back( -2.0 );
218 cells_mu_x.push_back(0.0);
219 cells_mu_y.push_back(0.0);
220 cells_mu_z.push_back(0.0);
221 cells_mu_eta.push_back(0.0);
222 cells_mu_phi.push_back(0.0);
224 cells_to_mu_dx.push_back(0.0);
225 cells_to_mu_dy.push_back(0.0);
226 cells_to_mu_dz.push_back(0.0);
227 cells_to_mu_deta.push_back(0.0);
228 cells_to_mu_dphi.push_back(0.0);
236 selected_mu(*
mu) = 0;
239 cellsMuonX(*
mu) = std::move(cells_mu_x);
240 cellsMuonY(*
mu) = std::move(cells_mu_y);
241 cellsMuonZ(*
mu) = std::move(cells_mu_z);
242 cellsMuonEta(*
mu) = std::move(cells_mu_eta);
243 cellsMuonPhi(*
mu) = std::move(cells_mu_phi);
244 cellsToMuonDx(*
mu) = std::move(cells_to_mu_dx);
245 cellsToMuonDy(*
mu) = std::move(cells_to_mu_dy);
246 cellsToMuonDz(*
mu) = std::move(cells_to_mu_dz);
247 cellsToMuonDeta(*
mu) = std::move(cells_to_mu_deta);
248 cellsToMuonDphi(*
mu) = std::move(cells_to_mu_dphi);
249 cellsMuonDx(*
mu) = std::move(cells_mu_dx);
250 cellsMuonDeDx(*
mu) = std::move(cells_mu_dedx);
256 return StatusCode::SUCCESS;