CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
TrajectorySeedProducer Class Reference

#include <TrajectorySeedProducer.h>

Inheritance diagram for TrajectorySeedProducer:
edm::stream::EDProducer<> edm::stream::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

virtual void beginRun (edm::Run const &run, const edm::EventSetup &es)
 
bool compatibleWithBeamSpot (const GlobalPoint &gpos1, const GlobalPoint &gpos2, double error, bool forward) const
 
bool compatibleWithPrimaryVertex (const GlobalPoint &gpos1, const GlobalPoint &gpos2, double error, bool forward) const
 
const SeedingNode
< TrackingLayer > * 
insertHit (const std::vector< TrajectorySeedHitCandidate > &trackerRecHits, std::vector< int > &hitIndicesInTree, const SeedingNode< TrackingLayer > *node, unsigned int trackerHit) const
 method inserts hit into the tree structure at an empty position. More...
 
bool isHitOnLayer (const TrajectorySeedHitCandidate &trackerRecHit, const TrackingLayer &layer) const
 
virtual std::vector< unsigned int > iterateHits (unsigned int start, const std::vector< TrajectorySeedHitCandidate > &trackerRecHits, std::vector< int > hitIndicesInTree, bool processSkippedHits) const
 method tries to insert all hits into the tree structure. More...
 
bool pass2HitsCuts (const TrajectorySeedHitCandidate &hit1, const TrajectorySeedHitCandidate &hit2) const
 
bool passHitTuplesCuts (const SeedingNode< TrackingLayer > &seedingNode, const std::vector< TrajectorySeedHitCandidate > &trackerRecHits, const std::vector< int > &hitIndicesInTree, const TrajectorySeedHitCandidate &currentTrackerHit) const
 method checks if a TrajectorySeedHitCandidate fulfills the quality requirements. More...
 
virtual bool passSimTrackQualityCuts (const SimTrack &theSimTrack, const SimVertex &theSimVertex) const
 method checks if a SimTrack fulfills the quality requirements. More...
 
virtual void produce (edm::Event &e, const edm::EventSetup &es)
 
 TrajectorySeedProducer (const edm::ParameterSet &conf)
 
virtual ~TrajectorySeedProducer ()
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
- Public Member Functions inherited from edm::stream::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducerBase ()
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Attributes

SeedingTree< TrackingLayer_seedingTree
 
const reco::BeamSpotbeamSpot
 
edm::EDGetTokenT< reco::BeamSpotbeamSpotToken
 
const MagneticFieldmagneticField
 
const MagneticFieldMapmagneticFieldMap
 
unsigned int minLayersCrossed
 
double nSigmaZ
 
double originHalfLength
 
double originRadius
 
const reco::VertexCollectionprimaryVertices
 
double ptMin
 
edm::EDGetTokenT
< SiTrackerGSMatchedRecHit2DCollection
recHitToken
 
edm::EDGetTokenT
< reco::VertexCollection
recoVertexToken
 
std::vector< std::vector
< TrackingLayer > > 
seedingLayers
 
double simTrack_maxD0
 
double simTrack_maxZ0
 
double simTrack_pTMin
 
edm::EDGetTokenT
< edm::SimTrackContainer
simTrackToken
 
edm::EDGetTokenT
< edm::SimVertexContainer
simVertexToken
 
std::vector< edm::EDGetTokenT
< std::vector< unsigned int > > > 
skipSimTrackIdTokens
 
bool testBeamspotCompatibility
 
bool testPrimaryVertexCompatibility
 
std::shared_ptr
< PropagatorWithMaterial
thePropagator
 
const TrackerGeometrytrackerGeometry
 
const TrackerTopologytrackerTopology
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T...> CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T...> HasAbility
 
typedef
CacheTypes::LuminosityBlockCache 
LuminosityBlockCache
 
typedef
LuminosityBlockContextT
< LuminosityBlockCache,
RunCache, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDProducerBase
typedef EDProducerAdaptorBase ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::stream::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Definition at line 36 of file TrajectorySeedProducer.h.

Constructor & Destructor Documentation

TrajectorySeedProducer::TrajectorySeedProducer ( const edm::ParameterSet conf)

Definition at line 43 of file TrajectorySeedProducer.cc.

References _seedingTree, HLT_25ns14e33_v1_cff::beamSpotTag, beamSpotToken, edm::EDConsumerBase::consumes(), TrackingLayer::createFromString(), edm::hlt::Exception, edm::ParameterSet::getParameter(), HLT_25ns14e33_v1_cff::InputTag, SeedingTree< DATA >::insert(), relval_steps::k, edm::InputTag::label(), geometryCSVtoXML::line, minLayersCrossed, nSigmaZ, originHalfLength, originRadius, ptMin, recHitToken, recoVertexToken, seedingLayers, simTrack_maxD0, simTrack_maxZ0, simTrack_pTMin, simTrackToken, simVertexToken, skipSimTrackIdTokens, AlCaHLTBitMon_QueryRunRegistry::string, testBeamspotCompatibility, and testPrimaryVertexCompatibility.

