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
#define DEFINE_FWK_MODULE(type)
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 &)
void printClusters(const edmNew::DetSetVector< Phase2TrackerCluster1D > &clusters) const
bool getData(T &iHolder) const
#define TYPELOOKUP_DATA_REG(_dataclass_)
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_
~VectorHitBuilderEDProducer() override=default
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)