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;
96 double dz, dr, a1, zdet, newzmin, newzmax;
97 std::vector<ForwardDetLayer*>::const_iterator flayer;
103 outrad=(fls.back())->specificSurface().outerRadius();
118 std::cout<<
"HICTkOuterStartingLayerFinder::findForwardLayers "<<rseed<<
" dr "<<dr<<
" outrad "<<outrad<<std::endl;
123 std::cout<<
"HICTkOuterStartingLayerFinder::findForwardLayers::add last forward layer "<<rseed<<
" dr "<<dr<<
" outrad "<<outrad<<std::endl;
125 seedlayers.push_back(fls.back());
126 zdetlast = fabs((fls.back())->surface().position().z());
131 std::cout<<
"HICTkOuterStartingLayerFinder::findForwardLayers::1 zseed "<<zseed<<
" dz "<<dz<<std::endl;
134 newzmin=
abs(zseed)-3.*dz;
139 if(zseed<0.) a1=-1.*a1;
142 std::cout<<
"HICTkOuterStartingLayerFinder::findForwardLayers::2 zseed "<<zseed<<
" dz "<<dz<<
" "<<(fls.back())->surface().position().z()<<std::endl;
145 newzmin=
abs(outrad/a1)-3.*dz;
147 newzmax=fabs((fls.back())->surface().position().z())+dz;
150 std::cout<<
"HICTkOuterStartingLayerFinder::findForwardLayers::newzmin,newzmax "<<newzmin<<
" "<<newzmax<<std::endl;
153 for(flayer=fls.end()-1;flayer!=fls.begin()-1;flayer--){
155 zdet=(**flayer).surface().position().z();
157 std::cout<<
"HICTkOuterStartingLayerFinder::findForwardLayers::zdet "<<zdet<<
" thickness "<<(**flayer).surface().bounds().thickness()<<std::endl;
163 if(fabs(zdet)<
length)
break;
165 if(fabs(newzmin)<=fabs(zdet)+(**flayer).surface().bounds().thickness()
166 && fabs(zdet)-(**flayer).surface().bounds().thickness()<=fabs(newzmax)){
169 std::cout<<
"HICTkOuterStartingLayerFinder::findForwardLayers::add layer "<<zdet<<std::endl;
172 seedlayers.push_back(&(**flayer));
182 std::cout<<
"HICTkOuterStartingLayerFinder::zdetlast,mincoor "<<zdetlast<<
" "<<mincoor<<std::endl;
185 if(fabs(mincoor)<fabs(zdetlast)||fabs(zdetlast)<140.){
187 std::cout<<
"HICTkOuterStartingLayerFinder::add barrel layers to forward "<<std::endl;
197 std::cout<<
"HICTkOuterStartingLayerFinder::findBarrelLayers::start::zdetlast "<<
length<<std::endl;
199 std::vector<BarrelDetLayer*>::const_iterator blayer;
203 double zdetlast =
length+10.;
215 double barrelradius=bc->
radius();
220 rmin=a1*zbarrel-(
theBarrelLayers.back())->surface().bounds().thickness();
221 rmax=barrelradius+(
theBarrelLayers.back())->surface().bounds().thickness();
233 std::cout<<
"HICTkOuterStartingLayerFinder::findBarrelLayers::rmin,rmax "<<rmin<<
" "<<rmax<<std::endl;
243 seedlayers.push_back(&(**blayer));
245 std::cout<<
"HICTkOuterStartingLayerFinder::findBarrelLayers::add "<<r<<std::endl;
virtual float length() const =0
const GlobalTrajectoryParameters & parameters() const
const CurvilinearTrajectoryError & curvilinearError() const
std::vector< BarrelDetLayer * > const & barrelLayers() const
std::vector< BarrelDetLayer * > theBarrelLayers
Scalar radius() const
Radius of the cylinder.
LayerContainer startingLayers(FreeTrajectoryState &fts)
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