41 static std::unique_ptr<TrackstersCache> initializeGlobalCache(
const edm::ParameterSet&);
47 std::unique_ptr<PatternRecognitionAlgoBaseT<TICLLayerTiles>>
myAlgo_;
48 std::unique_ptr<PatternRecognitionAlgoBaseT<TICLLayerTilesHFNose>>
myAlgoHFNose_;
63 std::unique_ptr<TrackstersCache>
cache = std::make_unique<TrackstersCache>(
params);
67 if (!graphPath.empty()) {
76 delete cache->eidGraphDef;
77 cache->eidGraphDef =
nullptr;
81 : detector_(ps.getParameter<
std::
string>(
"detector")),
82 doNose_(detector_ ==
"HFNose"),
85 clusters_token_(consumes<
std::vector<
reco::CaloCluster>>(ps.getParameter<
edm::
InputTag>(
"layer_clusters"))),
86 filtered_layerclusters_mask_token_(consumes<
std::vector<
float>>(ps.getParameter<
edm::
InputTag>(
"filtered_mask"))),
87 original_layerclusters_mask_token_(consumes<
std::vector<
float>>(ps.getParameter<
edm::
InputTag>(
"original_mask"))),
90 seeding_regions_token_(
92 itername_(ps.getParameter<
std::
string>(
"itername")) {
99 produces<std::vector<Trackster>>();
100 produces<std::vector<float>>();
114 desc.
add<std::vector<int>>(
"filter_on_categories", {0});
115 desc.
add<
double>(
"pid_threshold", 0.);
116 desc.
add<
double>(
"energy_em_over_total_threshold", -1.);
117 desc.
add<
double>(
"max_longitudinal_sigmaPCA", 9999);
118 desc.
add<
int>(
"shower_start_max_layer", 9999);
119 desc.
add<
int>(
"algo_verbosity", 0);
120 desc.
add<
double>(
"min_cos_theta", 0.915);
121 desc.
add<
double>(
"root_doublet_max_distance_from_seed_squared", 9999);
122 desc.
add<
double>(
"min_cos_pointing", -1.);
123 desc.
add<
int>(
"skip_layers", 0);
124 desc.
add<
int>(
"max_missing_layers_in_trackster", 9999);
125 desc.
add<
double>(
"etaLimitIncreaseWindow", 2.1);
126 desc.
add<
int>(
"min_layers_per_trackster", 10);
127 desc.
add<
double>(
"max_delta_time", 3.);
128 desc.
add<
bool>(
"out_in_dfs",
true);
129 desc.
add<
int>(
"max_out_in_hops", 10);
130 desc.
add<
bool>(
"oneTracksterPerTrackSeed",
false);
131 desc.
add<
bool>(
"promoteEmptyRegionToTrackster",
false);
132 desc.
add<
std::string>(
"eid_graph_path",
"RecoHGCal/TICL/data/tf_models/energy_id_v0.pb");
134 desc.
add<
std::string>(
"eid_output_name_energy",
"output/regressed_energy");
135 desc.
add<
std::string>(
"eid_output_name_id",
"output/id_probabilities");
137 desc.
add<
double>(
"eid_min_cluster_energy", 1.);
138 desc.
add<
int>(
"eid_n_layers", 50);
139 desc.
add<
int>(
"eid_n_clusters", 10);
140 descriptions.
add(
"trackstersProducer", desc);
144 auto result = std::make_unique<std::vector<Trackster>>();
145 auto output_mask = std::make_unique<std::vector<float>>();
153 std::unordered_map<int, std::vector<int>> seedToTrackstersAssociation;
157 for (
unsigned int i = 0;
i < numberOfSeedingRegions; ++
i) {
177 output_mask->reserve(original_layerclusters_mask.size());
180 std::begin(original_layerclusters_mask),
std::end(original_layerclusters_mask), std::back_inserter(*output_mask));
183 for (
auto const& trackster : *
result) {
184 for (
auto const v : trackster.vertices()) {
187 (*output_mask)[
v] = 0.;