Go to the documentation of this file.00001 #ifndef RecoLocalCalo_EcalRecAlgos_EcalSeverityLevelAlgo_hh
00002 #define RecoLocalCalo_EcalRecAlgos_EcalSeverityLevelAlgo_hh
00003
00004 #include "DataFormats/DetId/interface/DetId.h"
00005 #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"
00006 #include "CondFormats/EcalObjects/interface/EcalChannelStatus.h"
00007
00008 class EcalSeverityLevelAlgo {
00009 public:
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 enum EcalSeverityLevel { kGood=0, kProblematic, kRecovered, kTime, kWeird, kBad };
00020
00021 enum SpikeId { kE1OverE9=0, kSwissCross, kSwissCrossBordersIncluded };
00022
00025 static int severityLevel( const DetId,
00026 const EcalRecHitCollection &,
00027 const EcalChannelStatus &,
00028 float recHitEtThreshold = 5.,
00029 SpikeId spId = kSwissCross,
00030 float spIdThreshold = 0.95,
00031 float recHitEnergyThresholdForTiming = 2.,
00032 float recHitEnergyThresholdForEE = 15,
00033 float spIdThresholdIEta85 = 0.999
00034 );
00035
00039 static float spikeFromNeighbours( const DetId id,
00040 const EcalRecHitCollection &,
00041 float recHitEtThreshold,
00042 SpikeId spId
00043 );
00044
00048 static float E1OverE9( const DetId id, const EcalRecHitCollection &, float recHitEtThreshold = 0. );
00049
00068 static float E2overE9( const DetId id, const EcalRecHitCollection &, float recHitEtThreshold = 10.0 ,
00069 float recHitEtThreshold2 = 1.0 , bool avoidIeta85=false, bool KillSecondHit=true);
00070
00071
00075 static float swissCross( const DetId id, const EcalRecHitCollection &, float recHitEtThreshold = 0. , bool avoidIeta85=true);
00076
00079 static bool spikeFromTiming( const EcalRecHit &, float recHitEnergyThreshold );
00080
00081 private:
00082
00083 static int severityLevel( uint32_t rhFlag, uint16_t dbStatus );
00084 static int severityLevel( const EcalRecHit &, const EcalChannelStatus & );
00085
00086 static uint16_t retrieveDBStatus( const DetId , const EcalChannelStatus &chStatus );
00087
00090 static float recHitE( const DetId id, const EcalRecHitCollection &recHits );
00091 static float recHitApproxEt( const DetId id, const EcalRecHitCollection &recHits );
00092 static float recHitE( const DetId id, const EcalRecHitCollection & recHits, int dEta, int dPhi );
00093 };
00094
00095 #endif