CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
ConversionSeedFinder Class Referenceabstract

#include <ConversionSeedFinder.h>

Inheritance diagram for ConversionSeedFinder:
InOutConversionSeedFinder OutInConversionSeedFinder

Public Member Functions

void clear ()
 
 ConversionSeedFinder ()
 
 ConversionSeedFinder (const edm::ParameterSet &config, edm::ConsumesCollector &iC)
 
const MeasurementTrackergetMeasurementTracker () const
 
std::vector< const DetLayer * > const & layerList () const
 
virtual void makeSeeds (const edm::Handle< edm::View< reco::CaloCluster > > &allBc)=0
 
TrajectorySeedCollectionseeds ()
 
virtual void setCandidate (float e, GlobalPoint pos)
 
void setEvent (const edm::Event &e)
 
void setEventSetup (const edm::EventSetup &es)
 Initialize EventSetup objects at each event. More...
 
void setMeasurementTracker (const MeasurementTracker *tracker) const
 
void setNavigationSchool (const NavigationSchool *navigation)
 
virtual ~ConversionSeedFinder ()
 

Protected Member Functions

void findLayers ()
 
void findLayers (const FreeTrajectoryState &fts)
 
void printLayer (int i) const
 
FreeTrajectoryState trackStateFromClusters (int aCharge, const GlobalPoint &gpOrigine, PropagationDirection dir, float scaleFactor) const
 

Protected Attributes

edm::EDGetTokenT< reco::BeamSpotbeamSpotToken_
 
PropagationDirection dir_
 
edm::EDGetTokenT< MeasurementTrackerEventmeasurementTrkToken_
 
float theBCEnergy_
 
GlobalPoint theBCPosition_
 
reco::BeamSpot theBeamSpot_
 
edm::ESHandle< GeometricSearchTrackertheGeomSearchTracker_
 
std::vector< const DetLayer * > theLayerList_
 
const MeasurementTrackertheMeasurementTracker_
 
std::string theMeasurementTrackerName_
 
edm::ESHandle< MagneticFieldtheMF_
 
const NavigationSchooltheNavigationSchool_ = nullptr
 
const PropagatorthePropagatorAlongMomentum_
 
const PropagatorthePropagatorOppositeToMomentum_
 
reco::CaloClustertheSC_
 
float theSCenergy_
 
GlobalPoint theSCPosition_
 
TrajectorySeedCollection theSeeds_
 
edm::Handle< MeasurementTrackerEventtheTrackerData_
 
const TrackingGeometrytheTrackerGeom_
 
KFUpdator theUpdator_
 

Detailed Description

Author
Nancy Marinelli, U. of Notre Dame, US

Definition at line 48 of file ConversionSeedFinder.h.

Constructor & Destructor Documentation

◆ ConversionSeedFinder() [1/2]

ConversionSeedFinder::ConversionSeedFinder ( )

◆ ConversionSeedFinder() [2/2]

ConversionSeedFinder::ConversionSeedFinder ( const edm::ParameterSet config,
edm::ConsumesCollector iC 
)

Definition at line 16 of file ConversionSeedFinder.cc.

17  : // conf_(config),
18  theUpdator_() {
20  edm::InputTag("MeasurementTrackerEvent")); //hardcoded because the original was and no time to fix (sigh)
22  edm::InputTag("offlineBeamSpot")); //hardcoded because the original was and no time to fix (sigh)
23 
24  LogDebug("ConversionSeedFinder") << " CTOR "
25  << "\n";
26 
27  theMeasurementTrackerName_ = config.getParameter<std::string>("MeasurementTrackerName");
28 }

References beamSpotToken_, edm::ConsumesCollector::consumes(), HLT_FULL_cff::InputTag, LogDebug, measurementTrkToken_, AlCaHLTBitMon_QueryRunRegistry::string, and theMeasurementTrackerName_.

◆ ~ConversionSeedFinder()

virtual ConversionSeedFinder::~ConversionSeedFinder ( )
inlinevirtual

Definition at line 53 of file ConversionSeedFinder.h.

53 {}

Member Function Documentation

◆ clear()

void ConversionSeedFinder::clear ( void  )
inline

Definition at line 72 of file ConversionSeedFinder.h.

72 { theSeeds_.clear(); }

References theSeeds_.

◆ findLayers() [1/2]

void ConversionSeedFinder::findLayers ( )
protected

Definition at line 58 of file ConversionSeedFinder.cc.

