46 std::vector<std::pair<uint32_t, EncodedEventId> >
67 produces<ClusterTPAssociation>();
83 descriptions.
add(
"tpClusterProducerDefault", desc);
116 auto clusterTPList = std::make_unique<ClusterTPAssociation>(TPCollectionH);
121 itp < TPCollectionH.
product()->size(); ++itp) {
127 for (std::vector<SimTrack>::const_iterator itrk = trackingParticle->g4Track_begin();
128 itrk != trackingParticle->g4Track_end(); ++itrk) {
129 std::pair<uint32_t, EncodedEventId> trkid(itrk->trackId(),
eid);
131 mapping.insert(std::make_pair(trkid, trackingParticle));
135 if ( foundPixelClusters ) {
138 iter != pixelClusters->end(); ++iter) {
139 uint32_t detid = iter->id();
143 di != link_pixel.
end(); ++di) {
148 std::set<std::pair<uint32_t, EncodedEventId> > simTkIds;
152 std::vector<std::pair<uint32_t, EncodedEventId> > trkid(getSimTrackId<PixelDigiSimLink>(sipixelSimLinks, detId, channel));
153 if (trkid.size()==0)
continue;
154 simTkIds.insert(trkid.begin(),trkid.end());
157 for (std::set<std::pair<uint32_t, EncodedEventId> >::const_iterator iset = simTkIds.begin();
158 iset != simTkIds.end(); iset++) {
159 auto ipos = mapping.find(*iset);
160 if (ipos != mapping.end()) {
169 if ( foundStripClusters ) {
172 iter != eter; ++iter) {
173 if (!(*iter).isValid())
continue;
174 uint32_t detid = iter->id();
178 di != link_strip.
end(); di++) {
183 std::set<std::pair<uint32_t, EncodedEventId> > simTkIds;
187 for (
int istr = first; istr <
last; ++istr) {
188 std::vector<std::pair<uint32_t, EncodedEventId> > trkid(getSimTrackId<StripDigiSimLink>(sistripSimLinks, detId, istr));
189 if (trkid.size()==0)
continue;
190 simTkIds.insert(trkid.begin(),trkid.end());
192 for (std::set<std::pair<uint32_t, EncodedEventId> >::const_iterator iset = simTkIds.begin();
193 iset != simTkIds.end(); iset++) {
194 auto ipos = mapping.find(*iset);
195 if (ipos != mapping.end()) {
204 if ( foundPhase2OTClusters ) {
207 if(phase2OTClusters.
isValid()){
209 iter != eter; ++iter) {
210 if (!(*iter).isValid())
continue;
211 uint32_t detid = iter->id();
215 di != link_phase2.
end(); di++) {
220 std::set<std::pair<uint32_t, EncodedEventId> > simTkIds;
222 for (
unsigned int istr(0); istr < cluster.
size(); ++istr) {
224 std::vector<std::pair<uint32_t, EncodedEventId> > trkid(getSimTrackId<PixelDigiSimLink>(siphase2OTSimLinks, detId, channel));
225 if (trkid.size()==0)
continue;
226 simTkIds.insert(trkid.begin(),trkid.end());
229 for (std::set<std::pair<uint32_t, EncodedEventId> >::const_iterator iset = simTkIds.begin();
230 iset != simTkIds.end(); iset++) {
231 auto ipos = mapping.find(*iset);
232 if (ipos != mapping.end()) {
241 clusterTPList->sort();
245 template <
typename T>
246 std::vector<std::pair<uint32_t, EncodedEventId> >
249 const DetId& detId, uint32_t channel)
const 252 std::vector<std::pair<uint32_t, EncodedEventId> > simTrkId;
253 auto isearch = simLinks->find(detId);
254 if (isearch != simLinks->end()) {
258 it != link_detset.
data.end(); ++it) {
259 if (channel == it->channel()) {
260 simTrkId.
push_back(std::make_pair(it->SimTrackId(), it->eventId()));
virtual void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
edm::Ref< typename HandleT::element_type, typename HandleT::element_type::value_type::value_type > makeRefTo(const HandleT &iHandle, typename HandleT::element_type::value_type::const_iterator itIter)
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
void push_back(const T &t)
std::vector< TrackingParticle > TrackingParticleCollection
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< edmNew::DetSetVector< Phase2TrackerCluster1D > > phase2OTClustersToken_
uint16_t firstStrip() const
data_type const * const_iterator
edm::EDGetTokenT< edm::DetSetVector< PixelDigiSimLink > > siphase2OTSimLinksToken_
edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > pixelClustersToken_
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::EDGetTokenT< edmNew::DetSetVector< SiStripCluster > > stripClustersToken_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
unsigned int firstRow() const
ClusterTPAssociationProducer(const edm::ParameterSet &)
std::vector< OmniClusterRef > OmniClusterCollection
unsigned int column() const
static PackedDigiType pixelToChannel(unsigned int row, unsigned int col)
~ClusterTPAssociationProducer()
ParameterDescriptionBase * add(U const &iLabel, T const &value)
edm::EDGetTokenT< TrackingParticleCollection > trackingParticleToken_
T const * product() const
edm::EDGetTokenT< edm::DetSetVector< PixelDigiSimLink > > sipixelSimLinksToken_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Pixel cluster – collection of neighboring pixels above threshold.
static int pixelToChannel(int row, int col)
std::vector< std::pair< uint32_t, EncodedEventId > > getSimTrackId(const edm::Handle< edm::DetSetVector< T > > &simLinks, const DetId &detId, uint32_t channel) const
collection_type::const_iterator const_iterator
edm::EDGetTokenT< edm::DetSetVector< StripDigiSimLink > > sistripSimLinksToken_
const std::vector< uint8_t > & amplitudes() const