Skip to content

Commit

Permalink
Additional material
Browse files Browse the repository at this point in the history
  • Loading branch information
Sunanda authored and cferraio committed Oct 19, 2016
1 parent eec054c commit 5caf23b
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 35 deletions.
4 changes: 3 additions & 1 deletion CalibFormats/HcalObjects/src/HcalText2DetIdConverter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ bool HcalText2DetIdConverter::init (DetId fId) {
case HcalZDCDetId::EM: flavorName = "ZDC_EM"; break;
case HcalZDCDetId::HAD: flavorName = "ZDC_HAD"; break;
case HcalZDCDetId::LUM: flavorName = "ZDC_LUM"; break;
case HcalZDCDetId::RPD: flavorName = "ZDC_RPD"; break;
default: result = false;
}
setField (1, zdcId.zside());
Expand Down Expand Up @@ -206,7 +207,8 @@ bool HcalText2DetIdConverter::init (const std::string& fFlavor, const std::strin
else if (flavorName.find ("ZDC_") == 0) {
HcalZDCDetId::Section section = flavorName == "ZDC_EM" ? HcalZDCDetId::EM :
flavorName == "ZDC_HAD" ? HcalZDCDetId::HAD :
flavorName == "ZDC_LUM" ? HcalZDCDetId::LUM : HcalZDCDetId::Unknown;
flavorName == "ZDC_LUM" ? HcalZDCDetId::LUM :
flavorName == "ZDC_RPD" ? HcalZDCDetId::RPD : HcalZDCDetId::Unknown;
mId = HcalZDCDetId (section, getField (1)>0, getField (2));
}
else if (flavorName.find ("CALIB_") == 0) {
Expand Down
2 changes: 2 additions & 0 deletions CaloOnlineTools/HcalOnlineDb/src/HcalAssistant.cc
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ std::string HcalAssistant::getZDCSectionString(HcalZDCDetId::Section _section){
if ( _section==HcalZDCDetId::EM) zdcSection = "ZDC EM";
else if ( _section==HcalZDCDetId::HAD) zdcSection = "ZDC HAD";
else if ( _section==HcalZDCDetId::LUM) zdcSection = "ZDC LUM";
else if ( _section==HcalZDCDetId::RPD) zdcSection = "ZDC RPD";
else zdcSection = "UNKNOWN";
return zdcSection;
}
Expand All @@ -177,6 +178,7 @@ HcalZDCDetId::Section HcalAssistant::getZDCSection(std::string _section){
if ( _section.find("ZDC EM") != std::string::npos ) return HcalZDCDetId::EM;
else if ( _section.find("ZDC HAD") != std::string::npos ) return HcalZDCDetId::HAD;
else if ( _section.find("ZDC LUM") != std::string::npos ) return HcalZDCDetId::LUM;
else if ( _section.find("ZDC RPD") != std::string::npos ) return HcalZDCDetId::RPD;
else return HcalZDCDetId::Unknown;
}

Expand Down
1 change: 1 addition & 0 deletions CaloOnlineTools/HcalOnlineDb/src/HcalDbOmds.cc
Original file line number Diff line number Diff line change
Expand Up @@ -963,6 +963,7 @@ HcalZDCDetId::Section HcalDbOmds::get_zdc_section( std::string _section )
else if ( _section.find("EM") != std::string::npos ) result = HcalZDCDetId::EM;
else if ( _section.find("HAD") != std::string::npos ) result = HcalZDCDetId::HAD;
else if ( _section.find("LUM") != std::string::npos ) result = HcalZDCDetId::LUM;
else if ( _section.find("RPD") != std::string::npos ) result = HcalZDCDetId::RPD;
else result = HcalZDCDetId::Unknown;

return result;
Expand Down
4 changes: 3 additions & 1 deletion CondFormats/HcalObjects/src/HcalMappingEntry.cc
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ ZDCLogicalMapEntry::ZDCLogicalMapEntry(
if (in_s_det=="ZDC_EM") myzdcsec = HcalZDCDetId::EM;
else if (in_s_det=="ZDC_HAD") myzdcsec = HcalZDCDetId::HAD;
else if (in_s_det=="ZDC_LUM") myzdcsec = HcalZDCDetId::LUM;
else if (in_s_det=="ZDC_RPD") myzdcsec = HcalZDCDetId::RPD;
else myzdcsec = HcalZDCDetId::Unknown;

(in_sid > 0) ? myzdccheck = true : myzdccheck = false;
Expand Down Expand Up @@ -352,7 +353,8 @@ char* ZDCLogicalMapEntry::printLMapLine() {
if (myzdcsec==0) mydet += "Unknown";
else if (myzdcsec==1) mydet += "EM";
else if (myzdcsec==2) mydet += "HAD";
else mydet += "LUM";
else if (myzdcsec==3) mydet += "LUM";
else mydet += "RPD";

(hcaleid.htrTopBottom()==0) ? myfpga = "bot" : myfpga = "top";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ class ZdcHardcodeGeometryLoader {
float theHADSectiondX;
float theHADSectiondY;
float theHADSectiondZ;
float theRPDSectiondX;
float theRPDSectiondY;
float theRPDSectiondZ;

};

Expand Down
3 changes: 3 additions & 0 deletions Geometry/ForwardGeometry/src/ZdcHardcodeGeometryData.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,15 @@ static const double X0 = 0.;
static const double Z0 = 140000.0;
static const double Y0 = 0.;
static const double YLUM = 253.6;
static const double YRPD = 253.6;
static const double dYPlate = 62.5;
static const double dYLUM = 320.0;
static const double dYRPD = 320.0;
static const double dXPlate = 48.0;
static const double tiltangle = 0.7854; // 45 degrees
static const double theZSectionBoundaries[] = {-500.0,-395.55,-290.0};
static const double theXChannelBoundaries[] = {-48.0,-28.8,-9.6,9.6,28.8};
static const double theZLUMChannelBoundaries[] = {-395.55,-346.525,-301.5};
static const double theZRPDChannelBoundaries[] = {-395.55,-346.525,-301.5};
static const double theZHadChannelBoundaries[] = {-257.4,-118.2,21.0,160.2,};
#endif
75 changes: 42 additions & 33 deletions Geometry/ForwardGeometry/src/ZdcHardcodeGeometryLoader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ ZdcHardcodeGeometryLoader::load(DetId::Detector /*det*/, int subdet)
fill(HcalZDCDetId::EM ,hg );
fill(HcalZDCDetId::LUM ,hg );
fill(HcalZDCDetId::HAD ,hg );
fill(HcalZDCDetId::RPD ,hg );
}
return hg;
}
Expand All @@ -45,6 +46,7 @@ ZdcHardcodeGeometryLoader::load()
fill(HcalZDCDetId::EM ,hg );
fill(HcalZDCDetId::LUM ,hg );
fill(HcalZDCDetId::HAD ,hg );
fill(HcalZDCDetId::RPD ,hg );
return hg;
}

Expand Down Expand Up @@ -97,74 +99,81 @@ ZdcHardcodeGeometryLoader::makeCell(const HcalZDCDetId& detId,

static const double angEM ( 0 ) ; // the angles of front face wrt vertical
static const double angLUM ( 0 ) ;
static const double angRPD ( 0 ) ;
static const double angHAD ( atan( 1. ) ) ; // this is 45 deg

// these dimensions are **half**-sizes

static const double dxHAD ( 4.8 ) ;
static const double dxEM ( dxHAD/5. ) ;
static const double dxLUM ( 4.8 ) ; // to be updated when known
static const double dxRPD ( 4.8 ) ; // to be updated when known

static const double dhEM ( 6.25 ) ;
static const double dhLUM ( 6.25 ) ; // to be updated when known
static const double dhHAD ( 6.25 ) ;
static const double dhRPD ( 6.25 ) ; // to be updated when known

static const double dzEM ( 33.*0.15 ) ;
static const double dzLUM ( 23.5 ) ; // to be updated when known
static const double dzHAD ( 0.82*6./cos(angHAD) ) ;
static const double dzRPD ( 23.5 ) ; // to be updated when known

// these are not half-dimensions, they are offsets from nominal
// for the center-of-front-face points

static const double xOffEM ( -4.*dxEM ) ;
static const double xOffLUM ( 0 ) ;
static const double xOffHAD ( 0 ) ;
static const double xOffRPD ( 0 ) ;

static const double yOffEM ( 0 ) ;
static const double yOffLUM ( 0 ) ;
static const double yOffHAD ( 0 ) ;
static const double yOffRPD ( 0 ) ;

static const double zOffEM ( -49.85 - 0.15 ) ;
static const double zOffLUM ( -39.555 ) ;
static const double zOffHAD ( -29.00 ) ;
static const double zOffRPD ( -39.555 ) ;

//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

double dx, dh, dz, x, y, z, an ;

if( section==HcalZDCDetId::EM )
{
dx = dxEM ;
dh = dhEM ;
dz = dzEM ;
an = angEM ;
x = zside*( x0 + xOffEM + ( channel - 1.0 )*dxEM*2. ) ;
y = y0 + yOffEM ;
z = zside*( z0 + zOffEM ) ;
}
else
{
if( section==HcalZDCDetId::LUM )
{
dx = dxLUM ;
dh = dhLUM ;
dz = dzLUM ;
an = angLUM ;
x = zside*( x0 + xOffLUM ) ;
y = y0 + yOffLUM ;
z = zside*( z0 + zOffLUM + ( channel - 1.0 )*dzLUM*2. ) ;
}
else
{
assert( section==HcalZDCDetId::HAD ) ;
dx = dxHAD ;
dh = dhHAD ;
dz = dzHAD ;
an = angHAD ;
x = zside*( x0 + xOffHAD ) ;
y = y0 + yOffHAD ;
z = zside*( z0 + zOffHAD + ( channel - 1.0 )*dzHAD*2. ) ;
}
if( section==HcalZDCDetId::EM ) {
dx = dxEM ;
dh = dhEM ;
dz = dzEM ;
an = angEM ;
x = zside*( x0 + xOffEM + ( channel - 1.0 )*dxEM*2. ) ;
y = y0 + yOffEM ;
z = zside*( z0 + zOffEM ) ;
} else if( section==HcalZDCDetId::LUM ) {
dx = dxLUM ;
dh = dhLUM ;
dz = dzLUM ;
an = angLUM ;
x = zside*( x0 + xOffLUM ) ;
y = y0 + yOffLUM ;
z = zside*( z0 + zOffLUM + ( channel - 1.0 )*dzLUM*2. ) ;
} else if( section==HcalZDCDetId::RPD ) {
dx = dxRPD ;
dh = dhRPD ;
dz = dzRPD ;
an = angRPD ;
x = zside*( x0 + xOffRPD ) ;
y = y0 + yOffRPD ;
z = zside*( z0 + zOffRPD + ( channel - 1.0 )*dzRPD*2. ) ;
} else {
assert( section==HcalZDCDetId::HAD ) ;
dx = dxHAD ;
dh = dhHAD ;
dz = dzHAD ;
an = angHAD ;
x = zside*( x0 + xOffHAD ) ;
y = y0 + yOffHAD ;
z = zside*( z0 + zOffHAD + ( channel - 1.0 )*dzHAD*2. ) ;
}

const GlobalPoint fc ( x, y, z );
Expand Down

0 comments on commit 5caf23b

Please sign in to comment.