38 : offlinestubsTag_(conf.getParameter<
std::
string>(
"offlinestubs")),
39 maxOfflinestubs_(conf.getParameter<
int>(
"maxVectorHits")),
44 produces<edmNew::DetSetVector<Phase2TrackerCluster1D>>(
"accepted");
45 produces<edmNew::DetSetVector<Phase2TrackerCluster1D>>(
"rejected");
46 produces<VectorHitCollection>(
"accepted");
47 produces<VectorHitCollection>(
"rejected");
51 LogDebug(
"VectorHitBuilderEDProducer") <<
"VectorHitBuilderEDProducer::produce() begin";
56 auto outputClustersAccepted = std::make_unique<edmNew::DetSetVector<Phase2TrackerCluster1D>>();
57 auto outputClustersRejected = std::make_unique<edmNew::DetSetVector<Phase2TrackerCluster1D>>();
69 run(clustersHandle, *outputClustersAccepted, *outputClustersRejected, *outputVHAccepted, *outputVHRejected);
71 unsigned int numberOfVectorHits = 0;
72 for (
const auto& dSViter : *outputVHAccepted) {
73 for (
const auto& vh : dSViter) {
75 LogDebug(
"VectorHitBuilderEDProducer") <<
"\t vectorhit in output " << vh;
78 LogDebug(
"VectorHitBuilderEDProducer") <<
"found\n" << numberOfVectorHits <<
" .\n";
81 event.put(
std::move(outputClustersAccepted),
"accepted");
82 event.put(
std::move(outputClustersRejected),
"rejected");
83 event.put(
std::move(outputVHAccepted),
"accepted");
84 event.put(
std::move(outputVHRejected),
"rejected");
97 desc.add<
int>(
"maxVectorHits", 999999999);
100 desc.add<std::vector<double>>(
"BarrelCut",
111 desc.add<
int>(
"maxVectorHitsInAStack", 999);
112 desc.add<std::vector<double>>(
"EndcapCut",
121 descriptions.
add(
"siPhase2VectorHits",
desc);
T getParameter(std::string const &) const
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
const VectorHitBuilderAlgorithm * algo() const
edm::ESGetToken< VectorHitBuilderAlgorithm, TkPhase2OTCPERecord > stubsBuilderToken_
unsigned int maxOfflinestubs_
const VectorHitBuilderAlgorithm * stubsBuilder_
void run(edm::Handle< edmNew::DetSetVector< Phase2TrackerCluster1D >> clusters, edmNew::DetSetVector< Phase2TrackerCluster1D > &clustersAcc, edmNew::DetSetVector< Phase2TrackerCluster1D > &clustersRej, VectorHitCollection &outputAcc, VectorHitCollection &outputRej)
VectorHitBuilderEDProducer(const edm::ParameterSet &)
#define DEFINE_FWK_MODULE(type)
void printClusters(const edmNew::DetSetVector< Phase2TrackerCluster1D > &clusters) const
void produce(edm::Event &, const edm::EventSetup &) override
void run(edm::Handle< edmNew::DetSetVector< Phase2TrackerCluster1D >> clusters, VectorHitCollection &vhAcc, VectorHitCollection &vhRej, edmNew::DetSetVector< Phase2TrackerCluster1D > &clustersAcc, edmNew::DetSetVector< Phase2TrackerCluster1D > &clustersRej) const override
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::string offlinestubsTag_
edmNew::DetSetVector< VectorHit > VectorHitCollection
edm::EDGetTokenT< edmNew::DetSetVector< Phase2TrackerCluster1D > > clusterProducer_
#define TYPELOOKUP_DATA_REG(_dataclass_)
~VectorHitBuilderEDProducer() override=default
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)