43  :
44  magneticField(nullptr),
45  magneticFieldMap(nullptr),
46  trackerGeometry(nullptr),
47  trackerTopology(nullptr),
49  beamSpot(nullptr),
51  primaryVertices(nullptr)
52 {
53  // The name of the TrajectorySeed Collection
54  produces<TrajectorySeedCollection>();
55 
56 
57 
58  const edm::ParameterSet& simTrackSelectionConfig = conf.getParameter<edm::ParameterSet>("simTrackSelection");
59  // The smallest pT,dxy,dz for a simtrack
60  simTrack_pTMin = simTrackSelectionConfig.getParameter<double>("pTMin");
61  simTrack_maxD0 = simTrackSelectionConfig.getParameter<double>("maxD0");
62  simTrack_maxZ0 = simTrackSelectionConfig.getParameter<double>("maxZ0");
63  //simtracks to skip (were processed in previous iterations)
64  std::vector<edm::InputTag> skipSimTrackTags = simTrackSelectionConfig.getParameter<std::vector<edm::InputTag> >("skipSimTrackIds");
65 
66  for ( unsigned int k=0; k<skipSimTrackTags.size(); ++k)
67  {
68  skipSimTrackIdTokens.push_back(consumes<std::vector<unsigned int> >(skipSimTrackTags[k]));
69  }
70 
71 
72  // The smallest number of hits for a track candidate
73  minLayersCrossed = conf.getParameter<unsigned int>("minLayersCrossed");
74 
76  if (beamSpotTag.label()!="")
77  {
79  beamSpotToken = consumes<reco::BeamSpot>(beamSpotTag);
80  }
81  edm::InputTag primaryVertexTag = conf.getParameter<edm::InputTag>("primaryVertex");
82  if (primaryVertexTag.label()!="")
83  {
85  recoVertexToken=consumes<reco::VertexCollection>(primaryVertexTag);
86  }
87 
88  //make sure that only one test is performed
90  {
91  throw cms::Exception("FastSimulation/Tracking/TrajectorySeedProducer: bad configuration","Either 'beamSpot' or 'primaryVertex' compatiblity should be configured; not both");
92  }
93 
94  // The name of the hit producer
95  edm::InputTag recHitTag = conf.getParameter<edm::InputTag>("recHits");
96  recHitToken = consumes<SiTrackerGSMatchedRecHit2DCollection>(recHitTag);
97 
98  // read Layers
99  std::vector<std::string> layerStringList = conf.getParameter<std::vector<std::string>>("layerList");
100  for(auto it=layerStringList.cbegin(); it < layerStringList.cend(); ++it)
101  {
102  std::vector<TrackingLayer> trackingLayerList;
103  std::string line = *it;
105  while (pos != std::string::npos)
106  {
107  pos=line.find("+");
108  std::string layer = line.substr(0, pos);
110 
111  trackingLayerList.push_back(layerSpec);
112  line=line.substr(pos+1,std::string::npos);
113  }
114  _seedingTree.insert(trackingLayerList);
115  seedingLayers.push_back(std::move(trackingLayerList));
116  }
117 
118  originRadius = conf.getParameter<double>("originRadius");
119  originHalfLength = conf.getParameter<double>("originHalfLength");
120  ptMin = conf.getParameter<double>("ptMin");
121  nSigmaZ = conf.getParameter<double>("nSigmaZ");
122 
123  //make sure that only one cut is configured
124  if (originHalfLength>=0 && nSigmaZ>=0)
125  {
126  throw cms::Exception("FastSimulation/Tracking/TrajectorySeedProducer: bad configuration","Either 'originHalfLength' or 'nSigmaZ' selection should be configured; not both. Deactivate one (or both) by setting it to <0.");
127  }
128 
129  //make sure that performance cuts are not interfering with selection on reconstruction
130  if ((ptMin>=0 && simTrack_pTMin>=0) && (ptMin<simTrack_pTMin))
131  {
132  throw cms::Exception("FastSimulation/Tracking/TrajectorySeedProducer: bad configuration","Performance cut on SimTrack pT is tighter than cut on pT estimate from seed.");
133  }
134  if ((originHalfLength>=0 && simTrack_maxZ0>=0) && (originHalfLength>simTrack_maxZ0))
135  {
136  throw cms::Exception("FastSimulation/Tracking/TrajectorySeedProducer: bad configuration","Performance cut on SimTrack dz is tighter than cut on dz estimate from seed.");
137  }
138  if ((originRadius>=0 && simTrack_maxD0>=0) && (originRadius>simTrack_maxD0))
139  {
140  throw cms::Exception("FastSimulation/Tracking/TrajectorySeedProducer: bad configuration","Performance cut on SimTrack dxy is tighter than cut on dxy estimate from seed.");
141  }
142  simTrackToken = consumes<edm::SimTrackContainer>(edm::InputTag("famosSimHits"));
143  simVertexToken = consumes<edm::SimVertexContainer>(edm::InputTag("famosSimHits"));
144 }
T getParameter(std::string const &) const
const MagneticField * magneticField
uint16_t size_type
edm::EDGetTokenT< SiTrackerGSMatchedRecHit2DCollection > recHitToken
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
const reco::BeamSpot * beamSpot
std::vector< edm::EDGetTokenT< std::vector< unsigned int > > > skipSimTrackIdTokens
bool insert(const std::vector< DATA > &dataList)
Definition: SeedingTree.h:179
const TrackerTopology * trackerTopology
const reco::VertexCollection * primaryVertices
static TrackingLayer createFromString(std::string layerSpecification)
edm::EDGetTokenT< edm::SimVertexContainer > simVertexToken
edm::EDGetTokenT< edm::SimTrackContainer > simTrackToken
std::vector< std::vector< TrackingLayer > > seedingLayers
std::string const & label() const
Definition: InputTag.h:43
edm::EDGetTokenT< reco::VertexCollection > recoVertexToken
const TrackerGeometry * trackerGeometry
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken
SeedingTree< TrackingLayer > _seedingTree
const MagneticFieldMap * magneticFieldMap
virtual TrajectorySeedProducer::~TrajectorySeedProducer ( )
inlinevirtual

Definition at line 78 of file TrajectorySeedProducer.h.

79  {
80  }

Member Function Documentation

void TrajectorySeedProducer::beginRun ( edm::Run const &  run,
const edm::EventSetup es 
)
virtual

Reimplemented from edm::stream::EDProducerBase.

Definition at line 147 of file TrajectorySeedProducer.cc.

References alongMomentum, edm::EventSetup::get(), magneticField, magneticFieldMap, thePropagator, trackerGeometry, and trackerTopology.

148 {
149  edm::ESHandle<MagneticField> magneticFieldHandle;
150  edm::ESHandle<TrackerGeometry> trackerGeometryHandle;
151  edm::ESHandle<MagneticFieldMap> magneticFieldMapHandle;
152  edm::ESHandle<TrackerTopology> trackerTopologyHandle;
153 
154  es.get<IdealMagneticFieldRecord>().get(magneticFieldHandle);
155  es.get<TrackerDigiGeometryRecord>().get(trackerGeometryHandle);
156  es.get<MagneticFieldMapRecord>().get(magneticFieldMapHandle);
157  es.get<TrackerTopologyRcd>().get(trackerTopologyHandle);
158 
159  magneticField = &(*magneticFieldHandle);
160  trackerGeometry = &(*trackerGeometryHandle);
161  magneticFieldMap = &(*magneticFieldMapHandle);
162  trackerTopology = &(*trackerTopologyHandle);
163 
164  thePropagator = std::make_shared<PropagatorWithMaterial>(alongMomentum,0.105,magneticField);
165 }
const MagneticField * magneticField
const TrackerTopology * trackerTopology
const T & get() const
Definition: EventSetup.h:55
const TrackerGeometry * trackerGeometry
std::shared_ptr< PropagatorWithMaterial > thePropagator
const MagneticFieldMap * magneticFieldMap
bool TrajectorySeedProducer::compatibleWithBeamSpot ( const GlobalPoint gpos1,
const GlobalPoint gpos2,
double  error,
bool  forward 
) const

