23 float trk_nhits_ = -1.;
24 float trk_high_quality_ = -1.;
25 float trk_chi2red_ = -1.;
27 float ktf_ecal_cluster_e_ = -1.;
28 float ktf_ecal_cluster_deta_ = -42.;
29 float ktf_ecal_cluster_dphi_ = -42.;
30 float ktf_ecal_cluster_e3x3_ = -1.;
31 float ktf_ecal_cluster_e5x5_ = -1.;
32 float ktf_ecal_cluster_covEtaEta_ = -42.;
33 float ktf_ecal_cluster_covEtaPhi_ = -42.;
34 float ktf_ecal_cluster_covPhiPhi_ = -42.;
35 float ktf_ecal_cluster_r9_ = -0.1;
36 float ktf_ecal_cluster_circularity_ = -0.1;
37 float ktf_hcal_cluster_e_ = -1.;
38 float ktf_hcal_cluster_deta_ = -42.;
39 float ktf_hcal_cluster_dphi_ = -42.;
40 float preid_gsf_dpt_ = -1.;
41 float preid_trk_gsf_chiratio_ = -1.;
42 float preid_gsf_chi2red_ = -1.;
43 float trk_dxy_sig_ = -1.;
46 const auto& trk =
ecal.trackRef();
47 if (trk.isNonnull()) {
49 trk_eta_ = trk->eta();
50 trk_phi_ = trk->phi();
52 trk_nhits_ = static_cast<float>(trk->found());
54 trk_chi2red_ = trk->normalizedChi2();
55 if (trk->dxy(spot) > 0.) {
56 trk_dxy_sig_ = trk->dxyError() / trk->dxy(spot);
58 ktf_ecal_cluster_dphi_ *= trk->charge();
62 rho_ = static_cast<float>(
rho);
65 const auto& ecal_clu =
ecal.clusterRef();
66 if (ecal_clu.isNonnull()) {
67 ktf_ecal_cluster_e_ = ecal_clu->energy();
68 ktf_ecal_cluster_deta_ =
ecal.geomMatching()[0];
69 ktf_ecal_cluster_dphi_ =
ecal.geomMatching()[1];
70 ktf_ecal_cluster_e3x3_ =
tools.e3x3(*ecal_clu);
71 ktf_ecal_cluster_e5x5_ =
tools.e5x5(*ecal_clu);
72 const auto& covs =
tools.localCovariances(*ecal_clu);
73 ktf_ecal_cluster_covEtaEta_ = covs[0];
74 ktf_ecal_cluster_covEtaPhi_ = covs[1];
75 ktf_ecal_cluster_covPhiPhi_ = covs[2];
76 if (ktf_ecal_cluster_e_ > 0.) {
77 ktf_ecal_cluster_r9_ = ktf_ecal_cluster_e3x3_ / ktf_ecal_cluster_e_;
79 if (ktf_ecal_cluster_e5x5_ > 0.) {
80 ktf_ecal_cluster_circularity_ = 1. -
tools.e1x5(*ecal_clu) / ktf_ecal_cluster_e5x5_;
82 ktf_ecal_cluster_circularity_ = -0.1;
87 const auto& hcal_clu =
hcal.clusterRef();
88 if (hcal_clu.isNonnull()) {
89 ktf_hcal_cluster_e_ = hcal_clu->energy();
90 ktf_hcal_cluster_deta_ =
hcal.geomMatching()[0];
91 ktf_hcal_cluster_dphi_ =
hcal.geomMatching()[1];
95 preid_gsf_dpt_ =
ecal.dpt();
96 preid_trk_gsf_chiratio_ =
ecal.chi2Ratio();
97 preid_gsf_chi2red_ =
ecal.gsfChi2();
100 std::vector<float>
output = {trk_pt_,
109 ktf_ecal_cluster_deta_,
110 ktf_ecal_cluster_dphi_,
111 ktf_ecal_cluster_e3x3_,
112 ktf_ecal_cluster_e5x5_,
113 ktf_ecal_cluster_covEtaEta_,
114 ktf_ecal_cluster_covEtaPhi_,
115 ktf_ecal_cluster_covPhiPhi_,
116 ktf_ecal_cluster_r9_,
117 ktf_ecal_cluster_circularity_,
119 ktf_hcal_cluster_deta_,
120 ktf_hcal_cluster_dphi_,
122 preid_trk_gsf_chiratio_,