2 |
* DataQualCut.h |
* DataQualCut.h |
3 |
* |
* |
4 |
* Created on: 10-mar-2009 |
* Created on: 10-mar-2009 |
5 |
* Author: Nicola Mori, S. Ricciarini |
* Author: N. Mori, S. Ricciarini, E. Mocchiutti |
6 |
*/ |
*/ |
7 |
|
|
8 |
#ifndef DATAQUALCUT_H_ |
#ifndef DATAQUALCUT_H_ |
21 |
|
|
22 |
public: |
public: |
23 |
/*! @brief Constructor. |
/*! @brief Constructor. |
|
DataQualCut.h |
|
24 |
* |
* |
25 |
* @param cutName The cut's name. |
* @param cutName The cut's name. |
26 |
* @param cutMask An integer whose binary code would provide a mask for the cuts to apply; |
* @param cutMask An integer whose binary code would provide a mask for the cuts to apply; |
27 |
* use a DETECTORCODE or a combination of them to enable the corresponding checks. |
* use a DETECTORCODE or a combination of them to enable the corresponding checks. |
28 |
* Default: ALL (meaning all Level 2 detectors except S4 and ND). |
* Default: DEFAULT (meaning Level-2 for TRK, CALO, TOF, ANT, TRG, ORB). |
29 |
*/ |
*/ |
30 |
|
|
31 |
DataQualCut(const char *cutName, unsigned int cutMask=ALL) : |
DataQualCut(const char *cutName, unsigned int cutMask = DEFAULT) : |
32 |
PamCut(cutName), _cutMask(cutMask) { |
PamCut(cutName), _cutMask(cutMask) { |
33 |
} |
} |
34 |
/*! @brief Destructor. */ |
/*! @brief Destructor. */ |
35 |
~DataQualCut() { |
~DataQualCut() { |
38 |
/*! @brief The event and data quality check. |
/*! @brief The event and data quality check. |
39 |
* |
* |
40 |
* This method checks if the pointers to the various detectors level 2 data are present and |
* This method checks if the pointers to the various detectors level 2 data are present and |
41 |
* if the data has been correctly unpacked, in this order: |
* if the data has been correctly unpacked. If it finds missing or corrupted data, it |
|
* Tracker, Calo, ToF, AC, Trigger, Orbital Info. If it finds missing or corrupted data, it |
|
42 |
* will stop the check and return a code corresponding to the missing/corrupted detector data. |
* will stop the check and return a code corresponding to the missing/corrupted detector data. |
43 |
* |
* |
44 |
* @param event The event to analyze. |
* @param event The event to analyze. |
47 |
* @return #CALO if Calo level2 data is missing or corrupted. |
* @return #CALO if Calo level2 data is missing or corrupted. |
48 |
* @return #CALO_L1 if Calo level1 data is missing |
* @return #CALO_L1 if Calo level1 data is missing |
49 |
* @return #TOF if ToF data is missing or corrupted. |
* @return #TOF if ToF data is missing or corrupted. |
50 |
* @return #AC if AC data is missing or corrupted. |
* @return #ANT if AC data is missing or corrupted. |
51 |
* @return #TRIG if Trigger data is missing or corrupted. |
* @return #TRG if Trigger data is missing or corrupted. |
52 |
* @return #ORB if Orbital Info data is missing. |
* @return #ORB if Orbital Info data is missing. |
53 |
*/ |
*/ |
54 |
int Check(PamLevel2 *event); |
int Check(PamLevel2 *event); |
56 |
private: |
private: |
57 |
|
|
58 |
unsigned int _cutMask; |
unsigned int _cutMask; |
59 |
|
Bool_t CL1IsGood(CaloLevel1 *cl1, CaloLevel2 *cl2); ///< Check CaloLevel1 Consistency |
60 |
|
|
61 |
}; |
}; |
62 |
#endif /* DATAQUALCUT_H_ */ |
#endif /* DATAQUALCUT_H_ */ |