41 static std::unique_ptr<TrackstersCache> initializeGlobalCache(
const edm::ParameterSet&);
47 std::unique_ptr<PatternRecognitionAlgoBaseT<TICLLayerTiles>>
myAlgo_;
48 std::unique_ptr<PatternRecognitionAlgoBaseT<TICLLayerTilesHFNose>>
myAlgoHFNose_;
64 std::unique_ptr<TrackstersCache>
cache = std::make_unique<TrackstersCache>(
params);
68 if (!graphPath.empty()) {
82 : detector_(ps.getParameter<std::
string>(
"detector")),
83 doNose_(detector_ ==
"HFNose"),
84 clusters_token_(consumes<std::
vector<
reco::CaloCluster>>(ps.getParameter<edm::
InputTag>(
"layer_clusters"))),
85 filtered_layerclusters_mask_token_(consumes<std::
vector<float>>(ps.getParameter<edm::
InputTag>(
"filtered_mask"))),
86 original_layerclusters_mask_token_(consumes<std::
vector<float>>(ps.getParameter<edm::
InputTag>(
"original_mask"))),
88 consumes<edm::ValueMap<std::pair<float, float>>>(ps.getParameter<edm::
InputTag>(
"time_layerclusters"))),
89 seeding_regions_token_(
91 itername_(ps.getParameter<std::
string>(
"itername")) {
116 produces<std::vector<Trackster>>();
117 produces<std::vector<float>>();
132 desc.
add<
std::string>(
"eid_graph_path",
"RecoHGCal/TICL/data/tf_models/energy_id_v0.pb");
145 descriptions.
add(
"trackstersProducer", desc);
149 auto result = std::make_unique<std::vector<Trackster>>();
150 auto output_mask = std::make_unique<std::vector<float>>();
158 std::unordered_map<int, std::vector<int>> seedToTrackstersAssociation;
160 if (!seeding_regions.empty() and seeding_regions[0].index != -1) {
161 auto numberOfSeedingRegions = seeding_regions.size();
162 for (
unsigned int i = 0;
i < numberOfSeedingRegions; ++
i) {
163 seedToTrackstersAssociation.emplace(seeding_regions[
i].
index, 0);
170 evt, es, layerClusters, inputClusterMask, layerClustersTimes, layer_clusters_hfnose_tiles, seeding_regions);
177 evt, es, layerClusters, inputClusterMask, layerClustersTimes, layer_clusters_tiles, seeding_regions);
179 myAlgo_->makeTracksters(input, *
result, seedToTrackstersAssociation);
182 output_mask->reserve(original_layerclusters_mask.size());
185 std::begin(original_layerclusters_mask),
std::end(original_layerclusters_mask), std::back_inserter(*output_mask));
187 for (
auto& trackster : *
result) {
190 for (
auto const v : trackster.vertices()) {
193 (*output_mask)[
v] = 0.;
ticl::Trackster::IterationIndex iterIndex_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
edm::EDGetTokenT< TICLLayerTilesHFNose > layer_clusters_tiles_hfnose_token_
const edm::EDGetTokenT< std::vector< reco::CaloCluster > > clusters_token_
#define DEFINE_FWK_MODULE(type)
GraphDef * loadGraphDef(const std::string &pbFile)
const edm::EDGetTokenT< std::vector< float > > original_layerclusters_mask_token_
ParameterDescriptionNode * addNode(ParameterDescriptionNode const &node)
static std::string const input
void produce(edm::Event &, const edm::EventSetup &) override
edm::EDGetTokenT< TICLLayerTiles > layer_clusters_tiles_token_
const std::string itername_
const edm::EDGetTokenT< std::vector< TICLSeedingRegion > > seeding_regions_token_
unique_ptr< JetDefinition::Plugin > plugin
const edm::EDGetTokenT< edm::ValueMap< std::pair< float, float > > > clustersTime_token_
bool get(ProductID const &oid, Handle< PROD > &result) const
std::atomic< tensorflow::GraphDef * > eidGraphDef
ParameterDescriptionBase * add(U const &iLabel, T const &value)
std::unique_ptr< PatternRecognitionAlgoBaseT< TICLLayerTiles > > myAlgo_
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 &)
T getParameter(std::string const &) const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
~TrackstersProducer() override
const edm::EDGetTokenT< std::vector< float > > filtered_layerclusters_mask_token_
std::string fullPath() const
std::unique_ptr< PatternRecognitionAlgoBaseT< TICLLayerTilesHFNose > > myAlgoHFNose_