Check that the seed is compatible with a track coming from within a cylinder of radius originRadius, with a decent pT.

Definition at line 533 of file TrajectorySeedProducer.cc.

References beamSpot, magneticFieldMap, bookConverter::max, nSigmaZ, originHalfLength, originRadius, reco::BeamSpot::position(), BaseParticlePropagator::propagateToBeamCylinder(), ptMin, reco::BeamSpot::sigmaZ(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), PV3DBase< T, PVType, FrameType >::z(), and RawParticle::Z().

Referenced by pass2HitsCuts().

539 {
540 
541  // The hits 1 and 2 positions, in HepLorentzVector's
542  XYZTLorentzVector thePos1(gpos1.x(),gpos1.y(),gpos1.z(),0.);
543  XYZTLorentzVector thePos2(gpos2.x(),gpos2.y(),gpos2.z(),0.);
544 
545  // create a particle with following properties
546  // - charge = +1
547  // - vertex at second rechit
548  // - momentum direction: from first to second rechit
549  // - magnitude of momentum: nonsense (distance between 1st and 2nd rechit)
550  ParticlePropagator myPart(thePos2 - thePos1,thePos2,1.,magneticFieldMap);
551 
552  /*
553  propagateToBeamCylinder does the following
554  - check there exists a track through the 2 hits and through a
555  cylinder with radius "originRadius" centered around the CMS axis
556  - if such tracks exists, pick the one with maximum pt
557  - track vertex z coordinate is z coordinate of closest approach of
558  track to (x,y) = (0,0)
559  - the particle gets the charge that allows the highest pt
560  */
561  if (originRadius>0)
562  {
563  bool intersect = myPart.propagateToBeamCylinder(thePos1,originRadius*1.);
564  if ( !intersect )
565  {
566  return false;
567  }
568  }
569 
570  // Check if the constraints are satisfied
571  // 1. pT at cylinder with radius originRadius
572  if ((ptMin>0) && ( myPart.Pt() < ptMin ))
573  {
574  return false;
575  }
576  // 2. Z compatible with beam spot size
577  // in constuctur only one of originHalfLength,nSigmaZ is allowed to be >= 0
578  double zConstraint = std::max(originHalfLength,beamSpot->sigmaZ()*nSigmaZ);
579  if ((zConstraint>0) && ( fabs(myPart.Z()-beamSpot->position().Z()) > zConstraint ))
580  {
581  return false;
582  }
583  return true;
584 }
T y() const
Definition: PV3DBase.h:63
const reco::BeamSpot * beamSpot
T z() const
Definition: PV3DBase.h:64
double sigmaZ() const
sigma z
Definition: BeamSpot.h:80
const Point & position() const
position
Definition: BeamSpot.h:62
T x() const
Definition: PV3DBase.h:62
const MagneticFieldMap * magneticFieldMap
math::XYZTLorentzVector XYZTLorentzVector
Definition: RawParticle.h:15
bool TrajectorySeedProducer::compatibleWithPrimaryVertex ( const GlobalPoint gpos1,
const GlobalPoint gpos2,
double  error,
bool  forward 
) const

Check that the seed is compatible with a track coming from within a cylinder of radius originRadius, with a decent pT.

Definition at line 587 of file TrajectorySeedProducer.cc.

References relativeConstraints::error, bookConverter::max, min(), nSigmaZ, originHalfLength, primaryVertices, mathSSE::sqrt(), PV3DBase< T, PVType, FrameType >::x(), reco::Vertex::x(), PV3DBase< T, PVType, FrameType >::y(), reco::Vertex::y(), PV3DBase< T, PVType, FrameType >::z(), reco::Vertex::z(), and reco::Vertex::zError().

Referenced by pass2HitsCuts().

593 {
594 
595  unsigned int nVertices = primaryVertices->size();
596  if ( nVertices==0 || ((originHalfLength < 0.0) && (nSigmaZ < 0.0)))
597  {
598  return true;
599  }
600 
601  // Loop on primary vertices
602  for ( unsigned iv=0; iv<nVertices; ++iv )
603  {
604  // Z position of the primary vertex
605  const reco::Vertex& vertex = (*primaryVertices)[iv];
606 
607  double xV = vertex.x();
608  double yV = vertex.y();
609  double zV = vertex.z();
610 
611  // Radii of the two hits with respect to the vertex position
612  double R1 = std::sqrt ( (gpos1.x()-xV)*(gpos1.x()-xV) + (gpos1.y()-yV)*(gpos1.y()-yV) );
613  double R2 = std::sqrt ( (gpos2.x()-xV)*(gpos2.x()-xV) + (gpos2.y()-yV)*(gpos2.y()-yV) );
614 
615  double zConstraint = std::max(originHalfLength,vertex.zError()*nSigmaZ);
616  //inner hit must be within a sort of pyramid using
617  //the outer hit and the cylinder around the PV
618  double checkRZ1 = forward ?
619  (gpos1.z()-zV+zConstraint) / (gpos2.z()-zV+zConstraint) * R2 :
620  -zConstraint + R1/R2*(gpos2.z()-zV+zConstraint);
621  double checkRZ2 = forward ?
622  (gpos1.z()-zV-zConstraint)/(gpos2.z()-zV-zConstraint) * R2 :
623  +zConstraint + R1/R2*(gpos2.z()-zV-zConstraint);
624  double checkRZmin = std::min(checkRZ1,checkRZ2)-3.*error;
625  double checkRZmax = std::max(checkRZ1,checkRZ2)+3.*error;
626  // Check if the innerhit is within bounds
627  bool compatible = forward ?
628  checkRZmin < R1 && R1 < checkRZmax :
629  checkRZmin < gpos1.z()-zV && gpos1.z()-zV < checkRZmax;
630  // If it is, just return ok
631  if ( compatible )
632  {
633  return compatible;
634  }
635  }
636  // Otherwise, return not ok
637  return false;
638 
639 }
double zError() const
error on z
Definition: Vertex.h:118
double y() const
y coordinate
Definition: Vertex.h:110
T y() const
Definition: PV3DBase.h:63
T sqrt(T t)
Definition: SSEVec.h:48
const reco::VertexCollection * primaryVertices
T z() const
Definition: PV3DBase.h:64
double z() const
y coordinate
Definition: Vertex.h:112
T min(T a, T b)
Definition: MathUtil.h:58
double x() const
x coordinate
Definition: Vertex.h:108
T x() const
Definition: PV3DBase.h:62
const SeedingNode< TrackingLayer > * TrajectorySeedProducer::insertHit ( const std::vector< TrajectorySeedHitCandidate > &  trackerRecHits,
std::vector< int > &  hitIndicesInTree,
const SeedingNode< TrackingLayer > *  node,
unsigned int  trackerHit 
) const

