CMS 3D CMS Logo

List of all members | Public Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes
ConversionTrackEcalImpactPoint Class Reference

#include <ConversionTrackEcalImpactPoint.h>

Public Member Functions

 ConversionTrackEcalImpactPoint (const MagneticField *field)
 
std::vector< math::XYZPointFfind (const std::vector< reco::TransientTrack > &tracks, const edm::Handle< edm::View< reco::CaloCluster > > &bcHandle)
 
std::vector< reco::CaloClusterPtrmatchingBC () const
 
void setMagneticField (const MagneticField *mf)
 
 ~ConversionTrackEcalImpactPoint ()
 

Static Private Member Functions

static const BoundCylinderbarrel ()
 
static const BoundDisknegativeEtaEndcap ()
 
static const BoundDiskpositiveEtaEndcap ()
 

Private Attributes

PropagationDirection dir_
 
PropagatorWithMaterialforwardPropagator_
 
std::vector< reco::CaloClusterPtrmatchingBC_
 
TrajectoryStateOnSurface stateAtECAL_
 
const MagneticFieldtheMF_
 

Static Private Attributes

static const ReferenceCountingPointer< BoundCylindertheBarrel_ = initBarrel()
 
static const ReferenceCountingPointer< BoundDisktheNegativeEtaEndcap_ = initNegative()
 
static const ReferenceCountingPointer< BoundDiskthePositiveEtaEndcap_ = initPositive()
 

Detailed Description

Author
N. Marinelli - Univ. of Notre Dame
Version

Definition at line 37 of file ConversionTrackEcalImpactPoint.h.

Constructor & Destructor Documentation

◆ ConversionTrackEcalImpactPoint()

ConversionTrackEcalImpactPoint::ConversionTrackEcalImpactPoint ( const MagneticField field)

Definition at line 47 of file ConversionTrackEcalImpactPoint.cc.

48  :
49 
50  theMF_(field) {
52 }

References alongMomentum, dir_, forwardPropagator_, and theMF_.

◆ ~ConversionTrackEcalImpactPoint()

ConversionTrackEcalImpactPoint::~ConversionTrackEcalImpactPoint ( )

Definition at line 54 of file ConversionTrackEcalImpactPoint.cc.

54 { delete forwardPropagator_; }

References forwardPropagator_.

Member Function Documentation

◆ barrel()

static const BoundCylinder& ConversionTrackEcalImpactPoint::barrel ( )
inlinestaticprivate

Definition at line 62 of file ConversionTrackEcalImpactPoint.h.

62 { return *theBarrel_; }

References theBarrel_.

Referenced by find().

◆ find()

std::vector< math::XYZPointF > ConversionTrackEcalImpactPoint::find ( const std::vector< reco::TransientTrack > &  tracks,
const edm::Handle< edm::View< reco::CaloCluster > > &  bcHandle 
)

Definition at line 56 of file ConversionTrackEcalImpactPoint.cc.

57  {
58  std::vector<math::XYZPointF> result;
59  //
60  matchingBC_.clear();
61 
62  std::vector<reco::CaloClusterPtr> matchingBC(2);
63 
64  //
65 
66  int iTrk = 0;
67  for (auto const& track : tracks) {
68  math::XYZPointF ecalImpactPosition(0., 0., 0.);
69  const TrajectoryStateOnSurface myTSOS = track.innermostMeasurementState();
70  if (!(myTSOS.isValid()))
71  continue;
72 
74 
75  if (!stateAtECAL_.isValid() || (stateAtECAL_.isValid() && fabs(stateAtECAL_.globalPosition().eta()) > 1.479)) {
76  if (track.innermostMeasurementState().globalPosition().eta() > 0.) {
78 
79  } else {
81  }
82  }
83 
84  if (stateAtECAL_.isValid())
85  ecalImpactPosition = stateAtECAL_.globalPosition();
86 
87  result.push_back(ecalImpactPosition);
88 
89  if (stateAtECAL_.isValid()) {
90  int goodBC = 0;
91  float bcDistanceToTrack = 9999;
92  reco::CaloClusterPtr matchedBCItr;
93  int ibc = 0;
94  goodBC = 0;
95 
96  for (auto const& bc : *bcHandle) {
97  float dEta = bc.position().eta() - ecalImpactPosition.eta();
98  float dPhi = bc.position().phi() - ecalImpactPosition.phi();
99  if (sqrt(dEta * dEta + dPhi * dPhi) < bcDistanceToTrack) {
100  goodBC = ibc;
101  bcDistanceToTrack = sqrt(dEta * dEta + dPhi * dPhi);
102  }
103  ibc++;
104  }
105 
106  matchingBC[iTrk] = bcHandle->ptrAt(goodBC);
107  }
108 
109  iTrk++;
110  }
111 
113 
114  return result;
115 }

