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

Phase2-hgx109 Complete the geometry parameter part for new HGCal geometry #23070

Merged
merged 6 commits into from May 2, 2018
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
8 changes: 4 additions & 4 deletions Geometry/HGCalCommonData/data/hgcal/v9/hgcal.xml
Expand Up @@ -41,15 +41,15 @@
<Constant name="radMixL15" value="902.0*mm"/>
<Constant name="slope2" value="tan(19.3*deg)"/>
<Constant name="slope3" value="tan(53.0*deg)"/>
<Constant name="zHGCal1" value="3170.0*mm"/>
<Constant name="zHGCal2" value="3898.2*mm"/>
<Constant name="zHGCal1" value="3190.50*mm"/>
<Constant name="zHGCal2" value="3878.51*mm"/>
<Constant name="zHGCal4" value="5137.70*mm"/>
<Constant name="rMinHGCal1" value="[etaMax:slope]*[zHGCal1]"/>
<Constant name="rMinHGCal2" value="[etaMax:slope]*[zHGCal2]"/>
<Constant name="rMinHGCal4" value="[etaMax:slope]*[zHGCal4]"/>
<Constant name="rMaxHGCal1" value="1534.5*mm"/>
<Constant name="rMaxHGCal1" value="1568.325*mm"/>
<Constant name="rMaxHGCal2" value="([rMaxHGCal1]+(([zHGCal2]-[zHGCal1])*[slope2]))"/>
<Constant name="rMaxHGCal3" value="2458.0*mm"/>
<Constant name="rMaxHGCal3" value="2670.25*mm"/>
<Constant name="rMaxHGCal4" value="[rMaxHGCal3]"/>
<Constant name="zHGCal3" value="([zHGCal2]+([rMaxHGCal3]-[rMaxHGCal2])/[slope3])"/>
<Constant name="rMinHGCal3" value="[etaMax:slope]*[zHGCal3]"/>
Expand Down
18 changes: 9 additions & 9 deletions Geometry/HGCalCommonData/data/hgcalCons/v9/hgcalCons.xml
Expand Up @@ -2,27 +2,27 @@
<DDDefinition xmlns="http://www.cern.ch/cms/DDL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.cern.ch/cms/DDL ../../../../DetectorDescription/Schema/DDLSchema.xsd">

<ConstantsSection label="hgcalCons.xml" eval="true">
<Vector name="depledLayerThickness" type="numeric" nEntries="3">
<Vector name="CellThickness" type="numeric" nEntries="3">
[hgcal:CellThicknessFine], [hgcal:CellThicknessCoarse1],
[hgcal:CellThicknessCoarse2] </Vector>
<Vector name="radius100to200" type="numeric" nEntries="5">
<Vector name="Radius100to200" type="numeric" nEntries="5">
[hgcal:rad100200P0], [hgcal:rad100200P1], [hgcal:rad100200P2],
[hgcal:rad100200P3], [hgcal:rad100200P4] </Vector>
<Vector name="radius200to300" type="numeric" nEntries="5">
<Vector name="Radius200to300" type="numeric" nEntries="5">
[hgcal:rad200300P0], [hgcal:rad200300P1], [hgcal:rad200300P2],
[hgcal:rad200300P3], [hgcal:rad200300P4] </Vector>
<Vector name="radCuts" type="numeric" nEntries="2">
<Vector name="RadiusCuts" type="numeric" nEntries="2">
[hgcal:NCornerCut], [hgcal:zMinForRadPar] </Vector>
<Vector name="radiusMix" type="numeric" nEntries="16">
<Vector name="RadiusMixBoundary" type="numeric" nEntries="16">
[hgcal:radMixL0], [hgcal:radMixL1], [hgcal:radMixL2], [hgcal:radMixL3],
[hgcal:radMixL4], [hgcal:radMixL5], [hgcal:radMixL6], [hgcal:radMixL7],
[hgcal:radMixL8], [hgcal:radMixL9], [hgcal:radMixL10],[hgcal:radMixL11],
[hgcal:radMixL12],[hgcal:radMixL13],[hgcal:radMixL14],[hgcal:radMixL15]
</Vector>
<Vector name="NDivisions" type="numeric" nEntries="16">
<Vector name="NPhiBinBH" type="numeric" nEntries="16">
360, 360, 360, 360, 240, 240, 240, 240, 240, 240,
240, 240, 240, 240, 240, 240 </Vector>
<Vector name="slopesBottom" type="numeric" nEntries="2">
<Vector name="SlopeBottom" type="numeric" nEntries="2">
[etaMax:slope], [etaMax:slope]</Vector>
<Vector name="SlopeTop" type="numeric" nEntries="4">
[hgcal:slope2], [hgcal:slope3], 0, 0</Vector>
Expand Down Expand Up @@ -50,9 +50,9 @@
</SpecPar>
<SpecPar name="HGCalHEsci">
<PartSelector path="//HGCalHEScintillatorSensitive.*"/>
<Parameter name="Volume" value="HGCalHESiliconSensitive" eval="false"/>
<Parameter name="Volume" value="HGCalHEScintillatorSensitive" eval="false"/>
<Parameter name="GeometryMode" value="HGCalGeometryMode::Trapezoid" eval="false"/>
<Parameter name="etaMax" value="1.35"/>
<Parameter name="etaMaxBH" value="1.35"/>
</SpecPar>
<SpecPar name="HGCalWafer">
<PartSelector path="//HGCalEECell.*"/>
Expand Down
4 changes: 4 additions & 0 deletions Geometry/HGCalCommonData/interface/HGCalGeomParameters.h
Expand Up @@ -35,10 +35,14 @@ class HGCalGeomParameters {
const std::string&, const DDCompactView*,
const std::string&, const std::string&,
HGCalGeometryMode::WaferMode);
void loadGeometryHexagon8(const DDFilteredView&, HGCalParameters&);
void loadSpecParsHexagon(const DDFilteredView&, HGCalParameters&,
const DDCompactView*, const std::string&,
const std::string&);
void loadSpecParsHexagon8(const DDFilteredView&, HGCalParameters&);
void loadSpecParsTrapezoid(const DDFilteredView&, HGCalParameters&);
void loadWaferHexagon(HGCalParameters& php);
void loadWaferHexagon8(HGCalParameters& php);
void loadCellParsHexagon(const DDCompactView* cpv, HGCalParameters& php);

