8 #include "CLHEP/Random/RandFlat.h" 11 : theDriftSim(driftSim), theGasIonizer(new
CSCGasCollisions(p)), theNewWireHits() {}
17 CLHEP::HepRandomEngine *engine) {
21 for (edm::PSimHitContainer::const_iterator hitItr = simHits.begin(); hitItr != simHits.end(); ++hitItr) {
24 unsigned nClusters = ionClusters.size();
27 for (
unsigned icl = 0; icl < nClusters; ++icl) {
29 int nearestWire = geom->
nearestWire(ionClusters[icl]);
42 CLHEP::HepRandomEngine *engine) {
46 LogTrace(
"CSCWireHitSim") <<
"CSCWireHitSim:" 47 <<
" type=" << simHit.
particleType() <<
" mom=" << simHit.
pabs() <<
"\n Local entry " 48 << entryPoint <<
" exit " << exitPoint;
50 std::vector<LocalPoint> positions;
54 std::vector<LocalPoint>
results;
57 for (std::vector<LocalPoint>::const_iterator pointItr = positions.begin(); pointItr != positions.end(); ++pointItr) {
63 for (
int ie = 1; ie <= electrons[j - 1]; ++ie) {
66 if (CLHEP::RandFlat::shoot(engine) > f_att) {
67 results.push_back(*pointItr);
72 LogTrace(
"CSCWireHitSim") <<
"CSCWireHitSim: there are " << results.size()
73 <<
" clusters identified with each electron.";
int nearestWire(const LocalPoint &lp) const
CSCWireHitSim(CSCDriftSim *driftSim, const edm::ParameterSet &p)
HepPDT::ParticleDataTable ParticleDataTable
std::vector< CSCDetectorHit > & simulate(const CSCLayer *layer, const edm::PSimHitContainer &simHits, CLHEP::HepRandomEngine *)
CSCDetectorHit getWireHit(const Local3DPoint &ionClusterPosition, const CSCLayer *, int wire, const PSimHit &simHit, CLHEP::HepRandomEngine *)
CSCDriftSim * theDriftSim
Local3DPoint exitPoint() const
Exit point in the local Det frame.
float pabs() const
fast and more accurate access to momentumAtEntry().mag()
bool inside(const Local3DPoint &, const LocalError &, float scale=1.f) const override
void setParticleDataTable(const ParticleDataTable *pdt)
std::vector< Local3DPoint > getIonizationClusters(const PSimHit &hit, const CSCLayer *, CLHEP::HepRandomEngine *)
CSCGasCollisions * theGasIonizer
std::vector< PSimHit > PSimHitContainer
std::vector< CSCDetectorHit > theNewWireHits
void simulate(const PSimHit &, std::vector< LocalPoint > &clusters, std::vector< int > &electrons, CLHEP::HepRandomEngine *)
Local3DPoint entryPoint() const
Entry point in the local Det frame.
void setParticleDataTable(const ParticleDataTable *pdt)
const CSCLayerGeometry * geometry() const