21 template <
class T>
T sqr(
T t) {
return t*
t;}
31 float cotTheta, std::stringstream& ss)
34 if ( hits.
size() < 2)
return nullptr;
42 return buildSeed(seedCollection,hits,fts,es);
50 const float cotTheta)
const 62 FastHelix helix(tth2->globalPosition(), tth1->globalPosition(), vertexPos, nomField, &*bfield, vertexPos);
63 kine = helix.stateAtVertex();
68 GlobalVector(kine.momentum().x(),kine.momentum().y(),kine.momentum().perp()*cotTheta),
70 & kine.magneticField()
81 (*pss) <<
"[SeedForPhotonConversion1Leg] initialKinematic tth1 " ;
82 detid=tth1->geographicalId().rawId();
84 (*pss) <<
" \t " << detid <<
" " << tth1->localPosition() <<
" " << tth1->globalPosition() ;
85 detid= tth2->geographicalId().rawId();
86 (*pss) <<
" \n\t tth2 ";
88 (*pss) <<
" \t " << detid <<
" " << tth2->localPosition() <<
" " << tth2->globalPosition()
92 bool isBOFF =(0==nomField);;
108 float sinTheta)
const 113 sqr(vertexBounds.
y()), 0, 0,
114 sqr(vertexBounds.
z())
123 float sin2th =
sqr(sinTheta);
126 float zErr = vertexErr.
czz();
127 float transverseErr = vertexErr.
cxx();
128 C[3][3] = transverseErr;
129 C[4][4] = zErr*sin2th + transverseErr*(1-sin2th);
154 auto cloner = (*builder).cloner();
167 for (
unsigned int iHit = 0; iHit < hits.
size() && iHit<1; iHit++) {
172 if (!state.
isValid())
return nullptr;
176 std::unique_ptr<BaseTrackerRecHit> newtth(
refitHit( tth, state, cloner));
179 if (!
checkHit(state,&*newtth,es))
return nullptr;
181 updatedState = updator.
update(state, *newtth);
182 if (!updatedState.
isValid())
return nullptr;
187 (*pss) <<
"\n[SeedForPhotonConversion1Leg] hit " << iHit;
190 <<
" tth " << tth->localPosition() <<
" newtth " << newtth->localPosition() <<
" state " << state.
globalMomentum().
perp();
194 if(!hit)
return nullptr;
200 return &seedCollection.back();
std::pair< ALIstring, ALIstring > pss
const TrajectorySeed * buildSeed(TrajectorySeedCollection &seedCollection, const SeedingHitSet &hits, const FreeTrajectoryState &fts, const edm::EventSetup &es) const
int nominalValue() const
The nominal field value for this map in kGauss.
GlobalTrajectoryParameters initialKinematic(const SeedingHitSet &hits, const GlobalPoint &vertexPos, const edm::EventSetup &es, const float cotTheta) const
Sin< T >::type sin(const T &t)
SeedingHitSet::RecHitPointer refitHit(SeedingHitSet::ConstRecHitPointer hit, const TrajectoryStateOnSurface &state, const TkClonerImpl &cloner) const
constexpr uint32_t rawId() const
get the raw id
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
float transverseCurvature() const
TrajectoryStateOnSurface update(const TrajectoryStateOnSurface &, const TrackingRecHit &) const override
static const int cotTheta_Max
BaseTrackerRecHit const * ConstRecHitPointer
std::vector< TrajectorySeed > TrajectorySeedCollection
GlobalVector momentum() const
void print(std::stringstream &ss, const SiStripCluster &clus)
virtual LocalPoint localPosition() const =0
GlobalPoint position() const
Vector3DBase unit() 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 TrackerGeomDet * idToDet(DetId) const override
const MagneticField & magneticField() const
DetId geographicalId() const
bool checkHit(const TrajectoryStateOnSurface &, const SeedingHitSet::ConstRecHitPointer &hit, const edm::EventSetup &es) const
TrackCharge charge() const
T const * product() const
Global3DVector GlobalVector
CurvilinearTrajectoryError initialError(const GlobalVector &vertexBounds, float ptMin, float sinTheta) const