CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/RecoParticleFlow/PFProducer/src/PFGeometry.cc

Go to the documentation of this file.
00001 #include "RecoParticleFlow/PFProducer/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     // Define reference surfaces
00057     const float epsilon = 0.001; // should not matter at all
00058     Surface::RotationType rot;
00059     // BeamPipe
00060     cylinder_.push_back(new BoundCylinder(Surface::PositionType(0,0,0), rot, 
00061                                           SimpleCylinderBounds(innerRadius_[BeamPipe], innerRadius_[BeamPipe], -outerZ_[BeamPipe], outerZ_[BeamPipe])));
00062     negativeDisk_.push_back(new BoundPlane(Surface::PositionType(0,0,-outerZ_[BeamPipe]), rot, 
00063                                                     SimpleDiskBounds(0., innerRadius_[BeamPipe], -epsilon, epsilon)));
00064     positiveDisk_.push_back(new BoundPlane(Surface::PositionType(0,0,outerZ_[BeamPipe]), rot, 
00065                                                     SimpleDiskBounds(0., innerRadius_[BeamPipe], -epsilon, epsilon)));
00066     tanTh_.push_back(innerRadius_[BeamPipe]/outerZ_[BeamPipe]);
00067     // PS1Wall
00068     cylinder_.push_back(new BoundCylinder(Surface::PositionType(0,0,0), rot, 
00069                                           SimpleCylinderBounds(outerRadius_[PS1], outerRadius_[PS1], -outerZ_[PS1], outerZ_[PS1])));
00070     negativeDisk_.push_back(new BoundPlane(Surface::PositionType(0,0,-outerZ_[PS1]), rot, 
00071                                                     SimpleDiskBounds(0., outerRadius_[PS1], -epsilon, epsilon)));
00072     positiveDisk_.push_back(new BoundPlane(Surface::PositionType(0,0,outerZ_[PS1]), rot, 
00073                                                     SimpleDiskBounds(0., outerRadius_[PS1], -epsilon, epsilon)));
00074     tanTh_.push_back(outerRadius_[PS1]/outerZ_[PS1]);
00075     // PS2Wall
00076     cylinder_.push_back(new BoundCylinder(Surface::PositionType(0,0,0), rot, 
00077                                           SimpleCylinderBounds(outerRadius_[PS2], outerRadius_[PS2], -outerZ_[PS2], outerZ_[PS2])));
00078     negativeDisk_.push_back(new BoundPlane(Surface::PositionType(0,0,-outerZ_[PS2]), rot, 
00079                                                     SimpleDiskBounds(0., outerRadius_[PS2], -epsilon, epsilon)));
00080     positiveDisk_.push_back(new BoundPlane(Surface::PositionType(0,0,outerZ_[PS2]), rot, 
00081                                                     SimpleDiskBounds(0., outerRadius_[PS2], -epsilon, epsilon)));
00082     tanTh_.push_back(outerRadius_[PS2]/outerZ_[PS2]);
00083     // ECALInnerWall
00084     cylinder_.push_back(new BoundCylinder(Surface::PositionType(0,0,0), rot, 
00085                                           SimpleCylinderBounds(innerRadius_[ECALBarrel], innerRadius_[ECALBarrel], -innerZ_[ECALEndcap], innerZ_[ECALEndcap])));
00086     negativeDisk_.push_back(new BoundPlane(Surface::PositionType(0,0,-innerZ_[ECALEndcap]), rot, 
00087                                                     SimpleDiskBounds(0., innerRadius_[ECALBarrel], -epsilon, epsilon)));
00088     positiveDisk_.push_back(new BoundPlane(Surface::PositionType(0,0,innerZ_[ECALEndcap]), rot, 
00089                                                     SimpleDiskBounds(0., innerRadius_[ECALBarrel], -epsilon, epsilon)));
00090     tanTh_.push_back(innerRadius_[ECALBarrel]/innerZ_[ECALEndcap]);
00091     // HCALInnerWall
00092     cylinder_.push_back(new BoundCylinder(Surface::PositionType(0,0,0), rot, 
00093                                           SimpleCylinderBounds(innerRadius_[HCALBarrel], innerRadius_[HCALBarrel], -innerZ_[HCALEndcap], innerZ_[HCALEndcap])));
00094     negativeDisk_.push_back(new BoundPlane(Surface::PositionType(0,0,-innerZ_[HCALEndcap]), rot, 
00095                                                     SimpleDiskBounds(0., innerRadius_[HCALBarrel], -epsilon, epsilon)));
00096     positiveDisk_.push_back(new BoundPlane(Surface::PositionType(0,0,innerZ_[HCALEndcap]), rot, 
00097                                                     SimpleDiskBounds(0., innerRadius_[HCALBarrel], -epsilon, epsilon)));
00098     tanTh_.push_back(innerRadius_[HCALBarrel]/innerZ_[HCALEndcap]);
00099     // HCALOuterWall
00100     cylinder_.push_back(new BoundCylinder(Surface::PositionType(0,0,0), rot, 
00101                                           SimpleCylinderBounds(outerRadius_[HCALBarrel], outerRadius_[HCALBarrel], -outerZ_[HCALEndcap], outerZ_[HCALEndcap])));
00102     negativeDisk_.push_back(new BoundPlane(Surface::PositionType(0,0,-outerZ_[HCALEndcap]), rot, 
00103                                                     SimpleDiskBounds(0., outerRadius_[HCALBarrel], -epsilon, epsilon)));
00104     positiveDisk_.push_back(new BoundPlane(Surface::PositionType(0,0,outerZ_[HCALEndcap]), rot, 
00105                                                     SimpleDiskBounds(0., outerRadius_[HCALBarrel], -epsilon, epsilon)));
00106     tanTh_.push_back(outerRadius_[HCALBarrel]/outerZ_[HCALEndcap]);
00107   }
00108 }