14 produces<FEDRawDataCollection>();
20 auto producedData = std::make_unique<FEDRawDataCollection>();
25 std::vector<edm::Ref<reco::IsolatedPixelTrackCandidateCollection> > isoPixTrackRefs;
33 std::vector<int> stripFEDVec;
44 for (
int i = 0;
i < 1000;
i++)
48 for (uint32_t
p = 0;
p < isoPixTrackRefs.size();
p++) {
49 double etaObj_ = isoPixTrackRefs[
p]->track()->eta();
50 double phiObj_ = isoPixTrackRefs[
p]->track()->phi();
53 for (uint32_t
i = 0;
i < ccab.size();
i++) {
55 double dphi = fabs(pos.second - phiObj_);
57 dphi = 2 * acos(-1) - dphi;
58 double R =
sqrt(
pow(pos.first - etaObj_, 2) + dphi * dphi);
70 SiStripRegionCabling::ElementCabling::const_iterator it = fedVectorMap.begin();
71 for (; it != fedVectorMap.end(); it++) {
72 for (uint32_t op = 0; op < (it->second).
size(); op++) {
74 int fediid = (it->second)[op].
fedId();
75 if (!fedSaved[fediid]) {
76 stripFEDVec.push_back(fediid);
78 fedSaved[fediid] =
true;
94 bool rightFED =
false;
95 for (uint32_t
k = 0;
k < stripFEDVec.size();
k++) {
96 if (j == stripFEDVec[
k]) {
107 FEDRawData& fedDataProd = producedData->FEDData(j);
108 if (fedDataProd.
size() != 0) {
114 unsigned char* dataProd = fedDataProd.
data();
115 const unsigned char*
data = fedData.
data();
116 for (
unsigned int k = 0;
k <
size; ++
k) {
117 dataProd[
k] = data[
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
void produce(edm::Event &, const edm::EventSetup &) override
edm::ESHandle< SiStripRegionCabling > strip_cabling
std::vector< Element > ElementCabling
~SiStripRegFEDSelector() override
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)
edm::EDGetTokenT< FEDRawDataCollection > tok_raw_
std::vector< RegionCabling > Cabling
const Cabling & getRegionCabling() const
const Position position(const uint32_t) const
T const * product() const
std::pair< double, double > Position
std::vector< WedgeCabling > RegionCabling
char data[epos_bytes_allocation]
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
std::vector< ElementCabling > WedgeCabling
Power< A, B >::type pow(const A &a, const B &b)