1 #ifndef RecoHGCal_TICL_interface_commons_h
2 #define RecoHGCal_TICL_interface_commons_h
17 }
else if (pdgId == 11) {
19 }
else if (pdgId == 13) {
22 bool isHadron = (pdgId > 100 and pdgId < 900) or (pdgId > 1000 and pdgId < 9000);
39 const std::vector<float>& inputClusterMask,
40 const float& fractionCut_,
45 std::vector<float>& output_mask,
46 std::vector<Trackster>&
result) {
51 tmpTrackster.zeroProbabilities();
52 tmpTrackster.vertices().reserve(lcVec.size());
53 tmpTrackster.vertex_multiplicity().reserve(lcVec.size());
54 for (
auto const& [lc, energyScorePair] : lcVec) {
55 if (inputClusterMask[lc.index()] > 0) {
56 double fraction = energyScorePair.first / lc->energy();
57 if (fraction < fractionCut_)
59 tmpTrackster.vertices().push_back(lc.index());
61 tmpTrackster.vertex_multiplicity().push_back(1. / fraction);
66 tmpTrackster.setRegressedEnergy(energy);
67 tmpTrackster.setSeed(seed, index);
68 result.emplace_back(tmpTrackster);
Trackster::ParticleType tracksterParticleTypeFromPdgId(int pdgId, int charge)
static void addTrackster(const int &index, const std::vector< std::pair< edm::Ref< reco::CaloClusterCollection >, std::pair< float, float >>> &lcVec, const std::vector< float > &inputClusterMask, const float &fractionCut_, const float &energy, const int &pdgId, const int &charge, const edm::ProductID &seed, std::vector< float > &output_mask, std::vector< Trackster > &result)
Abs< T >::type abs(const T &t)