References barrel(), HLT_FULL_cff::dEta, HLT_FULL_cff::dPhi, PV3DBase< T, PVType, FrameType >::eta(), forwardPropagator_, TrajectoryStateOnSurface::globalPosition(), TrajectoryStateOnSurface::isValid(), matchingBC(), matchingBC_, negativeEtaEndcap(), positiveEtaEndcap(), PropagatorWithMaterial::propagate(), mps_fire::result, mathSSE::sqrt(), stateAtECAL_, HLT_FULL_cff::track, and tracks.

Referenced by ConvertedPhotonProducer::buildCollections().

◆ matchingBC()

std::vector<reco::CaloClusterPtr> ConversionTrackEcalImpactPoint::matchingBC ( ) const
inline

Definition at line 46 of file ConversionTrackEcalImpactPoint.h.

46 { return matchingBC_; }

References matchingBC_.

Referenced by ConvertedPhotonProducer::buildCollections(), and find().

◆ negativeEtaEndcap()

static const BoundDisk& ConversionTrackEcalImpactPoint::negativeEtaEndcap ( )
inlinestaticprivate

Definition at line 63 of file ConversionTrackEcalImpactPoint.h.

63 { return *theNegativeEtaEndcap_; }

References theNegativeEtaEndcap_.

Referenced by find().

◆ positiveEtaEndcap()

static const BoundDisk& ConversionTrackEcalImpactPoint::positiveEtaEndcap ( )
inlinestaticprivate

Definition at line 64 of file ConversionTrackEcalImpactPoint.h.

64 { return *thePositiveEtaEndcap_; }

References thePositiveEtaEndcap_.

Referenced by find().

◆ setMagneticField()

void ConversionTrackEcalImpactPoint::setMagneticField ( const MagneticField mf)
inline

Definition at line 47 of file ConversionTrackEcalImpactPoint.h.

47 { theMF_ = mf; }

References theMF_.

Member Data Documentation

◆ dir_

PropagationDirection ConversionTrackEcalImpactPoint::dir_
private

Definition at line 55 of file ConversionTrackEcalImpactPoint.h.

Referenced by ConversionTrackEcalImpactPoint().

◆ forwardPropagator_

PropagatorWithMaterial* ConversionTrackEcalImpactPoint::forwardPropagator_
private

◆ matchingBC_

std::vector<reco::CaloClusterPtr> ConversionTrackEcalImpactPoint::matchingBC_
private

Definition at line 56 of file ConversionTrackEcalImpactPoint.h.

Referenced by find(), and matchingBC().

◆ stateAtECAL_

TrajectoryStateOnSurface ConversionTrackEcalImpactPoint::stateAtECAL_
private

Definition at line 52 of file ConversionTrackEcalImpactPoint.h.

Referenced by find().

◆ theBarrel_

const ReferenceCountingPointer< BoundCylinder > ConversionTrackEcalImpactPoint::theBarrel_ = initBarrel()
staticprivate

Definition at line 58 of file ConversionTrackEcalImpactPoint.h.

Referenced by barrel().

◆ theMF_

const MagneticField* ConversionTrackEcalImpactPoint::theMF_
private

◆ theNegativeEtaEndcap_

