11 theDriftSim(driftSim),
24 std::vector<CSCDetectorHit> &
31 for (edm::PSimHitContainer::const_iterator hitItr = simHits.begin();
32 hitItr != simHits.end(); ++hitItr)
35 std::vector<LocalPoint> ionClusters
38 unsigned nClusters = ionClusters.size();
41 for(
unsigned icl = 0; icl < nClusters; ++icl) {
44 int nearestWire=geom->
nearestWire(ionClusters[icl]);
58 std::vector<LocalPoint>
65 LogTrace(
"CSCWireHitSim") <<
"CSCWireHitSim:"
67 <<
" mom=" << simHit.
pabs()
68 <<
"\n Local entry " << entryPoint <<
" exit " << exitPoint;
70 std::vector<LocalPoint> positions;
74 std::vector<LocalPoint>
results;
77 for( std::vector<LocalPoint>::const_iterator pointItr = positions.begin();
78 pointItr != positions.end(); ++pointItr )
85 for(
int ie = 1; ie <= electrons[j-1]; ++ie ) {
89 results.push_back(*pointItr);
94 LogTrace(
"CSCWireHitSim") <<
"CSCWireHitSim: there are " << results.size()
95 <<
" clusters identified with each electron.";
int nearestWire(const LocalPoint &lp) const
void simulate(const PSimHit &, std::vector< LocalPoint > &clusters, std::vector< int > &electrons)
CLHEP::RandFlat * theRandFlat
std::vector< Local3DPoint > getIonizationClusters(const PSimHit &hit, const CSCLayer *)
HepPDT::ParticleDataTable ParticleDataTable
CSCDriftSim * theDriftSim
Local3DPoint exitPoint() const
Exit point in the local Det frame.
void setRandomEngine(CLHEP::HepRandomEngine &engine)
float pabs() const
fast and more accurate access to momentumAtEntry().mag()
void setParticleDataTable(const ParticleDataTable *pdt)
void setRandomEngine(CLHEP::HepRandomEngine &engine)
CSCWireHitSim(CSCDriftSim *driftSim)
CSCGasCollisions * theGasIonizer
std::vector< CSCDetectorHit > & simulate(const CSCLayer *layer, const edm::PSimHitContainer &simHits)
CSCDetectorHit getWireHit(const Local3DPoint &ionClusterPosition, const CSCLayer *, int wire, const PSimHit &simHit)
bool inside(const Local3DPoint &, const LocalError &, float scale=1.f) const
std::vector< PSimHit > PSimHitContainer
std::vector< CSCDetectorHit > theNewWireHits
Local3DPoint entryPoint() const
Entry point in the local Det frame.
void setParticleDataTable(const ParticleDataTable *pdt)
const CSCLayerGeometry * geometry() const
void setRandomEngine(CLHEP::HepRandomEngine &engine)