61 #include "CLHEP/Random/RandomEngine.h"
69 produces<edm::DetSetVector<StripDigiSimLink> >().setBranchAlias (
alias +
"siStripDigiSimLink");
75 if ( ! rng.isAvailable()) {
77 <<
"DigiSimLinkProducer requires the RandomNumberGeneratorService\n"
78 "which is not present in the configuration file. You must add the service\n"
79 "in the configuration file or remove the modules that require it.";
107 std::vector<const CrossingFrame<PSimHit> *> cf_simhitvec;
110 cf_simhitvec.push_back(cf_simhit.
product());
120 std::vector<std::pair<const PSimHit*,int> >::iterator isim;
121 for (isim=trackerHits.begin() ; isim!= trackerHits.end();isim++) {
123 SimHitMap[((*isim).first)->detUnitId()].push_back(*isim);
161 for(TrackingGeometry::DetUnitContainer::const_iterator iu = pDD->detUnits().begin(); iu != pDD->detUnits().end(); iu ++){
167 GlobalVector bfield=pSetup->inTesla((*iu)->surface().position());
173 float langle = (lorentzAngleHandle.
isValid()) ? lorentzAngleHandle->getLorentzAngle((*iu)->geographicalId().rawId()) : 0.;
175 gainHandle,thresholdHandle,noiseHandle,pedestalHandle, deadChannelHandle, tTopo);
177 if(collectorZS.data.size()>0){
179 if(
SimHitMap[(*iu)->geographicalId().rawId()].size()>0){
181 if(linkcollector.data.size()>0)
186 if(collectorRaw.data.size()>0){
188 if(
SimHitMap[(*iu)->geographicalId().rawId()].size()>0){
190 if(linkcollector.data.size()>0)
201 iEvent.
put(outputlink);
T getParameter(std::string const &) const
std::vector< edm::DetSet< StripDigiSimLink > > theDigiLinkVector
virtual void produce(edm::Event &e, const edm::EventSetup &c)
std::vector< StripDigiSimLink > make_link()
void setParticleDataTable(const ParticleDataTable *pardt)
void getData(T &iHolder) const
std::vector< std::pair< const PSimHit *, int > > getSimHit(std::auto_ptr< MixCollection< PSimHit > > &, std::map< uint32_t, std::vector< int > > &)
virtual ~DigiSimLinkProducer()
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
std::map< uint32_t, std::vector< int > > theDetIdList
DigiSimLinkAlgorithm * theDigiAlgo
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
void run(edm::DetSet< SiStripDigi > &, edm::DetSet< SiStripRawDigi > &, const std::vector< std::pair< const PSimHit *, int > > &, StripGeomDetUnit *, GlobalVector, float, edm::ESHandle< SiStripGain > &, edm::ESHandle< SiStripThreshold > &, edm::ESHandle< SiStripNoises > &, edm::ESHandle< SiStripPedestals > &, edm::ESHandle< SiStripBadStrip > &, const TrackerTopology *tTopo)
DigiSimLinkProducer(const edm::ParameterSet &conf)
T const * product() const
T const * product() const
SimHitSelectorFromDB SimHitSelectorFromDB_
CLHEP::HepRandomEngine * rndEngine
std::vector< edm::DetSet< SiStripDigi > > theDigiVector
std::vector< edm::DetSet< SiStripRawDigi > > theRawDigiVector
vstring trackerContainers