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>();
56 std::vector<edm::Ref<reco::IsolatedPixelTrackCandidateCollection> > isoPixTrackRefs;
63 std::vector<int> stripFEDVec;
74 for (
int i = 0;
i < 1000;
i++)
78 for (uint32_t
p = 0;
p < isoPixTrackRefs.size();
p++) {
79 double etaObj_ = isoPixTrackRefs[
p]->track()->eta();
80 double phiObj_ = isoPixTrackRefs[
p]->track()->phi();
83 for (uint32_t
i = 0;
i < ccab.size();
i++) {
85 double dphi = fabs(pos.second - phiObj_);
87 dphi = 2 * acos(-1) - dphi;
88 double R =
sqrt(
pow(pos.first - etaObj_, 2) + dphi * dphi);
100 SiStripRegionCabling::ElementCabling::const_iterator it = fedVectorMap.begin();
101 for (; it != fedVectorMap.end(); it++) {
102 for (uint32_t op = 0; op < (it->second).
size(); op++) {
104 int fediid = (it->second)[op].
fedId();
105 if (!fedSaved[fediid]) {
106 stripFEDVec.push_back(fediid);
108 fedSaved[fediid] =
true;
124 bool rightFED =
false;
125 for (uint32_t
k = 0;
k < stripFEDVec.size();
k++) {
126 if (
j == stripFEDVec[
k]) {
137 FEDRawData& fedDataProd = producedData->FEDData(
j);
138 if (fedDataProd.
size() != 0) {
139 edm::LogVerbatim(
"HcalIsoTrack") <<
" More than one FEDRawDataCollection with data in FED " <<
j
140 <<
" Skipping the 2nd *****";
144 unsigned char* dataProd = fedDataProd.
data();
145 const unsigned char*
data = fedData.
data();
146 for (
unsigned int k = 0;
k <
size; ++
k) {
147 dataProd[
k] = data[
k];
159 desc.
add<
double>(
"delta", 1.0);
160 descriptions.
add(
"stripFED", desc);
SiStripRegFEDSelector(const edm::ParameterSet &)
Log< level::Info, true > LogVerbatim
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
#define DEFINE_FWK_MODULE(type)
const edm::EDGetTokenT< FEDRawDataCollection > tok_raw_
std::vector< Element > ElementCabling
~SiStripRegFEDSelector() override
size_t size() const
Lenght of the data buffer in bytes.
bool getData(T &iHolder) const
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
void resize(size_t newsize)
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > tok_seed_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::vector< RegionCabling > Cabling
const Cabling & getRegionCabling() const
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
const Position position(const uint32_t) const
T const * product() const
std::pair< double, double > Position
void add(std::string const &label, ParameterSetDescription const &psetDescription)
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
const edm::ESGetToken< SiStripRegionCabling, SiStripRegionCablingRcd > tok_strip_
tuple size
Write out results.
Power< A, B >::type pow(const A &a, const B &b)