43 static std::unique_ptr<TrackstersCache> initializeGlobalCache(
const edm::ParameterSet&);
52 std::unique_ptr<PatternRecognitionAlgoBaseT<TICLLayerTiles>>
myAlgo_;
53 std::unique_ptr<PatternRecognitionAlgoBaseT<TICLLayerTilesHFNose>>
myAlgoHFNose_;
68 : detector_(ps.getParameter<std::
string>(
"detector")),
69 doNose_(detector_ ==
"HFNose"),
70 tfDnnLabel_(ps.getParameter<std::
string>(
"tfDnnLabel")),
73 clusters_token_(consumes<std::
vector<
reco::CaloCluster>>(ps.getParameter<edm::
InputTag>(
"layer_clusters"))),
74 filtered_layerclusters_mask_token_(consumes<std::
vector<float>>(ps.getParameter<edm::
InputTag>(
"filtered_mask"))),
75 original_layerclusters_mask_token_(consumes<std::
vector<float>>(ps.getParameter<edm::
InputTag>(
"original_mask"))),
77 consumes<edm::ValueMap<std::pair<float, float>>>(ps.getParameter<edm::
InputTag>(
"time_layerclusters"))),
78 seeding_regions_token_(
80 itername_(ps.getParameter<std::
string>(
"itername")) {
105 produces<std::vector<Trackster>>();
106 produces<std::vector<float>>();
139 descriptions.
add(
"trackstersProducer", desc);
143 auto result = std::make_unique<std::vector<Trackster>>();
144 auto output_mask = std::make_unique<std::vector<float>>();
154 std::unordered_map<int, std::vector<int>> seedToTrackstersAssociation;
156 if (!seeding_regions.empty() and seeding_regions[0].index != -1) {
157 auto numberOfSeedingRegions = seeding_regions.size();
158 for (
unsigned int i = 0;
i < numberOfSeedingRegions; ++
i) {
159 seedToTrackstersAssociation.emplace(seeding_regions[
i].
index, 0);
170 layer_clusters_hfnose_tiles,
179 evt, es, layerClusters, inputClusterMask, layerClustersTimes, layer_clusters_tiles, seeding_regions,
tfSession_);
181 myAlgo_->makeTracksters(input, *
result, seedToTrackstersAssociation);
184 output_mask->reserve(original_layerclusters_mask.size());
187 std::begin(original_layerclusters_mask),
std::end(original_layerclusters_mask), std::back_inserter(*output_mask));
189 for (
auto& trackster : *
result) {
192 for (
auto const v : trackster.vertices()) {
195 (*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)
const edm::EDGetTokenT< std::vector< float > > original_layerclusters_mask_token_
const std::string tfDnnLabel_
ParameterDescriptionNode * addNode(ParameterDescriptionNode const &node)
static std::string const input
const tensorflow::Session * tfSession_
void produce(edm::Event &, const edm::EventSetup &) override
bool getData(T &iHolder) const
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
ParameterDescriptionBase * add(U const &iLabel, T const &value)
std::unique_ptr< PatternRecognitionAlgoBaseT< TICLLayerTiles > > myAlgo_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
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_
const edm::ESGetToken< TfGraphDefWrapper, TfGraphRecord > tfDnnToken_
std::unique_ptr< PatternRecognitionAlgoBaseT< TICLLayerTilesHFNose > > myAlgoHFNose_
TrackstersProducer(const edm::ParameterSet &)