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;
127 for ( ; aCluster != theLastHit; ++aCluster ) {
131 DetId det = aCluster->id();
132 unsigned int subdet = det.
subdetId();
134 for (std::vector<std::pair<PSimHit,int> >::const_iterator
136 if((aCluster->simtrackId() == (int)(*simcount).first.trackId())&&(det.
rawId() == (*simcount).first.detUnitId())&&(aCluster->eeId() == (*simcount).first.eventId().rawId()))
137 sim_counter = (*simcount).second;
139 if (sim_counter == 0)
throw cms::Exception(
"SiClusterTranslator") <<
"No Matching SimHit found.";
149 int charge = (int)(aCluster->charge() + 0.5);
164 std::pair<float,float> pixelPos_out = topol.
pixel(position);
168 std::pair<int,int> row_col((
int)pixelPos_out.first,(
int)pixelPos_out.second);
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);
198 uint16_t strip_num = 0;
199 std::vector<uint16_t> digi_vec;
200 while (charge > 255) {
201 digi_vec.push_back(255);
204 if (charge > 0) digi_vec.push_back(charge);
214 if((subdet == 3) || (subdet == 5)) {
215 const RectangularStripTopology& topol=(
const RectangularStripTopology&)stripDet->
type().
topology();
216 strip_num = (uint16_t)topol.strip(position);
217 }
else if ((subdet == 4) || (subdet == 6)) {
219 strip_num = (uint16_t)topol.
strip(position);
226 SiStripCluster temporaryStripCluster(det.
rawId(), strip_num, digi_vec.begin(), digi_vec.end());
227 temporaryStripClusters[det].push_back(temporaryStripCluster);
233 aCluster->simtrackId(),
243 "Trying to build a cluster that is not in the SiStripTracker or Pixels.\n";
251 std::auto_ptr<edmNew::DetSetVector<SiPixelCluster> >
258 std::auto_ptr<edmNew::DetSetVector<SiStripCluster> >
264 e.
put(siPixelClusterCollection);
265 e.
put(siStripClusterCollection);
266 e.
put(stripoutputlink);
267 e.
put(pixeloutputlink);
275 std::map<DetId,std::vector<SiStripCluster> >::const_iterator
276 it = theClusters.begin();
277 std::map<DetId,std::vector<SiStripCluster> >::const_iterator
278 lastDet = theClusters.end();
279 for( ; it != lastDet ; ++it ) {
282 std::vector<SiStripCluster>::const_iterator clust_it = it->second.begin();
283 std::vector<SiStripCluster>::const_iterator clust_end = it->second.end();
284 for( ; clust_it != clust_end ; ++clust_it) {
296 std::map<DetId,std::vector<SiPixelCluster> >::const_iterator
297 it = theClusters.begin();
298 std::map<DetId,std::vector<SiPixelCluster> >::const_iterator
299 lastCluster = theClusters.end();
300 for( ; it != lastCluster ; ++it ) {
303 std::vector<SiPixelCluster>::const_iterator clust_it = it->second.begin();
304 std::vector<SiPixelCluster>::const_iterator clust_end = it->second.end();
305 for( ; clust_it != clust_end ; ++clust_it) {
virtual const Topology & topology() const
Returns a reference to the pixel proxy topology.
void push_back(data_type const &d)
std::vector< edm::DetSet< PixelDigiSimLink > > thePixelDigiLinkVector
const TrackerGeometry * geometry
virtual void clearParameters() const
virtual void produce(edm::Event &e, const edm::EventSetup &c) override
static int position[TOTALCHAMBERS][3]
virtual void enterLocalParameters(unsigned int id, std::pair< int, int > &row_col, LocalValues pos_err_info) const
SiClusterTranslator(const edm::ParameterSet &conf)
uint32_t rawId() const
get the raw id
C::const_iterator const_iterator
constant access iterator type
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 float strip(const LocalPoint &) const =0
virtual const GeomDetType & type() const
std::vector< std::pair< PSimHit, int > > theNewSimHitList
T const * product() const
virtual const Topology & topology() const =0
virtual const GeomDetUnit * idToDetUnit(DetId) const
Return the pointer to the GeomDetUnit corresponding to a given DetId.
Pixel cluster – collection of neighboring pixels above threshold.
void loadStripClusters(std::map< DetId, std::vector< SiStripCluster > > &theClusters, edmNew::DetSetVector< SiStripCluster > &theClusterCollection) const
static int pixelToChannel(int row, int col)
virtual void beginRun(edm::Run const &run, const edm::EventSetup &es) override