| 1 |
/* |
| 2 |
* TrkSaturationCut.h |
| 3 |
* |
| 4 |
* Created on: 31/ago/2009 |
| 5 |
* Author: Nicola Mori |
| 6 |
*/ |
| 7 |
|
| 8 |
/*! @file TrkSaturationCut.h The TrkSaturationCut class definition file */ |
| 9 |
|
| 10 |
#ifndef TRKSATURATIONCUT_H_ |
| 11 |
#define TRKSATURATIONCUT_H_ |
| 12 |
|
| 13 |
#include "../../PamCutBase/PamCutBase.h" |
| 14 |
|
| 15 |
/*! @brief The tracker saturation cut. |
| 16 |
* |
| 17 |
* This cut checks if the clusters on the track are saturated. It can reject events with |
| 18 |
* at least one saturated cluster or events with no saturated cluster, depending on the |
| 19 |
* value of the discardSaturated parameter passed to the constructor. |
| 20 |
*/ |
| 21 |
class TrkSaturationCut: public PamCut { |
| 22 |
|
| 23 |
public: |
| 24 |
/*! @brief Constructor. |
| 25 |
* |
| 26 |
* @param cutName The cut's name. |
| 27 |
* @param discardSaturated If true, events with at least one saturated cluster along the track are discarded. |
| 28 |
* If false, events with no saturated cluster along the track are discarded. |
| 29 |
* */ |
| 30 |
TrkSaturationCut(const char *cutName, bool discardSaturated = true) : |
| 31 |
PamCut(cutName), _discardSaturated(discardSaturated) { |
| 32 |
} |
| 33 |
/*! @brief Destructor. */ |
| 34 |
~TrkSaturationCut() { |
| 35 |
} |
| 36 |
|
| 37 |
/*! @brief The tracker saturation check. |
| 38 |
* |
| 39 |
* This method checks the clusters along the track. |
| 40 |
* |
| 41 |
* @param event The event to analyze. |
| 42 |
* @return #CUTOK if (at least one saturated cluster && discardSaturated = false) || (no saturated cluster && discardSaturated = true). |
| 43 |
* @return 0 otherwise. |
| 44 |
*/ |
| 45 |
int Check(PamLevel2 *event); |
| 46 |
|
| 47 |
private: |
| 48 |
|
| 49 |
bool _discardSaturated; |
| 50 |
|
| 51 |
}; |
| 52 |
#endif /* TRKSATURATIONCUT_H_ */ |