method inserts hit into the tree structure at an empty position.

Parameters
trackerRecHitslist of all TrackerRecHits.
hitIndicesInTreehit indices which translates the tree node to the hits in trackerRecHits. Empty positions are identified with '-1'.
nodewhere to look for an empty position. Important for recursive tree traversing (Breadth-first). Starts with the root.
trackerHithit which is tested.
Returns
pointer if this hit is inserted at a leaf which means that a seed has been found. Returns 'nullptr' otherwise.

Definition at line 253 of file TrajectorySeedProducer.cc.

References SeedingNode< DATA >::getChild(), SeedingNode< DATA >::getChildrenSize(), SeedingNode< DATA >::getData(), SeedingNode< DATA >::getIndex(), SeedingNode< DATA >::getParent(), isHitOnLayer(), python.Node::node, passHitTuplesCuts(), and fileCollector::seed.

Referenced by iterateHits().

258 {
259  if (!node->getParent() || hitIndicesInTree[node->getParent()->getIndex()]>=0)
260  {
261  if (hitIndicesInTree[node->getIndex()]<0)
262  {
263  const TrajectorySeedHitCandidate& currentTrackerHit = trackerRecHits[trackerHit];
264  if (!isHitOnLayer(currentTrackerHit,node->getData()))
265  {
266  return nullptr;
267  }
268  if (!passHitTuplesCuts(*node,trackerRecHits,hitIndicesInTree,currentTrackerHit))
269  {
270  return nullptr;
271  }
272  hitIndicesInTree[node->getIndex()]=trackerHit;
273  if (node->getChildrenSize()==0)
274  {
275  return node;
276  }
277  return nullptr;
278  }
279  else
280  {
281  for (unsigned int ichild = 0; ichild<node->getChildrenSize(); ++ichild)
282  {
283  const SeedingNode<TrackingLayer>* seed = insertHit(trackerRecHits,hitIndicesInTree,node->getChild(ichild),trackerHit);
284  if (seed)
285  {
286  return seed;
287  }
288  }
289  }
290  }
291  return nullptr;
292 }
bool passHitTuplesCuts(const SeedingNode< TrackingLayer > &seedingNode, const std::vector< TrajectorySeedHitCandidate > &trackerRecHits, const std::vector< int > &hitIndicesInTree, const TrajectorySeedHitCandidate &currentTrackerHit) const
method checks if a TrajectorySeedHitCandidate fulfills the quality requirements.
const DATA & getData() const
Definition: SeedingTree.h:136
unsigned int getChildrenSize() const
Definition: SeedingTree.h:121
tuple node
Definition: Node.py:50
const SeedingNode * getParent() const
Definition: SeedingTree.h:112
bool isHitOnLayer(const TrajectorySeedHitCandidate &trackerRecHit, const TrackingLayer &layer) const
const SeedingNode< TrackingLayer > * insertHit(const std::vector< TrajectorySeedHitCandidate > &trackerRecHits, std::vector< int > &hitIndicesInTree, const SeedingNode< TrackingLayer > *node, unsigned int trackerHit) const
method inserts hit into the tree structure at an empty position.
unsigned int getIndex() const
Definition: SeedingTree.h:107
const SeedingNode< DATA > * getChild(unsigned int ichild) const
Definition: SeedingTree.h:126
bool TrajectorySeedProducer::isHitOnLayer ( const TrajectorySeedHitCandidate trackerRecHit,
const TrackingLayer layer 
) const
inline

Definition at line 162 of file TrajectorySeedProducer.h.

References TrajectorySeedHitCandidate::getTrackingLayer().

Referenced by insertHit().

163  {
164  return layer==trackerRecHit.getTrackingLayer();
165  }
const TrackingLayer & getTrackingLayer() const
std::vector< unsigned int > TrajectorySeedProducer::iterateHits ( unsigned int  start,
const std::vector< TrajectorySeedHitCandidate > &  trackerRecHits,
std::vector< int >  hitIndicesInTree,
bool  processSkippedHits 
) const
virtual

method tries to insert all hits into the tree structure.

Parameters
startindex where to begin insertion. Important for recursion.
trackerRecHitslist of all TrackerRecHits.
hitIndicesInTreehit indices which translates the tree node to the hits in trackerRecHits.
currentTrackerHithit which is tested.
Returns
list of hit indices which form a found seed. Returns empty list if no seed was found.

Definition at line 295 of file TrajectorySeedProducer.cc.

References _seedingTree, SeedingNode< DATA >::getDepth(), SeedingNode< DATA >::getIndex(), SeedingNode< DATA >::getParent(), SeedingTree< DATA >::getRoot(), insertHit(), and SeedingTree< DATA >::numberOfRoots().

Referenced by produce().

301 {
302  for (unsigned int irecHit = start; irecHit<trackerRecHits.size(); ++irecHit)
303  {
304  unsigned int currentHitIndex=irecHit;
305 
306  for (unsigned int inext=currentHitIndex+1; inext< trackerRecHits.size(); ++inext)
307  {
308  //if multiple hits are on the same layer -> follow all possibilities by recusion
309  if (trackerRecHits[currentHitIndex].getTrackingLayer()==trackerRecHits[inext].getTrackingLayer())
310  {
311  if (processSkippedHits)
312  {
313  //recusively call the method again with hit 'inext' but skip all following on the same layer though 'processSkippedHits=false'
314  std::vector<unsigned int> seedHits = iterateHits(
315  inext,
316  trackerRecHits,
317  hitIndicesInTree,
318  false
319  );
320  if (seedHits.size()>0)
321  {
322  return seedHits;
323  }
324  }
325  irecHit+=1;
326  }
327  else
328  {
329  break;
330  }
331  }
332 
333  processSkippedHits=true;
334 
335  const SeedingNode<TrackingLayer>* seedNode = nullptr;
336  for (unsigned int iroot=0; seedNode==nullptr && iroot<_seedingTree.numberOfRoots(); ++iroot)
337  {
338  seedNode=insertHit(trackerRecHits,hitIndicesInTree,_seedingTree.getRoot(iroot), currentHitIndex);
339  }
340  if (seedNode)
341  {
342  std::vector<unsigned int> seedIndices(seedNode->getDepth()+1);
343  while (seedNode)
344  {
345  seedIndices[seedNode->getDepth()]=hitIndicesInTree[seedNode->getIndex()];
346  seedNode=seedNode->getParent();
347  }
348  return seedIndices;
349  }
350 
351  }
352 
353  return std::vector<unsigned int>();
354 
355 }
tuple start
Check for commandline option errors.
Definition: dqm_diff.py:58
unsigned int getDepth() const
Definition: SeedingTree.h:84
const SeedingNode * getParent() const
Definition: SeedingTree.h:112
unsigned int numberOfRoots() const
Definition: SeedingTree.h:222
virtual std::vector< unsigned int > iterateHits(unsigned int start, const std::vector< TrajectorySeedHitCandidate > &trackerRecHits, std::vector< int > hitIndicesInTree, bool processSkippedHits) const
method tries to insert all hits into the tree structure.
const SeedingNode< DATA > * getRoot(unsigned int i) const
Definition: SeedingTree.h:232
const SeedingNode< TrackingLayer > * insertHit(const std::vector< TrajectorySeedHitCandidate > &trackerRecHits, std::vector< int > &hitIndicesInTree, const SeedingNode< TrackingLayer > *node, unsigned int trackerHit) const
method inserts hit into the tree structure at an empty position.
unsigned int getIndex() const
Definition: SeedingTree.h:107
SeedingTree< TrackingLayer > _seedingTree
bool TrajectorySeedProducer::pass2HitsCuts ( const TrajectorySeedHitCandidate hit1,
const TrajectorySeedHitCandidate hit2 
) const

