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