StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StjTrackCutTdcaPtDependent.h
1 // -*- mode: c++ -*-
2 //
3 // Pibero Djawotho <pibero@tamu.edu>
4 // Texas A&M
5 // 22 May 2012
6 //
7 
8 #ifndef STJ_TRACK_CUT_TDCA_PT_DEPENDENT_H
9 #define STJ_TRACK_CUT_TDCA_PT_DEPENDENT_H
10 
11 #include <cmath>
12 #include "StjTrackCut.h"
13 
15  /* to reduce pile up tracks
16  *
17  *
18  *
19  * dca
20  * |
21  * |
22  * |
23  * | pass
24  * |
25  * |
26  * |
27  * dca1 |-----------\
28  * | \
29  * | \
30  * | \
31  * dca2 | \----------------------------
32  * |
33  * | not pass
34  * |
35  * -+--------------------------------------------- pt
36  * pt1 pt2
37  */
38 
39 public:
40  StjTrackCutTdcaPtDependent(double pt1 = 0.5, double dcaMax1 = 2.0, double pt2 = 1.5, double dcaMax2 = 1.0)
41  : _pt1(pt1), _dcaMax1(dcaMax1), _pt2(pt2), _dcaMax2(dcaMax2) { }
42 
43  bool operator()(const StjTrack& track) const
44  {
45  if (track.pt < _pt1) return fabs(track.Tdca) > _dcaMax1;
46  if (track.pt < _pt2) return fabs(track.Tdca) > fabs(_dcaMax1 + (_dcaMax2 - _dcaMax1) / (_pt2 - _pt1) * (track.pt - _pt1));
47  return fabs(track.Tdca) > _dcaMax2;
48  }
49 
50 private:
51  double _pt1;
52  double _dcaMax1;
53  double _pt2;
54  double _dcaMax2;
55 
56  ClassDef(StjTrackCutTdcaPtDependent,0)
57 };
58 
59 #endif // STJ_TRACK_CUT_TDCA_PT_DEPENDENT_H