Skip to content

Commit

Permalink
Merge pull request #17911 from kpedro88/Phase2-WF33
Browse files Browse the repository at this point in the history
Revert "Merge pull request #17175 from pietverwilligen/90X_NewME0GeometryBuilder_ForPR_v1" (only for L1 TDR production) [90X]
  • Loading branch information
cmsbuild committed Mar 15, 2017
2 parents 937a0f7 + 7052c48 commit 329dfac
Show file tree
Hide file tree
Showing 13 changed files with 142 additions and 677 deletions.
Expand Up @@ -39,6 +39,7 @@
from RecoMuon.DetLayers.muonDetLayerGeometry_cfi import *
from Geometry.GEMGeometryBuilder.gemGeometry_cfi import *
from Geometry.GEMGeometryBuilder.me0Geometry_cfi import *
ME0GeometryESModule.use10EtaPart = cms.bool(True)
from Geometry.CSCGeometryBuilder.idealForDigiCscGeometry_cff import *
from Geometry.DTGeometryBuilder.idealForDigiDtGeometry_cff import *

Expand Down
9 changes: 5 additions & 4 deletions Configuration/Geometry/python/dict2023Geometry.py
Expand Up @@ -378,16 +378,16 @@
'Geometry/MuonCommonData/data/PhaseII/TDR_BaseLine/me0.xml',
],
2 : [
'Geometry/MuonCommonData/data/PhaseII/TDR_BaseLine/muonNumbering.xml',
'Geometry/MuonCommonData/data/PhaseII/muonNumbering.xml',
],
3 : [
'Geometry/MuonSimData/data/PhaseII/ME0EtaPart/muonSens.xml',
'Geometry/MuonSimData/data/PhaseII/muonSens.xml',
'Geometry/DTGeometryBuilder/data/dtSpecsFilter.xml',
'Geometry/CSCGeometryBuilder/data/cscSpecsFilter.xml',
'Geometry/CSCGeometryBuilder/data/cscSpecs.xml',
'Geometry/RPCGeometryBuilder/data/PhaseII/RPCSpecs.xml',
'Geometry/GEMGeometryBuilder/data/v7/GEMSpecsFilter.xml',
'Geometry/GEMGeometryBuilder/data/v7/GEMSpecs.xml',
'Geometry/GEMGeometryBuilder/data/GEMSpecsFilter.xml',
'Geometry/GEMGeometryBuilder/data/v5/GEMSpecs.xml',
],
4 : [
'Geometry/MuonSimData/data/PhaseII/muonProdCuts.xml',
Expand Down Expand Up @@ -439,6 +439,7 @@
'from RecoMuon.DetLayers.muonDetLayerGeometry_cfi import *',
'from Geometry.GEMGeometryBuilder.gemGeometry_cfi import *',
'from Geometry.GEMGeometryBuilder.me0Geometry_cfi import *',
'ME0GeometryESModule.use10EtaPart = cms.bool(True)',
'from Geometry.CSCGeometryBuilder.idealForDigiCscGeometry_cff import *',
'from Geometry.DTGeometryBuilder.idealForDigiDtGeometry_cff import *',
],
Expand Down
Expand Up @@ -88,20 +88,20 @@
'Geometry/ForwardCommonData/data/cmszdc.xml',
)+
cms.vstring(
'Geometry/MuonCommonData/data/PhaseII/TDR_BaseLine/muonNumbering.xml',
'Geometry/MuonCommonData/data/PhaseII/muonNumbering.xml',
'Geometry/EcalSimData/data/ecalsens.xml',
'Geometry/HcalCommonData/data/Phase0/hcalsenspmf.xml',
'Geometry/HcalSimData/data/hf.xml',
'Geometry/HcalSimData/data/hfpmt.xml',
'Geometry/HcalSimData/data/hffibrebundle.xml',
'Geometry/HcalSimData/data/CaloUtil.xml',
'Geometry/MuonSimData/data/PhaseII/ME0EtaPart/muonSens.xml',
'Geometry/MuonSimData/data/PhaseII/muonSens.xml',
'Geometry/DTGeometryBuilder/data/dtSpecsFilter.xml',
'Geometry/CSCGeometryBuilder/data/cscSpecsFilter.xml',
'Geometry/CSCGeometryBuilder/data/cscSpecs.xml',
'Geometry/RPCGeometryBuilder/data/PhaseII/RPCSpecs.xml',
'Geometry/GEMGeometryBuilder/data/v7/GEMSpecsFilter.xml',
'Geometry/GEMGeometryBuilder/data/v7/GEMSpecs.xml',
'Geometry/GEMGeometryBuilder/data/GEMSpecsFilter.xml',
'Geometry/GEMGeometryBuilder/data/v5/GEMSpecs.xml',
'Geometry/ForwardCommonData/data/brmsens.xml',
'Geometry/ForwardSimData/data/zdcsens.xml',
'Geometry/HcalSimData/data/HcalProdCuts.xml',
Expand Down
Expand Up @@ -87,7 +87,7 @@
'Geometry/ForwardCommonData/data/cmszdc.xml',
)+
cms.vstring(
'Geometry/MuonCommonData/data/PhaseII/TDR_BaseLine/muonNumbering.xml',
'Geometry/MuonCommonData/data/PhaseII/muonNumbering.xml',
'Geometry/EcalSimData/data/PhaseII/ecalsens.xml',
'Geometry/HcalCommonData/data/PhaseII/HGCal/hcalsenspmf.xml',
'Geometry/HcalSimData/data/hf.xml',
Expand All @@ -97,13 +97,13 @@
'Geometry/HGCalSimData/data/hgcsensv6.xml',
'Geometry/HGCalSimData/data/hgccons.xml',
'Geometry/HGCalSimData/data/hgcProdCuts.xml',
'Geometry/MuonSimData/data/PhaseII/ME0EtaPart/muonSens.xml',
'Geometry/MuonSimData/data/PhaseII/muonSens.xml',
'Geometry/DTGeometryBuilder/data/dtSpecsFilter.xml',
'Geometry/CSCGeometryBuilder/data/cscSpecsFilter.xml',
'Geometry/CSCGeometryBuilder/data/cscSpecs.xml',
'Geometry/RPCGeometryBuilder/data/PhaseII/RPCSpecs.xml',
'Geometry/GEMGeometryBuilder/data/v7/GEMSpecsFilter.xml',
'Geometry/GEMGeometryBuilder/data/v7/GEMSpecs.xml',
'Geometry/GEMGeometryBuilder/data/GEMSpecsFilter.xml',
'Geometry/GEMGeometryBuilder/data/v5/GEMSpecs.xml',
'Geometry/ForwardCommonData/data/brmsens.xml',
'Geometry/ForwardSimData/data/zdcsens.xml',
'Geometry/HcalSimData/data/HcalProdCuts.xml',
Expand Down
Expand Up @@ -87,7 +87,7 @@
'Geometry/ForwardCommonData/data/cmszdc.xml',
)+
cms.vstring(
'Geometry/MuonCommonData/data/PhaseII/TDR_BaseLine/muonNumbering.xml',
'Geometry/MuonCommonData/data/PhaseII/muonNumbering.xml',
'Geometry/EcalSimData/data/PhaseII/ecalsens.xml',
'Geometry/HcalCommonData/data/PhaseII/HGCal/hcalsenspmf.xml',
'Geometry/HcalSimData/data/hf.xml',
Expand All @@ -97,13 +97,13 @@
'Geometry/HGCalSimData/data/hgcsensv6.xml',
'Geometry/HGCalSimData/data/hgccons.xml',
'Geometry/HGCalSimData/data/hgcProdCuts.xml',
'Geometry/MuonSimData/data/PhaseII/ME0EtaPart/muonSens.xml',
'Geometry/MuonSimData/data/PhaseII/muonSens.xml',
'Geometry/DTGeometryBuilder/data/dtSpecsFilter.xml',
'Geometry/CSCGeometryBuilder/data/cscSpecsFilter.xml',
'Geometry/CSCGeometryBuilder/data/cscSpecs.xml',
'Geometry/RPCGeometryBuilder/data/PhaseII/RPCSpecs.xml',
'Geometry/GEMGeometryBuilder/data/v7/GEMSpecsFilter.xml',
'Geometry/GEMGeometryBuilder/data/v7/GEMSpecs.xml',
'Geometry/GEMGeometryBuilder/data/GEMSpecsFilter.xml',
'Geometry/GEMGeometryBuilder/data/v5/GEMSpecs.xml',
'Geometry/ForwardCommonData/data/brmsens.xml',
'Geometry/ForwardSimData/data/zdcsens.xml',
'Geometry/HcalSimData/data/HcalProdCuts.xml',
Expand Down
Expand Up @@ -88,20 +88,20 @@
'Geometry/ForwardCommonData/data/cmszdc.xml',
)+
cms.vstring(
'Geometry/MuonCommonData/data/PhaseII/TDR_BaseLine/muonNumbering.xml',
'Geometry/MuonCommonData/data/PhaseII/muonNumbering.xml',
'Geometry/EcalSimData/data/ecalsens.xml',
'Geometry/HcalCommonData/data/Phase0/hcalsenspmf.xml',
'Geometry/HcalSimData/data/hf.xml',
'Geometry/HcalSimData/data/hfpmt.xml',
'Geometry/HcalSimData/data/hffibrebundle.xml',
'Geometry/HcalSimData/data/CaloUtil.xml',
'Geometry/MuonSimData/data/PhaseII/ME0EtaPart/muonSens.xml',
'Geometry/MuonSimData/data/PhaseII/muonSens.xml',
'Geometry/DTGeometryBuilder/data/dtSpecsFilter.xml',
'Geometry/CSCGeometryBuilder/data/cscSpecsFilter.xml',
'Geometry/CSCGeometryBuilder/data/cscSpecs.xml',
'Geometry/RPCGeometryBuilder/data/PhaseII/RPCSpecs.xml',
'Geometry/GEMGeometryBuilder/data/v7/GEMSpecsFilter.xml',
'Geometry/GEMGeometryBuilder/data/v7/GEMSpecs.xml',
'Geometry/GEMGeometryBuilder/data/GEMSpecsFilter.xml',
'Geometry/GEMGeometryBuilder/data/v5/GEMSpecs.xml',
'Geometry/ForwardCommonData/data/brmsens.xml',
'Geometry/ForwardSimData/data/zdcsens.xml',
'Geometry/HcalSimData/data/HcalProdCuts.xml',
Expand Down
Expand Up @@ -90,7 +90,7 @@
'Geometry/HGCalCommonData/data/fastTimingElement.xml',
)+
cms.vstring(
'Geometry/MuonCommonData/data/PhaseII/TDR_BaseLine/muonNumbering.xml',
'Geometry/MuonCommonData/data/PhaseII/muonNumbering.xml',
'Geometry/EcalSimData/data/PhaseII/ecalsens.xml',
'Geometry/HcalCommonData/data/PhaseII/HGCal/hcalsenspmf.xml',
'Geometry/HcalSimData/data/hf.xml',
Expand All @@ -100,13 +100,13 @@
'Geometry/HGCalSimData/data/hgcsensv6.xml',
'Geometry/HGCalSimData/data/hgccons.xml',
'Geometry/HGCalSimData/data/hgcProdCuts.xml',
'Geometry/MuonSimData/data/PhaseII/ME0EtaPart/muonSens.xml',
'Geometry/MuonSimData/data/PhaseII/muonSens.xml',
'Geometry/DTGeometryBuilder/data/dtSpecsFilter.xml',
'Geometry/CSCGeometryBuilder/data/cscSpecsFilter.xml',
'Geometry/CSCGeometryBuilder/data/cscSpecs.xml',
'Geometry/RPCGeometryBuilder/data/PhaseII/RPCSpecs.xml',
'Geometry/GEMGeometryBuilder/data/v7/GEMSpecsFilter.xml',
'Geometry/GEMGeometryBuilder/data/v7/GEMSpecs.xml',
'Geometry/GEMGeometryBuilder/data/GEMSpecsFilter.xml',
'Geometry/GEMGeometryBuilder/data/v5/GEMSpecs.xml',
'Geometry/ForwardCommonData/data/brmsens.xml',
'Geometry/ForwardSimData/data/zdcsens.xml',
'Geometry/HGCalSimData/data/fasttimesens.xml',
Expand Down
163 changes: 78 additions & 85 deletions Geometry/GEMGeometry/test/ME0GeometryAnalyzer.cc
Expand Up @@ -75,7 +75,6 @@ ME0GeometryAnalyzer::analyze( const edm::Event& /*iEvent*/, const edm::EventSetu
ofos << " GeomDetUnit \t" <<pDD->detUnits().size() << endl;
ofos << " GeomDet \t" <<pDD->dets().size() << endl;
ofos << " GeomDetUnit DetIds\t" <<pDD->detUnitIds().size() << endl;
ofos << " layers \t" <<pDD->layers().size() << endl;
ofos << " eta partitions \t" <<pDD->etaPartitions().size() << endl;

// checking uniqueness of roll detIds
Expand Down Expand Up @@ -110,92 +109,86 @@ ME0GeometryAnalyzer::analyze( const edm::Event& /*iEvent*/, const edm::EventSetu
* sum of all dx + gap = chamber height
*/

// for (auto roll : pDD->etaPartitions()){
for (auto layer : pDD->layers()){
ME0DetId lId(layer->id());
ofos<<"\tME0Layer , ME0DetId = " << lId.rawId() << ", " << lId << endl;
for (auto roll : layer->etaPartitions()){
ME0DetId rId(roll->id());
ofos<<"\tME0EtaPartition , ME0DetId = " << rId.rawId() << ", " << rId << endl;

const BoundPlane& bSurface(roll->surface());
const StripTopology* topology(&(roll->specificTopology()));
for (auto roll : pDD->etaPartitions()){
ME0DetId rId(roll->id());
ofos<<"\tME0EtaPartition , ME0DetId = " << rId.rawId() << ", " << rId << endl;

const BoundPlane& bSurface(roll->surface());
const StripTopology* topology(&(roll->specificTopology()));

// base_bottom, base_top, height, strips, pads (all half length)
auto& parameters(roll->specs()->parameters());
float bottomEdge(parameters[0]);
float topEdge(parameters[1]);
float height(parameters[2]);
// float nStrips(parameters[3]);
//float nPads(parameters[4]);

LocalPoint lCentre( 0., 0., 0. );
GlobalPoint gCentre(bSurface.toGlobal(lCentre));

LocalPoint lTop( 0., height, 0.);
GlobalPoint gTop(bSurface.toGlobal(lTop));

LocalPoint lBottom( 0., -height, 0.);
GlobalPoint gBottom(bSurface.toGlobal(lBottom));

// gx, gy, gz, geta, gphi (center)
double cx(gCentre.x());
double cy(gCentre.y());
double cz(gCentre.z());
double ceta(gCentre.eta());
int cphi(static_cast<int>(gCentre.phi().degrees()));
if (cphi < 0) cphi += 360;

double tx(gTop.x());
double ty(gTop.y());
double tz(gTop.z());
double teta(gTop.eta());
int tphi(static_cast<int>(gTop.phi().degrees()));
if (tphi < 0) tphi += 360;

double bx(gBottom.x());
double by(gBottom.y());
double bz(gBottom.z());
double beta(gBottom.eta());
int bphi(static_cast<int>(gBottom.phi().degrees()));
if (bphi < 0) bphi += 360;

/*
// pitch bottom, pitch top, pitch centre
float pitch(roll->pitch());
float topPitch(roll->localPitch(lTop));
float bottomPitch(roll->localPitch(lBottom));
*/
// Type - should be ME0 Somethng
string type(roll->type().name());

// print info about edges
LocalPoint lEdge1(topology->localPosition(0.));
/*
LocalPoint lEdgeN(topology->localPosition((float)nStrips));
double cstrip1(roll->toGlobal(lEdge1).phi().degrees());
double cstripN(roll->toGlobal(lEdgeN).phi().degrees());
double dphi(cstripN - cstrip1);
if (dphi < 0.) dphi += 360.;
*/
double deta(abs(beta - teta));
const bool printDetails(true);
if (printDetails)
ofos << "\t\tType: " << type << endl
<< "\t\tDimensions[cm]: b = " << bottomEdge*2 << ", B = " << topEdge*2 << ", H = " << height*2 << endl
// << " \tnStrips = " << nStrips << ", nPads = " << nPads << endl
<< "\t\ttop(x,y,z)[cm] = (" << tx << ", " << ty << ", " << tz << "), top (eta,phi) = (" << teta << ", " << tphi << ")" << endl
<< "\t\tcenter(x,y,z) = (" << cx << ", " << cy << ", " << cz << "), center(eta,phi) = (" << ceta << ", " << cphi << ")" << endl
<< "\t\tbottom(x,y,z) = (" << bx << ", " << by << ", " << bz << "), bottom(eta,phi) = (" << beta << ", " << bphi << ")" << endl
<< "\t\tdeta = " << deta << " local position at 0 " << lEdge1
//<< " \tpith (top,center,bottom) = " << topPitch << " " << pitch << " " << bottomPitch << ", dEta = " << deta
//<< ", dPhi = " << dphi
<< endl;
}
ofos << dashedLine_ << " end" << endl;
// base_bottom, base_top, height, strips, pads (all half length)
auto& parameters(roll->specs()->parameters());
float bottomEdge(parameters[0]);
float topEdge(parameters[1]);
float height(parameters[2]);
// float nStrips(parameters[3]);
//float nPads(parameters[4]);

LocalPoint lCentre( 0., 0., 0. );
GlobalPoint gCentre(bSurface.toGlobal(lCentre));

LocalPoint lTop( 0., height, 0.);
GlobalPoint gTop(bSurface.toGlobal(lTop));

LocalPoint lBottom( 0., -height, 0.);
GlobalPoint gBottom(bSurface.toGlobal(lBottom));

// gx, gy, gz, geta, gphi (center)
double cx(gCentre.x());
double cy(gCentre.y());
double cz(gCentre.z());
double ceta(gCentre.eta());
int cphi(static_cast<int>(gCentre.phi().degrees()));
if (cphi < 0) cphi += 360;

double tx(gTop.x());
double ty(gTop.y());
double tz(gTop.z());
double teta(gTop.eta());
int tphi(static_cast<int>(gTop.phi().degrees()));
if (tphi < 0) tphi += 360;

double bx(gBottom.x());
double by(gBottom.y());
double bz(gBottom.z());
double beta(gBottom.eta());
int bphi(static_cast<int>(gBottom.phi().degrees()));
if (bphi < 0) bphi += 360;

/*
// pitch bottom, pitch top, pitch centre
float pitch(roll->pitch());
float topPitch(roll->localPitch(lTop));
float bottomPitch(roll->localPitch(lBottom));
*/
// Type - should be ME0 Somethng
string type(roll->type().name());

// print info about edges
LocalPoint lEdge1(topology->localPosition(0.));
/*
LocalPoint lEdgeN(topology->localPosition((float)nStrips));
double cstrip1(roll->toGlobal(lEdge1).phi().degrees());
double cstripN(roll->toGlobal(lEdgeN).phi().degrees());
double dphi(cstripN - cstrip1);
if (dphi < 0.) dphi += 360.;
*/
double deta(abs(beta - teta));
const bool printDetails(true);
if (printDetails)
ofos << "\t\tType: " << type << endl
<< "\t\tDimensions[cm]: b = " << bottomEdge*2 << ", B = " << topEdge*2 << ", H = " << height*2 << endl
// << " \tnStrips = " << nStrips << ", nPads = " << nPads << endl
<< "\t\ttop(x,y,z)[cm] = (" << tx << ", " << ty << ", " << tz << "), top (eta,phi) = (" << teta << ", " << tphi << ")" << endl
<< "\t\tcenter(x,y,z) = (" << cx << ", " << cy << ", " << cz << "), center(eta,phi) = (" << ceta << ", " << cphi << ")" << endl
<< "\t\tbottom(x,y,z) = (" << bx << ", " << by << ", " << bz << "), bottom(eta,phi) = (" << beta << ", " << bphi << ")" << endl
<< "\t\tdeta = " << deta << " local position at 0 " << lEdge1
//<< " \tpith (top,center,bottom) = " << topPitch << " " << pitch << " " << bottomPitch << ", dEta = " << deta
//<< ", dPhi = " << dphi
<< endl;
}

ofos << dashedLine_ << " end" << endl;
}

//define this as a plug-in
Expand Down
2 changes: 1 addition & 1 deletion Geometry/GEMGeometryBuilder/python/me0Geometry_cfi.py
Expand Up @@ -5,5 +5,5 @@
#
ME0GeometryESModule = cms.ESProducer("ME0GeometryESModule",
useDDD = cms.bool(True),
use10EtaPart = cms.bool(True),
use10EtaPart = cms.bool(False),
)
18 changes: 2 additions & 16 deletions Geometry/GEMGeometryBuilder/src/ME0GeometryBuilderFromDDD.cc
Expand Up @@ -87,7 +87,7 @@ ME0Geometry* ME0GeometryBuilderFromDDD::buildGeometry(DDFilteredView& fview, con
ME0DetId rollDetId(me0num.baseNumberToUnitNumber(mbn));
LogDebug("ME0GeometryBuilderFromDDD") << "ME0 eta partition rawId: " << rollDetId.rawId() << ", detId: " << rollDetId;

// chamber id for this partition. everything is the same; but partition number is 0 and layer number is 0.
// chamber id for this partition. everything is the same; but partition number is 0.
ME0DetId chamberId(rollDetId.chamberId());
LogDebug("ME0GeometryBuilderFromDDD") << "ME0 chamber rawId: " << chamberId.rawId() << ", detId: " << chamberId;

Expand Down Expand Up @@ -148,26 +148,12 @@ ME0Geometry* ME0GeometryBuilderFromDDD::buildGeometry(DDFilteredView& fview, con

BoundPlane* bp = new BoundPlane(pos, rot, bounds);
ReferenceCountingPointer<BoundPlane> surf(bp);

// Set EtaPartition of RollDetId equal to 1
ME0DetId rollDetId2(rollDetId.region(),rollDetId.layer(),rollDetId.station(),1);
ME0EtaPartition* mep = new ME0EtaPartition(rollDetId2, surf, e_p_specs);

// For Nick ... build also the layer
ME0DetId layerDetId(rollDetId.layerId());
ME0Layer* ml = new ME0Layer(layerDetId, surf);
ME0EtaPartition* mep = new ME0EtaPartition(rollDetId, surf, e_p_specs);

// Add the eta partition to the geometry
geometry->add(mep);
// Add the eta partition to the layer
ml->add(mep);
// Add the layer to the geometry
geometry->add(ml);

// go to next layer
doSubDets = fview.nextSibling();


}


Expand Down

0 comments on commit 329dfac

Please sign in to comment.