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

Run3-TB38 Take care of changing geometry for HGCal DetID #27590

Merged
merged 4 commits into from Jul 27, 2019
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
2 changes: 1 addition & 1 deletion Geometry/CaloEventSetup/python/HGCalTopology_cfi.py
Expand Up @@ -17,6 +17,6 @@

HGCalHESciTopologyBuilder = cms.ESProducer("HGCalTopologyBuilder",
Name = cms.string("HGCalHEScintillatorSensitive"),
Type = cms.untracked.int32(5)
Type = cms.int32(5)
)

2 changes: 1 addition & 1 deletion Geometry/HGCalCommonData/data/TB181/Oct182/hgcal.xml
Expand Up @@ -18,7 +18,7 @@
<Constant name="rminAH" value="0.0*fm"/>
<Constant name="rmaxAH" value="[rmax]"/>
<Constant name="zminAH" value="0.0*fm"/>
<Constant name="zmaxAH" value="110.1*cm"/>
<Constant name="zmaxAH" value="114*cm"/>
<Constant name="zgapEEFH" value="3.5*cm"/>
<Constant name="zgapFHBH" value="36.5*cm"/>
<Constant name="zCalor" value="([zmaxEE]+[zgapEEFH]+[zmaxHE]+[zgapFHBH]+
Expand Down
2 changes: 1 addition & 1 deletion Geometry/HGCalCommonData/data/TB181/Oct183/hgcal.xml
Expand Up @@ -18,7 +18,7 @@
<Constant name="rminAH" value="0.0*fm"/>
<Constant name="rmaxAH" value="[rmax]"/>
<Constant name="zminAH" value="0.0*fm"/>
<Constant name="zmaxAH" value="92.2*cm"/>
<Constant name="zmaxAH" value="114*cm"/>
<Constant name="zgapEEFH" value="3.5*cm"/>
<Constant name="zgapFHBH" value="3.0*cm"/>
<Constant name="zCalor" value="([zmaxEE]+[zgapEEFH]+[zmaxHE]+[zgapFHBH]+
Expand Down
207 changes: 207 additions & 0 deletions Geometry/HGCalCommonData/data/TB181/ahcal.xml
@@ -0,0 +1,207 @@
<?xml version="1.0"?>
<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="ahcal.xml" eval="true">
<Constant name="absorberThick" value="17.2*mm"/>
<Constant name="radiatorThick" value="17.2*mm"/>
<Constant name="airgapThick" value="1.285*mm"/>
<Constant name="cassetteThick" value="0.5*mm"/>
<Constant name="cableThick" value="1.5*mm"/>
<Constant name="pcbThick" value="0.7*mm"/>
<Constant name="foilThick" value="0.115*mm"/>
<Constant name="scintThick" value="3.0*mm"/>
<Constant name="passiveHeight" value="72.0*cm"/>
<Constant name="passiveWidth" value="72.0*cm"/>
<Constant name="activeHeight" value="72.0*cm"/>
<Constant name="activeWidth" value="72.0*cm"/>
<Constant name="tileGap" value="30.0*mm"/>
<Constant name="tileHeight" value="30*mm"/>
<Constant name="tileWidth" value="30*mm"/>
<Constant name="tileEdge" value="0.1*mm"/>
</ConstantsSection>

