1 |
pam-fi |
1.1 |
/* |
2 |
|
|
* TrkHitQualCut.h |
3 |
|
|
* |
4 |
|
|
* Created on: 13-mar-2009 |
5 |
pam-fi |
1.2 |
* Author: Nicola Mori |
6 |
pam-fi |
1.1 |
*/ |
7 |
|
|
|
8 |
|
|
/*! @file TrkHitQualCut.h The TrkHitQualCut class definition file */ |
9 |
|
|
|
10 |
|
|
#ifndef TRKHITQUALCUT_H_ |
11 |
|
|
#define TRKHITQUALCUT_H_ |
12 |
|
|
|
13 |
|
|
#include "../../PamCutBase/PamCutBase.h" |
14 |
|
|
|
15 |
|
|
/*! @brief The tracker hit quality cut. |
16 |
|
|
* |
17 |
|
|
* This cut performs a check on the number of hits on X and Y view |
18 |
|
|
* and on the lever arm. |
19 |
|
|
* |
20 |
|
|
* CUT DEPENDENCIES: TrkPhysSin for object trkTrack |
21 |
|
|
*/ |
22 |
|
|
|
23 |
|
|
class TrkHitQualCut: public PamCut { |
24 |
|
|
|
25 |
|
|
public: |
26 |
|
|
/*! @brief Constructor. |
27 |
|
|
* |
28 |
|
|
* @param cutName The cut's name. |
29 |
pam-fi |
1.3 |
* @param trkAlg The tracking algorythm used to check the track. |
30 |
pam-fi |
1.2 |
* @param xMinHit The minimum number of hits along the track for X view |
31 |
|
|
* @param yMinHit The minimum number of hits along the track for X view |
32 |
|
|
* @param xLeverArm The minimum lever arm for X view |
33 |
|
|
* @param xAngMin The minimum XZ angle (degrees) measured from vertical axis on the first TRK plane (can either positive or negative) |
34 |
|
|
* @param xAngMax The maximum XZ angle (degrees) measured from vertical axis on the first TRK plane (can either positive or negative) |
35 |
pam-fi |
1.1 |
*/ |
36 |
pam-fi |
1.3 |
TrkHitQualCut(const char *cutName, const char *trkAlg, int xMinHit, int yMinHit, int xLeverArm, Float_t xAngMin=-90., Float_t xAngMax=+90.) : |
37 |
|
|
PamCut(cutName), _trkAlg(trkAlg), _xMinHit(xMinHit), _yMinHit(yMinHit), _xLeverArm(xLeverArm), _xAngMin(xAngMin), _xAngMax(xAngMax) { |
38 |
pam-fi |
1.1 |
} |
39 |
|
|
/*! @brief Destructor. */ |
40 |
|
|
~TrkHitQualCut() { |
41 |
|
|
} |
42 |
|
|
|
43 |
|
|
/*! @brief The tracker hit quality check. |
44 |
|
|
* |
45 |
pam-fi |
1.2 |
* The event is rejected if number of X hits or Y hits or X lever arm is less than the |
46 |
|
|
* parameter passed to the constructor or if the angle is not inside the specified range. |
47 |
pam-fi |
1.1 |
* |
48 |
|
|
* @see TrkHitQualCut |
49 |
|
|
* @param event The event to analyze. |
50 |
pam-fi |
1.2 |
* @return #CUTOK if X hits, Y hits and X lever arm are greater or equal than the minimum values and if the XZ angle satisfies the condition xAngMin < angle < xAngMax. |
51 |
pam-fi |
1.1 |
* @return 0 if at least one of the above conditions is not matched. |
52 |
|
|
*/ |
53 |
|
|
int Check(PamLevel2 *event); |
54 |
|
|
|
55 |
|
|
private: |
56 |
|
|
|
57 |
pam-fi |
1.3 |
const char *_trkAlg; |
58 |
pam-fi |
1.1 |
int _xMinHit, _yMinHit, _xLeverArm; |
59 |
pam-fi |
1.2 |
Float_t _xAngMin, _xAngMax; |
60 |
pam-fi |
1.1 |
|
61 |
|
|
}; |
62 |
|
|
#endif /* TRKHITQUALCUT_H_ */ |