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_,
46 std::vector<float>& output_mask,
47 std::vector<Trackster>&
result) {
52 tmpTrackster.zeroProbabilities();
53 tmpTrackster.vertices().reserve(lcVec.size());
54 tmpTrackster.vertex_multiplicity().reserve(lcVec.size());
55 for (
auto const& [lc, energyScorePair] : lcVec) {
56 if (inputClusterMask[lc.index()] > 0) {
57 double fraction = energyScorePair.first / lc->energy();
58 if (fraction < fractionCut_)
60 tmpTrackster.vertices().push_back(lc.index());
62 tmpTrackster.vertex_multiplicity().push_back(1. / fraction);
67 tmpTrackster.setRegressedEnergy(energy);
68 tmpTrackster.setIteration(iter);
69 tmpTrackster.setSeed(seed, index);
70 result.emplace_back(tmpTrackster);
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, const Trackster::IterationIndex iter, std::vector< float > &output_mask, std::vector< Trackster > &result)
Trackster::ParticleType tracksterParticleTypeFromPdgId(int pdgId, int charge)
Abs< T >::type abs(const T &t)