forked from cms-sw/cmssw
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request cms-sw#10123 from ianna/hcal-parameters-schema-upd…
…ate-v2 Hcal Parameters Schema Update v2
- Loading branch information
Showing
28 changed files
with
1,317 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
108 changes: 108 additions & 0 deletions
108
Geometry/HcalCommonData/interface/HcalDDDRecConstants.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
#ifndef Geometry_HcalTowerAlgo_HcalDDDRecConstants_h | ||
#define Geometry_HcalTowerAlgo_HcalDDDRecConstants_h | ||
|
||
/** \class HcalDDDRecConstants | ||
* | ||
* this class reads the constant section of | ||
* the hcal-sim-numbering xml-file | ||
* | ||
* $Date: 2013/12/25 00:06:50 $ | ||
* \author Sunanda Banerjee, SINP <[email protected]> | ||
* | ||
*/ | ||
|
||
#include<string> | ||
#include<vector> | ||
#include<iostream> | ||
|
||
#include "CondFormats/GeometryObjects/interface/HcalParameters.h" | ||
#include "Geometry/HcalCommonData/interface/HcalCellType.h" | ||
#include "Geometry/HcalCommonData/interface/HcalDDDSimConstants.h" | ||
#include "DataFormats/HcalDetId/interface/HcalSubdetector.h" | ||
|
||
class HcalDDDRecConstants { | ||
|
||
public: | ||
|
||
HcalDDDRecConstants(const HcalParameters* hp, const HcalDDDSimConstants& hc); | ||
~HcalDDDRecConstants(); | ||
|
||
struct HcalID { | ||
int subdet, eta, phi, depth; | ||
HcalID(int sub=0, int et=0, int fi=0, int d=0) : subdet(sub), eta(et), | ||
phi(fi), depth(d) {} | ||
}; | ||
struct HcalEtaBin { | ||
int ieta, nPhi, depthStart; | ||
double etaMin, etaMax, phi0, dphi; | ||
std::vector<std::pair<int, int> > layer; | ||
HcalEtaBin(int eta=0, double et1=0, double et2=0, int nf=0, double fi0=0, | ||
double df=0) : ieta(eta), nPhi(nf),depthStart(0), etaMin(et1), | ||
etaMax(et2), phi0(fi0), dphi(df) {} | ||
}; | ||
struct HcalActiveLength { | ||
int ieta, depth; | ||
double eta, thick; | ||
HcalActiveLength(int ie=0, int d=0, double et=0, | ||
double t=0) : ieta(ie), depth(d), eta(et), thick(t) {} | ||
}; | ||
|
||
std::vector<std::pair<double,double> > getConstHBHE(const int type) const { | ||
if (type == 0) return gconsHB; | ||
else if (type == 1) return gconsHE; | ||
else {std::vector<std::pair<double,double> > gcons; return gcons;} | ||
} | ||
const std::vector<int> & getDepth(const int i) const {return layerGroup[i];} | ||
std::vector<HcalEtaBin> getEtaBins(const int itype) const; | ||
std::pair<double,double> getEtaPhi(int subdet, int ieta, int iphi) const; | ||
std::pair<int,int> getEtaRange(const int i) const | ||
{return std::pair<int,int>(iEtaMin[i],iEtaMax[i]);} | ||
const std::vector<double> & getEtaTable() const {return etaTable;} | ||
const std::vector<double> & getEtaTableHF() const {return hpar->etaTableHF;} | ||
std::pair<double,double> getEtaLimit(const int i) const | ||
{return std::pair<double,double>(etaTable[i],etaTable[i+1]);} | ||
HcalID getHCID(int subdet, int ieta, int iphi, int lay, | ||
int idepth) const; | ||
int getMaxDepth(const int type) const {return maxDepth[type];} | ||
int getNEta() const {return nEta;} | ||
double getPhiBin(const int i) const {return phibin[i];} | ||
double getPhiOff(const int i) const {return hpar->phioff[i];} | ||
const std::vector<double> & getPhiOffs() const {return hpar->phioff;} | ||
const std::vector<double> & getPhiTable() const {return phibin;} | ||
const std::vector<double> & getPhiTableHF() const {return phibinHF;} | ||
double getRZ(int subdet, int ieta, int depth) const; | ||
std::vector<HcalActiveLength> getThickActive(const int type) const; | ||
int getTopoMode() const {return modeTopo_;} | ||
std::vector<HcalCellType> HcalCellTypes(HcalSubdetector) const; | ||
unsigned int numberOfCells(HcalSubdetector) const; | ||
unsigned int nCells(HcalSubdetector) const; | ||
unsigned int nCells() const; | ||
|
||
private: | ||
void initialize(void); | ||
|
||
bool tobeInitialized; | ||
static const int nEtaMax=100; | ||
const HcalParameters *hpar; | ||
const HcalDDDSimConstants &hcons; | ||
int modeTopo_; // Mode for topology | ||
std::vector<int> etaGroup; // Eta Grouping | ||
std::vector<std::pair<int,int> > etaSimValu; // eta ranges at Sim stage | ||
std::vector<double> etaTable; // Eta table (HB+HE) | ||
std::vector<int> ietaMap; // Map Sim level ieta to Rec level ieta | ||
std::vector<int> iEtaMin, iEtaMax; // Minimum and maximum eta | ||
std::vector<int> maxDepth; // Maximum depth in HB/HE/HF/HO | ||
int nEta; // Number of bins in eta for HB and HE | ||
std::vector<int> phiGroup; // Eta Grouping | ||
std::vector<double> phibin; // Phi step for all eta bins (HB, HE, HO) | ||
std::vector<double> phibinHF; // Phi step for all eta bins (HF) | ||
std::vector<int> phiUnitS; // Phi unit at SIM stage | ||
std::vector<int> layerGroup[nEtaMax]; | ||
std::vector<int> nOff; // Speical eta bin #'s in barrel and endcap | ||
std::vector<std::pair<double,double> > gconsHB; // Geometry constatnts HB | ||
std::vector<std::pair<double,double> > gconsHE; // Geometry constatnts HE | ||
int nModule[2], nHalves[2]; // Modules, Halves for HB/HE | ||
enum { kHOSizePreLS1 = 2160, kHFSizePreLS1 = 1728 } ; | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.