11 const std::vector<CSCDetectorHit> &wireHits) {
16 const int nNodes = chamberSpecs->
nNodes();
21 newStripHits.reserve((2 * nNodes + 1) * wireHits.size());
22 std::vector<CSCDetectorHit>::const_iterator wireHitI;
23 for (wireHitI = wireHits.begin(); wireHitI != wireHits.end(); ++wireHitI) {
24 int wire = (*wireHitI).getElement();
25 float wireCharge = (*wireHitI).getCharge();
26 float wireHitTime = (*wireHitI).getTime();
29 float hitX = (*wireHitI).getPosition() *
cos(
geom->wireAngle());
30 float hitY =
geom->yOfWire(wire, hitX);
33 int centerStrip =
geom->nearestStrip(wireHitPos);
34 int firstStrip =
std::max(centerStrip - nNodes, 1);
35 int lastStrip =
std::min(centerStrip + nNodes,
geom->numberOfStrips());
36 for (
int istrip = firstStrip; istrip <= lastStrip; istrip++) {
37 float offset = hitX -
geom->xOfStrip(istrip, hitY);
38 float stripWidth =
geom->stripPitch(wireHitPos);
49 const float igain = 1. / 0.9;
50 float stripCharge = wireCharge * binValue * igain * 0.5;
51 float stripTime = wireHitTime;
std::vector< CSCDetectorHit > & simulate(const CSCLayer *layer, const std::vector< CSCDetectorHit > &wireHits)
Sin< T >::type sin(const T &t)
double binValue(double x, double stripWidth) const
std::vector< CSCDetectorHit > newStripHits
constexpr std::array< uint8_t, layerIndexSize > layer
void initChamberSpecs(const CSCChamberSpecs &)
Calculates k1, k2, k3, h per chamber type, if necessary.
Cos< T >::type cos(const T &t)
static int position[264][3]
CSCGattiFunction theGattiFunction