21 template <
class T>
T sqr(
T t) {
return t*
t;}
31 float cotTheta, std::stringstream&
ss)
34 if ( hits.
size() < 2)
return 0;
42 return buildSeed(seedCollection,hits,fts,es);
50 const float cotTheta)
const
60 float nomField = bfield->nominalValue();
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 cloner = (*builder).cloner();
167 for (
unsigned int iHit = 0; iHit < hits.
size() && iHit<1; iHit++) {
172 if (!state.
isValid())
return 0;
176 std::unique_ptr<BaseTrackerRecHit> newtth(
refitHit( tth, state));
179 if (!
checkHit(state,&*newtth,es))
return 0;
181 updatedState = updator.
update(state, *newtth);
182 if (!updatedState.
isValid())
return 0;
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
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
TrajectoryStateOnSurface update(const TrajectoryStateOnSurface &, const TrackingRecHit &) const
std::vector< TrajectorySeed > TrajectorySeedCollection
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