41 static std::unique_ptr<TrackstersCache> initializeGlobalCache(
const edm::ParameterSet&);
52 std::unique_ptr<PatternRecognitionAlgoBase>
myAlgo_;
58 std::unique_ptr<TrackstersCache>
cache = std::make_unique<TrackstersCache>(
params);
62 if (!graphPath.empty()) {
84 produces<std::vector<Trackster>>();
85 produces<std::vector<float>>();
97 desc.
add<
int>(
"algo_verbosity", 0);
98 desc.
add<
double>(
"min_cos_theta", 0.915);
99 desc.
add<
double>(
"min_cos_pointing", -1.);
100 desc.
add<
int>(
"missing_layers", 0);
101 desc.
add<
int>(
"min_clusters_per_ntuplet", 10);
102 desc.
add<
double>(
"max_delta_time", 0.09);
103 desc.
add<
bool>(
"out_in_dfs",
true);
104 desc.
add<
int>(
"max_out_in_hops", 10);
105 desc.
add<
std::string>(
"eid_graph_path",
"RecoHGCal/TICL/data/tf_models/energy_id_v0.pb");
107 desc.
add<
std::string>(
"eid_output_name_energy",
"output/regressed_energy");
108 desc.
add<
std::string>(
"eid_output_name_id",
"output/id_probabilities");
109 desc.
add<
double>(
"eid_min_cluster_energy", 1.);
110 desc.
add<
int>(
"eid_n_layers", 50);
111 desc.
add<
int>(
"eid_n_clusters", 10);
112 descriptions.
add(
"trackstersProducer", desc);
116 auto result = std::make_unique<std::vector<Trackster>>();
117 auto output_mask = std::make_unique<std::vector<float>>();
133 const auto& layerClusters = *cluster_h;
134 const auto& inputClusterMask = *filtered_layerclusters_mask_h;
135 const auto& layerClustersTimes = *time_clusters_h;
136 const auto& layer_clusters_tiles = *layer_clusters_tiles_h;
137 const auto& seeding_regions = *seeding_regions_h;
139 evt, es, layerClusters, inputClusterMask, layerClustersTimes, layer_clusters_tiles, seeding_regions);
143 output_mask->reserve(original_layerclusters_mask_h->size());
146 std::end(*original_layerclusters_mask_h),
147 std::back_inserter(*output_mask));
149 for (
auto const& trackster : *
result) {
150 for (
auto const v : trackster.vertices) {
153 (*output_mask)[
v] = 0.;
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
edm::EDGetTokenT< std::vector< TICLSeedingRegion > > seeding_regions_token_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
GraphDef * loadGraphDef(const std::string &pbFile)
edm::EDGetTokenT< std::vector< float > > filtered_layerclusters_mask_token_
static std::string const input
edm::EDGetTokenT< edm::ValueMap< float > > clustersTime_token_
void produce(edm::Event &, const edm::EventSetup &) override
edm::EDGetTokenT< TICLLayerTiles > layer_clusters_tiles_token_
edm::EDGetTokenT< std::vector< reco::CaloCluster > > clusters_token_
#define DEFINE_FWK_MODULE(type)
std::atomic< tensorflow::GraphDef * > eidGraphDef
std::unique_ptr< PatternRecognitionAlgoBase > myAlgo_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
static void globalEndJob(TrackstersCache *)
TrackstersProducer(const edm::ParameterSet &, const TrackstersCache *)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
static std::unique_ptr< TrackstersCache > initializeGlobalCache(const edm::ParameterSet &)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
~TrackstersProducer() override
std::string fullPath() const
edm::EDGetTokenT< std::vector< float > > original_layerclusters_mask_token_