57 fastTrackerClusterCollectionTag_(conf.getParameter<edm::InputTag>(
"fastTrackerClusterCollectionTag"))
59 produces<edmNew::DetSetVector<SiStripCluster> >();
60 produces<edmNew::DetSetVector<SiPixelCluster> >();
61 produces<edm::DetSetVector<StripDigiSimLink> >();
62 produces<edm::DetSetVector<PixelDigiSimLink> >();
97 std::vector<const CrossingFrame<PSimHit> *> cf_simhitvec;
98 e.
getByLabel(
"mix",
"famosSimHitsTrackerHits", cf_simhit);
99 cf_simhitvec.push_back(cf_simhit.
product());
117 std::map< DetId, std::vector<SiPixelCluster> > temporaryPixelClusters;
118 std::map< DetId, std::vector<SiStripCluster> > temporaryStripClusters;
124 for ( ; aCluster != theLastHit; ++aCluster ) {
128 DetId det = aCluster->id();
129 unsigned int subdet = det.
subdetId();
131 for (std::vector<std::pair<PSimHit,int> >::const_iterator
133 if((aCluster->simtrackId() == (int)(*simcount).first.trackId())&&(det.
rawId() == (*simcount).first.detUnitId())&&(aCluster->eeId() == (*simcount).first.eventId().rawId()))
134 sim_counter = (*simcount).second;
136 if (sim_counter == 0)
throw cms::Exception(
"SiClusterTranslator") <<
"No Matching SimHit found.";
146 int charge = (int)(aCluster->charge() + 0.5);
161 std::pair<float,float> pixelPos_out = topol.
pixel(position);
175 temporaryPixelClusters[det].push_back(temporaryPixelCluster);
181 aCluster->simtrackId(),
188 else if ((subdet > 2) && (subdet < 7)) {
194 uint16_t charge = (uint16_t)(aCluster->charge() + 0.5);
200 uint16_t strip_num = 0;
201 std::vector<uint16_t> digi_vec;
202 while (charge > 255) {
203 digi_vec.push_back(255);
206 if (charge > 0) digi_vec.push_back(charge);
216 if((subdet == 3) || (subdet == 5)) {
218 strip_num = (uint16_t)topol.
strip(position);
219 }
else if ((subdet == 4) || (subdet == 6)) {
221 strip_num = (uint16_t)topol.
strip(position);
231 SiStripCluster temporaryStripCluster(strip_num, digi_vec.begin(), digi_vec.end());
232 temporaryStripClusters[det].push_back(temporaryStripCluster);
238 aCluster->simtrackId(),
248 "Trying to build a cluster that is not in the SiStripTracker or Pixels.\n";
256 std::auto_ptr<edmNew::DetSetVector<SiPixelCluster> >
263 std::auto_ptr<edmNew::DetSetVector<SiStripCluster> >
269 e.
put(siPixelClusterCollection);
270 e.
put(siStripClusterCollection);
271 e.
put(stripoutputlink);
272 e.
put(pixeloutputlink);
280 std::map<DetId,std::vector<SiStripCluster> >::const_iterator
281 it = theClusters.begin();
282 std::map<DetId,std::vector<SiStripCluster> >::const_iterator
283 lastDet = theClusters.end();
284 for( ; it != lastDet ; ++it ) {
287 std::vector<SiStripCluster>::const_iterator clust_it = it->second.begin();
288 std::vector<SiStripCluster>::const_iterator clust_end = it->second.end();
289 for( ; clust_it != clust_end ; ++clust_it) {
301 std::map<DetId,std::vector<SiPixelCluster> >::const_iterator
302 it = theClusters.begin();
303 std::map<DetId,std::vector<SiPixelCluster> >::const_iterator
304 lastCluster = theClusters.end();
305 for( ; it != lastCluster ; ++it ) {
308 std::vector<SiPixelCluster>::const_iterator clust_it = it->second.begin();
309 std::vector<SiPixelCluster>::const_iterator clust_end = it->second.end();
310 for( ; clust_it != clust_end ; ++clust_it) {
virtual const TrackerGeomDet * idToDetUnit(DetId) const
Return the pointer to the GeomDetUnit corresponding to a given DetId.
void push_back(data_type const &d)
std::vector< edm::DetSet< PixelDigiSimLink > > thePixelDigiLinkVector
const TrackerGeometry * geometry
virtual void produce(edm::Event &e, const edm::EventSetup &c) override
SiClusterTranslator(const edm::ParameterSet &conf)
uint32_t rawId() const
get the raw id
edm::InputTag fastTrackerClusterCollectionTag_
virtual ~SiClusterTranslator()
virtual std::pair< float, float > pixel(const LocalPoint &p) const =0
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
void loadPixelClusters(std::map< DetId, std::vector< SiPixelCluster > > &theClusters, SiPixelClusterCollectionNew &theClusterCollection) const
std::vector< edm::DetSet< StripDigiSimLink > > theStripDigiLinkVector
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
virtual const Topology & topology() const override
Returns a reference to the pixel proxy topology.
virtual float strip(const LocalPoint &) const =0
T const * product() const
std::vector< std::pair< PSimHit, int > > theNewSimHitList
virtual const Topology & topology() const =0
virtual float strip(const LocalPoint &) const
Pixel cluster – collection of neighboring pixels above threshold.
static std::atomic< unsigned int > counter
static int position[264][3]
void loadStripClusters(std::map< DetId, std::vector< SiStripCluster > > &theClusters, edmNew::DetSetVector< SiStripCluster > &theClusterCollection) const
static int pixelToChannel(int row, int col)
virtual const GeomDetType & type() const override
virtual void beginRun(edm::Run const &run, const edm::EventSetup &es) override