25 float trk_nhits_ = -1.;
26 float trk_high_quality_ = -1.;
27 float trk_chi2red_ = -1.;
29 float ktf_ecal_cluster_e_ = -1.;
30 float ktf_ecal_cluster_deta_ = -42.;
31 float ktf_ecal_cluster_dphi_ = -42.;
32 float ktf_ecal_cluster_e3x3_ = -1.;
33 float ktf_ecal_cluster_e5x5_ = -1.;
34 float ktf_ecal_cluster_covEtaEta_ = -42.;
35 float ktf_ecal_cluster_covEtaPhi_ = -42.;
36 float ktf_ecal_cluster_covPhiPhi_ = -42.;
37 float ktf_ecal_cluster_r9_ = -0.1;
38 float ktf_ecal_cluster_circularity_ = -0.1;
39 float ktf_hcal_cluster_e_ = -1.;
40 float ktf_hcal_cluster_deta_ = -42.;
41 float ktf_hcal_cluster_dphi_ = -42.;
42 float preid_gsf_dpt_ = -1.;
43 float preid_trk_gsf_chiratio_ = -1.;
44 float preid_gsf_chi2red_ = -1.;
45 float trk_dxy_sig_ = -1.;
48 const auto& trk =
ecal.trackRef();
49 if (trk.isNonnull()) {
51 trk_eta_ = trk->eta();
52 trk_phi_ = trk->phi();
54 trk_nhits_ = static_cast<float>(trk->found());
56 trk_chi2red_ = trk->normalizedChi2();
57 if (trk->dxy(spot) > 0.) {
58 trk_dxy_sig_ = trk->dxyError() / trk->dxy(spot);
60 ktf_ecal_cluster_dphi_ *= trk->charge();
64 rho_ = static_cast<float>(
rho);
67 const auto& ecal_clu =
ecal.clusterRef();
68 if (ecal_clu.isNonnull()) {
69 ktf_ecal_cluster_e_ = ecal_clu->energy();
70 ktf_ecal_cluster_deta_ =
ecal.geomMatching()[0];
71 ktf_ecal_cluster_dphi_ =
ecal.geomMatching()[1];
72 ktf_ecal_cluster_e3x3_ =
tools.e3x3(*ecal_clu);
73 ktf_ecal_cluster_e5x5_ =
tools.e5x5(*ecal_clu);
74 const auto& covs =
tools.localCovariances(*ecal_clu);
75 ktf_ecal_cluster_covEtaEta_ = covs[0];
76 ktf_ecal_cluster_covEtaPhi_ = covs[1];
77 ktf_ecal_cluster_covPhiPhi_ = covs[2];
78 if (ktf_ecal_cluster_e_ > 0.) {
79 ktf_ecal_cluster_r9_ = ktf_ecal_cluster_e3x3_ / ktf_ecal_cluster_e_;
81 if (ktf_ecal_cluster_e5x5_ > 0.) {
82 ktf_ecal_cluster_circularity_ = 1. -
tools.e1x5(*ecal_clu) / ktf_ecal_cluster_e5x5_;
84 ktf_ecal_cluster_circularity_ = -0.1;
89 const auto& hcal_clu =
hcal.clusterRef();
90 if (hcal_clu.isNonnull()) {
91 ktf_hcal_cluster_e_ = hcal_clu->energy();
92 ktf_hcal_cluster_deta_ =
hcal.geomMatching()[0];
93 ktf_hcal_cluster_dphi_ =
hcal.geomMatching()[1];
97 preid_gsf_dpt_ =
ecal.dpt();
98 preid_trk_gsf_chiratio_ =
ecal.chi2Ratio();
99 preid_gsf_chi2red_ =
ecal.gsfChi2();
102 std::vector<float>
output = {trk_pt_,
111 ktf_ecal_cluster_deta_,
112 ktf_ecal_cluster_dphi_,
113 ktf_ecal_cluster_e3x3_,
114 ktf_ecal_cluster_e5x5_,
115 ktf_ecal_cluster_covEtaEta_,
116 ktf_ecal_cluster_covEtaPhi_,
117 ktf_ecal_cluster_covPhiPhi_,
118 ktf_ecal_cluster_r9_,
119 ktf_ecal_cluster_circularity_,
121 ktf_hcal_cluster_deta_,
122 ktf_hcal_cluster_dphi_,
124 preid_trk_gsf_chiratio_,