58  {
59  int charge;
60  //List the DetLayers crossed by a straight line from the centre of the
61  //detector to the supercluster position
62  // GlobalPoint vertex(0.,0.,0.);
64  charge = -1;
66 
67  findLayers(theStraightLineFTS);
68 }

References alongMomentum, ALCARECOTkAlJpsiMuMu_cff::charge, reco::BeamSpot::position(), theBeamSpot_, trackStateFromClusters(), and bphysicsOniaDQM_cfi::vertex.

Referenced by OutInConversionSeedFinder::makeSeeds(), and InOutConversionSeedFinder::makeSeeds().

◆ findLayers() [2/2]

void ConversionSeedFinder::findLayers ( const FreeTrajectoryState fts)
protected

Definition at line 109 of file ConversionSeedFinder.cc.

109  {
110  theLayerList_.clear();
111 
113 
114  LayerCollector collector(theNavigationSchool_, &prop, this->getMeasurementTracker(), 5., 5.);
115 
116  theLayerList_ = collector.allLayers(traj);
117 
118  for (unsigned int i = 0; i < theLayerList_.size(); ++i) {
119  printLayer(i);
120  }
121 }

References LayerCollector::allLayers(), alongMomentum, getMeasurementTracker(), mps_fire::i, printLayer(), theLayerList_, theMF_, and theNavigationSchool_.

◆ getMeasurementTracker()

const MeasurementTracker* ConversionSeedFinder::getMeasurementTracker ( ) const
inline

◆ layerList()

std::vector<const DetLayer*> const& ConversionSeedFinder::layerList ( ) const
inline

◆ makeSeeds()

virtual void ConversionSeedFinder::makeSeeds ( const edm::Handle< edm::View< reco::CaloCluster > > &  allBc)
pure virtual

◆ printLayer()

void ConversionSeedFinder::printLayer ( int  i) const
protected

Definition at line 123 of file ConversionSeedFinder.cc.

123  {
124  const DetLayer* layer = theLayerList_[i];
125  if (layer->location() == GeomDetEnumerators::barrel) {
126  // const BarrelDetLayer * barrelLayer = dynamic_cast<const BarrelDetLayer*>(layer);
127  //float r = barrelLayer->specificSurface().radius();
128  // std::cout << " barrel layer radius " << r << " " << barrelLayer->specificSurface().bounds().length()/2. << "\n";
129 
130  } else {
131  // const ForwardDetLayer * forwardLayer = dynamic_cast<const ForwardDetLayer*>(layer);
132  // float z = fabs(forwardLayer->surface().position().z());
133  // std::cout << " forward layer position " << z << " " << forwardLayer->specificSurface().innerRadius() << " " << forwardLayer->specificSurface().outerRadius() << "\n";
134  }
135 }

References GeomDetEnumerators::barrel, mps_fire::i, DetLayer::location(), and theLayerList_.

Referenced by InOutConversionSeedFinder::completeSeed(), InOutConversionSeedFinder::fillClusterSeeds(), and findLayers().

◆ seeds()

TrajectorySeedCollection& ConversionSeedFinder::seeds ( )
inline

Definition at line 57 of file ConversionSeedFinder.h.

57 { return theSeeds_; }

References theSeeds_.

◆ setCandidate()

virtual void ConversionSeedFinder::setCandidate ( float  e,
GlobalPoint  pos 
)
inlinevirtual

Definition at line 58 of file ConversionSeedFinder.h.

58  {
59  theSCenergy_ = e;
61  }

References MillePedeFileConverter_cfg::e, theSCenergy_, and theSCPosition_.

◆ setEvent()

void ConversionSeedFinder::setEvent ( const edm::Event e)

Definition at line 30 of file ConversionSeedFinder.cc.

30  {
32 
33  //get the BeamSpot
34  edm::Handle<reco::BeamSpot> recoBeamSpotHandle;
35  evt.getByToken(beamSpotToken_, recoBeamSpotHandle);
36  theBeamSpot_ = *recoBeamSpotHandle;
37 
38  evt.getByToken(measurementTrkToken_, theTrackerData_);
39 }

References beamSpotToken_, MeasurementTracker::geomTracker(), edm::Event::getByToken(), getMeasurementTracker(), measurementTrkToken_, theBeamSpot_, theTrackerData_, and theTrackerGeom_.

◆ setEventSetup()

