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
56 FastHelix helix(tth2->globalPosition(), tth1->globalPosition(), vertexPos, es, vertexPos);
57 kine = helix.stateAtVertex().parameters();
62 GlobalVector(kine.momentum().x(),kine.momentum().y(),kine.momentum().perp()*cotTheta),
64 & kine.magneticField()
75 (*pss) <<
"[SeedForPhotonConversion1Leg] initialKinematic tth1 " ;
76 detid=tth1->geographicalId().rawId();
78 (*pss) <<
" \t " << detid <<
" " << tth1->localPosition() <<
" " << tth1->globalPosition() ;
79 detid= tth2->geographicalId().rawId();
80 (*pss) <<
" \n\t tth2 ";
82 (*pss) <<
" \t " << detid <<
" " << tth2->localPosition() <<
" " << tth2->globalPosition()
104 float sinTheta)
const
109 sqr(vertexBounds.
y()), 0, 0,
110 sqr(vertexBounds.
z())
119 float sin2th =
sqr(sinTheta);
122 float zErr = vertexErr.
czz();
123 float transverseErr = vertexErr.
cxx();
124 C[3][3] = transverseErr;
125 C[4][4] = zErr*sin2th + transverseErr*(1-sin2th);
154 for (
unsigned int iHit = 0; iHit < hits.
size() && iHit<1; iHit++) {
155 hit = hits[iHit]->hit();
159 if (!state.
isValid())
return 0;
166 if (!
checkHit(state,newtth,es))
return 0;
168 updatedState = updator.
update(state, *newtth);
169 if (!updatedState.
isValid())
return 0;
171 seedHits.
push_back(newtth->hit()->clone());
174 (*pss) <<
"\n[SeedForPhotonConversion1Leg] hit " << iHit;
177 <<
" tth " << tth->localPosition() <<
" newtth " << newtth->localPosition() <<
" state " << state.
globalMomentum().
perp();
186 return &seedCollection.back();
200 return hit->clone(state);
std::pair< ALIstring, ALIstring > pss
virtual const TrajectorySeed * buildSeed(TrajectorySeedCollection &seedCollection, const SeedingHitSet &hits, const FreeTrajectoryState &fts, const edm::EventSetup &es) const
virtual GlobalTrajectoryParameters initialKinematic(const SeedingHitSet &hits, const GlobalPoint &vertexPos, const edm::EventSetup &es, const float cotTheta) const
Sin< T >::type sin(const T &t)
virtual 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
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
virtual TrajectoryStateOnSurface propagate(const FreeTrajectoryState &, const Surface &) const
Vector3DBase unit() const
GlobalVector globalMomentum() const
std::string thePropagatorLabel
TrajectoryStateOnSurface update(const TrajectoryStateOnSurface &, const TransientTrackingRecHit &) const
Square< F >::type sqr(const F &f)
virtual TransientTrackingRecHit::RecHitPointer refitHit(const TransientTrackingRecHit::ConstRecHitPointer &hit, const TrajectoryStateOnSurface &state) const
unsigned int size() const
const MagneticField & magneticField() const
DetId geographicalId() const
TrackCharge charge() const
virtual bool checkHit(const TrajectoryStateOnSurface &, const TransientTrackingRecHit::ConstRecHitPointer &hit, const edm::EventSetup &es) const
virtual LocalPoint localPosition() const =0
Global3DVector GlobalVector
virtual CurvilinearTrajectoryError initialError(const GlobalVector &vertexBounds, float ptMin, float sinTheta) const