Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-09-26 05:07:07

0001 // Author: Felice Pantaleo,Marco Rovere - felice.pantaleo@cern.ch, marco.rovere@cern.ch
0002 // Date: 09/2018
0003 
0004 #ifndef __RecoHGCal_TICL_PRbyCA_H__
0005 #define __RecoHGCal_TICL_PRbyCA_H__
0006 #include <memory>  // unique_ptr
0007 #include "RecoHGCal/TICL/interface/PatternRecognitionAlgoBase.h"
0008 #include "RecoLocalCalo/HGCalRecAlgos/interface/RecHitTools.h"
0009 #include "PhysicsTools/TensorFlow/interface/TensorFlow.h"
0010 #include "HGCGraph.h"
0011 
0012 namespace ticl {
0013   template <typename TILES>
0014   class PatternRecognitionbyCA final : public PatternRecognitionAlgoBaseT<TILES> {
0015   public:
0016     PatternRecognitionbyCA(const edm::ParameterSet& conf, edm::ConsumesCollector iC);
0017     ~PatternRecognitionbyCA() override;
0018 
0019     void makeTracksters(const typename PatternRecognitionAlgoBaseT<TILES>::Inputs& input,
0020                         std::vector<Trackster>& result,
0021                         std::unordered_map<int, std::vector<int>>& seedToTracksterAssociation) override;
0022 
0023     void filter(std::vector<Trackster>& output,
0024                 const std::vector<Trackster>& inTracksters,
0025                 const typename PatternRecognitionAlgoBaseT<TILES>::Inputs& input,
0026                 std::unordered_map<int, std::vector<int>>& seedToTracksterAssociation) override;
0027 
0028     void energyRegressionAndID(const std::vector<reco::CaloCluster>& layerClusters,
0029                                const tensorflow::Session*,
0030                                std::vector<Trackster>& result);
0031     void emptyTrackstersFromSeedsTRK(std::vector<Trackster>& tracksters,
0032                                      std::unordered_map<int, std::vector<int>>& seedToTracksterAssociation,
0033                                      const edm::ProductID& collectionID) const;
0034 
0035     static void fillPSetDescription(edm::ParameterSetDescription& iDesc);
0036 
0037   private:
0038     void mergeTrackstersTRK(const std::vector<Trackster>&,
0039                             const std::vector<reco::CaloCluster>&,
0040                             std::vector<Trackster>&,
0041                             std::unordered_map<int, std::vector<int>>& seedToTracksterAssociation) const;
0042     edm::ESGetToken<CaloGeometry, CaloGeometryRecord> caloGeomToken_;
0043     const std::unique_ptr<HGCGraphT<TILES>> theGraph_;
0044     const bool oneTracksterPerTrackSeed_;
0045     const bool promoteEmptyRegionToTrackster_;
0046     const bool out_in_dfs_;
0047     const unsigned int max_out_in_hops_;
0048     const float min_cos_theta_;
0049     const float min_cos_pointing_;
0050     const float root_doublet_max_distance_from_seed_squared_;
0051     const float etaLimitIncreaseWindow_;
0052     const int skip_layers_;
0053     const int max_missing_layers_in_trackster_;
0054     bool check_missing_layers_ = false;
0055     const unsigned int shower_start_max_layer_;
0056     const unsigned int min_layers_per_trackster_;
0057     const std::vector<int> filter_on_categories_;
0058     const double pid_threshold_;
0059     const double energy_em_over_total_threshold_;
0060     const double max_longitudinal_sigmaPCA_;
0061     const int min_clusters_per_ntuplet_;
0062     const float max_delta_time_;
0063     const std::string eidInputName_;
0064     const std::string eidOutputNameEnergy_;
0065     const std::string eidOutputNameId_;
0066     const bool computeLocalTime_;
0067 
0068     hgcal::RecHitTools rhtools_;
0069     const std::vector<double> siblings_maxRSquared_;
0070   };
0071 
0072 }  // namespace ticl
0073 #endif