CMS 3D CMS Logo

Enumerations | Functions
FWTGeoRecoGeometryESProducer.cc File Reference
#include "Fireworks/Geometry/interface/FWTGeoRecoGeometryESProducer.h"
#include "Fireworks/Geometry/interface/FWTGeoRecoGeometry.h"
#include "Fireworks/Geometry/interface/FWTGeoRecoGeometryRecord.h"
#include "DataFormats/GeometrySurface/interface/RectangularPlaneBounds.h"
#include "DataFormats/GeometrySurface/interface/TrapezoidalPlaneBounds.h"
#include "DataFormats/TrackerCommon/interface/TrackerTopology.h"
#include "DataFormats/MuonDetId/interface/RPCDetId.h"
#include "DataFormats/MuonDetId/interface/GEMDetId.h"
#include "DataFormats/MuonDetId/interface/ME0DetId.h"
#include "DataFormats/EcalDetId/interface/EcalSubdetector.h"
#include "DataFormats/HcalDetId/interface/HcalSubdetector.h"
#include "DataFormats/EcalDetId/interface/EBDetId.h"
#include "DataFormats/EcalDetId/interface/EEDetId.h"
#include "DataFormats/HcalDetId/interface/HcalDetId.h"
#include "DataFormats/CaloTowers/interface/CaloTowerDetId.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "Geometry/CommonDetUnit/interface/GlobalTrackingGeometry.h"
#include "Geometry/CaloGeometry/interface/CaloGeometry.h"
#include "Geometry/CaloGeometry/interface/CaloCellGeometry.h"
#include "Geometry/HcalTowerAlgo/interface/HcalGeometry.h"
#include "Geometry/CSCGeometry/interface/CSCGeometry.h"
#include "Geometry/DTGeometry/interface/DTGeometry.h"
#include "Geometry/CSCGeometry/interface/CSCChamber.h"
#include "Geometry/CSCGeometry/interface/CSCLayer.h"
#include "Geometry/DTGeometry/interface/DTChamber.h"
#include "Geometry/DTGeometry/interface/DTLayer.h"
#include "Geometry/RPCGeometry/interface/RPCGeometry.h"
#include "Geometry/GEMGeometry/interface/GEMEtaPartition.h"
#include "Geometry/GEMGeometry/interface/GEMGeometry.h"
#include "Geometry/GEMGeometry/interface/ME0EtaPartition.h"
#include "Geometry/GEMGeometry/interface/ME0Geometry.h"
#include "Geometry/Records/interface/CaloGeometryRecord.h"
#include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
#include "Geometry/TrackerGeometryBuilder/interface/RectangularPixelTopology.h"
#include "Geometry/CommonDetUnit/interface/PixelGeomDetUnit.h"
#include "Geometry/TrackerGeometryBuilder/interface/StripGeomDetUnit.h"
#include "Geometry/TrackerGeometryBuilder/interface/StripGeomDetType.h"
#include "Geometry/CommonTopologies/interface/StripTopology.h"
#include "Geometry/CommonTopologies/interface/RectangularStripTopology.h"
#include "Geometry/CommonTopologies/interface/TrapezoidalStripTopology.h"
#include "Geometry/CaloGeometry/interface/IdealZPrism.h"
#include "Geometry/CaloGeometry/interface/IdealObliquePrism.h"
#include "Geometry/CaloGeometry/interface/TruncatedPyramid.h"
#include "TGeoManager.h"
#include "TGeoArb8.h"
#include "TGeoMatrix.h"
#include "TFile.h"
#include "TTree.h"
#include "TError.h"
#include "TMath.h"
#include "TEveVector.h"
#include "TEveTrans.h"

Go to the source code of this file.

Enumerations

enum  GMCol
 

Functions

TGeoHMatrix * getEcalTrans (CaloCellGeometry::CornersVec const &gc)
 
TGeoShape * makeEcalShape (const TruncatedPyramid *cell)
 

Enumeration Type Documentation

◆ GMCol

enum GMCol

Definition at line 164 of file FWTGeoRecoGeometryESProducer.cc.

164  {
165  Green = 4,
166  Blue0 = 13,
167  Blue1 = 24,
168  Blue2 = 6,
169  Yellow0 = 3,
170  Yellow1 = 16,
171  Pink = 10,
172  Red = 29,
173  Orange0 = 79,
174  Orange1 = 14,
175  Magenta = 8,
176  Gray = 12
177  };

