38 for (
unsigned int t = 0;
t < inputs_.size();
t++)
41 if (inputs_.size() != dPhi_.size() || dPhi_.size() != maxZ_.size()) {
43 <<
"Not the same size of config parameters vectors!\n"
44 <<
" inputs " << inputs_.size() <<
" deltaPhi " << dPhi_.size() <<
" maxZ " << maxZ_.size();
60 size_t ninputs =
inputs_.size();
66 for (
size_t i = 0;
i <
n; ++
i) {
81 cabling_ = cablingMap->cablingTree();
102 auto it = geom->dets().begin();
103 for (; it != geom->dets().end(); ++it) {
104 int subdet = (*it)->geographicalId().subdetId();
110 m.
x = (*it)->position().x();
111 m.
y = (*it)->position().y();
112 m.
z = (*it)->position().z();
114 m.
phi = (*it)->position().phi();
116 m.
id = (*it)->geographicalId().rawId();
117 const std::vector<sipixelobjects::CablingPathToDetUnit> path2det =
cabling_->pathToDetUnit(m.
id);
119 m.
fed = path2det[0].fed;
142 float phi = r.
v.phi();
148 if (r.
v.eta() > 1.) {
151 if (r.
v.eta() < -1.) {
157 std::vector<Module>& container,
165 std::vector<Module>::const_iterator
a,
b;
169 a =
lower_bound(container.begin(), container.end(), lo);
170 b =
upper_bound(container.begin(), container.end(), hi);
176 a =
lower_bound(container.begin(), container.end(), pi_m);
177 b =
upper_bound(container.begin(), container.end(), hi);
182 a =
lower_bound(container.begin(), container.end(), lo);
183 b =
upper_bound(container.begin(), container.end(), pi_p);
189 std::vector<Module>::const_iterator
a,
190 std::vector<Module>::const_iterator
b) {
191 for (; a !=
b; ++
a) {
199 feds_.insert(a->fed);
205 if (
feds_.count(fed_n))
bool mayUnpackModule(unsigned int id) const
check whether a module has to be unpacked
const edm::EventSetup & c
void addRegionLocal(Region &r, std::vector< Module > &container, const Module &lo, const Module &hi)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< edm::EDGetTokenT< reco::CandidateView > > tCandidateView
void addRegion(Region &r)
__host__ __device__ constexpr RandomIt upper_bound(RandomIt first, RandomIt last, const T &value, Compare comp={})
void gatherFromRange(Region &r, std::vector< Module >::const_iterator, std::vector< Module >::const_iterator)
Log< level::Error, false > LogError
PixelUnpackingRegions(const edm::ParameterSet &, edm::ConsumesCollector &&iC)
static std::string const input
std::vector< Module > phiFPIXm_
std::unique_ptr< SiPixelFedCablingTree > cabling_
virtual Vector momentum() const =0
spatial momentum vector
edm::ESWatcher< SiPixelFedCablingMapRcd > watcherSiPixelFedCablingMap_
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
Abs< T >::type abs(const T &t)
unsigned int nBarrelModules() const
edm::InputTag beamSpotTag_
void run(const edm::Event &e, const edm::EventSetup &es)
has to be run during each event
edm::ESGetToken< SiPixelFedCablingMap, SiPixelFedCablingMapRcd > cablingMapToken_
std::vector< edm::InputTag > inputs_
std::vector< Module > phiFPIXp_
T getParameter(std::string const &) const
bool check(const edm::EventSetup &iSetup)
unsigned int nForwardModules() const
__host__ __device__ constexpr RandomIt lower_bound(RandomIt first, RandomIt last, const T &value, Compare comp={})
bool mayUnpackFED(unsigned int fed_n) const
check whether a FED has to be unpacked
std::vector< double > dPhi_
void initialize(const edm::EventSetup &es)
run by the run method: (re)initialize the cabling data when it's necessary
std::vector< double > maxZ_
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > trackerGeomToken_
std::vector< Module > phiBPIX_
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
edm::EDGetTokenT< reco::BeamSpot > tBeamSpot
std::set< unsigned int > feds_
std::set< unsigned int > modules_