41 : tok_seed_(consumes<
trigger::TriggerFilterObjectWithRefs>(iConfig.getParameter<
edm::
InputTag>(
"regSeedLabel"))),
44 delta_(iConfig.getParameter<double>(
"delta")) {
45 produces<FEDRawDataCollection>();
51 auto producedData = std::make_unique<FEDRawDataCollection>();
55 std::vector<edm::Ref<reco::IsolatedPixelTrackCandidateCollection> > isoPixTrackRefs;
61 std::vector<int> stripFEDVec;
72 for (
int i = 0;
i < 1000;
i++)
76 for (uint32_t
p = 0;
p < isoPixTrackRefs.size();
p++) {
77 double etaObj_ = isoPixTrackRefs[
p]->track()->eta();
78 double phiObj_ = isoPixTrackRefs[
p]->track()->phi();
81 for (uint32_t
i = 0;
i < ccab.size();
i++) {
83 double dphi = fabs(
pos.second - phiObj_);
85 dphi = 2 * acos(-1) - dphi;
86 double R =
sqrt(
pow(
pos.first - etaObj_, 2) + dphi * dphi);
98 SiStripRegionCabling::ElementCabling::const_iterator it = fedVectorMap.begin();
99 for (; it != fedVectorMap.end(); it++) {
100 for (uint32_t
op = 0;
op < (it->second).
size();
op++) {
102 int fediid = (it->second)[
op].
fedId();
103 if (!fedSaved[fediid]) {
104 stripFEDVec.push_back(fediid);
106 fedSaved[fediid] =
true;
122 bool rightFED =
false;
123 for (uint32_t
k = 0;
k < stripFEDVec.size();
k++) {
124 if (
j == stripFEDVec[
k]) {
135 FEDRawData& fedDataProd = producedData->FEDData(
j);
136 if (fedDataProd.
size() != 0) {
137 edm::LogVerbatim(
"HcalIsoTrack") <<
" More than one FEDRawDataCollection with data in FED " <<
j 138 <<
" Skipping the 2nd *****";
142 unsigned char* dataProd = fedDataProd.
data();
143 const unsigned char*
data = fedData.
data();
144 for (
unsigned int k = 0;
k <
size; ++
k) {
157 desc.add<
double>(
"delta", 1.0);
158 descriptions.
add(
"stripFED",
desc);
SiStripRegFEDSelector(const edm::ParameterSet &)
Log< level::Info, true > LogVerbatim
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
T const * product() const
size_t size() const
Lenght of the data buffer in bytes.
const edm::EDGetTokenT< FEDRawDataCollection > tok_raw_
const Cabling & getRegionCabling() const
std::vector< Element > ElementCabling
~SiStripRegFEDSelector() override
const Position position(const uint32_t) const
void resize(size_t newsize)
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > tok_seed_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
#define DEFINE_FWK_MODULE(type)
std::vector< RegionCabling > Cabling
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
std::pair< double, double > Position
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::vector< WedgeCabling > RegionCabling
char data[epos_bytes_allocation]
const std::pair< double, double > regionDimensions() const
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
std::vector< ElementCabling > WedgeCabling
const edm::ESGetToken< SiStripRegionCabling, SiStripRegionCablingRcd > tok_strip_