21 runningmode_(iConfig.getParameter<
std::
string>(
"runningMode")) {
22 std::vector<edm::InputTag> simhits_tags = iConfig.
getParameter<std::vector<edm::InputTag>>(
"InputTags");
23 for (
auto itag : simhits_tags) {
27 produces<std::vector<unsigned>>(
Prefix +
"hits");
28 produces<std::vector<float>>(
Prefix +
"strip");
29 produces<std::vector<float>>(
Prefix +
"localtheta");
30 produces<std::vector<float>>(
Prefix +
"localphi");
31 produces<std::vector<float>>(
Prefix +
"localx");
32 produces<std::vector<float>>(
Prefix +
"localy");
33 produces<std::vector<float>>(
Prefix +
"localz");
34 produces<std::vector<float>>(
Prefix +
"momentum");
35 produces<std::vector<float>>(
Prefix +
"energyloss");
36 produces<std::vector<float>>(
Prefix +
"time");
37 produces<std::vector<int>>(
Prefix +
"particle");
38 produces<std::vector<unsigned short>>(
Prefix +
"process");
44 int size = clustermap.size();
45 auto hits = std::make_unique<std::vector<unsigned>>(
size, 0);
46 auto strip = std::make_unique<std::vector<float>>(
size, -100);
47 auto localtheta = std::make_unique<std::vector<float>>(
size, -100);
48 auto localphi = std::make_unique<std::vector<float>>(
size, -100);
49 auto localx = std::make_unique<std::vector<float>>(
size, -100);
50 auto localy = std::make_unique<std::vector<float>>(
size, -100);
51 auto localz = std::make_unique<std::vector<float>>(
size, -100);
52 auto momentum = std::make_unique<std::vector<float>>(
size, 0);
53 auto energyloss = std::make_unique<std::vector<float>>(
size, -1);
54 auto time = std::make_unique<std::vector<float>>(
size, -1);
55 auto particle = std::make_unique<std::vector<int>>(
size, -500);
56 auto process = std::make_unique<std::vector<unsigned short>>(
size, 0);
71 const uint32_t
id =
hit.detUnitId();
72 const StripGeomDetUnit* theStripDet = dynamic_cast<const StripGeomDetUnit*>(theTrackerGeometry->idToDet(
id));
78 shallow::CLUSTERMAP::const_iterator cluster =
match_cluster(
id, driftedstrip_, clustermap, *
clusters);
79 if (cluster != clustermap.end()) {
80 unsigned i = cluster->second;
82 if (
hits->at(
i) == 1) {
84 localtheta->at(
i) =
hit.thetaAtEntry();
85 localphi->at(
i) =
hit.phiAtEntry();
86 localx->at(
i) =
hit.localPosition().
x();
87 localy->at(
i) =
hit.localPosition().
y();
88 localz->at(
i) =
hit.localPosition().
z();
89 momentum->at(
i) =
hit.pabs();
90 energyloss->at(
i) =
hit.energyLoss();
92 particle->at(
i) =
hit.particleType();
118 shallow::CLUSTERMAP::const_iterator cluster = clustermap.end();
120 if (clustersDetSet !=
clusters.end()) {
122 while (right != clustersDetSet->
end() && strip_ > right->barycenter())
125 if (right != clustersDetSet->
end() && right != clustersDetSet->
begin()) {
126 unsigned firstStrip =
127 (right->barycenter() - strip_) < (strip_ - left->barycenter()) ? right->firstStrip() : left->firstStrip();
128 cluster = clustermap.find(std::make_pair(
id, firstStrip));
129 }
else if (right != clustersDetSet->
begin())
130 cluster = clustermap.find(std::make_pair(
id, left->firstStrip()));
132 cluster = clustermap.find(std::make_pair(
id, right->firstStrip()));