36 #include "CLHEP/Geometry/Point3D.h" 37 #include "CLHEP/Geometry/Vector3D.h" 38 #include "CLHEP/Units/GlobalSystemOfUnits.h" 39 #include "CLHEP/Units/GlobalPhysicalConstants.h" 196 std::vector<float> hitVtxX = infoLayer->
hitvtxX();
197 std::vector<float> hitVtxY = infoLayer->
hitvtxY();
198 std::vector<float> hitVtxZ = infoLayer->
hitvtxZ();
199 std::vector<unsigned int> hitDet = infoLayer->
hitDets();
200 std::vector<unsigned int> hitIdx = infoLayer->
hitIndex();
203 std::vector<float> edepLayerEE = infoLayer->
eehgcEdep();
204 std::vector<float> edepLayerHE = infoLayer->
hefhgcEdep();
205 std::vector<float> edepLayerHB = infoLayer->
hebhgcEdep();
208 for(i=0; i<edepLayerEE.size(); i++) {
212 for(i=0; i<edepLayerHE.size(); i++) {
216 for(i=0; i<edepLayerHB.size(); i++) {
226 for(
unsigned int i=0; i<hitVtxX.size(); i++) {
229 int subdet,
zside, layer, wafer, celltype, cell;
232 std::pair<float, float>
xy;
233 std::pair<int,float> layerIdx;
236 if (subdet==(
int)(
HGCEE)) {
237 xy =
hgcGeometry_[0]->locateCell(cell,layer,wafer,
false);
239 if (zside < 0) zp = -zp;
240 xx = (zp<0) ? -xy.first/10 : xy.first/10;
242 hitVtxX.at(i) = hitVtxX.at(i)/10;
243 hitVtxY.at(i) = hitVtxY.at(i)/10;
244 hitVtxZ.at(i) = hitVtxZ.at(i)/10;
262 }
else if (subdet==(
int)(
HGCHEF)) {
264 xy =
hgcGeometry_[1]->locateCell(cell,layer,wafer,
false);
266 if (zside < 0) zp = -zp;
267 xx = (zp<0) ? -xy.first/10 : xy.first/10;
269 hitVtxX.at(i) = hitVtxX.at(i)/10;
270 hitVtxY.at(i) = hitVtxY.at(i)/10;
271 hitVtxZ.at(i) = hitVtxZ.at(i)/10;
297 double zp = cell.
rz/10;
298 if (zside == 0) zp = -zp;
299 double rho = zp*
tan(2.0*atan(
exp(-cell.eta)));
300 double xp = rho *
cos(cell.phi);
301 double yp = rho *
sin(cell.phi);
303 hitVtxX.at(i) = hitVtxX.at(i)/10;
304 hitVtxY.at(i) = hitVtxY.at(i)/10;
305 hitVtxZ.at(i) = hitVtxZ.at(i)/10;
MonitorElement * heedxVsLayer
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * hebdzVsLayer
MonitorElement * hebdyVsY
MonitorElement * hebdxVsX
edm::EDGetTokenT< PHGCalValidInfo > g4Token_
MonitorElement * hebdzVsZ
MonitorElement * hefdxVsLayer
MonitorElement * hefZG4VsId
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
MonitorElement * hebdxVsLayer
MonitorElement * heeZG4VsId
Sin< T >::type sin(const T &t)
MonitorElement * heedzVsLayer
MonitorElement * hebYG4VsId
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
HcalCellType::HcalCell cell(const int &det, const int &zside, const int &depth, const int &etaR, const int &iphi) const
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
MonitorElement * hebdyVsLayer
std::vector< const HGCalDDDConstants * > hgcGeometry_
MonitorElement * heedxVsX
std::vector< float > hitvtxZ() const
void addDefault(ParameterSetDescription const &psetDescription)
MonitorElement * heedyVsY
MonitorElement * heeXG4VsId
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
void dqmBeginRun(edm::Run const &, edm::EventSetup const &) override
MonitorElement * hefTotEdepStep
MonitorElement * hefYG4VsId
std::vector< float > eehgcEdep() const
Cos< T >::type cos(const T &t)
MonitorElement * hefLayerVsEnStep
MonitorElement * book1D(Args &&...args)
MonitorElement * heeLayerVsEnStep
Tan< T >::type tan(const T &t)
static void unpackHcalIndex(const uint32_t &idx, int &det, int &z, int &depth, int &eta, int &phi, int &lay)
void analyze(const edm::Event &, const edm::EventSetup &) override
std::vector< float > hitvtxX() const
MonitorElement * hebTotEdepStep
std::vector< float > hitvtxY() const
void setCurrentFolder(const std::string &fullpath)
MonitorElement * book2D(Args &&...args)
std::vector< float > hebhgcEdep() const
MonitorElement * hebZG4VsId
MonitorElement * hefdyVsLayer
MonitorElement * hebLayerVsEnStep
MonitorElement * hefdyVsY
const HcalDDDSimConstants * hcons_
MonitorElement * heeYG4VsId
MonitorElement * hefdxVsX
MonitorElement * heedzVsZ
HGCGeometryValidation(const edm::ParameterSet &)
MonitorElement * hefXG4VsId
std::vector< unsigned int > hitIndex() const
MonitorElement * heedyVsLayer
std::vector< std::string > geometrySource_
~HGCGeometryValidation() override
MonitorElement * heeTotEdepStep
T const * product() const
MonitorElement * hefdzVsZ
MonitorElement * hefdzVsLayer
std::vector< unsigned int > hitDets() const
std::vector< float > hefhgcEdep() const
static void unpackHexagonIndex(const uint32_t &idx, int &subdet, int &z, int &lay, int &wafer, int &celltyp, int &cell)
MonitorElement * hebXG4VsId