Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hcal DD Rec and Sim Constants Cleanup #10214

Merged
merged 3 commits into from Jul 16, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
31 changes: 10 additions & 21 deletions Geometry/HcalCommonData/interface/HcalDDDRecConstants.h
Expand Up @@ -52,57 +52,46 @@ class HcalDDDRecConstants {
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];}
const std::vector<int> & getDepth(const unsigned int i) const;
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;}
{return std::pair<int,int>(hpar->etaMin[i],hpar->etaMax[i]);}
const std::vector<double> & getEtaTable() const {return hpar->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]);}
{return std::pair<double,double>(hpar->etaTable[i],hpar->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;}
int getMaxDepth(const int type) const {return hpar->maxDepth[type];}
int getNEta() const {return hpar->etagroup.size();}
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;}
const std::vector<double> & getPhiTableHF() const {return hpar->phitable;}
double getRZ(int subdet, int ieta, int depth) const;
std::vector<HcalActiveLength> getThickActive(const int type) const;
int getTopoMode() const {return modeTopo_;}
int getTopoMode() const {return hpar->topologyMode;}
std::vector<HcalCellType> HcalCellTypes(HcalSubdetector) const;
unsigned int numberOfCells(HcalSubdetector) const;
unsigned int nCells(HcalSubdetector) const;
unsigned int nCells() const;

private:
void initialize(void);
unsigned int layerGroupSize( unsigned int eta ) const;
unsigned int layerGroup( unsigned int eta, unsigned int i ) const;

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)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bsunanda - would it make sense to add the remaining vectors which are calculated at initialisation of this class to HcalParameters? The same for Sim part?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont know which could be persistent and which could be transient variables. This depends on the analysis if you could make some computation at the beginning and use them later on. At this stage I suggest please do not change the payload and whatever can be calculated may be there at initialization.


From: Ianna Osborne [notifications@github.com]
Sent: 15 July 2015 16:50
To: cms-sw/cmssw
Cc: Sunanda Banerjee
Subject: Re: [cmssw] Hcal DD Rec and Sim Constants Cleanup (#10214)

In Geometry/HcalCommonData/interface/HcalDDDRecConstants.hhttps://github.com//pull/10214#discussion_r34686162:

std::vector ietaMap; // Map Sim level ieta to Rec level ieta

  • std::vector iEtaMin, iEtaMax; // Minimum and maximum eta
  • std::vector maxDepth; // Maximum depth in HB/HE/HF/HO
  • int nEta; // Number of bins in eta for HB and HE
  • std::vector phiGroup; // Eta Grouping
    std::vector phibin; // Phi step for all eta bins (HB, HE, HO)

@bsunandahttps://github.com/bsunanda - would it make sense to add the remaining vectors which are calculated at initialisation of this class to HcalParameters? The same for Sim part?


Reply to this email directly or view it on GitHubhttps://github.com//pull/10214/files#r34686162.

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
6 changes: 3 additions & 3 deletions Geometry/HcalCommonData/interface/HcalDDDSimConstants.h
Expand Up @@ -37,7 +37,6 @@ class HcalDDDSimConstants {
double getEtaHO(double& etaR, double& x, double& y,
double& z) const;
std::pair<int,int> getiEtaRange(const int i) const {return std::pair<int,int>(hpar->etaMin[i],hpar->etaMax[i]);}
std::vector<double> getEtaTableHF() const;
unsigned int findLayer(int layer, const std::vector<HcalParameters::LayerItem>& layerGroup) const;
const std::vector<double> & getGparHF() const {return hpar->gparHF;}
const std::vector<double> & getLayer0Wt() const {return hpar->Layer0Wt;}
Expand All @@ -62,15 +61,16 @@ class HcalDDDSimConstants {
double getGain (HcalSubdetector subdet, int depth) const;
void printTileHB(int eta, int depth) const;
void printTileHE(int eta, int depth) const;
unsigned int layerGroupSize( unsigned int eta ) const;
unsigned int layerGroup( unsigned int eta, unsigned int i ) const;

const HcalParameters* hpar;
static const int nEtaMax=100;

static const int nDepthMax=9;
std::vector<int> maxDepth; // Maximum depths in HB/HE/HF/HO
int nEta; // Number of bins in eta for HB and HE
int nR; // Number of bins in r
int nPhiF; // Number of bins in phitable
std::vector<int> layerGroup[nEtaMax]; // Depth index for a given layer
std::vector<int> depths[nDepthMax]; // Maximum layer number for a depth
int nDepth; // Number of bins in depth0
int nzHB, nmodHB; // Number of halves and modules in HB
Expand Down