CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/RecoParticleFlow/PFTracking/src/PFGeometry.cc

Go to the documentation of this file.
00001 #include "RecoParticleFlow/PFTracking/interface/PFGeometry.h"
00002 #include "DataFormats/GeometrySurface/interface/BoundCylinder.h"
00003 #include "DataFormats/GeometrySurface/interface/BoundDisk.h"
00004 #include "DataFormats/GeometrySurface/interface/SimpleCylinderBounds.h"
00005 #include "DataFormats/GeometrySurface/interface/SimpleDiskBounds.h"
00006 
00007 std::vector< float > PFGeometry::innerRadius_;
00008 std::vector< float > PFGeometry::outerRadius_;
00009 std::vector< float > PFGeometry::innerZ_;
00010 std::vector< float > PFGeometry::outerZ_;
00011 std::vector< ReferenceCountingPointer<BoundCylinder> > PFGeometry::cylinder_;
00012 std::vector< ReferenceCountingPointer<BoundPlane> > PFGeometry::negativeDisk_;
00013 std::vector< ReferenceCountingPointer<BoundPlane> > PFGeometry::positiveDisk_;
00014 std::vector< float > PFGeometry::tanTh_;
00015 
00016 PFGeometry::PFGeometry()
00017 {
00018   if (!innerRadius_.size()) {
00019     // All distances are in cm
00020     // BeamPipe
00021     innerRadius_.push_back(2.5);
00022     outerRadius_.push_back(2.5);
00023     innerZ_.push_back(0.);
00024     outerZ_.push_back(500.);
00025     // PS1
00026     innerRadius_.push_back(45.0);
00027     outerRadius_.push_back(125.0);
00028     innerZ_.push_back(303.16);
00029     outerZ_.push_back(303.16);
00030     // PS2
00031     innerRadius_.push_back(45.0);
00032     outerRadius_.push_back(125.0);
00033     innerZ_.push_back(307.13);
00034     outerZ_.push_back(307.13);
00035     // ECALBarrel
00036     innerRadius_.push_back(129.0);
00037     outerRadius_.push_back(175.0);
00038     innerZ_.push_back(0.);
00039     outerZ_.push_back(304.5);
00040     // ECALEndcap
00041     innerRadius_.push_back(31.6);
00042     outerRadius_.push_back(171.1);
00043     innerZ_.push_back(317.0);
00044     outerZ_.push_back(388.0);
00045     // HCALBarrel
00046     innerRadius_.push_back(183.0);
00047     outerRadius_.push_back(285.0);
00048     innerZ_.push_back(0.);
00049     outerZ_.push_back(433.2);
00050     // HCALEndcap
00051     innerRadius_.push_back(31.6); // !!! Do not use : Probably wrong !!!    
00052     outerRadius_.push_back(285.0); // !!! Do not use : Probably wrong !!! 
00053     innerZ_.push_back(388.0);
00054     outerZ_.push_back(560.0);
00055 
00056     // HO Barrel
00057     innerRadius_.push_back(387.6);
00058     outerRadius_.push_back(410.2);
00059     innerZ_.push_back(0.);
00060     outerZ_.push_back(700.25);
00061 
00062     // Define reference surfaces
00063     const float epsilon = 0.001; // should not matter at all
00064     Surface::RotationType rot;
00065     // BeamPipe
00066     cylinder_.push_back(new BoundCylinder(Surface::PositionType(0,0,0), rot, 
00067                                           SimpleCylinderBounds(innerRadius_[BeamPipe], innerRadius_[BeamPipe], -outerZ_[BeamPipe], outerZ_[BeamPipe])));
00068     negativeDisk_.push_back(new BoundPlane(Surface::PositionType(0,0,-outerZ_[BeamPipe]), rot, 
00069                                                     SimpleDiskBounds(0., innerRadius_[BeamPipe], -epsilon, epsilon)));
00070     positiveDisk_.push_back(new BoundPlane(Surface::PositionType(0,0,outerZ_[BeamPipe]), rot, 
00071                                                     SimpleDiskBounds(0., innerRadius_[BeamPipe], -epsilon, epsilon)));
00072     tanTh_.push_back(innerRadius_[BeamPipe]/outerZ_[BeamPipe]);
00073     // PS1Wall
00074     cylinder_.push_back(new BoundCylinder(Surface::PositionType(0,0,0), rot, 
00075                                           SimpleCylinderBounds(outerRadius_[PS1], outerRadius_[PS1], -outerZ_[PS1], outerZ_[PS1])));
00076     negativeDisk_.push_back(new BoundPlane(Surface::PositionType(0,0,-outerZ_[PS1]), rot, 
00077                                                     SimpleDiskBounds(0., outerRadius_[PS1], -epsilon, epsilon)));
00078     positiveDisk_.push_back(new BoundPlane(Surface::PositionType(0,0,outerZ_[PS1]), rot, 
00079                                                     SimpleDiskBounds(0., outerRadius_[PS1], -epsilon, epsilon)));
00080     tanTh_.push_back(outerRadius_[PS1]/outerZ_[PS1]);
00081     // PS2Wall
00082     cylinder_.push_back(new BoundCylinder(Surface::PositionType(0,0,0), rot, 
00083                                           SimpleCylinderBounds(outerRadius_[PS2], outerRadius_[PS2], -outerZ_[PS2], outerZ_[PS2])));
00084     negativeDisk_.push_back(new BoundPlane(Surface::PositionType(0,0,-outerZ_[PS2]), rot, 
00085                                                     SimpleDiskBounds(0., outerRadius_[PS2], -epsilon, epsilon)));
00086     positiveDisk_.push_back(new BoundPlane(Surface::PositionType(0,0,outerZ_[PS2]), rot, 
00087                                                     SimpleDiskBounds(0., outerRadius_[PS2], -epsilon, epsilon)));
00088     tanTh_.push_back(outerRadius_[PS2]/outerZ_[PS2]);
00089     // ECALInnerWall
00090     cylinder_.push_back(new BoundCylinder(Surface::PositionType(0,0,0), rot, 
00091                                           SimpleCylinderBounds(innerRadius_[ECALBarrel], innerRadius_[ECALBarrel], -innerZ_[ECALEndcap], innerZ_[ECALEndcap])));
00092     negativeDisk_.push_back(new BoundPlane(Surface::PositionType(0,0,-innerZ_[ECALEndcap]), rot, 
00093                                                     SimpleDiskBounds(0., innerRadius_[ECALBarrel], -epsilon, epsilon)));
00094     positiveDisk_.push_back(new BoundPlane(Surface::PositionType(0,0,innerZ_[ECALEndcap]), rot, 
00095                                                     SimpleDiskBounds(0., innerRadius_[ECALBarrel], -epsilon, epsilon)));
00096     tanTh_.push_back(innerRadius_[ECALBarrel]/innerZ_[ECALEndcap]);
00097     // HCALInnerWall
00098     cylinder_.push_back(new BoundCylinder(Surface::PositionType(0,0,0), rot, 
00099                                           SimpleCylinderBounds(innerRadius_[HCALBarrel], innerRadius_[HCALBarrel], -innerZ_[HCALEndcap], innerZ_[HCALEndcap])));
00100     negativeDisk_.push_back(new BoundPlane(Surface::PositionType(0,0,-innerZ_[HCALEndcap]), rot, 
00101                                                     SimpleDiskBounds(0., innerRadius_[HCALBarrel], -epsilon, epsilon)));
00102     positiveDisk_.push_back(new BoundPlane(Surface::PositionType(0,0,innerZ_[HCALEndcap]), rot, 
00103                                                     SimpleDiskBounds(0., innerRadius_[HCALBarrel], -epsilon, epsilon)));
00104     tanTh_.push_back(innerRadius_[HCALBarrel]/innerZ_[HCALEndcap]);
00105     // HCALOuterWall
00106     cylinder_.push_back(new BoundCylinder(Surface::PositionType(0,0,0), rot, 
00107                                           SimpleCylinderBounds(outerRadius_[HCALBarrel], outerRadius_[HCALBarrel], -outerZ_[HCALEndcap], outerZ_[HCALEndcap])));
00108     negativeDisk_.push_back(new BoundPlane(Surface::PositionType(0,0,-outerZ_[HCALEndcap]), rot, 
00109                                                     SimpleDiskBounds(0., outerRadius_[HCALBarrel], -epsilon, epsilon)));
00110     positiveDisk_.push_back(new BoundPlane(Surface::PositionType(0,0,outerZ_[HCALEndcap]), rot, 
00111                                                     SimpleDiskBounds(0., outerRadius_[HCALBarrel], -epsilon, epsilon)));
00112     tanTh_.push_back(outerRadius_[HCALBarrel]/outerZ_[HCALEndcap]);
00113   }
00114 }