001
002
003
004
005
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
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
053
054
055 bool padTracks( EventRecord * pEvent,
056 Handle<CdfTrackView> & viewHandle,
057 std::string processName = "PROD" );
058 }
059
060
061
062
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
078
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
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
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
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
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
168
169
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
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
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
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
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
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
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
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
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
325
326
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
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
366
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
389
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
410
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
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
447
448
449
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;
465 };
466
467
468
469
470
471
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
488
489
490
491 class track_cut::MatchesCdfTrack : public CdfTrackCut
492 {
493 public:
494
495
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
521
522
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
559
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
Send problems or questions to cdfcode@fnal.gov