|
|
Go to the documentation of this file.
51 LogDebug(
"CaloGeometryTools") <<
" No preshower present" << std::endl;
69 float deltaeta2 = ip.
eta() -
cc.eta();
70 deltaeta2 *= deltaeta2;
71 float deltaphi2 = acos(
cos(ip.
phi() -
cc.phi()));
72 deltaphi2 *= deltaphi2;
94 if (fabs(
point.Z()) > 1132.) {
137 float deltaeta2 = ip.
eta() -
cc.eta();
138 deltaeta2 *= deltaeta2;
139 float deltaphi2 = acos(
cos(ip.
phi() -
cc.phi()));
140 deltaphi2 *= deltaphi2;
179 unsigned size = vec.size();
180 for (
unsigned ic = 0; ic <
size; ++ic) {
184 unsigned nneighbours = neighbours.size();
187 if (hashedindex >= nbarrel) {
188 LogDebug(
"CaloGeometryTools") <<
" Array overflow " << std::endl;
196 if (nneighbours == 9) {
199 for (
unsigned in = 0;
in < nneighbours; ++
in) {
201 if (neighbours[
in] != vec[ic]) {
210 for (
unsigned idir = 0; idir < 8; ++idir) {
231 for (
unsigned ic = 0; ic <
size; ++ic) {
234 unsigned nneighbours = neighbours.size();
238 if (hashedindex >= nendcap) {
239 LogDebug(
"CaloGeometryTools") <<
" Array overflow " << std::endl;
242 if (nneighbours == 9) {
245 for (
unsigned in = 0;
in < nneighbours; ++
in) {
247 if (neighbours[
in] != vece[ic]) {
255 for (
unsigned idir = 0; idir < 8; ++idir) {
273 DetId originalcell = cell;
280 static const int calodirections[9] = {-1, 1, 2, 0, 4, 3, 7, 5, 6};
303 std::vector<DetId> neighbours;
309 if ((!neighbours.empty()) && (!neighbours[0].
null())) {
310 cell = neighbours[0];
379 return (cc1.
im() != cc2.
im() || cc1.
ism() != cc2.
ism());
397 unsigned size = vec.size();
398 for (
unsigned ic = 0; ic <
size; ++ic) {
416 for (
unsigned ic = 0; ic <
size; ++ic) {
void setCorners(const CaloCellGeometry::CornersVec &vec, const GlobalPoint &pos)
int hashedIndex() const
get a compact index for arrays
const EcalEndcapGeometry * EcalEndcapGeometry_
CaloDirection
Codes the local directions in the cell lattice.
static Histos * instance()
constexpr int iphi() const
get the cell iphi
const CaloSubdetectorTopology * EcalEndcapTopology_
bool diagonalmove(DetId &cell, const CaloDirection &dir) const
int im() const
get the number of module inside the SM (1-4)
bool simplemove(DetId &cell, const CaloDirection &dir) const
T perp() const
Magnitude of transverse component.
void initialize(double bField)
DetId getClosestCell(const XYZPoint &point, bool ecal, bool central) const
Cos< T >::type cos(const T &t)
std::vector< BaseCrystal > barrelCrystals_
static const CaloDirection orderedDir[8]
Global3DPoint GlobalPoint
virtual const std::vector< DetId > & getValidDetIds(DetId::Detector det=DetId::Detector(0), int subdet=0) const
Get a list of valid detector ids (for the given subdetector)
DetId getClosestCell(const GlobalPoint &r) const override
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
const CaloSubdetectorTopology * getEcalTopology(int subdetn) const
virtual std::vector< DetId > getNeighbours(const DetId &id, const CaloDirection &dir) const
constexpr int ieta() const
get the cell ieta
std::vector< NeiVect > endcapNeighbours_
std::vector< BaseCrystal > endcapCrystals_
void buildCrystal(const DetId &id, Crystal &) const
void getWindow(const DetId &pivot, int s1, int s2, std::vector< DetId > &) const
bool borderCrossing(const DetId &, const DetId &) const
virtual std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
const CaloSubdetectorGeometry * HcalGeometry_
const EcalBarrelGeometry * EcalBarrelGeometry_
virtual std::vector< DetId > getWindow(const DetId &id, const int &northSouthSize, const int &eastWestSize) const
std::array< DetId, 8 > NeiVect
void fill(const std::string &name, float val1, float val2=1., float val3=1.)
Fill an histogram.
bool move(DetId &cell, const CaloDirection &dir, bool fast=true) const
std::vector< NeiVect > barrelNeighbours_
const EcalPreshowerGeometry * getEcalPreshowerGeometry() const
int ism() const
get the ECAL/SM id
const NeiVect & getNeighbours(const DetId &det) const
const CaloSubdetectorTopology * EcalBarrelTopology_
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
int hashedIndex(int ieta, int iphi)
DetId getClosestCell(const GlobalPoint &r) const override
Geom::Phi< T > phi() const
const CaloSubdetectorGeometry * getEcalGeometry(int subdetn) const
bool neighbourmapcalculated_
void buildNeighbourArray()