12 : Suffix(iConfig.getParameter<std::
string>(
"Suffix")),
15 clusters_token_(consumes<edmNew::DetSetVector<
SiStripCluster>>(iConfig.getParameter<edm::
InputTag>(
"Clusters"))) {
16 std::vector<edm::InputTag> rec_hits_tags = iConfig.
getParameter<std::vector<edm::InputTag>>(
"InputTags");
17 for (
const auto& itag : rec_hits_tags) {
23 produces<std::vector<float>>(
Prefix +
"localx" +
Suffix);
24 produces<std::vector<float>>(
Prefix +
"localy" +
Suffix);
25 produces<std::vector<float>>(
Prefix +
"localxerr" +
Suffix);
26 produces<std::vector<float>>(
Prefix +
"localyerr" +
Suffix);
27 produces<std::vector<float>>(
Prefix +
"globalx" +
Suffix);
28 produces<std::vector<float>>(
Prefix +
"globaly" +
Suffix);
29 produces<std::vector<float>>(
Prefix +
"globalz" +
Suffix);
35 int size = clustermap.size();
36 auto strip = std::make_unique<std::vector<float>>(
size, -10000);
37 auto merr = std::make_unique<std::vector<float>>(
size, -10000);
38 auto localx = std::make_unique<std::vector<float>>(
size, -10000);
39 auto localy = std::make_unique<std::vector<float>>(
size, -10000);
40 auto localxerr = std::make_unique<std::vector<float>>(
size, -1);
41 auto localyerr = std::make_unique<std::vector<float>>(
size, -1);
42 auto globalx = std::make_unique<std::vector<float>>(
size, -10000);
43 auto globaly = std::make_unique<std::vector<float>>(
size, -10000);
44 auto globalz = std::make_unique<std::vector<float>>(
size, -10000);
51 for (
auto const& ds : *recHits) {
52 for (
auto const&
hit : ds) {
53 shallow::CLUSTERMAP::iterator cluster =
54 clustermap.find(std::make_pair(
hit.geographicalId().rawId(),
hit.cluster()->firstStrip()));
55 if (cluster != clustermap.end()) {
58 unsigned int i = cluster->second;
62 localx->at(i) =
hit.localPosition().
x();
63 localy->at(i) =
hit.localPosition().
y();
64 localxerr->at(i) =
sqrt(
hit.localPositionError().xx());
65 localyerr->at(i) =
sqrt(
hit.localPositionError().yy());
66 globalx->at(i) = theStripDet->
toGlobal(
hit.localPosition()).
x();
67 globaly->at(i) = theStripDet->
toGlobal(
hit.localPosition()).
y();
68 globalz->at(i) = theStripDet->
toGlobal(
hit.localPosition()).
z();
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
const edm::EDGetTokenT< edmNew::DetSetVector< SiStripCluster > > clusters_token_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
ShallowRechitClustersProducer(const edm::ParameterSet &)
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
virtual const StripTopology & specificTopology() const
Returns a reference to the strip proxy topology.
virtual float strip(const LocalPoint &) const =0
virtual MeasurementError measurementError(const LocalPoint &, const LocalError &) const =0
std::vector< edm::EDGetTokenT< SiStripRecHit2DCollection > > rec_hits_tokens_
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
T getParameter(std::string const &) const
CLUSTERMAP make_cluster_map(const edm::Event &, const edm::EDGetTokenT< edmNew::DetSetVector< SiStripCluster > > &)
std::map< std::pair< uint32_t, uint16_t >, unsigned int > CLUSTERMAP
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
tuple size
Write out results.