void ConversionSeedFinder::setEventSetup ( const edm::EventSetup es)

Initialize EventSetup objects at each event.

Definition at line 41 of file ConversionSeedFinder.cc.

41  {
44 
45  edm::ESHandle<MeasurementTracker> measurementTrackerHandle;
46  es.get<CkfComponentsRecord>().get(theMeasurementTrackerName_, measurementTrackerHandle);
47  theMeasurementTracker_ = measurementTrackerHandle.product();
48 
49  edm::ESHandle<Propagator> propagatorAlongMomHandle;
50  es.get<TrackingComponentsRecord>().get("alongMomElePropagator", propagatorAlongMomHandle);
51  thePropagatorAlongMomentum_ = &(*propagatorAlongMomHandle);
52 
53  edm::ESHandle<Propagator> propagatorOppoToMomHandle;
54  es.get<TrackingComponentsRecord>().get("oppositeToMomElePropagator", propagatorOppoToMomHandle);
55  thePropagatorOppositeToMomentum_ = &(*propagatorOppoToMomHandle);
56 }

References edm::EventSetup::get(), get, edm::ESHandle< T >::product(), theGeomSearchTracker_, theMeasurementTracker_, theMeasurementTrackerName_, theMF_, thePropagatorAlongMomentum_, and thePropagatorOppositeToMomentum_.

◆ setMeasurementTracker()

void ConversionSeedFinder::setMeasurementTracker ( const MeasurementTracker tracker) const
inline

Definition at line 64 of file ConversionSeedFinder.h.

64 { ; }

◆ setNavigationSchool()

void ConversionSeedFinder::setNavigationSchool ( const NavigationSchool navigation)
inline

Definition at line 69 of file ConversionSeedFinder.h.

69 { theNavigationSchool_ = navigation; }

References theNavigationSchool_.

◆ trackStateFromClusters()

FreeTrajectoryState ConversionSeedFinder::trackStateFromClusters ( int  aCharge,
const GlobalPoint gpOrigine,
PropagationDirection  dir,
float  scaleFactor 
) const
protected

Definition at line 70 of file ConversionSeedFinder.cc.

73  {
74  double caloEnergy = theSCenergy_ * scaleFactor;
75 
76  GlobalVector radiusCalo = theSCPosition_ - theOrigin;
77 
78  GlobalVector momentumWithoutCurvature = radiusCalo.unit() * caloEnergy;
79 
81  if (dir == alongMomentum) {
82  gtp = GlobalTrajectoryParameters(theOrigin, momentumWithoutCurvature, charge, &(*theMF_));
83  } else {
84  gtp = GlobalTrajectoryParameters(theSCPosition_, momentumWithoutCurvature, charge, &(*theMF_));
85  }
86 
87  // now create error matrix
88  // dpos = 4mm/sqrt(E), dtheta = move vertex by 1sigma
89  float dpos = 0.4 / sqrt(theSCenergy_);
90  dpos *= 2.;
91  float dphi = dpos / theSCPosition_.perp();
92  // float dp = 0.03 * sqrt(theCaloEnergy);
93  // float dp = theCaloEnergy / sqrt(12.); // for fun
94  float theta1 = theSCPosition_.theta();
95  float theta2 = atan2(double(theSCPosition_.perp()), theSCPosition_.z() - 5.5);
96  float dtheta = theta1 - theta2;
98  m[0][0] = 1.;
99  m[1][1] = dpos * dpos;
100  m[2][2] = dpos * dpos;
101  m[3][3] = dphi * dphi;
102  m[4][4] = dtheta * dtheta;
103 
105 
106  return fts;
107 }

