31 using namespace sipixelobjects;
43 edm::LogInfo(
"SiPixelFedCablingMapBuilder")<<
"pixel fedid range: "<<fedIds;
57 LogDebug(
"read tracker geometry...");
60 LogDebug(
"tracker geometry read")<<
"There are: "<< pDD->dets().size() <<
" detectors";
62 typedef TrackerGeometry::DetContainer::const_iterator ITG;
65 typedef std::vector<pair<PixelModuleName* , uint32_t> >
UNITS;
68 for (ITG it = pDD->dets().begin(); it != pDD->dets().end(); it++){
70 if (pxUnit ==0 )
continue;
80 units.push_back( std::make_pair( name, geomid.
rawId() ) );
85 cout <<
" HERE PixelToFEDAssociateFromAscii"<<endl;
86 vector<FedSpec> fedSpecs(fedIds.
max()-fedIds.
min()+1);
87 for (
int id=fedIds.first;
id<=fedIds.second;
id++) {
88 FedSpec fs={
id, vector<PixelModuleName* >(), vector<uint32_t>()};
89 int idx =
id - fedIds.
min();
92 for (UNITS::iterator iu=units.begin(); iu != units.end(); iu++) {
94 uint32_t rawId = (*iu).second;
95 int fedId = name2fed( *name);
96 if ( fedIds.
inside(fedId) ) {
97 int idx = fedId - fedIds.
min();
98 fedSpecs[idx].rawids.push_back(rawId);
99 fedSpecs[idx].names.push_back(name);
101 <<
"problem with numbering! "<<fedId<<
" name: " << name->
name();
104 LogDebug(
"tracker geometry read")<<
"There are: "<< npxdets<<
" pixel detetors";
106 typedef vector<FedSpec>::iterator FI;
107 for ( FI it = fedSpecs.begin(); it != fedSpecs.end(); it++) {
108 int fedId = it->fedId;
109 vector<PixelModuleName* >
names = it->names;
110 vector<uint32_t> units = it->rawids;
111 if ( names.size() == 0)
continue;
113 bool barrel = it->names.front()->isBarrel();
115 PixelFEDCabling::Links links =
120 PixelFEDCabling::Links links =
128 cout <<
" HERE PixelToLNKAssociateFromAscii"<<endl;
129 for (UNITS::iterator iu=units.begin(); iu != units.end(); iu++) {
132 for (
int rocDetId=0; rocDetId<=16; rocDetId++) {
144 for (UNITS::iterator iu=units.begin(); iu != units.end(); iu++)
delete iu->first;
152 std::ostringstream str;
157 local =
LocalPoint(0,0,0); global = (*pxUnit).toGlobal(local);
159 float phi = 180*atan2(global.
x(),global.
y())/
M_PI;
if (phi > 180.) phi = phi-360;
160 float r = global.
perp();
161 float z = global.
z();
162 str <<
" POSITION: "<<
" r="<<r<<
" phi="<<phi<<
" z="<<
z;
165 local =
LocalPoint(0,0,0); str <<local<<
"global: "<<(*pxUnit).toGlobal(local) <<endl;
166 local =
LocalPoint(1,0,0); str <<local<<
"global: "<<(*pxUnit).toGlobal(local) <<endl;
167 local =
LocalPoint(0,1,0); str <<local<<
"global: "<<(*pxUnit).toGlobal(local) <<endl;
168 local =
LocalPoint(0,0,1); str <<local<<
"global: "<<(*pxUnit).toGlobal(local) <<endl;
static const HistoName names[]
SiPixelFedCablingTree * produce(const edm::EventSetup &setup)
virtual int ncolumns() const =0
virtual int nrows() const =0
bool inside(const T &value) const
check if object is inside region
Links links(const Names &n, const DetUnits &u) const
const T & min() const
lower edge of range
uint32_t rawId() const
get the raw id
virtual std::string version() const =0
version
std::string myprint(const PixelGeomDetUnit *pxUnit)
SiPixelFedCablingMapBuilder(const std::string &associatorName)
virtual std::string name() const =0
associated name
void setLinks(Links &links)
DetId geographicalId() const
The label of this GeomDet.
const PixelModuleName * module
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
const T & max() const
upper edge of range
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
TString units(TString variable, Char_t axis)
void addFed(const PixelFEDCabling &f)
add cabling for one fed
std::string theAssociatorName
void addItem(unsigned int fedId, unsigned int linkId, const sipixelobjects::PixelROC &roc)
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
Links links(const Names &n, const DetUnits &u) const