CMS 3D CMS Logo

Public Member Functions | Protected Attributes | Static Protected Attributes

MultipleScatteringGeometry Class Reference

#include <MultipleScatteringGeometry.h>

List of all members.

Public Member Functions

std::vector< MSLayerdetLayers (float eta, float z, const edm::EventSetup &iSetup) const
std::vector< MSLayerdetLayers (const edm::EventSetup &iSetup) const
 MultipleScatteringGeometry (const edm::EventSetup &iSetup)
std::vector< MSLayerotherLayers (float eta, const edm::EventSetup &iSetup) const

Protected Attributes

static const float endflangesZ = 30
static const float supportR = 19.
std::vector< const DetLayer * > theLayers

Static Protected Attributes

static const float beamPipeR = 2.94

Detailed Description

Definition at line 9 of file MultipleScatteringGeometry.h.


Constructor & Destructor Documentation

MultipleScatteringGeometry::MultipleScatteringGeometry ( const edm::EventSetup iSetup)

Definition at line 22 of file MultipleScatteringGeometry.cc.

References edm::EventSetup::get().

{

  edm::ESHandle<GeometricSearchTracker> track;
  iSetup.get<TrackerRecoGeometryRecord>().get( track ); 

  vector<BarrelDetLayer*> barrelLayers=track->barrelLayers();
  vector<BarrelDetLayer*>::const_iterator ib;
  vector<ForwardDetLayer*> forwardPosLayers=track->posForwardLayers();
  vector<ForwardDetLayer*> forwardNegLayers=track->negForwardLayers();
  vector<ForwardDetLayer*>::const_iterator ie;
  // barrelLayers = accessor.barrelLayers();
  for (ib = barrelLayers.begin(); ib != barrelLayers.end(); ib++)
    theLayers.push_back(*ib);

//   forwardLayers = accessor.negativeEndcapLayers();
  for (ie = forwardPosLayers.begin(); ie != forwardPosLayers.end(); ie++)
    theLayers.push_back(*ie);
  for (ie = forwardNegLayers.begin(); ie != forwardNegLayers.end(); ie++)
    theLayers.push_back(*ie);

}

Member Function Documentation

vector< MSLayer > MultipleScatteringGeometry::detLayers ( float  eta,
float  z,
const edm::EventSetup iSetup 
) const

Definition at line 55 of file MultipleScatteringGeometry.cc.

References alongMomentum, GeomDetEnumerators::barrel, BoundSurface::bounds(), edm::contains(), dir, GeomDetEnumerators::endcap, edm::EventSetup::get(), TrajectoryStateOnSurface::globalPosition(), BoundDisk::innerRadius(), PixelRecoRange< T >::inside(), TrajectoryStateOnSurface::isValid(), Bounds::length(), BoundDisk::outerRadius(), PV3DBase< T, PVType, FrameType >::perp(), GeometricSearchDet::position(), GloballyPositioned< T >::position(), StraightLinePropagator::propagate(), LargeD0_PixelPairStep_cff::propagator, alignCSCRings::r, Cylinder::radius(), query::result, ForwardDetLayer::specificSurface(), BarrelDetLayer::specificSurface(), Bounds::thickness(), PV3DBase< T, PVType, FrameType >::z(), and zero.

Referenced by MSLayersKeeperX0Averaged::init().

