CDF II
CDF KITS
source navigation ]
diff markup ]
identifier search ]
freetext search ]
file search ]
 
Architecture: i386 ]
Version: 4.10.4 ] [ 4.10.5 ] [ 4.8.4 ] [ 4.8.4l3s ] [ 4.8.5 ] [ 4.9.0 ] [ 4.9.1 ] [ 4.9.1.hpt3 ] [ 4.9.1hpt3 ] [ 4.9.1top1 ] [ 5.0.0 ] [ 5.1.0 ] [ 5.1.0beamonly ] [ 5.1.1 ] [ 5.2.0 ] [ 5.3.0 ] [ 5.3.1 ] [ 5.3.1dsp ] [ 5.3.3 ] [ 5.3.3_nt ] [ 5.3.4 ] [ 6.1.1 ] [ 6.1.1b ] [ 6.1.2 ] [ 6.1.3 ] [ 6.1.4 ] [ 6.1.4int3 ] [ 6.1.4mc ] [ 6.1.4mc_a ] [ 6.1.6 ] [ development ]

001 // ---------------------------------------------------------------------------------//
002 // track_cut.hh                                                                      //
003 // Joe Boudreau, Rick Snider & all                                                  //
004 // 10/24/00 - Ray Culbertson, added 3D, hits cuts                                   //
005 // 10/29/00 - Petar, added PtLessThan, Phi0InRange
006 //                                                                                  //
007 //----------------------------------------------------------------------------------//
008 #ifndef _track_cut_h_
009 #define _track_cut_h_
010 #include "TrackingObjects/Tracks/CdfTrack.hh" 
011 #include "TrackingObjects/Tracks/CdfTrackCutBase.hh"
012 #include <string>
013 
014 class CdfTrackView;
015 class EventRecord;
016 template class Handle<CdfTrackView>;
017 class Hep3Vector;
018 class HepPoint3D;
019 
020 //
021 // Predicates for track selection:
022 //
023 namespace track_cut {
024   class SelectAll;
025   class SelectDefault;
026   class SelectPadTracks;
027   class SelectById;
028   class HasHelixFit;
029   class SelectAlgorithm;
030   class PtGreaterThan;
031   class AbsEtaLessThan;
032   class EtaLessThan;
033   class EtaGreaterThan;
034   class InConeAround;
035   class D0InRange;
036   class D0WrtPointInRange;
037   class Z0WrtZInRange;
038   class HasOnlyCOTHits;
039   class HasCOTHits;
040   class HasOnlySIHits;
041   class HasSIHits;
042   class HasSIHitLayers;
043   class HasSVXIIHitLayers;
044   class HasStereo;
045   class Phi0InRange;
046   class PtLessThan;
047   class MatchesCdfTrack;
048   class StdCOTTrack;
049   class StdSiTrack;
050   class PhysicalError;
051 
052   // Free function to fill view with tracks
053   // passing PAD selection
054   //
055   bool padTracks( EventRecord * pEvent,
056                   Handle<CdfTrackView> & viewHandle, 
057                   std::string processName = "PROD" );
058 }
059 
060 
061 //
062 // Select By Track Type
063 //
064 class track_cut::SelectDefault: public CdfTrackCut  
065 {
066 public:
067   SelectDefault( const SelectDefault & right );
068   SelectDefault();
069   virtual ~SelectDefault();
070   virtual SelectDefault * clone( void ) const;
071   virtual bool operator ()( const CdfTrack & t ) const;
072   using CdfTrackCut::operator();
073 private:
074   const SelectDefault & operator=( const SelectDefault & right );
075 };
076 
077 // Selection for tracks to be saved in pads. This should become
078 // SelectDefault eventually.
079 //
080 class track_cut::SelectPadTracks: public CdfTrackCut  
081 {
082 public:
083   SelectPadTracks( const SelectPadTracks & right );
084   SelectPadTracks();
085   virtual ~SelectPadTracks();
086   virtual SelectPadTracks * clone( void ) const;
087   virtual bool operator ()( const CdfTrack & t ) const;
088   using CdfTrackCut::operator();
089 private:
090   const SelectPadTracks & operator=( const SelectPadTracks & right );
091 
092   static const int   MIN_CT_HITS_PER_GOOD_SL;
093   static const int   MIN_GOOD_AXIAL_SL;
094   static const int   MIN_GOOD_STEREO_SL;
095   static const float MAX_D0;
096   static const float MAX_Z0;
097 };
098 
099 //
100 // Select Tracks by Id number
101 //
102 class track_cut::SelectById: public CdfTrackCut  
103 {
104 public:
105   SelectById( const CdfTrack::Id & id );
106   SelectById( const SelectById & right );
107   SelectById();
108   virtual ~SelectById();
109   virtual SelectById * clone( void ) const;
110   virtual bool operator ()( const CdfTrack & t ) const;
111   using CdfTrackCut::operator();
112 private:
113   const SelectById & operator=( const SelectById & right );
114   CdfTrack::Id _id;
115 };
116 
117 //
118 // Select Tracks having 3d helix fits
119 //
120 class track_cut::HasHelixFit: public CdfTrackCut  
121 {
122 public:
123   HasHelixFit( const HasHelixFit & right );
124   HasHelixFit();
125   virtual ~HasHelixFit();
126   virtual HasHelixFit * clone( void ) const;
127   virtual bool operator ()( const CdfTrack & t ) const;
128   using CdfTrackCut::operator();
129 private:
130   const HasHelixFit & operator=( const HasHelixFit & right );
131 };
132 
133 //
134 // Select By Track Type
135 //
136 class track_cut::SelectAlgorithm : public CdfTrackCut  
137 {
138 public:
139   SelectAlgorithm( const SelectAlgorithm & right );
140   SelectAlgorithm( const CdfTrack::TrackingAlgorithm & alg );
141   virtual ~SelectAlgorithm();
142   virtual SelectAlgorithm * clone( void ) const;
143   virtual bool operator ()( const CdfTrack & t ) const;
144   using CdfTrackCut::operator();
145 private:
146   const SelectAlgorithm & operator=( const SelectAlgorithm & right );
147   CdfTrack::TrackingAlgorithm _alg;
148 };
149 //
150 // Select Tracks above a minimum Pt.
151 //
152 class track_cut::PtGreaterThan : public CdfTrackCut 
153 {
154 public:
155   PtGreaterThan( double minPt );
156   PtGreaterThan( const PtGreaterThan & right );
157   virtual ~PtGreaterThan();
158   virtual PtGreaterThan * clone( void ) const;
159   virtual bool operator ()( const CdfTrack & t ) const;
160   using CdfTrackCut::operator();
161 private:
162   PtGreaterThan();
163   const PtGreaterThan & operator=( const PtGreaterThan & right );
164   double _minPt; 
165 };
166 //
167 // Select Tracks below a maximum Pt.  Although this cut is rarely used in real
168 // analysis, it is still useful for tracking studies (e.g. looking at multiple
169 // scattering or high dE/dx)...  (added by Petar)
170 //
171 class track_cut::PtLessThan : public CdfTrackCut 
172 {
173 public:
174   PtLessThan( double maxPt );
175   PtLessThan( const PtLessThan & right );
176   virtual ~PtLessThan();
177   virtual PtLessThan * clone( void ) const;
178   virtual bool operator ()( const CdfTrack & t ) const;
179   using CdfTrackCut::operator();
180 private:
181   PtLessThan();
182   const PtLessThan & operator=( const PtLessThan & right );
183   double _maxPt; 
184 };
185 
186 //
187 // Select tracks below a minimum |eta|
188 //
189 class track_cut::AbsEtaLessThan : public CdfTrackCut 
190 {
191 public:
192   AbsEtaLessThan( double maxEta );
193   AbsEtaLessThan( const AbsEtaLessThan & right );
194   virtual ~AbsEtaLessThan();
195   virtual AbsEtaLessThan * clone( void ) const;
196   virtual bool operator ()( const CdfTrack & t ) const;
197   using CdfTrackCut::operator();
198 private:
199   AbsEtaLessThan();
200   const AbsEtaLessThan & operator=( const AbsEtaLessThan & right );
201   double _maxEta;
202 };
203 //
204 // Select tracks below a maximim eta
205 //
206 class track_cut::EtaLessThan : public CdfTrackCut 
207 {
208 public:
209   EtaLessThan( double maxEta );
210   EtaLessThan( const EtaLessThan & right );
211   virtual ~EtaLessThan();
212   virtual EtaLessThan * clone( void ) const;
213   virtual bool operator ()( const CdfTrack & t ) const;
214   using CdfTrackCut::operator();
215 private:
216   EtaLessThan();
217   const EtaLessThan & operator=( const EtaLessThan & right );
218   double _maxEta;
219 };
220 //
221 // Select tracks above a minimum eta
222 //
223 class track_cut::EtaGreaterThan : public CdfTrackCut 
224 {
225 public:
226   EtaGreaterThan( double maxEta );
227   EtaGreaterThan( const EtaGreaterThan & right );
228   virtual ~EtaGreaterThan();
229   virtual EtaGreaterThan * clone( void ) const;
230   virtual bool operator ()( const CdfTrack & t ) const;
231   using CdfTrackCut::operator();
232 private:
233   EtaGreaterThan();
234   const EtaGreaterThan & operator=( const EtaGreaterThan & right );
235   double _minEta;
236 };
237 
238 //
239 // Select tracks within a cone in eta-phi space about a vector
240 //
241 class track_cut::InConeAround : public CdfTrackCut 
242 {
243 public:
244   InConeAround( const Hep3Vector & direction, double conesize );
245   InConeAround( const InConeAround & right );
246   virtual ~InConeAround();
247   virtual InConeAround * clone( void ) const;
248   virtual bool operator ()( const CdfTrack & t ) const;
249   using CdfTrackCut::operator();
250 private:
251   const InConeAround & operator=( const InConeAround & right );
252   Hep3Vector   _direction;
253   const double _conesize; 
254 };
255 //
256 // Select tracks within a D0 range
257 //
258 class track_cut::D0InRange : public CdfTrackCut 
259 {
260 public:
261   D0InRange(double  min, double max );
262   D0InRange( const D0InRange & right );
263   virtual ~D0InRange();
264   virtual D0InRange * clone( void ) const;
265   virtual bool operator ()( const CdfTrack & t ) const;
266   using CdfTrackCut::operator();
267 private:
268   const D0InRange & operator=( const D0InRange & right );
269   const double _min;
270   const double _max; 
271 };
272 //
273 // Select tracks within a range of D0 w.r.t a point.
274 //
275 class track_cut::D0WrtPointInRange : public CdfTrackCut 
276 {
277 public:
278   D0WrtPointInRange( const HepPoint3D & point, double min, double max );
279   D0WrtPointInRange( const D0WrtPointInRange & right );
280   virtual ~D0WrtPointInRange();
281   virtual D0WrtPointInRange * clone( void ) const;
282   virtual bool operator ()( const CdfTrack & t ) const;
283   using CdfTrackCut::operator();
284 private:
285   const D0WrtPointInRange & operator=( const D0WrtPointInRange & right );
286   const HepPoint3D _point;
287   const double     _min;
288   const double     _max; 
289 };
290 
291 //
292 // Select tracks within a max distance from a z position (associated with a vertex)
293 //
294 class track_cut::Z0WrtZInRange : public CdfTrackCut 
295 {
296 public:
297   Z0WrtZInRange( double zPoint, double maxDist );
298   Z0WrtZInRange( const Z0WrtZInRange & right );
299   virtual ~Z0WrtZInRange();
300   virtual Z0WrtZInRange * clone( void ) const;
301   virtual bool operator ()( const CdfTrack & t ) const;
302   using CdfTrackCut::operator();
303 private:
304   const Z0WrtZInRange & operator=( const Z0WrtZInRange & right );
305   const double  _zPoint;
306   const double  _maxDist; 
307 };
308 
309 // Select tracks that have no silicon hits
310 //
311 class track_cut::HasOnlyCOTHits : public CdfTrackCut
312 {
313 public:
314   HasOnlyCOTHits();
315   virtual ~HasOnlyCOTHits();
316   virtual HasOnlyCOTHits * clone() const;
317   virtual bool operator () ( const CdfTrack & t ) const;
318   using CdfTrackCut::operator();
319 private:
320 };
321 
322 
323 //
324 // Select tracks within >=minAx axial hits, minSt stereo hits, and
325 //  >= minAxSL axial superlayers with >= nAxHit hits and
326 //  >= minStSL stereo superlayers with >= nStHit hits 
327 //  
328 //
329 class track_cut::HasCOTHits : public CdfTrackCut 
330 {
331 public:
332   HasCOTHits( int minAx, int minSt, int minAxSL, int minStSL, 
333               int nAxHit, int nStHit);
334   HasCOTHits( const HasCOTHits & right );
335   virtual ~HasCOTHits();
336   virtual HasCOTHits * clone( void ) const;
337   virtual bool operator ()( const CdfTrack & t ) const;
338   using CdfTrackCut::operator();
339 private:
340   const HasCOTHits & operator=( const HasCOTHits & right );
341   const int _minAx;
342   const int _minSt;
343   const int _minAxSL; 
344   const int _minStSL;
345   const int _nAxHit;
346   const int _nStHit;
347 };
348 
349 
350 // Select tracks with non-zero silicon hits, zero COT hits
351 //
352 class track_cut::HasOnlySIHits : public CdfTrackCut
353 {
354 public:
355   HasOnlySIHits();
356   HasOnlySIHits( const HasOnlySIHits & right );
357   virtual ~HasOnlySIHits();
358   virtual HasOnlySIHits * clone() const;
359   virtual bool operator () ( const CdfTrack & t ) const;
360   using CdfTrackCut::operator();
361 private:
362 };
363 
364 //
365 // Select tracks with a min number of total, phi, stereo, z, 
366 // and sum of stero and z hits
367 //
368 class track_cut::HasSIHits : public CdfTrackCut 
369 {
370 public:
371   HasSIHits( int minPhi, int minSt, int minZ, int minStZSum );
372   HasSIHits( int minSum );
373   HasSIHits( const HasSIHits & right );
374   virtual ~HasSIHits();
375   virtual HasSIHits * clone( void ) const;
376   virtual bool operator ()( const CdfTrack & t ) const;
377   using CdfTrackCut::operator();
378 private:
379   const HasSIHits & operator=( const HasSIHits & right );
380   const int _minPhi;
381   const int _minSt;
382   const int _minZ;
383   const int _minStZSum;
384   const int _minSum;
385 };
386 
387 //
388 // Select tracks with a min number of total layers with, phi, stereo, z, 
389 // and sum of stero and z hits
390 //
391 class track_cut::HasSIHitLayers : public CdfTrackCut 
392 {
393 public:
394   HasSIHitLayers( int minPhi, int minSt, int minZ, int minStZSum );
395   HasSIHitLayers( const HasSIHitLayers & right );
396   virtual ~HasSIHitLayers();
397   virtual HasSIHitLayers * clone( void ) const;
398   virtual bool operator ()( const CdfTrack & t ) const;
399   using CdfTrackCut::operator();
400 private:
401   const HasSIHitLayers & operator=( const HasSIHitLayers & right );
402   const int _minPhi;
403   const int _minSt;
404   const int _minZ;
405   const int _minStZSum;
406 };
407 
408 //
409 // Select tracks with a min number of total SVXII layers with, phi, stereo, z, 
410 // and sum of stero and z hits
411 //
412 class track_cut::HasSVXIIHitLayers : public CdfTrackCut 
413 {
414 public:
415   HasSVXIIHitLayers( int minPhi, int minSt, int minZ, int minStZSum );
416   HasSVXIIHitLayers( const HasSVXIIHitLayers & right );
417   virtual ~HasSVXIIHitLayers();
418   virtual HasSVXIIHitLayers * clone( void ) const;
419   virtual bool operator ()( const CdfTrack & t ) const;
420   using CdfTrackCut::operator();
421 private:
422   const HasSVXIIHitLayers & operator=( const HasSVXIIHitLayers & right );
423   const int _minPhi;
424   const int _minSt;
425   const int _minZ;
426   const int _minStZSum;
427 };
428 
429 //
430 // Select tracks with silicon stereo hits
431 //
432 class track_cut::HasStereo : public CdfTrackCut 
433 {
434 public:
435   HasStereo();
436   HasStereo( const HasStereo & right );
437   virtual ~HasStereo();
438   virtual HasStereo * clone( void ) const;
439   virtual bool operator ()( const CdfTrack & t ) const;
440   using CdfTrackCut::operator();
441 private:
442   const HasStereo & operator=( const HasStereo & right );
443 };
444 
445 //
446 // Select tracks with \phi0 in a given range. (Phi0 is an UnsignedAngle, so the
447 // domain is between 0 and 2*PI).  This kind of cut is rarely used in an offline analysis,
448 // but can be useful for certain studies requiring quick-n-dirty check of fiduciality.
449 // For example, to select COT tracks that are fiducial in Barrel 4.  (added by Petar)
450 //
451 class track_cut::Phi0InRange : public CdfTrackCut 
452 {
453 public:
454   Phi0InRange(double  min, double max);
455   Phi0InRange( const Phi0InRange & right );
456   virtual ~Phi0InRange();
457   virtual Phi0InRange * clone( void ) const;
458   virtual bool operator ()( const CdfTrack & t ) const;
459   using CdfTrackCut::operator();
460 private:
461   const Phi0InRange & operator=( const Phi0InRange & right );
462   const double _min;
463   const double _max; 
464   const bool   _includes0;   // if the interval includes 0, which happens when min>max.
465 };
466 
467 
468 //
469 // Same as CdfTrackSelectAll.  Why Repeat it?  Well, we need to avoid a 
470 // circular dependency for one thing, and we want SelectAll to be available
471 // in the track_cut namespace for another...
472 
473 class track_cut::SelectAll : public CdfTrackCut 
474 {
475 public:
476   SelectAll();
477   SelectAll( const SelectAll & right );
478   virtual ~SelectAll();
479   virtual SelectAll * clone( void ) const;
480   virtual bool operator ()( const CdfTrack & t ) const;
481   using CdfTrackCut::operator();
482 private:
483   const SelectAll & operator=( const D0InRange & right );
484 };
485 
486 //
487 // Select track matching another CdfTrack by hit content.  This is useful (we hope)
488 // in algorithm comparison, and is specifically invented for the case in which 
489 // regional tracking results are compared to global tracking results.  Added by 
490 // Jim Loken and Joe Boudreau
491 class track_cut::MatchesCdfTrack : public CdfTrackCut 
492 {
493 public:
494 
495   // Enumerated data type used to determine which type of matching is used:
496   enum Option {COT_HITS,
497                SILICON_HITS,
498                COT_AND_SILICON_HITS,
499                PARAMETERS};
500 
501   MatchesCdfTrack( const CdfTrack &, 
502                    Option opt=COT_AND_SILICON_HITS, 
503                    double minFrac=1.00);
504   MatchesCdfTrack( const MatchesCdfTrack & right );
505   virtual ~MatchesCdfTrack();
506   virtual MatchesCdfTrack * clone( void ) const;
507   virtual bool operator ()( const CdfTrack & t ) const;
508   using CdfTrackCut::operator();
509 
510 private:
511 
512   const MatchesCdfTrack & operator=( const MatchesCdfTrack & right );
513 
514   const CdfTrack & _track;
515   const Option     _option;
516   const double     _fraction;
517 };
518 
519 //
520 // Select Tracks which pass a standard set of cuts appropriate for
521 // tracking studies, but different from the cuts used in SelectPadTracks.
522 // The COT tracks and SI tracks have different cuts, but may be combined.
523 //
524 class track_cut::StdCOTTrack : public CdfTrackCut
525 {
526 public:
527   StdCOTTrack( const StdCOTTrack & right );
528   StdCOTTrack();
529   virtual ~StdCOTTrack();
530   virtual StdCOTTrack * clone( void ) const;
531   virtual bool operator ()( const CdfTrack & t ) const;
532   using CdfTrackCut::operator();
533 private:
534   const StdCOTTrack & operator=( const StdCOTTrack & right );
535 
536   static const int   MIN_CT_HITS_PER_GOOD_SL;
537   static const int   MIN_GOOD_AXIAL_SL;
538   static const int   MIN_GOOD_STEREO_SL;
539   static const int   MIN_TOTAL_CT_HITS;
540 };
541 
542 class track_cut::StdSiTrack : public CdfTrackCut
543 {
544 public:
545   StdSiTrack( const StdSiTrack & right );
546   StdSiTrack();
547   virtual ~StdSiTrack();
548   virtual StdSiTrack * clone( void ) const;
549   virtual bool operator ()( const CdfTrack & t ) const;
550   using CdfTrackCut::operator();
551 private:
552   const StdSiTrack & operator=( const StdSiTrack & right );
553 
554   static const int   MIN_AXIAL_SI_HITS;
555 };
556 
557 //
558 // Select Tracks with physical fit covariance matrices.
559 // (Positive definite diagonal elements)
560 //
561 class track_cut::PhysicalError : public CdfTrackCut 
562 {
563 public:
564   PhysicalError();
565   PhysicalError( const PhysicalError & right );
566   virtual ~PhysicalError();
567   virtual PhysicalError * clone( void ) const;
568   virtual bool operator ()( const CdfTrack & t ) const;
569   using CdfTrackCut::operator();
570 private:
571   const PhysicalError & operator=( const PhysicalError & right );
572 };
573 
574 
575 #include "TrackingObjects/Tracks/track_cut.icc"
576 
577 #endif
578 
579 
580 

source navigation ] diff markup ] identifier search ] freetext search ] file search ]

This page was automatically generated by the LXR engine.
The LXR team
Valid HTML 4.01!

Send problems or questions to cdfcode@fnal.gov