Definition at line 231 of file TrajectorySeedProducer.cc.

References compatibleWithBeamSpot(), compatibleWithPrimaryVertex(), relativeConstraints::error, TrajectorySeedHitCandidate::globalPosition(), TrajectorySeedHitCandidate::isForward(), TrajectorySeedHitCandidate::largerError(), mathSSE::sqrt(), testBeamspotCompatibility, and testPrimaryVertexCompatibility.

Referenced by passHitTuplesCuts().

232 {
233 
234  const GlobalPoint& globalHitPos1 = hit1.globalPosition();
235  const GlobalPoint& globalHitPos2 = hit2.globalPosition();
236  bool forward = hit1.isForward(); // true if hit is in endcap, false = barrel
237  double error = std::sqrt(hit1.largerError()+hit2.largerError());
239  {
240  return compatibleWithBeamSpot(globalHitPos1,globalHitPos2,error,forward);
241  }
243  {
244  return compatibleWithPrimaryVertex(globalHitPos1,globalHitPos2,error,forward);
245  }
246  else
247  {
248  return true;
249  }
250 
251 }
bool compatibleWithBeamSpot(const GlobalPoint &gpos1, const GlobalPoint &gpos2, double error, bool forward) const
bool isForward() const
Is it a forward hit ?
GlobalPoint globalPosition() const
The global position.
T sqrt(T t)
Definition: SSEVec.h:48
bool compatibleWithPrimaryVertex(const GlobalPoint &gpos1, const GlobalPoint &gpos2, double error, bool forward) const
bool TrajectorySeedProducer::passHitTuplesCuts ( const SeedingNode< TrackingLayer > &  seedingNode,
const std::vector< TrajectorySeedHitCandidate > &  trackerRecHits,
const std::vector< int > &  hitIndicesInTree,
const TrajectorySeedHitCandidate currentTrackerHit 
) const
inline

method checks if a TrajectorySeedHitCandidate fulfills the quality requirements.

Parameters
seedingNodetree node at which the hit will be inserted.
trackerRecHitslist of all TrackerRecHits.
hitIndicesInTreehit indices which translates the tree node to the hits in trackerRecHits.
currentTrackerHithit which is tested.
Returns
true if a hit fulfills the requirements.

Definition at line 101 of file TrajectorySeedProducer.h.

References SeedingNode< DATA >::getDepth(), SeedingNode< DATA >::getIndex(), SeedingNode< DATA >::getParent(), and pass2HitsCuts().

Referenced by insertHit().

107  {
108  switch (seedingNode.getDepth())
109  {
110  case 0:
111  {
112  return true;
113  /* example for 1 hits
114  const TrajectorySeedHitCandidate& hit1 = currentTrackerHit;
115  return pass1HitsCuts(hit1,trackingAlgorithmId);
116  */
117  }
118 
119  case 1:
120  {
121  const SeedingNode<TrackingLayer>* parentNode = &seedingNode;
122  parentNode = parentNode->getParent();
123  const TrajectorySeedHitCandidate& hit1 = trackerRecHits[hitIndicesInTree[parentNode->getIndex()]];
124  const TrajectorySeedHitCandidate& hit2 = currentTrackerHit;
125 
126  return pass2HitsCuts(hit1,hit2);
127  }
128  case 2:
129  {
130  return true;
131  /* example for 3 hits
132  const SeedingNode<LayerSpec>* parentNode = &seedingNode;
133  parentNode = parentNode->getParent();
134  const TrajectorySeedHitCandidate& hit2 = trackerRecHits[hitIndicesInTree[parentNode->getIndex()]];
135  parentNode = parentNode->getParent();
136  const TrajectorySeedHitCandidate& hit1 = trackerRecHits[hitIndicesInTree[parentNode->getIndex()]];
137  const TrajectorySeedHitCandidate& hit3 = currentTrackerHit;
138  return pass3HitsCuts(hit1,hit2,hit3,trackingAlgorithmId);
139  */
140  }
141  }
142  return true;
143  }
unsigned int getDepth() const
Definition: SeedingTree.h:84
const SeedingNode * getParent() const
Definition: SeedingTree.h:112
bool pass2HitsCuts(const TrajectorySeedHitCandidate &hit1, const TrajectorySeedHitCandidate &hit2) const
unsigned int getIndex() const
Definition: SeedingTree.h:107
bool TrajectorySeedProducer::passSimTrackQualityCuts ( const SimTrack theSimTrack,
const SimVertex theSimVertex 
) const
virtual

method checks if a SimTrack fulfills the quality requirements.

Parameters
theSimTrackthe SimTrack to be tested.
theSimVertexthe associated SimVertex of the SimTrack.
Returns
true if a track fulfills the requirements.

Definition at line 168 of file TrajectorySeedProducer.cc.

References beamSpot, CoreSimTrack::charge(), i, CoreSimTrack::momentum(), CoreSimVertex::position(), reco::BeamSpot::position(), position, primaryVertices, RawParticle::setCharge(), simTrack_maxD0, simTrack_maxZ0, simTrack_pTMin, testBeamspotCompatibility, testPrimaryVertexCompatibility, X, BaseParticlePropagator::xyImpactParameter(), Gflash::Z, and BaseParticlePropagator::zImpactParameter().

Referenced by produce().

