Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-06-13 03:24:01

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 energyRegressionAndID(const std::vector<reco::CaloCluster>& layerClusters,
0024                                const tensorflow::Session*,
0025                                std::vector<Trackster>& result);
0026     void emptyTrackstersFromSeedsTRK(std::vector<Trackster>& tracksters,
0027                                      std::unordered_map<int, std::vector<int>>& seedToTracksterAssociation,
0028                                      const edm::ProductID& collectionID) const;
0029 
0030     static void fillPSetDescription(edm::ParameterSetDescription& iDesc);
0031 
0032   private:
0033     void mergeTrackstersTRK(const std::vector<Trackster>&,
0034                             const std::vector<reco::CaloCluster>&,
0035                             std::vector<Trackster>&,
0036                             std::unordered_map<int, std::vector<int>>& seedToTracksterAssociation) const;
0037     edm::ESGetToken<CaloGeometry, CaloGeometryRecord> caloGeomToken_;
0038     const std::unique_ptr<HGCGraphT<TILES>> theGraph_;
0039     const bool oneTracksterPerTrackSeed_;
0040     const bool promoteEmptyRegionToTrackster_;
0041     const bool out_in_dfs_;
0042     const unsigned int max_out_in_hops_;
0043     const float min_cos_theta_;
0044     const float min_cos_pointing_;
0045     const float root_doublet_max_distance_from_seed_squared_;
0046     const float etaLimitIncreaseWindow_;
0047     const int skip_layers_;
0048     const int max_missing_layers_in_trackster_;
0049     bool check_missing_layers_ = false;
0050     const unsigned int shower_start_max_layer_;
0051     const unsigned int min_layers_per_trackster_;
0052     const std::vector<int> filter_on_categories_;
0053     const double pid_threshold_;
0054     const double energy_em_over_total_threshold_;
0055     const double max_longitudinal_sigmaPCA_;
0056     const int min_clusters_per_ntuplet_;
0057     const float max_delta_time_;
0058     const std::string eidInputName_;
0059     const std::string eidOutputNameEnergy_;
0060     const std::string eidOutputNameId_;
0061     const float eidMinClusterEnergy_;
0062     const int eidNLayers_;
0063     const int eidNClusters_;
0064     const bool computeLocalTime_;
0065 
0066     hgcal::RecHitTools rhtools_;
0067     tensorflow::Session* eidSession_;
0068     const std::vector<double> siblings_maxRSquared_;
0069 
0070     static const int eidNFeatures_ = 3;
0071   };
0072 
0073 }  // namespace ticl
0074 #endif