20 template <
class T>
T sqr(
T t) {
return t*
t;}
29 float cotTheta, std::stringstream&
ss)
32 if ( hits.
size() < 2)
return 0;
40 return buildSeed(seedCollection,hits,fts,es);
48 const float cotTheta)
const
58 float nomField = bfield->nominalValue();
60 FastHelix helix(tth2->globalPosition(), tth1->globalPosition(), vertexPos, nomField, &*bfield, vertexPos);
61 kine = helix.stateAtVertex();
66 GlobalVector(kine.momentum().x(),kine.momentum().y(),kine.momentum().perp()*cotTheta),
68 & kine.magneticField()
79 (*pss) <<
"[SeedForPhotonConversion1Leg] initialKinematic tth1 " ;
80 detid=tth1->geographicalId().rawId();
82 (*pss) <<
" \t " << detid <<
" " << tth1->localPosition() <<
" " << tth1->globalPosition() ;
83 detid= tth2->geographicalId().rawId();
84 (*pss) <<
" \n\t tth2 ";
86 (*pss) <<
" \t " << detid <<
" " << tth2->localPosition() <<
" " << tth2->globalPosition()
90 bool isBOFF =(0==nomField);;
106 float sinTheta)
const
111 sqr(vertexBounds.
y()), 0, 0,
112 sqr(vertexBounds.
z())
121 float sin2th =
sqr(sinTheta);
124 float zErr = vertexErr.
czz();
125 float transverseErr = vertexErr.
cxx();
126 C[3][3] = transverseErr;
127 C[4][4] = zErr*sin2th + transverseErr*(1-sin2th);
145 const Propagator* propagator = &(*propagatorHandle);
152 auto builder = (TkTransientTrackingRecHitBuilder
const *)(builderH.
product());
153 cloner = (*builder).cloner();
158 auto builder = (TkTransientTrackingRecHitBuilder
const *)(builderH.
product());
159 cloner = (*builder).cloner();
171 for (
unsigned int iHit = 0; iHit < hits.
size() && iHit<1; iHit++) {
176 if (!state.
isValid())
return 0;
180 std::unique_ptr<BaseTrackerRecHit> newtth(
refitHit( tth, state));
183 if (!
checkHit(state,&*newtth,es))
return 0;
185 updatedState = updator.update(state, *newtth);
186 if (!updatedState.
isValid())
return 0;
191 (*pss) <<
"\n[SeedForPhotonConversion1Leg] hit " << iHit;
194 <<
" tth " << tth->localPosition() <<
" newtth " << newtth->localPosition() <<
" state " << state.
globalMomentum().
perp();
203 return &seedCollection.back();
std::pair< ALIstring, ALIstring > pss
const TrajectorySeed * buildSeed(TrajectorySeedCollection &seedCollection, const SeedingHitSet &hits, const FreeTrajectoryState &fts, const edm::EventSetup &es) const
GlobalTrajectoryParameters initialKinematic(const SeedingHitSet &hits, const GlobalPoint &vertexPos, const edm::EventSetup &es, const float cotTheta) const
Sin< T >::type sin(const T &t)
const TrajectorySeed * trajectorySeed(TrajectorySeedCollection &seedCollection, const SeedingHitSet &hits, const GlobalPoint &vertex, const GlobalVector &vertexBounds, float ptmin, const edm::EventSetup &es, float cotTheta, std::stringstream &ss)
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
Geom::Theta< T > theta() const
uint32_t rawId() const
get the raw id
float transverseCurvature() const
static const int cotTheta_Max
BaseTrackerRecHit const * ConstRecHitPointer
std::vector< TrajectorySeed > TrajectorySeedCollection
const T & max(const T &a, const T &b)
GlobalVector momentum() const
void print(std::stringstream &ss, const SiStripCluster &clus)
GlobalPoint position() const
Vector3DBase unit() const
T const * product() const
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
GlobalVector globalMomentum() const
std::string thePropagatorLabel
Square< F >::type sqr(const F &f)
unsigned int size() const
const MagneticField & magneticField() const
SeedingHitSet::RecHitPointer refitHit(SeedingHitSet::ConstRecHitPointer hit, const TrajectoryStateOnSurface &state) const
DetId geographicalId() const
bool checkHit(const TrajectoryStateOnSurface &, const SeedingHitSet::ConstRecHitPointer &hit, const edm::EventSetup &es) const
TrackCharge charge() const
virtual LocalPoint localPosition() const =0
Global3DVector GlobalVector
CurvilinearTrajectoryError initialError(const GlobalVector &vertexBounds, float ptMin, float sinTheta) const