<MaterialSection label="ahcal.xml">
<CompositeMaterial name="Steel235" density="7.87*g/cm3" symbol=" " method="mixture by weight">
<MaterialFraction fraction="0.9843">
<rMaterial name="materials:Iron"/>
</MaterialFraction>
<MaterialFraction fraction="0.0017">
<rMaterial name="materials:Carbon"/>
</MaterialFraction>
<MaterialFraction fraction="0.0140">
<rMaterial name="materials:Manganese"/>
</MaterialFraction>
</CompositeMaterial>
<CompositeMaterial name="PCB" density="1.70*g/cm3" symbol=" " method="mixture by weight">
<MaterialFraction fraction="0.180774">
<rMaterial name="materials:Silicon"/>
</MaterialFraction>
<MaterialFraction fraction="0.405633">
<rMaterial name="materials:Oxygen"/>
</MaterialFraction>
<MaterialFraction fraction="0.278042">
<rMaterial name="materials:Carbon"/>
</MaterialFraction>
<MaterialFraction fraction="0.0684428">
<rMaterial name="materials:Hydrogen"/>
</MaterialFraction>
<MaterialFraction fraction="0.0671091">
<rMaterial name="materials:Bromine"/>
</MaterialFraction>
</CompositeMaterial>
<CompositeMaterial name="Polystyrene" density="1.060*g/cm3" symbol=" " method="mixture by weight">
<MaterialFraction fraction="0.077418">
<rMaterial name="materials:Hydrogen"/>
</MaterialFraction>
<MaterialFraction fraction="0.922582">
<rMaterial name="materials:Carbon"/>
</MaterialFraction>
</CompositeMaterial>
<CompositeMaterial name="PVC" density="1.35*g/cm3" symbol=" " method="mixture by weight">
<MaterialFraction fraction="0.048384">
<rMaterial name="materials:Hydrogen"/>
</MaterialFraction>
<MaterialFraction fraction="0.384378">
<rMaterial name="materials:Carbon"/>
</MaterialFraction>
<MaterialFraction fraction="0.567238">
<rMaterial name="materials:Chlorine"/>
</MaterialFraction>
</CompositeMaterial>
<CompositeMaterial name="Polystyrole" density="1.065*g/cm3" symbol=" " method="mixture by weight">
<MaterialFraction fraction="0.077421">
<rMaterial name="materials:Hydrogen"/>
</MaterialFraction>
<MaterialFraction fraction="0.922579">
<rMaterial name="materials:Carbon"/>
</MaterialFraction>
</CompositeMaterial>
<CompositeMaterial name="CFM" density="0.120*g/cm3" symbol=" " method="mixture by weight">
<MaterialFraction fraction="0.009">
<rMaterial name="materials:Air"/>
</MaterialFraction>
<MaterialFraction fraction="0.872">
<rMaterial name="ahcal:PVC"/>
</MaterialFraction>
<MaterialFraction fraction="0.119">
<rMaterial name="ahcal:Polystyrole"/>
</MaterialFraction>
</CompositeMaterial>
</MaterialSection>


<SolidSection label="ahcal.xml">
<Box name="AHcalTileSensitive" dx="[tileWidth]/2" dy="[tileHeight]/2"
dz="[scintThick]/2"/>
</SolidSection>

<LogicalPartSection label="ahcal.xml">
<LogicalPart name="AHcalTileSensitive" category="unspecified">
<rSolid name="AHcalTileSensitive"/>
<rMaterial name="ahcal:Polystyrene"/>
</LogicalPart>
</LogicalPartSection>

<PosPartSection label="ahcal.xml">
<Algorithm name="hgcal:DDAHcalModuleAlgo">
<rParent name="hgcal:HGCalAH"/>
<String name="TileName" value="ahcal:AHcalTileSensitive"/>
<Vector name="MaterialNames" type="string" nEntries="10">
ahcal:Steel235, materials:Air, ahcal:Steel235, ahcal:CFM, ahcal:PCB,
ahcal:Polystyrole, ahcal:Polystyrene, ahcal:Steel235, ahcal:Steel235,
materials:Air</Vector>
<Vector name="VolumeNames" type="string" nEntries="10">
AHcalRadiator, AHcalAirGa1p, AHcalCassette, AHcalCable, AHcalPCB,
AHcalFoil, AHcalActive, AHcalAbsorber, AHcalAbsorberLastCover,
AHcalAirGap2</Vector>
<Vector name="Thickness" type="numeric" nEntries="10">
[ahcal:radiatorThick], [ahcal:airgapThick], [ahcal:cassetteThick],
[ahcal:cableThick], [ahcal:pcbThick], [ahcal:foilThick],
[ahcal:scintThick], [ahcal:absorberThick], 5.0*mm,
9.0*mm</Vector>
<Vector name="Layers" type="numeric" nEntries="20">
20, 20, 20, 20, 20,
20, 20, 20, 20, 20,
20, 20, 20, 20, 20,
20, 20, 20, 20, 19
</Vector>
<Vector name="LayerThick" type="numeric" nEntries="20">
52.4*mm, 52.4*mm, 52.4*mm, 52.4*mm, 52.4*mm,
52.4*mm, 52.4*mm, 52.4*mm, 52.4*mm, 52.4*mm,
52.4*mm, 52.4*mm, 52.4*mm, 52.4*mm, 52.4*mm,
52.4*mm, 52.4*mm, 52.4*mm, 52.4*mm, 140.485*mm
</Vector>
<Vector name="LayerType" type="numeric" nEntries="399">
7, 1, 2, 3, 4, 5, 6, 5, 2, 1, 0, 1, 2, 3, 4, 5, 6, 5, 2, 1,
0, 1, 2, 3, 4, 5, 6, 5, 2, 1, 0, 1, 2, 3, 4, 5, 6, 5, 2, 1,
0, 1, 2, 3, 4, 5, 6, 5, 2, 1, 0, 1, 2, 3, 4, 5, 6, 5, 2, 1,
0, 1, 2, 3, 4, 5, 6, 5, 2, 1, 0, 1, 2, 3, 4, 5, 6, 5, 2, 1,
0, 1, 2, 3, 4, 5, 6, 5, 2, 1, 0, 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, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0
</Vector>
<Vector name="Widths" type="numeric" nEntries="2">
[ahcal:passiveWidth], [ahcal:activeWidth] </Vector>
<Vector name="Heights" type="numeric" nEntries="2">
[ahcal:passiveHeight], [ahcal:activeHeight] </Vector>
<Vector name="TileN" type="numeric" nEntries="2">
24, 24 </Vector>
<Vector name="TileStep" type="numeric" nEntries="2">
[ahcal:tileGap], [ahcal:tileGap] </Vector>
<Numeric name="zMinBlock" value="[hgcal:zminAH]"/>
<String name="RotNameSpace" value="hgcalmodule"/>
</Algorithm>
</PosPartSection>

