20 HICTkOuterStartingLayerFinder::HICTkOuterStartingLayerFinder(
int& numberOfSigmas,
const MagneticField * mf,
22 NumberOfSigm(numberOfSigmas),
38 vector<DetLayer*> seedlayers;
70 if (!checkBarrel)
return seedlayers;
85 std::vector<ForwardDetLayer*>& fls,
94 double outrad, zseed, rseed,
theta, atrack, btrack;
95 double dz, dr, a1, zdet, newzmin, newzmax;
96 std::vector<ForwardDetLayer*>::const_iterator flayer;
102 outrad=(fls.back())->specificSurface().outerRadius();
111 btrack=rseed-atrack*zseed;
115 std::cout<<
"HICTkOuterStartingLayerFinder::findForwardLayers "<<rseed<<
" dr "<<dr<<
" outrad "<<outrad<<std::endl;
120 std::cout<<
"HICTkOuterStartingLayerFinder::findForwardLayers::add last forward layer "<<rseed<<
" dr "<<dr<<
" outrad "<<outrad<<std::endl;
122 seedlayers.push_back(fls.back());
123 zdetlast = fabs((fls.back())->surface().position().z());
128 std::cout<<
"HICTkOuterStartingLayerFinder::findForwardLayers::1 zseed "<<zseed<<
" dz "<<dz<<std::endl;
131 newzmin=
abs(zseed)-3.*dz;
136 if(zseed<0.) a1=-1.*a1;
139 std::cout<<
"HICTkOuterStartingLayerFinder::findForwardLayers::2 zseed "<<zseed<<
" dz "<<dz<<
" "<<(fls.back())->surface().position().z()<<std::endl;
142 newzmin=
abs(outrad/a1)-3.*dz;
144 newzmax=fabs((fls.back())->surface().position().z())+dz;
147 std::cout<<
"HICTkOuterStartingLayerFinder::findForwardLayers::newzmin,newzmax "<<newzmin<<
" "<<newzmax<<std::endl;
150 for(flayer=fls.end()-1;flayer!=fls.begin()-1;flayer--){
152 zdet=(**flayer).surface().position().z();
154 std::cout<<
"HICTkOuterStartingLayerFinder::findForwardLayers::zdet "<<zdet<<
" thickness "<<(**flayer).surface().bounds().thickness()<<std::endl;
160 if(fabs(zdet)<
length)
break;
162 if(fabs(newzmin)<=fabs(zdet)+(**flayer).surface().bounds().thickness()
163 && fabs(zdet)-(**flayer).surface().bounds().thickness()<=fabs(newzmax)){
166 std::cout<<
"HICTkOuterStartingLayerFinder::findForwardLayers::add layer "<<zdet<<std::endl;
169 seedlayers.push_back(&(**flayer));
179 std::cout<<
"HICTkOuterStartingLayerFinder::zdetlast,mincoor "<<zdetlast<<
" "<<mincoor<<std::endl;
182 if(fabs(mincoor)<fabs(zdetlast)||fabs(zdetlast)<140.){
184 std::cout<<
"HICTkOuterStartingLayerFinder::add barrel layers to forward "<<std::endl;
194 std::cout<<
"HICTkOuterStartingLayerFinder::findBarrelLayers::start::zdetlast "<<
length<<std::endl;
196 std::vector<BarrelDetLayer*>::const_iterator blayer;
200 double zdetlast =
length+10.;
212 double barrelradius=bc->
radius();
217 rmin=a1*zbarrel-(
theBarrelLayers.back())->surface().bounds().thickness();
218 rmax=barrelradius+(
theBarrelLayers.back())->surface().bounds().thickness();
230 std::cout<<
"HICTkOuterStartingLayerFinder::findBarrelLayers::rmin,rmax "<<rmin<<
" "<<rmax<<std::endl;
240 seedlayers.push_back(&(**blayer));
242 std::cout<<
"HICTkOuterStartingLayerFinder::findBarrelLayers::add "<<r<<std::endl;
virtual float length() const =0
const GlobalTrajectoryParameters & parameters() const
Geom::Theta< T > theta() const
const CurvilinearTrajectoryError & curvilinearError() const
Geom::Theta< T > theta() const
std::vector< BarrelDetLayer * > const & barrelLayers() const
std::vector< BarrelDetLayer * > theBarrelLayers
Scalar radius() const
Radius of the cylinder.
LayerContainer startingLayers(FreeTrajectoryState &fts)
GlobalVector momentum() const
Tan< T >::type tan(const T &t)
std::vector< ForwardDetLayer * > const & negForwardLayers() const
bool findForwardLayers(const FreeTrajectoryState &fts, std::vector< ForwardDetLayer * > &fls, LayerContainer &lc)
GlobalPoint position() const
const Bounds & bounds() const
std::vector< ForwardDetLayer * > const & posForwardLayers() const
const GeometricSearchTracker * theTracker
std::vector< DetLayer * > LayerContainer
const AlgebraicSymMatrix55 & matrix() const
const HICConst * theHICConst
std::vector< ForwardDetLayer * > forwardPosLayers
LayerContainer findBarrelLayers(const FreeTrajectoryState &fts, std::vector< ForwardDetLayer * > &fls, LayerContainer &lc)
std::vector< ForwardDetLayer * > forwardNegLayers