Commit 5783538e authored by dauncey's avatar dauncey

Add NN wafer and cell (incomplete)

parent 9af4d29c
......@@ -16,6 +16,10 @@ DetIDs for TrgC2d and TrgC3d; maybe EndcapDetId, etc?
Resusitate event display from Karlsruhe?
fTrgC2dCreatorMethod in Event
Pass TVector of hits for an event into Coefficients to get energy, not do
externally.
Do not use xReflect for -z endcap, but fix numbering in SimHits when reading.
Other
=====
......
......@@ -455,6 +455,49 @@ public:
fInitialisedWaferNN=true;
}
static void initialiseCellNN() {
if(fInitialisedCellNN) return;
initialiseWaferNN();
std::cout << "Geometry::initialiseCellNN() called" << std::endl;
#ifdef NOT_YET
for(unsigned e(0);e<Geometry::kNumberOfEndcaps;e++) {
for(unsigned l(0);l<kNumberOfHGCLayers;l++) {
for(unsigned w(0);w<Geometry::numberOfWafers(l);w++) {
if(validWafer(l,w)) {
for(unsigned c(0);c<Geometry::numberOfCells(l,w);c++) {
std::pair<int,int> cp(cellPair(true,c));
for(unsigned n(c+1);n<Geometry::numberOfCells(l,w);n++) {
std::pair<int,int> np(cellPair(true,n));
if(abs(np.first -cp.first )<=2 &&
abs(np.second-cp.second)<=1) {
fCellNN[e][l][w][c].push_back(RecDetId(e,l,w,n));
fCellNN[e][l][w][n].push_back(RecDetId(e,l,w,c));
}
}
if(!edge) {
assert(fCellNN[e][l][w][e].size()==6);
} else {
for(unsigned i(0);i<fWaferNN[l][w].size();i++) {
for(unsigned n(0);n<Geometry::numberOfCells(l,fWaferNN[l][w][i]);n++) {
if(close) {
fCellNN[e][l][w][c].push_back(RecDetId(e,l,fWaferNN[l][w][i],n));
}
}
}
}
}
}
}
}
}
#endif
fInitialisedCellNN=true;
}
//////////////////////////////////////////////////////////////////
// Counts and numbering
......@@ -1675,6 +1718,7 @@ public:
private:
static bool fInitialised;
static bool fInitialisedWaferNN;
static bool fInitialisedCellNN;
static double fWaferSide;
static double fWaferHeight;
......@@ -1700,6 +1744,7 @@ private:
static reader fNavigation;
static std::vector<unsigned> fWaferNN[kNumberOfHGCLayers][kMaximumNumberOfWafers];
static std::vector<RecDetId> fCellNN[kNumberOfEndcaps][kNumberOfHGCLayers][kMaximumNumberOfWafers][kMaximumNumberOfCells];
};
......@@ -1707,6 +1752,7 @@ uint64_t Geometry::fTriggerLayers=0xfffaaaaaaa;
bool Geometry::fInitialised=false;
bool Geometry::fInitialisedWaferNN=false;
bool Geometry::fInitialisedCellNN=false;
double Geometry::fWaferSide;
double Geometry::fWaferHeight;
......@@ -1732,6 +1778,8 @@ double Geometry::fTrgPhi[kNumberOfCoarsePhis];
reader Geometry::fNavigation;
std::vector<unsigned> Geometry::fWaferNN[kNumberOfHGCLayers][kMaximumNumberOfWafers];
std::vector<RecDetId> Geometry::fCellNN[kNumberOfEndcaps][kNumberOfHGCLayers][kMaximumNumberOfWafers][kMaximumNumberOfCells];
// Python interface (for Vito)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment