11 std::pair<bool,double>
14 std::pair<bool,double>
flag(
false,0.);
17 std::cout<<
" HICMeasurementEstimator::estimate::trajectory is not valid "<<std::endl;
23 case 1:
return estimate<1>(tsos,aRecHit);
24 case 2:
return estimate<2>(tsos,aRecHit);
25 case 3:
return estimate<3>(tsos,aRecHit);
26 case 4:
return estimate<4>(tsos,aRecHit);
27 case 5:
return estimate<5>(tsos,aRecHit);
32 template <
unsigned int D> std::pair<bool,double>
41 std::cout<<
" Measurement estimator::RecHit is invalid "<<std::endl;
43 return HitReturnType(
false,est);
55 std::cout<<
" HICMeasurementEstimator::phi "<<dphi<<
" "<<thePhiBound<<std::endl;
56 std::cout<<
" HICMeasurementEstimator::z "<<dz<<
" "<<theZBound<<std::endl;
57 std::cout<<
" HICMeasurementEstimator::z "<<dr<<
" "<<theZBound<<std::endl;
59 if( dphi > thePhiBound ) {
61 std::cout<<
" HICMeasurementEstimator::phi::failed "<<std::endl;
63 return HitReturnType(
false,est);
65 if( dz > theZBound ) {
67 std::cout<<
" HICMeasurementEstimator::z::failed "<<std::endl;
69 return HitReturnType(
false,est);
71 if( dr > theZBound ) {
73 std::cout<<
" HICMeasurementEstimator::r::failed "<<std::endl;
75 return HitReturnType(
false,est);
80 Vec
r = asSVector<D>(aRecHit.
parameters()) - me.measuredParameters<
D>(aRecHit);
84 est = ROOT::Math::Similarity(r, R);
86 if( est > theChi2Cut )
89 std::cout<<
" HICMeasurementEstimator::chi2::failed "<<est<<
" "<<theChi2Cut<<std::endl;
92 return HitReturnType(
false,est);
95 return HitReturnType(
true,est);
103 double pi = 4.*atan(1.);
104 double twopi = 2.*
pi;
111 cout<<
" ======================================================================================== ";
112 cout<<
" Estimate detector:: tsos : detector : Error "<<endl;
123 if(phi1<0.) phi1 = twopi+phi1;
124 if(phi2<0.) phi2 = twopi+phi2;
125 float dfi = fabs(phi1-phi2);
126 if(dfi>pi) dfi = twopi-dfi;
127 if(dfi<thePhiError) flag =
true;
131 cout<<
" Estimate = "<<flag<<endl;
140 vector<double> theCuts;
151 thePhiWinMeanB = 0.002;
165 theTrajectorySize = traj.
data().size();
168 if( theBarrel.size() == 0 || theForward.size() == 0 )
171 cout<<
" HICMeasurementEstimator::setCuts:: no datector map "<<endl;
180 thePhiWin = (*theHICConst).phiwinbar[(*theBarrel.find(first)).
second][(*theBarrel.find(a)).
second][(*theBarrel.find(b)).
second];
181 theZWin = (*theHICConst).zwinbar[(*theBarrel.find(first)).
second][(*theBarrel.find(a)).
second][(*theBarrel.find(b)).
second];
182 thePhiCut = (*theHICConst).phicutbar[(*theBarrel.find(first)).
second][(*theBarrel.find(theLastLayer)).
second][(*theBarrel.find(b)).
second];
183 theZCut = (*theHICConst).zcutbar[(*theBarrel.find(first)).
second][(*theBarrel.find(theLastLayer)).
second][(*theBarrel.find(b)).
second];
191 thePhiWin = (*theHICConst).phiwinfbb[(*theForward.find(first)).
second][(*theBarrel.find(a)).
second][(*theBarrel.find(b)).
second];
192 theZWin = (*theHICConst).zwinfbb[(*theForward.find(first)).
second][(*theBarrel.find(a)).
second][(*theBarrel.find(b)).
second];
193 thePhiCut = (*theHICConst).phicutfbb[(*theForward.find(first)).
second][(*theBarrel.find(theLastLayer)).
second][(*theBarrel.find(b)).
second];
194 theZCut = (*theHICConst).zcutfbb[(*theForward.find(first)).
second][(*theBarrel.find(theLastLayer)).
second][(*theBarrel.find(b)).
second];
198 thePhiWin = (*theHICConst).phiwinfbb[(*theBackward.find(first)).
second][(*theBarrel.find(a)).
second][(*theBarrel.find(b)).
second];
199 theZWin = (*theHICConst).zwinfbb[(*theBackward.find(first)).
second][(*theBarrel.find(a)).
second][(*theBarrel.find(b)).
second];
200 thePhiCut = (*theHICConst).phicutfbb[(*theBackward.find(first)).
second][(*theBarrel.find(theLastLayer)).
second][(*theBarrel.find(b)).
second];
201 theZCut = (*theHICConst).zcutfbb[(*theBackward.find(first)).
second][(*theBarrel.find(theLastLayer)).
second][(*theBarrel.find(b)).
second];
208 theCuts.push_back(thePhiWin); theCuts.push_back(theZWin);
209 theCuts.push_back(thePhiCut); theCuts.push_back(theZCut);
217 thePhiWin = (*theHICConst).phiwinfrw[(*theForward.find(first)).
second][(*theForward.find(a)).
second][(*theForward.find(b)).
second];
218 theZWin = (*theHICConst).zwinfrw[(*theForward.find(first)).
second][(*theForward.find(a)).
second][(*theForward.find(b)).
second];
219 thePhiCut = (*theHICConst).phicutfrw[(*theForward.find(first)).
second][(*theForward.find(theLastLayer)).
second][(*theForward.find(b)).
second];
220 theZCut = (*theHICConst).zcutfrw[(*theForward.find(first)).
second][(*theForward.find(theLastLayer)).
second][(*theForward.find(b)).
second];
224 thePhiWin = (*theHICConst).phiwinfrw[(*theBackward.find(first)).
second][(*theBackward.find(a)).
second][(*theBackward.find(b)).
second];
225 theZWin = (*theHICConst).zwinfrw[(*theBackward.find(first)).
second][(*theBackward.find(a)).
second][(*theBackward.find(b)).
second];
226 thePhiCut = (*theHICConst).phicutfrw[(*theBackward.find(first)).
second][(*theBackward.find(theLastLayer)).
second][(*theBackward.find(b)).
second];
227 theZCut = (*theHICConst).zcutfrw[(*theBackward.find(first)).
second][(*theBackward.find(theLastLayer)).
second][(*theBackward.find(b)).
second];
230 if( theLowMult == 1 )
237 thePhiWinMeanB = 0.004;
241 theCuts.push_back(thePhiWin); theCuts.push_back(theZWin);
242 theCuts.push_back(thePhiCut); theCuts.push_back(theZCut);
251 thePhiWin = (*theHICConst).phiwinbfrw[(*theForward.find(first)).
second][(*theForward.find(a)).
second][(*theBarrel.find(b)).
second];
252 theZWin = (*theHICConst).zwinbfrw[(*theForward.find(first)).
second][(*theForward.find(a)).
second][(*theBarrel.find(b)).
second];
253 thePhiCut = (*theHICConst).phicutbfrw[(*theForward.find(first)).
second][(*theForward.find(theLastLayer)).
second][(*theBarrel.find(b)).
second];
254 theZCut = (*theHICConst).zcutbfrw[(*theForward.find(first)).
second][(*theForward.find(theLastLayer)).
second][(*theBarrel.find(b)).
second];
258 thePhiWin = (*theHICConst).phiwinbfrw[(*theBackward.find(first)).
second][(*theBackward.find(a)).
second][(*theBarrel.find(b)).
second];
259 theZWin = (*theHICConst).zwinbfrw[(*theBackward.find(first)).
second][(*theBackward.find(a)).
second][(*theBarrel.find(b)).
second];
260 thePhiCut = (*theHICConst).phicutbfrw[(*theBackward.find(first)).
second][(*theBackward.find(theLastLayer)).
second][(*theBarrel.find(b)).
second];
261 theZCut = (*theHICConst).zcutbfrw[(*theBackward.find(first)).
second][(*theBackward.find(theLastLayer)).
second][(*theBarrel.find(b)).
second];
266 thePhiWinMeanB = 0.004;
269 theCuts.push_back(thePhiWin); theCuts.push_back(theZWin);
270 theCuts.push_back(thePhiCut); theCuts.push_back(theZCut);
281 theChi2Cut = theNewCut;
286 thePhiBound = thePhiWin;
288 thePhiBoundMean = thePhiWinMean;
289 theZBoundMean = theZWinMean;
294 thePhiBound = thePhiWinB;
295 theZBound = theZWinB;
296 thePhiBoundMean = thePhiWinMean;
297 theZBoundMean = theZWinMean;
302 thePhiBound = thePhiCut;
304 thePhiBoundMean = thePhiCutMean;
305 theZBoundMean = theZCutMean;
317 layer = (*theBarrel.find(a)).
second;
331 std::cout<<
" Set Detector Map... "<<std::endl;
335 for ( std::vector<BarrelDetLayer*>::const_iterator ilayer = bl.begin(); ilayer != bl.end(); ilayer++)
337 theBarrel[(*ilayer)]=ila;
346 for ( vector<ForwardDetLayer*>::const_iterator ilayer = fpos.begin();
347 ilayer != fpos.end(); ilayer++)
349 theForward[(*ilayer)] = ilf1;
352 for ( vector<ForwardDetLayer*>::const_iterator ilayer = fneg.begin();
353 ilayer != fneg.end(); ilayer++)
356 cout<<
" HICDetectorMap::negative layers "<<(**ilayer).position().z()<<
" "<<ilf2<<endl;
358 theBackward[(*ilayer)] = ilf2;
virtual const BoundSurface & surface() const =0
The surface of the GeometricSearchDet.
virtual int dimension() const =0
virtual float length() const =0
ROOT::Math::SMatrix< double, D1, D1, ROOT::Math::MatRepSym< double, D1 > > SymMatrix
virtual void setHICDetMap()
virtual Location location() const =0
Which part of the detector (barrel, endcap)
const GlobalTrajectoryParameters & parameters() const
FreeTrajectoryState * freeTrajectoryState(bool withErrors=true) const
Geom::Phi< T > phi() const
virtual SubDetector subDetector() const =0
The type of detector (PixelBarrel, PixelEndcap, TIB, TOB, TID, TEC, CSC, DT, RPCBarrel, RPCEndcap)
GlobalPoint globalPosition() const
virtual void chooseCuts(int &i)
virtual std::vector< double > setCuts(Trajectory &traj, const DetLayer *theCurrentLayer)
U second(std::pair< T, U > const &p)
virtual AlgebraicVector parameters() const =0
DataContainer const & measurements() const
GlobalVector momentum() const
GlobalPoint position() const
const Bounds & bounds() const
ROOT::Math::SVector< double, D1 > Vector
DecomposeProduct< arg, typename Div::arg > D
virtual int getDetectorCode(const DetLayer *a)
DataContainer const & data() const
obsolete name, use measurements() instead.
virtual GlobalPoint globalPosition() const
virtual std::pair< bool, double > estimate(const TrajectoryStateOnSurface &, const TransientTrackingRecHit &) const
T first(std::pair< T, U > const &p)
virtual float width() const =0
const PositionType & position() const
virtual AlgebraicSymMatrix parametersError() const =0