{
  vector<MSLayer> result;
  GlobalPoint zero(0,0,z);
  float r=1; float dirZ = r*sinh(eta);
  GlobalVector dir(r,0.,dirZ);
  edm::ESHandle<MagneticField> pSetup;
  iSetup.get<IdealMagneticFieldRecord>().get(pSetup);
  FreeTrajectoryState fts( GlobalTrajectoryParameters(zero,dir,1,&(*pSetup)) );
  StraightLinePropagator propagator(&(*pSetup),alongMomentum);
  vector<const DetLayer*>::const_iterator il;
  TrajectoryStateOnSurface tsos;
  for (il = theLayers.begin(); il != theLayers.end(); il++) {
    bool contains=false;
//  if ((*il)->subDetector() != PixelBarrel && (*il)->subDetector()!= PixelEndcap) continue;

    if ( (*il)->location() == barrel ) {
      const BarrelDetLayer * bl = dynamic_cast<const BarrelDetLayer*>(*il);
      if (!bl) continue;
      tsos = propagator.propagate(fts, bl->specificSurface());
      if (!tsos.isValid()) continue;
      float r=bl->specificSurface().radius();
      float dr = bl->specificSurface().bounds().thickness();
      float z=bl->position().z();
      float dz = bl->specificSurface().bounds().length(); 
      PixelRecoRange<float> rRange(r-dr/2., r+dr/2.);
      PixelRecoRange<float> zRange(z-dz/2., z+dz/2.);
      contains =    rRange.inside(tsos.globalPosition().perp()) 
                 && zRange.inside(tsos.globalPosition().z());
      //     contains = bl->contains((*il)->toLocal(tsos.globalPosition()));
    }
    else if ((*il)->location() == endcap) {
      const ForwardDetLayer * fl = dynamic_cast<const ForwardDetLayer*>(*il);
      if (!fl) continue;
      if (fl->position().z() * eta < 0) continue;
      const BoundDisk & disk = fl->specificSurface();
      tsos = propagator.propagate(fts, disk);
      if (!tsos.isValid()) continue;
      float zMin = disk.position().z()-disk.bounds().thickness()/2;
      float zMax = disk.position().z()+disk.bounds().thickness()/2;
      PixelRecoRange<float> rRange(disk.innerRadius(), disk.outerRadius());
      PixelRecoRange<float> zRange(zMin, zMax);
      contains = rRange.inside(tsos.globalPosition().perp()) 
              && zRange.inside(tsos.globalPosition().z());
      //     contains = fl->contains(fl->toLocal(tsos.globalPosition()));
    }
    if (contains) result.push_back(MSLayer(*il));
  }
  return result;
}
vector< MSLayer > MultipleScatteringGeometry::detLayers ( const edm::EventSetup iSetup) const

Definition at line 46 of file MultipleScatteringGeometry.cc.

References query::result.

{
  vector<MSLayer> result;
  vector<const DetLayer*>::const_iterator il;
  for (il=theLayers.begin();il!=theLayers.end();il++) result.push_back(MSLayer(*il)); 
  return result;
}
vector< MSLayer > MultipleScatteringGeometry::otherLayers ( float  eta,
const edm::EventSetup iSetup 
) const

Definition at line 106 of file MultipleScatteringGeometry.cc.

References GeomDetEnumerators::barrel, GeomDetEnumerators::endcap, PixelRecoPointRZ::r(), query::result, and PixelRecoPointRZ::z().

Referenced by MSLayersKeeperX0Averaged::init().

{
  vector<MSLayer> result;
  // zero
  //  MSLayer zero(barrel, 0., MSLayer::Range(-15,15));
  //  result.push_back(zero);

  // beampipe
  MSLayer beampipe(barrel, beamPipeR, MSLayer::Range(-100,100));

  result.push_back(beampipe);

  // endflanges
  PixelRecoPointRZ endfPoint = (eta > 0) ?
      PixelRecoPointRZ(endflangesZ/sinh(eta), endflangesZ)
    : PixelRecoPointRZ(-endflangesZ/sinh(eta), -endflangesZ);
  if (0 < endfPoint.r() && endfPoint.r() < supportR) {
    MSLayer endflanges(endcap,endfPoint.z(),MSLayer::Range(0.1,supportR-0.1));
    result.push_back(endflanges);
  }

  // support
  MSLayer support( barrel,supportR, MSLayer::Range(-280,280));
  result.push_back(support);

  return result;
}

Member Data Documentation

const float MultipleScatteringGeometry::beamPipeR = 2.94 [static, protected]

Definition at line 20 of file MultipleScatteringGeometry.h.

const float MultipleScatteringGeometry::endflangesZ = 30 [protected]

Definition at line 20 of file MultipleScatteringGeometry.h.

const float MultipleScatteringGeometry::supportR = 19. [protected]

Definition at line 20 of file MultipleScatteringGeometry.h.

std::vector<const DetLayer*> MultipleScatteringGeometry::theLayers [protected]

Definition at line 19 of file MultipleScatteringGeometry.h.