169 {
170  //require min pT of the simtrack
171  if ((simTrack_pTMin>0) && ( theSimTrack.momentum().Perp2() < simTrack_pTMin*simTrack_pTMin))
172  {
173  return false;
174  }
176  {
177  return true;
178  }
179 
180  //require impact parameter of the simtrack
182  RawParticle(
184  theSimTrack.momentum().px(),
185  theSimTrack.momentum().py(),
186  theSimTrack.momentum().pz(),
187  theSimTrack.momentum().e()
188  ),
190  theSimVertex.position().x(),
191  theSimVertex.position().y(),
192  theSimVertex.position().z(),
193  theSimVertex.position().t())
194  ),
195  0.,0.,4.
196  );
197  theParticle.setCharge(theSimTrack.charge());
198 
199 
200  //this are just some cuts on the SimTrack for speed up
201  std::vector<const math::XYZPoint*> origins;
203  {
204  origins.push_back(&beamSpot->position());
205  }
207  {
208  for (unsigned int iv = 0; iv < primaryVertices->size(); ++iv)
209  {
210  origins.push_back(&(*primaryVertices)[iv].position());
211  }
212  }
213 
214  //only one possible origin is required to succeed
215  for (unsigned int i = 0; i < origins.size(); ++i)
216  {
217  if ((simTrack_maxD0>0.0) && ( theParticle.xyImpactParameter(origins[i]->X(),origins[i]->Y()) > simTrack_maxD0 ))
218  {
219  continue;
220  }
221  if ((simTrack_maxZ0>0.0) && ( fabs( theParticle.zImpactParameter(origins[i]->X(),origins[i]->Y()) - origins[i]->Z()) > simTrack_maxZ0))
222  {
223  continue;
224  }
225  return true;
226  }
227  return false;
228 }
const double Z[kNumberCalorimeter]
void setCharge(float q)
set the MEASURED charge
Definition: RawParticle.cc:139
int i
Definition: DBlmapReader.cc:9
double zImpactParameter(double x0=0, double y0=0.) const
Longitudinal impact parameter.
#define X(str)
Definition: MuonsGrabber.cc:48
float charge() const
charge
Definition: CoreSimTrack.cc:18
const reco::BeamSpot * beamSpot
const reco::VertexCollection * primaryVertices
const math::XYZTLorentzVectorD & position() const
Definition: CoreSimVertex.h:26
const math::XYZTLorentzVectorD & momentum() const
Definition: CoreSimTrack.h:22
static int position[264][3]
Definition: ReadPGInfo.cc:509
const Point & position() const
position
Definition: BeamSpot.h:62
double xyImpactParameter(double x0=0., double y0=0.) const
Transverse impact parameter.
math::XYZTLorentzVector XYZTLorentzVector
Definition: RawParticle.h:15
void TrajectorySeedProducer::produce ( edm::Event e,
const edm::EventSetup es 
)
virtual

should check if corresponds to m

Implements edm::stream::EDProducerBase.

Definition at line 358 of file TrajectorySeedProducer.cc.

References _seedingTree, alongMomentum, edm::OwnVector< T, P >::back(), beamSpot, beamSpotToken, CoreSimTrack::charge(), TrackingRecHit::clone(), TrackingRecHit::geographicalId(), edm::Event::getByToken(), SeedingTree< DATA >::getSingleSet(), TrajectorySeedHitCandidate::getTrackingLayer(), TrajectoryStateOnSurface::globalMomentum(), TrackingRecHit::hit(), i, TrackerGeometry::idToDet(), TrajectorySeedHitCandidate::isOnTheSameLayer(), TrajectoryStateOnSurface::isValid(), iterateHits(), j, relval_steps::k, TrajectoryStateOnSurface::localError(), TrajectoryStateOnSurface::localParameters(), contentValuesFiles::m, magneticField, LocalTrajectoryError::matrix(), minLayersCrossed, CoreSimTrack::momentum(), SeedingTree< DATA >::numberOfNodes(), convertSQLitetoXML_cfg::output, passSimTrackQualityCuts(), PV3DBase< T, PVType, FrameType >::perp(), position, primaryVertices, edm::Handle< T >::product(), edm::OwnVector< T, P >::push_back(), edm::Event::put(), DetId::rawId(), HLT_50ns_5e33_v3_cff::recHits, recHitToken, recoVertexToken, simTrackToken, simVertexToken, skipSimTrackIdTokens, GeomDetEnumerators::subDetId, GeomDet::surface(), TrajectoryStateOnSurface::surfaceSide(), testBeamspotCompatibility, testPrimaryVertexCompatibility, thePropagator, trackerGeometry, trackerTopology, SimTrack::vertIndex(), x, y, and z.

Referenced by JSONExport.JsonExport::export(), HTMLExport.HTMLExport::export(), and HTMLExport.HTMLExportStatic::export().

359 {
360  PTrajectoryStateOnDet initialState;
361 
362  // the tracks to be skipped
363  std::unordered_set<unsigned int> skipSimTrackIds;
364  for ( unsigned int i=0; i<skipSimTrackIdTokens.size(); ++i )
365  {
366  edm::Handle<std::vector<unsigned int> > skipSimTrackIds_temp;
367  e.getByToken(skipSimTrackIdTokens[i],skipSimTrackIds_temp);
368  skipSimTrackIds.insert(skipSimTrackIds_temp->begin(),skipSimTrackIds_temp->end());
369  }
370  // Beam spot
372  {
373  edm::Handle<reco::BeamSpot> recoBeamSpotHandle;
374  e.getByToken(beamSpotToken,recoBeamSpotHandle);
375  beamSpot = recoBeamSpotHandle.product();
376  }
377 
378  // Primary vertices
380  {
382  e.getByToken(recoVertexToken,theRecVtx);
383  primaryVertices = theRecVtx.product();
384  }
385 
386  // SimTracks and SimVertices
388  e.getByToken(simTrackToken,theSimTracks);
389 
391  e.getByToken(simVertexToken,theSimVtx);
392 
393  // edm::Handle<SiTrackerGSRecHit2DCollection> theGSRecHits;
395  e.getByToken(recHitToken, theGSRecHits);
396 
397  std::auto_ptr<TrajectorySeedCollection> output{new TrajectorySeedCollection()};
398 
399  //if no hits -> directly write empty collection
400  if(theGSRecHits->size() == 0)
401  {
402  e.put(output);
403  return;
404  }
405  for (SiTrackerGSMatchedRecHit2DCollection::id_iterator itSimTrackId=theGSRecHits->id_begin(); itSimTrackId!=theGSRecHits->id_end(); ++itSimTrackId )
406  {
407 
408  const unsigned int currentSimTrackId = *itSimTrackId;
409 
410  if(skipSimTrackIds.find(currentSimTrackId)!=skipSimTrackIds.end())
411  {
412  continue;
413  }
414 
415  const SimTrack& theSimTrack = (*theSimTracks)[currentSimTrackId];
416 
417  int vertexIndex = theSimTrack.vertIndex();
418  if (vertexIndex<0)
419  {
420  //tracks are required to be associated to a vertex
421  continue;
422  }
423  const SimVertex& theSimVertex = (*theSimVtx)[vertexIndex];
424 
425  if (!this->passSimTrackQualityCuts(theSimTrack,theSimVertex))
426  {
427  continue;
428  }
429  SiTrackerGSMatchedRecHit2DCollection::range recHitRange = theGSRecHits->get(currentSimTrackId);
430 
431  TrajectorySeedHitCandidate previousTrackerHit;
432  TrajectorySeedHitCandidate currentTrackerHit;
433  unsigned int layersCrossed=0;
434 
435  std::vector<TrajectorySeedHitCandidate> trackerRecHits;
436  for (SiTrackerGSMatchedRecHit2DCollection::const_iterator itRecHit = recHitRange.first; itRecHit!=recHitRange.second; ++itRecHit)
437  {
438  const SiTrackerGSMatchedRecHit2D& vec = *itRecHit;
439  previousTrackerHit=currentTrackerHit;
440 
442 
443  if (!currentTrackerHit.isOnTheSameLayer(previousTrackerHit))
444  {
445  ++layersCrossed;
446  }
447  if (_seedingTree.getSingleSet().find(currentTrackerHit.getTrackingLayer())!=_seedingTree.getSingleSet().end())
448  {
449  //add only the hits which are actually on the requested layers
450  trackerRecHits.push_back(std::move(currentTrackerHit));
451  }
452  }
453 
454  if ( layersCrossed < minLayersCrossed)
455  {
456  continue;
457  }
458 
459  std::vector<int> hitIndicesInTree(_seedingTree.numberOfNodes(),-1);
460  //A SeedingNode is associated by its index to this list. The list stores the indices of the hits in 'trackerRecHits'
461  /* example
462  SeedingNode | hit index | hit
463  -------------------------------------------------------------------------------
464  index= 0: [BPix1] | hitIndicesInTree[0] (=1) | trackerRecHits[1]
465  index= 1: -- [BPix2] | hitIndicesInTree[1] (=3) | trackerRecHits[3]
466  index= 2: -- -- [BPix3] | hitIndicesInTree[2] (=4) | trackerRecHits[4]
467  index= 3: -- -- [FPix1_pos] | hitIndicesInTree[3] (=6) | trackerRecHits[6]
468  index= 4: -- -- [FPix1_neg] | hitIndicesInTree[4] (=7) | trackerRecHits[7]
469 
470  The implementation has been chosen such that the tree only needs to be build once upon construction.
471  */
472 
473  std::vector<unsigned int> seedHitNumbers = iterateHits(0,trackerRecHits,hitIndicesInTree,true);
474 
475  if (seedHitNumbers.size()>0)
476  {
478  for ( unsigned ihit=0; ihit<seedHitNumbers.size(); ++ihit )
479  {
480  TrackingRecHit* aTrackingRecHit = trackerRecHits[seedHitNumbers[ihit]].hit()->clone();
481  recHits.push_back(aTrackingRecHit);
482  }
483  GlobalPoint position((*theSimVtx)[vertexIndex].position().x(),
484  (*theSimVtx)[vertexIndex].position().y(),
485  (*theSimVtx)[vertexIndex].position().z());
486 
487  GlobalVector momentum(theSimTrack.momentum().x(),theSimTrack.momentum().y(),theSimTrack.momentum().z());
488  float charge = theSimTrack.charge();
489  GlobalTrajectoryParameters initialParams(position,momentum,(int)charge,magneticField);
491  //this line help the fit succeed in the case of pixelless tracks (4th and 5th iteration)
492  //for the future: probably the best thing is to use the mini-kalmanFilter
493  if(trackerRecHits[seedHitNumbers[0]].subDetId() !=1 ||trackerRecHits[seedHitNumbers[0]].subDetId() !=2)
494  {
495  errorMatrix = errorMatrix * 0.0000001;
496  }
497  CurvilinearTrajectoryError initialError(errorMatrix);
498  FreeTrajectoryState initialFTS(initialParams, initialError);
499 
500  const GeomDet* initialLayer = trackerGeometry->idToDet( recHits.back().geographicalId() );
501  const TrajectoryStateOnSurface initialTSOS = thePropagator->propagate(initialFTS,initialLayer->surface()) ;
502 
503  if (!initialTSOS.isValid())
504  {
505  break; //continues with the next seeding algorithm
506  }
507 
508  const AlgebraicSymMatrix55& m = initialTSOS.localError().matrix();
509  int dim = 5;
510  float localErrors[15];
511  int k = 0;
512  for (int i=0; i<dim; ++i)
513  {
514  for (int j=0; j<=i; ++j)
515  {
516  localErrors[k++] = m(i,j);
517  }
518  }
519  int surfaceSide = static_cast<int>(initialTSOS.surfaceSide());
520  initialState = PTrajectoryStateOnDet( initialTSOS.localParameters(),initialTSOS.globalMomentum().perp(),localErrors, recHits.back().geographicalId().rawId(), surfaceSide);
521  output->push_back(TrajectorySeed(initialState, recHits, PropagationDirection::alongMomentum));
522 
523  }
524  } //end loop over simtracks
525 
526 
527  e.put(output);
528 }
int i
Definition: DBlmapReader.cc:9
reference back()
Definition: OwnVector.h:327
const MagneticField * magneticField
std::pair< const_iterator, const_iterator > range
iterator range
Definition: RangeMap.h:50
T perp() const
Definition: PV3DBase.h:72
const LocalTrajectoryParameters & localParameters() const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:457
const SingleSet & getSingleSet() const
Definition: SeedingTree.h:204
ROOT::Math::SMatrixIdentity AlgebraicMatrixID
identifier iterator
Definition: RangeMap.h:136
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
float charge() const
charge
Definition: CoreSimTrack.cc:18
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:40
edm::EDGetTokenT< SiTrackerGSMatchedRecHit2DCollection > recHitToken
const reco::BeamSpot * beamSpot
std::vector< edm::EDGetTokenT< std::vector< unsigned int > > > skipSimTrackIdTokens
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
unsigned int numberOfNodes() const
Definition: SeedingTree.h:227
C::const_iterator const_iterator
constant access iterator type
Definition: RangeMap.h:43
void push_back(D *&d)
Definition: OwnVector.h:280
const TrackerTopology * trackerTopology
std::vector< TrajectorySeed > TrajectorySeedCollection
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:115
unsigned int subDetId[18]
SurfaceSide surfaceSide() const
Position relative to material, defined relative to momentum vector.
const reco::VertexCollection * primaryVertices
virtual std::vector< unsigned int > iterateHits(unsigned int start, const std::vector< TrajectorySeedHitCandidate > &trackerRecHits, std::vector< int > hitIndicesInTree, bool processSkippedHits) const
method tries to insert all hits into the tree structure.
int j
Definition: DBlmapReader.cc:9
const AlgebraicSymMatrix55 & matrix() const
const LocalTrajectoryError & localError() const
edm::EDGetTokenT< edm::SimVertexContainer > simVertexToken
virtual TrackingRecHit * clone() const =0
int vertIndex() const
index of the vertex in the Event container (-1 if no vertex)
Definition: SimTrack.h:29
edm::EDGetTokenT< edm::SimTrackContainer > simTrackToken
virtual bool passSimTrackQualityCuts(const SimTrack &theSimTrack, const SimVertex &theSimVertex) const
method checks if a SimTrack fulfills the quality requirements.
virtual TrackingRecHit const * hit() const
T const * product() const
Definition: Handle.h:81
GlobalVector globalMomentum() const
const math::XYZTLorentzVectorD & momentum() const
Definition: CoreSimTrack.h:22
static int position[264][3]
Definition: ReadPGInfo.cc:509
edm::EDGetTokenT< reco::VertexCollection > recoVertexToken
const TrackerGeometry * trackerGeometry
std::shared_ptr< PropagatorWithMaterial > thePropagator
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken
DetId geographicalId() const
const TrackingLayer & getTrackingLayer() const
SeedingTree< TrackingLayer > _seedingTree
bool isOnTheSameLayer(const TrajectorySeedHitCandidate &other) const
Check if two hits are on the same layer of the same subdetector.
virtual const TrackerGeomDet * idToDet(DetId) const

Member Data Documentation

SeedingTree<TrackingLayer> TrajectorySeedProducer::_seedingTree
private

Definition at line 40 of file TrajectorySeedProducer.h.

Referenced by iterateHits(), produce(), and TrajectorySeedProducer().

const reco::BeamSpot* TrajectorySeedProducer::beamSpot
private
edm::EDGetTokenT<reco::BeamSpot> TrajectorySeedProducer::beamSpotToken
private

Definition at line 67 of file TrajectorySeedProducer.h.

Referenced by produce(), and TrajectorySeedProducer().

const MagneticField* TrajectorySeedProducer::magneticField
private

Definition at line 42 of file TrajectorySeedProducer.h.

Referenced by beginRun(), and produce().

const MagneticFieldMap* TrajectorySeedProducer::magneticFieldMap
private

Definition at line 43 of file TrajectorySeedProducer.h.

Referenced by beginRun(), and compatibleWithBeamSpot().

unsigned int TrajectorySeedProducer::minLayersCrossed
private

Definition at line 53 of file TrajectorySeedProducer.h.

Referenced by produce(), and TrajectorySeedProducer().

double TrajectorySeedProducer::nSigmaZ
private
double TrajectorySeedProducer::originHalfLength
private
double TrajectorySeedProducer::originRadius
private

Definition at line 57 of file TrajectorySeedProducer.h.

Referenced by compatibleWithBeamSpot(), and TrajectorySeedProducer().

const reco::VertexCollection* TrajectorySeedProducer::primaryVertices
private
double TrajectorySeedProducer::ptMin
private

Definition at line 58 of file TrajectorySeedProducer.h.

Referenced by compatibleWithBeamSpot(), and TrajectorySeedProducer().

edm::EDGetTokenT<SiTrackerGSMatchedRecHit2DCollection> TrajectorySeedProducer::recHitToken
private

Definition at line 70 of file TrajectorySeedProducer.h.

Referenced by produce(), and TrajectorySeedProducer().

edm::EDGetTokenT<reco::VertexCollection> TrajectorySeedProducer::recoVertexToken
private

Definition at line 71 of file TrajectorySeedProducer.h.

Referenced by produce(), and TrajectorySeedProducer().

std::vector<std::vector<TrackingLayer> > TrajectorySeedProducer::seedingLayers
private

Definition at line 55 of file TrajectorySeedProducer.h.

Referenced by TrajectorySeedProducer().

double TrajectorySeedProducer::simTrack_maxD0
private

Definition at line 50 of file TrajectorySeedProducer.h.

Referenced by passSimTrackQualityCuts(), and TrajectorySeedProducer().

double TrajectorySeedProducer::simTrack_maxZ0
private

Definition at line 51 of file TrajectorySeedProducer.h.

Referenced by passSimTrackQualityCuts(), and TrajectorySeedProducer().

double TrajectorySeedProducer::simTrack_pTMin
private

Definition at line 49 of file TrajectorySeedProducer.h.

Referenced by passSimTrackQualityCuts(), and TrajectorySeedProducer().

edm::EDGetTokenT<edm::SimTrackContainer> TrajectorySeedProducer::simTrackToken
private

Definition at line 68 of file TrajectorySeedProducer.h.

Referenced by produce(), and TrajectorySeedProducer().

edm::EDGetTokenT<edm::SimVertexContainer> TrajectorySeedProducer::simVertexToken
private

Definition at line 69 of file TrajectorySeedProducer.h.

Referenced by produce(), and TrajectorySeedProducer().

std::vector<edm::EDGetTokenT<std::vector<unsigned int> > > TrajectorySeedProducer::skipSimTrackIdTokens
private

Definition at line 72 of file TrajectorySeedProducer.h.

Referenced by produce(), and TrajectorySeedProducer().

bool TrajectorySeedProducer::testBeamspotCompatibility
private
bool TrajectorySeedProducer::testPrimaryVertexCompatibility
private
std::shared_ptr<PropagatorWithMaterial> TrajectorySeedProducer::thePropagator
private

Definition at line 47 of file TrajectorySeedProducer.h.

Referenced by beginRun(), and produce().

const TrackerGeometry* TrajectorySeedProducer::trackerGeometry
private

Definition at line 44 of file TrajectorySeedProducer.h.

Referenced by beginRun(), and produce().

const TrackerTopology* TrajectorySeedProducer::trackerTopology
private

Definition at line 45 of file TrajectorySeedProducer.h.

Referenced by beginRun(), and produce().