#include <ConversionTrackEcalImpactPoint.h>
Definition at line 39 of file ConversionTrackEcalImpactPoint.h.
ConversionTrackEcalImpactPoint::ConversionTrackEcalImpactPoint | ( | const MagneticField * | field | ) |
Definition at line 27 of file ConversionTrackEcalImpactPoint.cc.
References alongMomentum, dir_, forwardPropagator_, and theMF_.
: theMF_(field) { forwardPropagator_ = new PropagatorWithMaterial ( dir_ = alongMomentum, 0.000511, theMF_ ); }
ConversionTrackEcalImpactPoint::~ConversionTrackEcalImpactPoint | ( | ) |
Definition at line 36 of file ConversionTrackEcalImpactPoint.cc.
References forwardPropagator_.
{ delete forwardPropagator_ ; }
static const BoundCylinder& ConversionTrackEcalImpactPoint::barrel | ( | ) | [inline, static, private] |
Definition at line 86 of file ConversionTrackEcalImpactPoint.h.
References check(), and theBarrel_.
Referenced by find().
{ check(); return *theBarrel_;}
static float ConversionTrackEcalImpactPoint::barrelHalfLength | ( | ) | [inline, static, private] |
Definition at line 72 of file ConversionTrackEcalImpactPoint.h.
Referenced by initialize().
{return 270.9f;} //p81, p50, ECAL TDR
static float ConversionTrackEcalImpactPoint::barrelRadius | ( | ) | [inline, static, private] |
Hard-wired numbers defining the surfaces on which the crystal front faces lie.
Definition at line 71 of file ConversionTrackEcalImpactPoint.h.
Referenced by initialize().
{return 129.f;} //p81, p50, ECAL TDR
static void ConversionTrackEcalImpactPoint::check | ( | void | ) | [inline, static, private] |
Definition at line 77 of file ConversionTrackEcalImpactPoint.h.
References initialize(), and theInit_.
Referenced by barrel(), negativeEtaEndcap(), and positiveEtaEndcap().
{if (!theInit_) initialize();}
static float ConversionTrackEcalImpactPoint::endcapRadius | ( | ) | [inline, static, private] |
Definition at line 73 of file ConversionTrackEcalImpactPoint.h.
Referenced by initialize().
{return 171.1f;} // fig 3.26, p81, ECAL TDR
static float ConversionTrackEcalImpactPoint::endcapZ | ( | ) | [inline, static, private] |
Definition at line 74 of file ConversionTrackEcalImpactPoint.h.
Referenced by initialize().
{return 320.5f;} // fig 3.26, p81, ECAL TDR
std::vector< math::XYZPointF > ConversionTrackEcalImpactPoint::find | ( | const std::vector< reco::TransientTrack > & | tracks, |
const edm::Handle< edm::View< reco::CaloCluster > > & | bcHandle | ||
) |
Definition at line 42 of file ConversionTrackEcalImpactPoint.cc.
References barrel(), dPhi(), PV3DBase< T, PVType, FrameType >::eta(), forwardPropagator_, TrajectoryStateOnSurface::globalPosition(), i, TrajectoryStateOnSurface::isValid(), matchingBC(), matchingBC_, negativeEtaEndcap(), positiveEtaEndcap(), PropagatorWithMaterial::propagate(), query::result, mathSSE::sqrt(), and stateAtECAL_.
Referenced by ConvertedPhotonProducer::buildCollections().
{ std::vector<math::XYZPointF> result; // matchingBC_.clear(); std::vector<reco::CaloClusterPtr> matchingBC(2); // int iTrk=0; for ( std::vector<reco::TransientTrack>::const_iterator iTk=tracks.begin(); iTk!=tracks.end(); ++iTk) { math::XYZPointF ecalImpactPosition(0.,0.,0.); const TrajectoryStateOnSurface myTSOS=(*iTk).innermostMeasurementState(); if ( !( myTSOS.isValid() ) ) continue; stateAtECAL_= forwardPropagator_->propagate( myTSOS, barrel() ); if (!stateAtECAL_.isValid() || ( stateAtECAL_.isValid() && fabs(stateAtECAL_.globalPosition().eta() ) >1.479 ) ) { if ( (*iTk).innermostMeasurementState().globalPosition().eta() > 0.) { stateAtECAL_= forwardPropagator_->propagate( myTSOS, positiveEtaEndcap()); } else { stateAtECAL_= forwardPropagator_->propagate( myTSOS, negativeEtaEndcap()); } } if ( stateAtECAL_.isValid() ) ecalImpactPosition = stateAtECAL_.globalPosition(); result.push_back(ecalImpactPosition ); if ( stateAtECAL_.isValid() ) { int goodBC=0; float bcDistanceToTrack=9999; reco::CaloClusterPtr matchedBCItr; int ibc=0; goodBC=0; for (unsigned i = 0; i < bcHandle->size(); ++i ) { float dEta= bcHandle->ptrAt(i)->position().eta() - ecalImpactPosition.eta() ; float dPhi= bcHandle->ptrAt(i)->position().phi() - ecalImpactPosition.phi() ; if ( sqrt(dEta*dEta + dPhi*dPhi) < bcDistanceToTrack ) { goodBC=ibc; bcDistanceToTrack=sqrt(dEta*dEta + dPhi*dPhi); } ibc++; } matchingBC[iTrk]=bcHandle->ptrAt(goodBC); } iTrk++; } matchingBC_=matchingBC; return result; }
void ConversionTrackEcalImpactPoint::initialize | ( | ) | [static, private] |
Definition at line 120 of file ConversionTrackEcalImpactPoint.cc.
References barrelHalfLength(), barrelRadius(), endcapRadius(), endcapZ(), epsilon, theBarrel_, theInit_, theNegativeEtaEndcap_, and thePositiveEtaEndcap_.
Referenced by check().
{ const float epsilon = 0.001; Surface::RotationType rot; // unit rotation matrix theBarrel_ = new BoundCylinder( Surface::PositionType(0,0,0), rot, SimpleCylinderBounds( barrelRadius()-epsilon, barrelRadius()+epsilon, -barrelHalfLength(), barrelHalfLength())); theNegativeEtaEndcap_ = new BoundDisk( Surface::PositionType( 0, 0, -endcapZ()), rot, SimpleDiskBounds( 0, endcapRadius(), -epsilon, epsilon)); thePositiveEtaEndcap_ = new BoundDisk( Surface::PositionType( 0, 0, endcapZ()), rot, SimpleDiskBounds( 0, endcapRadius(), -epsilon, epsilon)); theInit_ = true; }
std::vector<reco::CaloClusterPtr> ConversionTrackEcalImpactPoint::matchingBC | ( | ) | const [inline] |
Definition at line 51 of file ConversionTrackEcalImpactPoint.h.
References matchingBC_.
Referenced by ConvertedPhotonProducer::buildCollections(), and find().
{return matchingBC_;}
static const BoundDisk& ConversionTrackEcalImpactPoint::negativeEtaEndcap | ( | ) | [inline, static, private] |
Definition at line 87 of file ConversionTrackEcalImpactPoint.h.
References check(), and theNegativeEtaEndcap_.
Referenced by find().
{ check(); return *theNegativeEtaEndcap_;}
static const BoundDisk& ConversionTrackEcalImpactPoint::positiveEtaEndcap | ( | ) | [inline, static, private] |
Definition at line 88 of file ConversionTrackEcalImpactPoint.h.
References check(), and thePositiveEtaEndcap_.
Referenced by find().
{ check(); return *thePositiveEtaEndcap_;}
void ConversionTrackEcalImpactPoint::setMagneticField | ( | const MagneticField * | mf | ) | [inline] |
Definition at line 65 of file ConversionTrackEcalImpactPoint.h.
Referenced by ConversionTrackEcalImpactPoint().
PropagatorWithMaterial* ConversionTrackEcalImpactPoint::forwardPropagator_ [mutable, private] |
Definition at line 64 of file ConversionTrackEcalImpactPoint.h.
Referenced by ConversionTrackEcalImpactPoint(), find(), and ~ConversionTrackEcalImpactPoint().
std::vector<reco::CaloClusterPtr> ConversionTrackEcalImpactPoint::matchingBC_ [private] |
Definition at line 66 of file ConversionTrackEcalImpactPoint.h.
Referenced by find(), and matchingBC().
Definition at line 62 of file ConversionTrackEcalImpactPoint.h.
Referenced by find().
ReferenceCountingPointer< BoundCylinder > ConversionTrackEcalImpactPoint::theBarrel_ = 0 [static, private] |
Definition at line 82 of file ConversionTrackEcalImpactPoint.h.
Referenced by barrel(), and initialize().
bool ConversionTrackEcalImpactPoint::theInit_ = false [static, private] |
Definition at line 89 of file ConversionTrackEcalImpactPoint.h.
Referenced by check(), and initialize().
const MagneticField* ConversionTrackEcalImpactPoint::theMF_ [private] |
Definition at line 60 of file ConversionTrackEcalImpactPoint.h.
Referenced by ConversionTrackEcalImpactPoint(), and setMagneticField().
ReferenceCountingPointer< BoundDisk > ConversionTrackEcalImpactPoint::theNegativeEtaEndcap_ = 0 [static, private] |
Definition at line 83 of file ConversionTrackEcalImpactPoint.h.
Referenced by initialize(), and negativeEtaEndcap().
ReferenceCountingPointer< BoundDisk > ConversionTrackEcalImpactPoint::thePositiveEtaEndcap_ = 0 [static, private] |
Definition at line 84 of file ConversionTrackEcalImpactPoint.h.
Referenced by initialize(), and positiveEtaEndcap().