15 produces<FEDRawDataCollection>();
27 auto producedData = std::make_unique<FEDRawDataCollection>();
32 std::vector< edm::Ref<reco::IsolatedPixelTrackCandidateCollection> > isoPixTrackRefs;
40 std::vector<int> stripFEDVec;
51 for (
int i=0;
i<1000;
i++) fedSaved[
i]=
false;
54 for (uint32_t
p=0;
p<isoPixTrackRefs.size();
p++)
56 double etaObj_=isoPixTrackRefs[
p]->track()->eta();
57 double phiObj_=isoPixTrackRefs[
p]->track()->phi();
60 for (uint32_t
i=0;
i<ccab.size();
i++)
63 double dphi=fabs(pos.second-phiObj_);
64 if (dphi>acos(-1)) dphi=2*acos(-1)-dphi;
65 double R=
sqrt(
pow(pos.first-etaObj_,2)+dphi*dphi);
78 SiStripRegionCabling::ElementCabling::const_iterator it=fedVectorMap.begin();
79 for( ; it!=fedVectorMap.end(); it++)
81 for (uint32_t op=0; op<(it->second).
size(); op++)
84 int fediid=(it->second)[op].fedId();
85 if (!fedSaved[fediid])
87 stripFEDVec.push_back(fediid);
89 fedSaved[fediid]=
true;
111 for (uint32_t
k=0;
k<stripFEDVec.size();
k++)
113 if (j==stripFEDVec[
k])
118 if (!rightFED)
continue;
125 FEDRawData & fedDataProd = producedData->FEDData(j);
126 if ( fedDataProd.
size() != 0 ) {
132 unsigned char *dataProd=fedDataProd.
data();
133 const unsigned char *
data=fedData.
data();
134 for (
unsigned int k=0;
k<
size; ++
k ) {
SiStripRegFEDSelector(const edm::ParameterSet &)
T getParameter(std::string const &) const
const std::pair< double, double > regionDimensions() const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< Element > ElementCabling
edm::ESHandle< SiStripRegionCabling > strip_cabling
size_t size() const
Lenght of the data buffer in bytes.
edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > tok_seed_
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
void resize(size_t newsize)
std::vector< ElementCabling > WedgeCabling
edm::EDGetTokenT< FEDRawDataCollection > tok_raw_
std::pair< double, double > Position
virtual void produce(edm::Event &, const edm::EventSetup &)
const Cabling & getRegionCabling() const
const Position position(const uint32_t) 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
Power< A, B >::type pow(const A &a, const B &b)
std::vector< RegionCabling > Cabling