27 bool isBPIXFED(
unsigned int fed) {
return fed< 32;}
28 bool isFPIXFED(
unsigned int fed) {
return fed>=32;}
49 if (inputs_.size() != dPhi_.size() || dPhi_.size() != maxZ_.size() )
51 edm::LogError(
"PixelUnpackingRegions")<<
"Not the same size of config parameters vectors!\n"
52 <<
" inputs "<<inputs_.size()<<
" deltaPhi "<<dPhi_.size() <<
" maxZ "<< maxZ_.size();
70 size_t ninputs =
inputs_.size();
77 for(
size_t i = 0;
i <
n; ++
i )
111 std::vector<GeomDet*>::const_iterator it = geom->dets().begin();
112 for ( ; it != geom->dets().end(); ++it)
114 int subdet = (*it)->geographicalId().subdetId();
120 m.
x = (*it)->position().x();
121 m.
y = (*it)->position().y();
122 m.
z = (*it)->position().z();
126 m.
id = (*it)->geographicalId().rawId();
127 const std::vector<sipixelobjects::CablingPathToDetUnit> path2det =
cabling_->pathToDetUnit(m.
id);
129 m.
fed = path2det[0].fed;
177 std::vector<Module>::const_iterator
a,
b;
181 a = lower_bound(container.begin(), container.end(), lo);
182 b = upper_bound(container.begin(), container.end(), hi);
188 a = lower_bound(container.begin(), container.end(), pi_m);
189 b = upper_bound(container.begin(), container.end(), hi);
193 a = lower_bound(container.begin(), container.end(), lo);
194 b = upper_bound(container.begin(), container.end(), pi_p);
210 feds_.insert(a->fed);
218 if (
feds_.count(fed_n))
return true;
224 return std::count_if(
feds_.begin(),
feds_.end(), isBPIXFED );
229 return std::count_if(
feds_.begin(),
feds_.end(), isFPIXFED );
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
unsigned int nForwardFEDs() const
void addRegion(Region &r)
void gatherFromRange(Region &r, std::vector< Module >::const_iterator, std::vector< Module >::const_iterator)
boost::scoped_ptr< SiPixelFedCabling > cabling_
std::ostream & operator<<(std::ostream &out, const ALILine &li)
std::vector< Module > phiFPIXm_
PixelUnpackingRegions(const edm::ParameterSet &)
virtual Vector momentum() const =0
spatial momentum vector
edm::ESWatcher< SiPixelFedCablingMapRcd > watcherSiPixelFedCablingMap_
unsigned int nBarrelModules() const
edm::InputTag beamSpotTag_
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
void run(const edm::Event &e, const edm::EventSetup &es)
has to be run during each event
void addRegionLocal(Region &r, std::vector< Module > &container, Module lo, Module hi)
std::vector< edm::InputTag > inputs_
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
std::vector< Module > phiFPIXp_
bool check(const edm::EventSetup &iSetup)
unsigned int nForwardModules() const
unsigned int nBarrelFEDs() 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
std::vector< double > maxZ_
std::vector< Module > phiBPIX_
std::set< unsigned int > feds_
Power< A, B >::type pow(const A &a, const B &b)
std::set< unsigned int > modules_