Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:24:19

0001 /**
0002    \file
0003    Declaration of class EcalCleaningAlgo
0004 
0005    \author Stefano Argiro
0006    \date 20 Dec 2010
0007 */
0008 
0009 #ifndef __EcalCleaningAlgo_h_
0010 #define __EcalCleaningAlgo_h_
0011 
0012 #include "FWCore/Framework/interface/Frameworkfwd.h"
0013 #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"
0014 #include "DataFormats/EcalRecHit/interface/EcalRecHit.h"
0015 #include <vector>
0016 
0017 class DetId;
0018 
0019 class EcalCleaningAlgo {
0020 public:
0021   EcalCleaningAlgo(const edm::ParameterSet& p);
0022 
0023   /** check topology, return :
0024    *  kGood    : not anomalous
0025       kWeird   : spike
0026       kDiWeird : dispike */
0027   EcalRecHit::Flags checkTopology(const DetId& id, const EcalRecHitCollection& rhs);
0028 
0029   void setFlags(EcalRecHitCollection& rhs);
0030 
0031 private:
0032   /// yet another function to calculate swiss cross
0033   float e4e1(const DetId& id, const EcalRecHitCollection& rhs);
0034 
0035   /**  Compute e6 over e2 around xtal 1, where 2 is the most energetic in 
0036        the swiss cross around 1
0037   
0038              | | |   
0039            +-+-+-+-+
0040            | |1|2| |
0041            +-+-+-+-+
0042              | | |               */
0043   float e6e2(const DetId& id, const EcalRecHitCollection& rhs);
0044 
0045   float recHitE(const DetId id, const EcalRecHitCollection& recHits, bool useTimingInfo);
0046 
0047   /// in EB, check if we are near a crack
0048   bool isNearCrack(const DetId& detid);
0049 
0050   /// return the id of the  4 neighbours in the swiss cross
0051   const std::vector<DetId> neighbours(const DetId& id);
0052 
0053   ///ignore kOutOfTime above threshold when calculating e4e1
0054   float ignoreOutOfTimeThresh_;
0055 
0056   // Parameters for tolopogical cut
0057   // mark anomalous if e> cThreshold &&  e4e1> a*log10(e1e1)+b
0058   float cThreshold_barrel_;
0059   float cThreshold_endcap_;
0060   float e4e1_a_barrel_;
0061   float e4e1_b_barrel_;
0062   float e4e1_a_endcap_;
0063   float e4e1_b_endcap_;
0064   // when calculating e4/e1, ignore hits below this threshold
0065   float e4e1Treshold_barrel_;
0066   float e4e1Treshold_endcap_;
0067   float tightenCrack_e1_single_;
0068   float tightenCrack_e4e1_single_;
0069   float cThreshold_double_;
0070   float tightenCrack_e1_double_;
0071   float tightenCrack_e6e2_double_;
0072   float e6e2thresh_;
0073 };
0074 
0075 #endif  // __EcalCleaningAlgo_h_
0076 
0077 // Configure (x)emacs for this file ...
0078 // Local Variables:
0079 // mode:c++
0080 // compile-command: "make -C .. -k"
0081 // End: