test
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 Member Functions
SeedFromConsecutiveHitsTripletOnlyCreator Class Reference

#include <SeedFromConsecutiveHitsTripletOnlyCreator.h>

Inheritance diagram for SeedFromConsecutiveHitsTripletOnlyCreator:
SeedFromConsecutiveHitsCreator SeedCreator

Public Member Functions

 SeedFromConsecutiveHitsTripletOnlyCreator (const edm::ParameterSet &cfg)
 
virtual ~SeedFromConsecutiveHitsTripletOnlyCreator ()
 
- Public Member Functions inherited from SeedFromConsecutiveHitsCreator
virtual void init (const TrackingRegion &region, const edm::EventSetup &es, const SeedComparitor *filter)
 
virtual void makeSeed (TrajectorySeedCollection &seedCollection, const SeedingHitSet &hits)
 
 SeedFromConsecutiveHitsCreator (const edm::ParameterSet &cfg)
 
 SeedFromConsecutiveHitsCreator (const std::string &propagator="PropagatorWithMaterial", double seedMomentumForBOFF=-5.0, double aOriginTransverseErrorMultiplier=1.0, double aMinOneOverPtError=1.0, const std::string &bname="WithTrackAngle")
 
virtual ~SeedFromConsecutiveHitsCreator ()
 
- Public Member Functions inherited from SeedCreator
virtual ~SeedCreator ()
 

Private Member Functions

virtual bool initialKinematic (GlobalTrajectoryParameters &kine, const SeedingHitSet &hits) const
 

Additional Inherited Members

- Protected Attributes inherited from SeedFromConsecutiveHitsCreator
edm::ESHandle< MagneticFieldbfield
 
TkClonerImpl cloner
 
const SeedComparitorfilter = 0
 
bool isBOFF = false
 
std::string mfName_
 
float nomField
 
edm::ESHandle< PropagatorpropagatorHandle
 
const TrackingRegionregion = 0
 
double theBOFFMomentum
 
double theMinOneOverPtError
 
double theOriginTransverseErrorMultiplier
 
std::string thePropagatorLabel
 
edm::ESHandle< TrackerGeometrytracker
 
std::string TTRHBuilder
 
bool useSimpleMF_
 

Detailed Description

Definition at line 6 of file SeedFromConsecutiveHitsTripletOnlyCreator.h.

Constructor & Destructor Documentation

SeedFromConsecutiveHitsTripletOnlyCreator::SeedFromConsecutiveHitsTripletOnlyCreator ( const edm::ParameterSet cfg)
inline

Definition at line 9 of file SeedFromConsecutiveHitsTripletOnlyCreator.h.

9  :
SeedFromConsecutiveHitsCreator(const edm::ParameterSet &cfg)
virtual SeedFromConsecutiveHitsTripletOnlyCreator::~SeedFromConsecutiveHitsTripletOnlyCreator ( )
inlinevirtual

Definition at line 12 of file SeedFromConsecutiveHitsTripletOnlyCreator.h.

12 {}

Member Function Documentation

bool SeedFromConsecutiveHitsTripletOnlyCreator::initialKinematic ( GlobalTrajectoryParameters kine,
const SeedingHitSet hits 
) const
privatevirtual

Reimplemented from SeedFromConsecutiveHitsCreator.

Definition at line 12 of file SeedFromConsecutiveHitsTripletOnlyCreator.cc.

References SeedFromConsecutiveHitsCreator::bfield, GlobalTrajectoryParameters::charge(), SeedComparitor::compatible(), SeedFromConsecutiveHitsCreator::filter, SeedFromConsecutiveHitsCreator::isBOFF, trackerHitRTTI::isSingleType(), GlobalTrajectoryParameters::momentum(), SeedFromConsecutiveHitsCreator::nomField, TrackingRegion::origin(), GlobalTrajectoryParameters::position(), SeedFromConsecutiveHitsCreator::region, SeedingHitSet::size(), SiStripDetId::TEC, SeedFromConsecutiveHitsCreator::theBOFFMomentum, SiStripDetId::TID, Vector3DBase< T, FrameTag >::unit(), and unlikely.

13  {
14 
15  SeedingHitSet::ConstRecHitPointer tth1 = hits[0];
16  SeedingHitSet::ConstRecHitPointer tth2 = hits[1];
17 
18 
19 
20  if (hits.size()==3 && !( trackerHitRTTI::isSingleType(*hits[2]) && (hits[2]->geographicalId().subdetId()==SiStripDetId::TID ||
21  hits[2]->geographicalId().subdetId()==SiStripDetId::TEC )
22  ) ) {
23  //if 3rd hit is mono and endcap pT is not well defined so take initial state from pair
24  SeedingHitSet::ConstRecHitPointer tth3 = hits[2];
25  FastHelix helix(tth3->globalPosition(), tth2->globalPosition(), tth1->globalPosition(), nomField, &*bfield, tth1->globalPosition());
26  kine = helix.stateAtVertex();
27  if unlikely(isBOFF && (theBOFFMomentum > 0)) {
28  kine = GlobalTrajectoryParameters(kine.position(),
29  kine.momentum().unit() * theBOFFMomentum,
30  kine.charge(),
31  &*bfield);
32  }
33  return (filter ? filter->compatible(hits, kine, helix, *region) : true);
34  }
35 
36  const GlobalPoint& vertexPos = region->origin();
37 
38  FastHelix helix(tth2->globalPosition(), tth1->globalPosition(), vertexPos, nomField,&*bfield);
39  if (helix.isValid()) {
40  kine = helix.stateAtVertex();
41  } else {
42  GlobalVector initMomentum(tth2->globalPosition() - vertexPos);
43  initMomentum *= (100./initMomentum.perp());
44  kine = GlobalTrajectoryParameters(vertexPos, initMomentum, 1, &*bfield);
45  }
46 
47  if unlikely(isBOFF && (theBOFFMomentum > 0)) {
48  kine = GlobalTrajectoryParameters(kine.position(),
49  kine.momentum().unit() * theBOFFMomentum,
50  kine.charge(),
51  &*bfield);
52  }
53  return (filter ? filter->compatible(hits, kine, helix, *region) : true);
54 }
bool isSingleType(TrackingRecHit const &hit)
GlobalPoint const & origin() const
virtual bool compatible(const SeedingHitSet &hits, const TrackingRegion &region) const =0
#define unlikely(x)
BaseTrackerRecHit const * ConstRecHitPointer
Definition: SeedingHitSet.h:11
unsigned int size() const
Definition: SeedingHitSet.h:44
GlobalTrajectoryParameters stateAtVertex() const
Definition: FastHelix.h:65
edm::ESHandle< MagneticField > bfield