const ReferenceCountingPointer< BoundDisk > ConversionTrackEcalImpactPoint::theNegativeEtaEndcap_ = initNegative()
staticprivate

Definition at line 59 of file ConversionTrackEcalImpactPoint.h.

Referenced by negativeEtaEndcap().

◆ thePositiveEtaEndcap_

const ReferenceCountingPointer< BoundDisk > ConversionTrackEcalImpactPoint::thePositiveEtaEndcap_ = initPositive()
staticprivate

Definition at line 60 of file ConversionTrackEcalImpactPoint.h.

Referenced by positiveEtaEndcap().

HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11724
PropagatorWithMaterial::propagate
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
Definition: Propagator.h:50
TrajectoryStateOnSurface::globalPosition
GlobalPoint globalPosition() const
Definition: TrajectoryStateOnSurface.h:65
ConversionTrackEcalImpactPoint::matchingBC_
std::vector< reco::CaloClusterPtr > matchingBC_
Definition: ConversionTrackEcalImpactPoint.h:56
ConversionTrackEcalImpactPoint::theNegativeEtaEndcap_
static const ReferenceCountingPointer< BoundDisk > theNegativeEtaEndcap_
Definition: ConversionTrackEcalImpactPoint.h:59
HLT_FULL_cff.dPhi
dPhi
Definition: HLT_FULL_cff.py:13695
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
ConversionTrackEcalImpactPoint::positiveEtaEndcap
static const BoundDisk & positiveEtaEndcap()
Definition: ConversionTrackEcalImpactPoint.h:64
PropagatorWithMaterial
Definition: PropagatorWithMaterial.h:25
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
ConversionTrackEcalImpactPoint::dir_
PropagationDirection dir_
Definition: ConversionTrackEcalImpactPoint.h:55
ConversionTrackEcalImpactPoint::thePositiveEtaEndcap_
static const ReferenceCountingPointer< BoundDisk > thePositiveEtaEndcap_
Definition: ConversionTrackEcalImpactPoint.h:60
tracks
const uint32_t *__restrict__ const HitContainer *__restrict__ TkSoA *__restrict__ tracks
Definition: CAHitNtupletGeneratorKernelsImpl.h:176
ConversionTrackEcalImpactPoint::barrel
static const BoundCylinder & barrel()
Definition: ConversionTrackEcalImpactPoint.h:62
ConversionTrackEcalImpactPoint::stateAtECAL_
TrajectoryStateOnSurface stateAtECAL_
Definition: ConversionTrackEcalImpactPoint.h:52
PV3DBase::eta
T eta() const
Definition: PV3DBase.h:73
ConversionTrackEcalImpactPoint::forwardPropagator_
PropagatorWithMaterial * forwardPropagator_
Definition: ConversionTrackEcalImpactPoint.h:54
edm::Ptr< CaloCluster >
HLT_FULL_cff.dEta
dEta
Definition: HLT_FULL_cff.py:13694
ConversionTrackEcalImpactPoint::theMF_
const MagneticField * theMF_
Definition: ConversionTrackEcalImpactPoint.h:50
ConversionTrackEcalImpactPoint::theBarrel_
static const ReferenceCountingPointer< BoundCylinder > theBarrel_
Definition: ConversionTrackEcalImpactPoint.h:58
ConversionTrackEcalImpactPoint::matchingBC
std::vector< reco::CaloClusterPtr > matchingBC() const
Definition: ConversionTrackEcalImpactPoint.h:46
mps_fire.result
result
Definition: mps_fire.py:311
math::XYZPointF
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< float > > XYZPointF
point in space with cartesian internal representation
Definition: Point3D.h:10
ConversionTrackEcalImpactPoint::negativeEtaEndcap
static const BoundDisk & negativeEtaEndcap()
Definition: ConversionTrackEcalImpactPoint.h:63
alongMomentum
Definition: PropagationDirection.h:4
TrajectoryStateOnSurface::isValid
bool isValid() const
Definition: TrajectoryStateOnSurface.h:54