<SpecParSection label="ahcal.xml" eval="true">
<SpecPar name="AHcal">
<PartSelector path="//AHcalTileSensitive.*"/>
<Parameter name="Volume" value="AHcalTileSensitive" eval="false"/>
<Parameter name="SensitiveDetector" value="AHcalSensitiveDetector" eval="false"/>
<Parameter name="ReadOutName" value="HcalHits" eval="false"/>
</SpecPar>
<SpecPar name="hgcProdCutsAHcal">
<PartSelector path="//HGCalAH"/>
<Parameter name="CMSCutsRegion" value="HGCalAHcalRegion" eval="false"/>
<Parameter name="ProdCutsForElectrons" value="1.0*mm"/>
<Parameter name="ProdCutsForPositrons" value="1.0*mm"/>
<Parameter name="ProdCutsForGamma" value="1.0*mm"/>
</SpecPar>
</SpecParSection>

</DDDefinition>
12 changes: 2 additions & 10 deletions SimG4CMS/HGCalTestBeam/interface/AHCalDetId.h
@@ -1,5 +1,5 @@
#ifndef SimG4CMS_HGCalTestBeam_HCALDETID_H
#define SimG4CMS_HGCalTestBeam_HCALDETID_H 1
#ifndef SimG4CMS_HGCalTestBeam_AHCALDETID_H
#define SimG4CMS_HGCalTestBeam_AHCALDETID_H 1

#include <iosfwd>
#include "DataFormats/DetId/interface/DetId.h"
Expand Down Expand Up @@ -37,17 +37,9 @@ class AHCalDetId : public DetId {
int icol() const;
int icolAbs() const { return (id_ & HcalDetId::kHcalPhiMask2); }
/// get the layer number
static const int MaxDepth = 12;
int depth() const;
/// get the local coordinate in the plane and along depth
std::pair<double, double> getXY() const;
double getZ() const;

static const AHCalDetId Undefined;
const double deltaX_ = 3.0; // Size of tile along X
const double deltaY_ = 3.0; // Size of tile along Y
const double deltaZ_ = 8.1; // Thickness of a single layer
const double zFirst_ = 1.76; // Position of the center
};

std::ostream& operator<<(std::ostream&, const AHCalDetId& id);
Expand Down
29 changes: 29 additions & 0 deletions SimG4CMS/HGCalTestBeam/interface/AHCalGeometry.h
@@ -0,0 +1,29 @@
#ifndef SimG4CMS_HGCalTestBeam_AHCALGEOMETRY_H
#define SimG4CMS_HGCalTestBeam_AHCALGEOMETRY_H 1

#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "SimG4CMS/HGCalTestBeam/interface/AHCalDetId.h"

/** \class AHCalGeometry
* Gets position of AHCal cell
*/

class AHCalGeometry {
public:
/** Create geometry of AHCal */
AHCalGeometry(edm::ParameterSet const&);
~AHCalGeometry() {}

/// get maximum number of layers
int maxDepth() const { return maxDepth_; }

/// get the local coordinate in the plane and along depth
std::pair<double, double> getXY(const AHCalDetId& id) const;
double getZ(const AHCalDetId& id) const;

private:
AHCalGeometry() = delete;
const int maxDepth_;
const double deltaX_, deltaY_, deltaZ_, zFirst_;
};
#endif