46 if (inputs_.size() != dPhi_.size() || dPhi_.size() != maxZ_.size() )
48 edm::LogError(
"PixelUnpackingRegions")<<
"Not the same size of config parameters vectors!\n" 49 <<
" inputs "<<inputs_.size()<<
" deltaPhi "<<dPhi_.size() <<
" maxZ "<< maxZ_.size();
68 size_t ninputs =
inputs_.size();
75 for(
size_t i = 0;
i <
n; ++
i )
119 auto it = geom->
dets().begin();
120 for ( ; it != geom->
dets().end(); ++it)
122 int subdet = (*it)->geographicalId().subdetId();
128 m.
x = (*it)->position().x();
129 m.
y = (*it)->position().y();
130 m.
z = (*it)->position().z();
132 m.
phi = (*it)->position().phi();
134 m.
id = (*it)->geographicalId().rawId();
135 const std::vector<sipixelobjects::CablingPathToDetUnit> path2det =
cabling_->pathToDetUnit(m.
id);
137 m.
fed = path2det[0].fed;
138 assert( (m.
fed<=fedMax) && (m.
fed>=fedMin) );
163 float phi = r.
v.phi();
187 std::vector<Module>::const_iterator
a,
b;
191 a = lower_bound(container.begin(), container.end(), lo);
192 b = upper_bound(container.begin(), container.end(), hi);
198 a = lower_bound(container.begin(), container.end(), pi_m);
199 b = upper_bound(container.begin(), container.end(), hi);
203 a = lower_bound(container.begin(), container.end(), lo);
204 b = upper_bound(container.begin(), container.end(), pi_p);
220 feds_.insert(a->fed);
228 if (
feds_.count(fed_n))
return true;
235 if (
modules_.count(
id))
return true;
T getParameter(std::string const &) const
bool mayUnpackModule(unsigned int id) const
check whether a module has to be unpacked
void addRegionLocal(Region &r, std::vector< Module > &container, const Module &lo, const Module &hi)
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< edm::EDGetTokenT< reco::CandidateView > > tCandidateView
void addRegion(Region &r)
void gatherFromRange(Region &r, std::vector< Module >::const_iterator, std::vector< Module >::const_iterator)
std::ostream & operator<<(std::ostream &out, const ALILine &li)
PixelUnpackingRegions(const edm::ParameterSet &, edm::ConsumesCollector &&iC)
static std::string const input
std::vector< Module > phiFPIXm_
bool isThere(GeomDetEnumerators::SubDetector subdet) const
std::unique_ptr< SiPixelFedCablingTree > cabling_
const DetContainer & dets() const override
Returm a vector of all GeomDet (including all GeomDetUnits)
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
std::unique_ptr< SiPixelFedCablingTree > cablingTree() const
std::vector< edm::InputTag > inputs_
std::vector< Module > phiFPIXp_
bool check(const edm::EventSetup &iSetup)
virtual Vector momentum() const =0
spatial momentum vector
unsigned int nForwardModules() const
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
const Point & position() const
position
std::vector< double > maxZ_
std::vector< Module > phiBPIX_
edm::EDGetTokenT< reco::BeamSpot > tBeamSpot
std::set< unsigned int > feds_
Power< A, B >::type pow(const A &a, const B &b)
std::set< unsigned int > modules_