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);
156 for (
unsigned int iHit = 0; iHit < hits.
size() && iHit<1; iHit++) {
157 hit = hits[iHit]->hit();
161 if (!state.
isValid())
return 0;
168 if (!
checkHit(state,newtth,es))
return 0;
170 updatedState = updator.update(state, *newtth);
171 if (!updatedState.
isValid())
return 0;
173 seedHits.
push_back(newtth->hit()->clone());
176 (*pss) <<
"\n[SeedForPhotonConversion1Leg] hit " << iHit;
179 <<
" tth " << tth->localPosition() <<
" newtth " << newtth->localPosition() <<
" state " << state.
globalMomentum().
perp();
188 return &seedCollection.back();
202 return hit->clone(state);
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
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
bool checkHit(const TrajectoryStateOnSurface &, const TransientTrackingRecHit::ConstRecHitPointer &hit, const edm::EventSetup &es) const
GlobalVector globalMomentum() const
std::string thePropagatorLabel
Square< F >::type sqr(const F &f)
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 LocalPoint localPosition() const =0
Global3DVector GlobalVector
CurvilinearTrajectoryError initialError(const GlobalVector &vertexBounds, float ptMin, float sinTheta) const