References alongMomentum, ALCARECOTkAlJpsiMuMu_cff::charge, DeadROC_duringRun::dir, visualization-live-secondInstance_cfg::m, PV3DBase< T, PVType, FrameType >::perp(), multiplicitycorr_cfi::scaleFactor, mathSSE::sqrt(), theMF_, theSCenergy_, theSCPosition_, PV3DBase< T, PVType, FrameType >::theta(), Vector3DBase< T, FrameTag >::unit(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by findLayers(), and OutInConversionSeedFinder::startSeed().

Member Data Documentation

◆ beamSpotToken_

edm::EDGetTokenT<reco::BeamSpot> ConversionSeedFinder::beamSpotToken_
protected

Definition at line 97 of file ConversionSeedFinder.h.

Referenced by ConversionSeedFinder(), and setEvent().

◆ dir_

PropagationDirection ConversionSeedFinder::dir_
protected

Definition at line 101 of file ConversionSeedFinder.h.

◆ measurementTrkToken_

edm::EDGetTokenT<MeasurementTrackerEvent> ConversionSeedFinder::measurementTrkToken_
protected

Definition at line 98 of file ConversionSeedFinder.h.

Referenced by ConversionSeedFinder(), and setEvent().

◆ theBCEnergy_

float ConversionSeedFinder::theBCEnergy_
protected

◆ theBCPosition_

GlobalPoint ConversionSeedFinder::theBCPosition_
protected

◆ theBeamSpot_

reco::BeamSpot ConversionSeedFinder::theBeamSpot_
protected

◆ theGeomSearchTracker_

edm::ESHandle<GeometricSearchTracker> ConversionSeedFinder::theGeomSearchTracker_
protected

Definition at line 95 of file ConversionSeedFinder.h.

Referenced by setEventSetup().

◆ theLayerList_

std::vector<const DetLayer*> ConversionSeedFinder::theLayerList_
protected

◆ theMeasurementTracker_

const MeasurementTracker* ConversionSeedFinder::theMeasurementTracker_
protected

Definition at line 90 of file ConversionSeedFinder.h.

Referenced by getMeasurementTracker(), and setEventSetup().

◆ theMeasurementTrackerName_

std::string ConversionSeedFinder::theMeasurementTrackerName_
protected

Definition at line 89 of file ConversionSeedFinder.h.

Referenced by ConversionSeedFinder(), and setEventSetup().

◆ theMF_

edm::ESHandle<MagneticField> ConversionSeedFinder::theMF_
protected

◆ theNavigationSchool_

const NavigationSchool* ConversionSeedFinder::theNavigationSchool_ = nullptr
protected

Definition at line 92 of file ConversionSeedFinder.h.

Referenced by findLayers(), and setNavigationSchool().

◆ thePropagatorAlongMomentum_

const Propagator* ConversionSeedFinder::thePropagatorAlongMomentum_
protected

◆ thePropagatorOppositeToMomentum_

const Propagator* ConversionSeedFinder::thePropagatorOppositeToMomentum_
protected

◆ theSC_

reco::CaloCluster* ConversionSeedFinder::theSC_
protected

Definition at line 102 of file ConversionSeedFinder.h.

◆ theSCenergy_

float ConversionSeedFinder::theSCenergy_
protected

◆ theSCPosition_

GlobalPoint ConversionSeedFinder::theSCPosition_
protected

◆ theSeeds_

TrajectorySeedCollection ConversionSeedFinder::theSeeds_
protected

◆ theTrackerData_

edm::Handle<MeasurementTrackerEvent> ConversionSeedFinder::theTrackerData_
protected

◆ theTrackerGeom_

const TrackingGeometry* ConversionSeedFinder::theTrackerGeom_
protected

Definition at line 91 of file ConversionSeedFinder.h.

Referenced by InOutConversionSeedFinder::fillClusterSeeds(), and setEvent().

◆ theUpdator_

KFUpdator ConversionSeedFinder::theUpdator_
protected
Vector3DBase
Definition: Vector3DBase.h:8
ConversionSeedFinder::theBeamSpot_
reco::BeamSpot theBeamSpot_
Definition: ConversionSeedFinder.h:113
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
mps_fire.i
i
Definition: mps_fire.py:428
ConversionSeedFinder::theMeasurementTrackerName_
std::string theMeasurementTrackerName_
Definition: ConversionSeedFinder.h:89
ConversionSeedFinder::findLayers
void findLayers()
Definition: ConversionSeedFinder.cc:58
DetLayer
Definition: DetLayer.h:21
PV3DBase::theta
Geom::Theta< T > theta() const
Definition: PV3DBase.h:72
LayerCollector
Definition: LayerCollector.h:19
pos
Definition: PixelAliasList.h:18
ConversionSeedFinder::theTrackerData_
edm::Handle< MeasurementTrackerEvent > theTrackerData_
Definition: ConversionSeedFinder.h:114
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89287
TrackerRecoGeometryRecord
Definition: TrackerRecoGeometryRecord.h:11
ConversionSeedFinder::theMF_
edm::ESHandle< MagneticField > theMF_
Definition: ConversionSeedFinder.h:94
edm::Handle< reco::BeamSpot >
ConversionSeedFinder::thePropagatorOppositeToMomentum_
const Propagator * thePropagatorOppositeToMomentum_
Definition: ConversionSeedFinder.h:111
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
GeomDetEnumerators::barrel
Definition: GeomDetEnumerators.h:9
IdealMagneticFieldRecord
Definition: IdealMagneticFieldRecord.h:11
config
Definition: config.py:1
DetLayer::location
virtual Location location() const =0
Which part of the detector (barrel, endcap)
Vector3DBase::unit
Vector3DBase unit() const
Definition: Vector3DBase.h:54
edm::EventSetup::get
T get() const
Definition: EventSetup.h:80
CurvilinearTrajectoryError
Definition: CurvilinearTrajectoryError.h:27
CkfComponentsRecord
Definition: CkfComponentsRecord.h:22
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:72
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
ConversionSeedFinder::theUpdator_
KFUpdator theUpdator_
Definition: ConversionSeedFinder.h:100
reco::BeamSpot
Definition: BeamSpot.h:21
edm::ESHandle< MeasurementTracker >
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:55
GlobalTrajectoryParameters
Definition: GlobalTrajectoryParameters.h:15
ConversionSeedFinder::printLayer
void printLayer(int i) const
Definition: ConversionSeedFinder.cc:123
reco::BeamSpot::position
const Point & position() const
position
Definition: BeamSpot.h:59
Point3DBase< float, GlobalTag >
MeasurementTracker::geomTracker
const TrackerGeometry * geomTracker() const
Definition: MeasurementTracker.h:36
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
ConversionSeedFinder::beamSpotToken_
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
Definition: ConversionSeedFinder.h:97
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
bphysicsOniaDQM_cfi.vertex
vertex
Definition: bphysicsOniaDQM_cfi.py:7
StraightLinePropagator
Definition: StraightLinePropagator.h:16
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:223
MeasurementTrackerEvent
Definition: MeasurementTrackerEvent.h:16
ConversionSeedFinder::theSCenergy_
float theSCenergy_
Definition: ConversionSeedFinder.h:103
ConversionSeedFinder::theSCPosition_
GlobalPoint theSCPosition_
Definition: ConversionSeedFinder.h:87
ConversionSeedFinder::thePropagatorAlongMomentum_
const Propagator * thePropagatorAlongMomentum_
Definition: ConversionSeedFinder.h:110
ConversionSeedFinder::getMeasurementTracker
const MeasurementTracker * getMeasurementTracker() const
Definition: ConversionSeedFinder.h:65
ConversionSeedFinder::theSeeds_
TrajectorySeedCollection theSeeds_
Definition: ConversionSeedFinder.h:86
get
#define get
ConversionSeedFinder::measurementTrkToken_
edm::EDGetTokenT< MeasurementTrackerEvent > measurementTrkToken_
Definition: ConversionSeedFinder.h:98
ConversionSeedFinder::theGeomSearchTracker_
edm::ESHandle< GeometricSearchTracker > theGeomSearchTracker_
Definition: ConversionSeedFinder.h:95
ConversionSeedFinder::trackStateFromClusters
FreeTrajectoryState trackStateFromClusters(int aCharge, const GlobalPoint &gpOrigine, PropagationDirection dir, float scaleFactor) const
Definition: ConversionSeedFinder.cc:70
ConversionSeedFinder::theTrackerGeom_
const TrackingGeometry * theTrackerGeom_
Definition: ConversionSeedFinder.h:91
FreeTrajectoryState
Definition: FreeTrajectoryState.h:27
multiplicitycorr_cfi.scaleFactor
scaleFactor
Definition: multiplicitycorr_cfi.py:7
ConversionSeedFinder::theNavigationSchool_
const NavigationSchool * theNavigationSchool_
Definition: ConversionSeedFinder.h:92
ConversionSeedFinder::theLayerList_
std::vector< const DetLayer * > theLayerList_
Definition: ConversionSeedFinder.h:105
AlgebraicSymMatrix55
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
Definition: AlgebraicROOTObjects.h:23
PV3DBase::perp
T perp() const
Definition: PV3DBase.h:69
alongMomentum
Definition: PropagationDirection.h:4
ConversionSeedFinder::theMeasurementTracker_
const MeasurementTracker * theMeasurementTracker_
Definition: ConversionSeedFinder.h:90
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
TrackingComponentsRecord
Definition: TrackingComponentsRecord.h:12