Skip to content

Commit

Permalink
Merge pull request #28506 from bsunanda/Run3-hcx243
Browse files Browse the repository at this point in the history
Run3-hcx243 Second step to make HCAL parameters to be read in DDD/DD4Hep
  • Loading branch information
cmsbuild authored Dec 6, 2019
2 parents 635d0f5 + d171058 commit a89ad8f
Show file tree
Hide file tree
Showing 5 changed files with 651 additions and 255 deletions.
29 changes: 18 additions & 11 deletions Geometry/HcalCommonData/interface/HcalGeomParameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,34 +15,41 @@
#include <vector>
#include <iostream>

#include "DetectorDescription/Core/interface/DDsvalues.h"
#include "DetectorDescription/Core/interface/DDFilteredView.h"
#include "DetectorDescription/DDCMS/interface/DDFilteredView.h"
#include "Geometry/HcalCommonData/interface/HcalCellType.h"
#include "DataFormats/HcalDetId/interface/HcalSubdetector.h"

class DDCompactView;
class DDFilteredView;
class HcalParameters;

class HcalGeomParameters {
public:
HcalGeomParameters();
~HcalGeomParameters();

double getConstDzHF() const { return dzVcal; }
double getConstDzHF() const { return dzVcal_; }
void getConstRHO(std::vector<double>&) const;
std::vector<int> getModHalfHBHE(const int type) const;
void loadGeometry(const DDFilteredView& _fv, HcalParameters& php);
void loadGeometry(cms::DDFilteredView& fv, HcalParameters& php);

private:
unsigned find(int element, std::vector<int>& array) const;
double getEta(double r, double z) const;

int nzHB, nmodHB; // Number of halves and modules in HB
int nzHE, nmodHE; // Number of halves and modules in HE
double etaHO[4], rminHO; // eta in HO ring boundaries
double zVcal; // Z-position of the front of HF
double dzVcal; // Half length of the HF
double dlShort; // Diference of length between long and short
void clear(HcalParameters& php);
void loadfinal(HcalParameters& php);

int nzHB_, nmodHB_; // Number of halves and modules in HB
int nzHE_, nmodHE_; // Number of halves and modules in HE
double etaHO_[4], rminHO_; // eta in HO ring boundaries
double zVcal_; // Z-position of the front of HF
double dzVcal_; // Half length of the HF
double dlShort_; // Diference of length between long and short
static const int maxLayer_ = 20;
static const int kHELayer1_ = 21, kHELayer2_ = 71;
std::vector<double> rb_, ze_, thkb_, thke_;
std::vector<int> ib_, ie_, izb_, phib_, ize_, phie_;
std::vector<double> rxb_, rminHE_, rmaxHE_;
};

#endif
2 changes: 1 addition & 1 deletion Geometry/HcalCommonData/interface/HcalParametersFromDD.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class HcalParametersFromDD {
HcalParametersFromDD() = default;

bool build(const DDCompactView*, HcalParameters&);
bool build(const cms::DDCompactView*, HcalParameters&) { return true; }
bool build(const cms::DDCompactView*, HcalParameters&);

private:
bool build(const HcalParameters&);
Expand Down
Loading

0 comments on commit a89ad8f

Please sign in to comment.