1 |
pam-fi |
1.1 |
/* |
2 |
|
|
* TrackRedGeomCut.h |
3 |
|
|
* |
4 |
|
|
* Created on: 30-nov-2009 |
5 |
|
|
* Author: S. Ricciarini |
6 |
|
|
*/ |
7 |
|
|
|
8 |
|
|
/*! @file TrackRedGeomCut.h The TrackRedGeomCut class definition file */ |
9 |
|
|
|
10 |
|
|
#ifndef TRACKREDGEOMCUT_H_ |
11 |
|
|
#define TRACKREDGEOMCUT_H_ |
12 |
|
|
|
13 |
|
|
#include "../../PamCutBase/PamCutBase.h" |
14 |
pam-fi |
1.2 |
#include <CaloAxis.h> |
15 |
pam-fi |
1.1 |
|
16 |
|
|
/*! @brief The track reduced acceptance (i.e. rectangular pipe) cut. |
17 |
|
|
* This cut checks if the track is inside the reduced acceptance chosen. |
18 |
|
|
* The check can be done using either the tracker's track or CaloAxis track. |
19 |
|
|
* CUT DEPENDENCIES: objects pamTrack, xCaloAxis, yCaloAxis. |
20 |
|
|
*/ |
21 |
|
|
|
22 |
|
|
class TrackRedGeomCut: public PamCut { |
23 |
|
|
|
24 |
|
|
public: |
25 |
|
|
/*! @brief Constructor. |
26 |
|
|
* |
27 |
|
|
* The parameters are the X and Y lengths of the rectangular pipe define the reduced acceptance region (centered on PAMELA vertical central axis). |
28 |
|
|
* |
29 |
|
|
* @param cutName The cut's name. |
30 |
|
|
* @param pamTrack The pointer to *pamTrack object |
31 |
|
|
* @param xDim The X-side length in cm. |
32 |
|
|
* @param yDim The Y-side length in cm. |
33 |
|
|
*/ |
34 |
|
|
TrackRedGeomCut(const char *cutName, PamTrack **pamTrack, float xDim, float yDim) : |
35 |
pam-fi |
1.2 |
PamCut(cutName), _pamTrack(pamTrack), _xDim(xDim), _yDim(yDim) { |
36 |
|
|
#ifndef NO_CALOAXIS |
37 |
|
|
_xCaloAxis = _yCaloAxis = NULL; |
38 |
|
|
#endif /* NO_CALOAXIS */ |
39 |
pam-fi |
1.1 |
} |
40 |
|
|
|
41 |
|
|
/*! @brief Constructor. |
42 |
|
|
* |
43 |
|
|
* The CaloAxis arguments are pointers to objects which contain the CaloAxis calorimeter |
44 |
|
|
* track information for current event. |
45 |
|
|
* |
46 |
|
|
* @param cutName The cut's name. |
47 |
|
|
* @param xCaloAxis The pointer to the CaloAxis object for X axis. |
48 |
|
|
* @param yCaloAxis The pointer to the CaloAxis object for Y axis. |
49 |
|
|
* @param xDim The X-side length in cm. |
50 |
|
|
* @param yDim The Y-side length in cm. |
51 |
|
|
*/ |
52 |
pam-fi |
1.2 |
|
53 |
|
|
#ifndef NO_CALOAXIS |
54 |
pam-fi |
1.1 |
TrackRedGeomCut(const char *cutName, CaloAxis *xCaloAxis, CaloAxis *yCaloAxis, float xDim, float yDim) : |
55 |
|
|
PamCut(cutName), _pamTrack(NULL), _xCaloAxis(xCaloAxis), _yCaloAxis(yCaloAxis), _xDim(xDim), _yDim(yDim) { |
56 |
|
|
} |
57 |
pam-fi |
1.2 |
#endif /* NO_CALOAXIS */ |
58 |
pam-fi |
1.1 |
|
59 |
|
|
/*! @brief Destructor. */ |
60 |
|
|
~TrackRedGeomCut() { |
61 |
|
|
} |
62 |
|
|
|
63 |
|
|
/*! @brief The track reduced acceptance check. |
64 |
|
|
* |
65 |
|
|
* @param event The event to analyze. |
66 |
|
|
* @return #CUTOK if the track is inside the reduced acceptance. |
67 |
|
|
* @return 0 otherwise. |
68 |
|
|
*/ |
69 |
|
|
int Check(PamLevel2 *event); |
70 |
|
|
|
71 |
|
|
private: |
72 |
|
|
|
73 |
|
|
PamTrack **_pamTrack; |
74 |
pam-fi |
1.2 |
#ifndef NO_CALOAXIS |
75 |
pam-fi |
1.1 |
CaloAxis *_xCaloAxis, *_yCaloAxis; |
76 |
pam-fi |
1.2 |
#endif /* NO_CALOAXIS */ |
77 |
pam-fi |
1.1 |
float _xDim; |
78 |
|
|
float _yDim; |
79 |
|
|
|
80 |
|
|
}; |
81 |
|
|
#endif /* TRACKREDGEOMCUT_H_ */ |