1 |
pam-fi |
1.1 |
/* |
2 |
|
|
* CaloIonCut.h |
3 |
|
|
* |
4 |
|
|
* Created on: 19-mar-2009 |
5 |
|
|
* Author: Sergio Ricciarini, Nicola Mori |
6 |
|
|
*/ |
7 |
|
|
|
8 |
|
|
/*! @file TrkIonCut.h The TrkIonCut class definition file */ |
9 |
|
|
|
10 |
pam-fi |
1.2 |
#ifndef NO_CALOAXIS |
11 |
|
|
|
12 |
pam-fi |
1.1 |
#ifndef CALOIONCUT_H_ |
13 |
|
|
#define CALOIONCUT_H_ |
14 |
|
|
|
15 |
|
|
#include "../../PamCutBase/PamCutBase.h" |
16 |
pam-fi |
1.2 |
#include <CaloAxis.h> |
17 |
pam-fi |
1.1 |
|
18 |
|
|
/*! @brief The calorimeter ionization cut. |
19 |
|
|
* |
20 |
|
|
* Checks the energy release on the first calorimeter plane. The current |
21 |
|
|
* implementation uses the CaloAxis objects; to save computing time, the class |
22 |
|
|
* assumes that the track is externally computed for each event and stored in |
23 |
|
|
* CaloAxis objects; pointers to these objects are passed as arguments to the constructor. |
24 |
|
|
* The Check method will then ignore the PamLevel2 *event and assume that the |
25 |
|
|
* current content of the CaloAxis objects are relative to the current event. |
26 |
|
|
* It is an user's task to ensure that these assumptions are fulfilled every time |
27 |
|
|
* Check or ApplyCut are called. |
28 |
|
|
* |
29 |
|
|
* CUT DEPENDENCIES: CaloTrackCut for the existence of the track (it can also provide the CaloAxis objects). |
30 |
|
|
*/ |
31 |
|
|
|
32 |
|
|
class CaloIonCut: public PamCut { |
33 |
|
|
|
34 |
|
|
public: |
35 |
|
|
/*! @brief Constructor. |
36 |
|
|
* |
37 |
|
|
* The CaloAxis arguments are objects which contain the calorimeter |
38 |
|
|
* track information for current event. |
39 |
|
|
* |
40 |
|
|
* @param cutName The cut's name. |
41 |
|
|
* @param xCaloAxis The pointer to the CaloAxis object for X axis. |
42 |
|
|
* @param yCaloAxis The pointer to the CaloAxis object for Y axis. |
43 |
|
|
* @param maxRelease The maximum mean ionization (in MIP) in the tracker planes above which an event is discarded. Default: 3. |
44 |
|
|
* @param minRelease The minimum mean ionization (in MIP) in the tracker planes below which an event is discarded. Default: 0. |
45 |
|
|
*/ |
46 |
|
|
CaloIonCut(const char *cutName, CaloAxis *xCaloAxis, CaloAxis *yCaloAxis, float minRelease = 0., float maxRelease = 3.) : |
47 |
|
|
PamCut(cutName), _xCaloAxis(xCaloAxis), _yCaloAxis(yCaloAxis), _minRelease(minRelease), _maxRelease(maxRelease) { |
48 |
|
|
} |
49 |
|
|
|
50 |
|
|
/*! @brief Destructor. */ |
51 |
|
|
~CaloIonCut() { |
52 |
|
|
} |
53 |
|
|
/*! @brief The calorimeter ionization check. |
54 |
|
|
* |
55 |
|
|
* @param event The event to analyze. |
56 |
|
|
* @return #CUTOK if charge released in plane 0 (from CaloAxis) is greater than minRelease and |
57 |
|
|
* lesser than maxRelease, for both X and Y |
58 |
|
|
* @return 0 otherwise |
59 |
|
|
*/ |
60 |
|
|
int Check(PamLevel2 *event); |
61 |
|
|
|
62 |
|
|
private: |
63 |
|
|
CaloAxis *_xCaloAxis, *_yCaloAxis; |
64 |
|
|
float _minRelease, _maxRelease; |
65 |
|
|
}; |
66 |
|
|
|
67 |
|
|
#endif /* CALOIONCUT_H_ */ |
68 |
pam-fi |
1.2 |
#endif /* NO_CALOAXIS */ |