private:
Expand Down
61 changes: 51 additions & 10 deletions Geometry/HGCalCommonData/interface/HGCalParameters.h
Expand Up @@ -16,6 +16,7 @@ class HGCalParameters {
public:

typedef std::vector<std::unordered_map<int32_t,int32_t> > layer_map;
typedef std::unordered_map<int32_t, int32_t> wafer_map;

struct hgtrap {
int lay;
Expand All @@ -36,15 +37,10 @@ class HGCalParameters {
hgtrform getTrForm(unsigned int k) const;
void addTrForm(const CLHEP::Hep3Vector& h3v);
void scaleTrForm(double);

static const int kMaskZside = 0x1;
static const int kMaskLayer = 0x7F;
static const int kMaskSector = 0x3FF;
static const int kMaskSubSec = 0x1;
static const int kShiftZside = 19;
static const int kShiftLayer = 12;
static const int kShiftSector = 1;
static const int kShiftSubSec = 0;
int waferIndex(int layer, int waferU, int waferV);
int waferLayer(const int index) const;
int waferU(const int index) const;
int waferV(const int index) const;

std::string name_;
int nCells_;
Expand Down Expand Up @@ -109,8 +105,53 @@ class HGCalParameters {
HGCalGeometryMode::GeometryMode mode_;
double slopeMin_;
layer_map copiesInLayers_;

int nCellsFine_;
int nCellsCoarse_;
double waferSize_;
double waferThick_;
double sensorSeparation_;
double mouseBite_;
bool defineFull_;
std::vector<double> cellThickness_;
std::vector<double> radius100to200_;
std::vector<double> radius200to300_;
int nCornerCut_;
double zMinForRad_;
std::vector<double> radiusMixBoundary_;
std::vector<int> nPhiBinBH_;
std::vector<double> dPhiEta_;
std::vector<double> slopeTop_;
std::vector<double> zFront_;
std::vector<double> rMaxFront_;
std::vector<double> zRanges_;
double etaMaxBH_;
wafer_map wafersInLayers_;
wafer_map typesInLayers_;

COND_SERIALIZABLE;

private:

const int kHGCalWaferUOffset = 0;
const int kHGCalWaferUMask = 0x1F;
const int kHGCalWaferUSignOffset = 5;
const int kHGCalWaferUSignMask = 0x1;
const int kHGCalWaferVOffset = 6;
const int kHGCalWaferVMask = 0x1F;
const int kHGCalWaferVSignOffset = 11;
const int kHGCalWaferVSignMask = 0x1;
const int kHGCalLayerOffset = 12;
const int kHGCalLayerMask = 0x1F;

const int kMaskZside = 0x1;
const int kMaskLayer = 0x7F;
const int kMaskSector = 0x3FF;
const int kMaskSubSec = 0x1;
const int kShiftZside = 19;
const int kShiftLayer = 12;
const int kShiftSector = 1;
const int kShiftSubSec = 0;

};

#endif