16 produces<FEDRawDataCollection>();
33 std::vector< edm::Ref<reco::IsolatedPixelTrackCandidateCollection> > isoPixTrackRefs;
41 std::vector<int> stripFEDVec;
47 const std::pair<double,double> regDim=
strip_cabling->regionDimensions();
52 for (
int i=0;
i<1000;
i++) fedSaved[
i]=
false;
55 for (uint32_t
p=0;
p<isoPixTrackRefs.size();
p++)
57 double etaObj_=isoPixTrackRefs[
p]->track()->eta();
58 double phiObj_=isoPixTrackRefs[
p]->track()->phi();
61 for (uint32_t
i=0;
i<ccab.size();
i++)
64 double dphi=fabs(pos.second-phiObj_);
65 if (dphi>acos(-1)) dphi=2*acos(-1)-dphi;
66 double R=
sqrt(
pow(pos.first-etaObj_,2)+dphi*dphi);
79 SiStripRegionCabling::ElementCabling::const_iterator it=fedVectorMap.begin();
80 for( ; it!=fedVectorMap.end(); it++)
82 for (uint32_t op=0; op<(it->second).
size(); op++)
85 int fediid=(it->second)[op].fedId();
86 if (!fedSaved[fediid])
88 stripFEDVec.push_back(fediid);
90 fedSaved[fediid]=
true;
112 for (uint32_t
k=0;
k<stripFEDVec.size();
k++)
114 if (
j==stripFEDVec[
k])
119 if (!rightFED)
continue;
126 FEDRawData & fedDataProd = producedData->FEDData(
j);
127 if ( fedDataProd.
size() != 0 ) {
133 unsigned char *dataProd=fedDataProd.
data();
134 const unsigned char *
data=fedData.
data();
135 for (
unsigned int k=0;
k<
size; ++
k ) {
141 iEvent.
put(producedData);
SiStripRegFEDSelector(const edm::ParameterSet &)
T getParameter(std::string const &) const
edm::ESHandle< SiStripRegionCabling > strip_cabling
size_t size() const
Lenght of the data buffer in bytes.
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
void resize(size_t newsize)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
std::vector< ElementCabling > WedgeCabling
std::pair< double, double > Position
virtual void produce(edm::Event &, const edm::EventSetup &)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
T const * product() const
char data[epos_bytes_allocation]
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
std::vector< WedgeCabling > RegionCabling
tuple size
Write out results.
Power< A, B >::type pow(const A &a, const B &b)
edm::InputTag rawInLabel_
std::map< uint32_t, std::vector< FedChannelConnection > > ElementCabling
std::vector< RegionCabling > Cabling