Function Documentation

◆ getEcalTrans()

TGeoHMatrix* getEcalTrans ( CaloCellGeometry::CornersVec const &  gc)

Definition at line 1134 of file FWTGeoRecoGeometryESProducer.cc.

1134  {
1135  TEveVector gCenter;
1136  for (int i = 0; i < 8; ++i)
1137  gCenter += TEveVector(gc[i].x(), gc[i].y(), gc[i].z());
1138  gCenter *= 0.125;
1139 
1140  TEveVector tgCenter; // top center 4 corners
1141  for (int i = 4; i < 8; ++i)
1142  tgCenter += TEveVector(gc[i].x(), gc[i].y(), gc[i].z());
1143  tgCenter *= 0.25;
1144 
1145  TEveVector axis = tgCenter - gCenter;
1146  axis.Normalize();
1147 
1148  TEveTrans tr;
1149  TVector3 v1t;
1150  tr.GetBaseVec(1, v1t);
1151 
1152  TEveVector v1(v1t.x(), v1t.y(), v1t.z());
1153  double dot13 = axis.Dot(v1);
1154  TEveVector gd = axis;
1155  gd *= dot13;
1156  v1 -= gd;
1157  v1.Normalize();
1158  TEveVector v2;
1159  TMath::Cross(v1.Arr(), axis.Arr(), v2.Arr());
1160  TMath::Cross(axis.Arr(), v1.Arr(), v2.Arr());
1161  v2.Normalize();
1162 
1163  tr.SetBaseVec(1, v1.fX, v1.fY, v1.fZ);
1164  tr.SetBaseVec(2, v2.fX, v2.fY, v2.fZ);
1165  tr.SetBaseVec(3, axis.fX, axis.fY, axis.fZ);
1166  tr.Move3PF(gCenter.fX, gCenter.fY, gCenter.fZ);
1167 
1168  TGeoHMatrix* out = new TGeoHMatrix();
1169  tr.SetGeoHMatrix(*out);
1170  return out;
1171 }

References mps_fire::i, MillePedeFileConverter_cfg::out, x, y, and z.

Referenced by FWTGeoRecoGeometryESProducer::addEcalCaloGeometry().

◆ makeEcalShape()

TGeoShape* makeEcalShape ( const TruncatedPyramid cell)

Definition at line 1173 of file FWTGeoRecoGeometryESProducer.cc.

1173  {
1174  // printf("BEGIN EE SHAPE --------------------------------\n");
1175  // std::cout << detid << std::endl;
1176  const HepGeom::Transform3D idtr;
1179  TruncatedPyramid::localCorners(co, cell->param(), ref);
1180  //for( int c = 0; c < 8; ++c)
1181  // printf("lc.push_back(TEveVector(%.4f, %.4f, %.4f));\n", co[c].x(),co[c].y(),co[c].z() );
1182 
1183  double points[16];
1184  for (int c = 0; c < 8; ++c) {
1185  points[c * 2] = co[c].x();
1186  points[c * 2 + 1] = co[c].y();
1187  }
1188  TGeoShape* solid = new TGeoArb8(cell->param()[0], points);
1189  return solid;
1190 }

References c, cms::cuda::co, TruncatedPyramid::localCorners(), CaloCellGeometry::param(), and HLT_FULL_cff::points.

Referenced by FWTGeoRecoGeometryESProducer::addEcalCaloGeometry().

mps_fire.i
i
Definition: mps_fire.py:428
HLT_FULL_cff.points
points
Definition: HLT_FULL_cff.py:21469
detailsBasic3DVector::z
float float float z
Definition: extBasic3DVector.h:14
TruncatedPyramid::Pt3DVec
CaloCellGeometry::Pt3DVec Pt3DVec
Definition: TruncatedPyramid.h:23
cms::cuda::co
__host__ __device__ VT * co
Definition: prefixScan.h:47
CaloCellGeometry::param
const CCGFloat * param() const
Definition: CaloCellGeometry.h:99
TruncatedPyramid::localCorners
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
Definition: TruncatedPyramid.cc:177
genVertex_cff.x
x
Definition: genVertex_cff.py:13
detailsBasic3DVector::y
float float y
Definition: extBasic3DVector.h:14
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:56
TruncatedPyramid::Pt3D
CaloCellGeometry::Pt3D Pt3D
Definition: TruncatedPyramid.h:22