File indexing completed on 2024-04-06 12:24:44
0001 #ifndef RecoEcal_EgammaCoreTools_Mustache_h
0002 #define RecoEcal_EgammaCoreTools_Mustache_h
0003
0004 #include <vector>
0005 #include "DataFormats/CaloRecHit/interface/CaloCluster.h"
0006 #include "DataFormats/CaloRecHit/interface/CaloClusterFwd.h"
0007 #include "DataFormats/EgammaReco/interface/SuperCluster.h"
0008 #include "CondFormats/EcalObjects/interface/EcalMustacheSCParameters.h"
0009 #include "CondFormats/EcalObjects/interface/EcalSCDynamicDPhiParameters.h"
0010
0011 namespace reco {
0012 namespace MustacheKernel {
0013 bool inMustache(const EcalMustacheSCParameters* params,
0014 const float maxEta,
0015 const float maxPhi,
0016 const float ClustE,
0017 const float ClusEta,
0018 const float ClusPhi);
0019 bool inDynamicDPhiWindow(const EcalSCDynamicDPhiParameters* params,
0020 const float seedEta,
0021 const float seedPhi,
0022 const float ClustE,
0023 const float ClusEta,
0024 const float clusPhi);
0025
0026 }
0027
0028 class Mustache {
0029 public:
0030 Mustache(const EcalMustacheSCParameters* mustache_params);
0031
0032 void MustacheID(const CaloClusterPtrVector& clusters, int& nclusters, float& EoutsideMustache);
0033 void MustacheID(const std::vector<const CaloCluster*>&, int& nclusers, float& EoutsideMustache);
0034 void MustacheID(const reco::SuperCluster& sc, int& nclusters, float& EoutsideMustache);
0035
0036 void MustacheClust(const std::vector<CaloCluster>& clusters,
0037 std::vector<unsigned int>& insideMust,
0038 std::vector<unsigned int>& outsideMust);
0039
0040 void FillMustacheVar(const std::vector<CaloCluster>& clusters);
0041
0042 float MustacheE() { return Energy_In_Mustache_; }
0043 float MustacheEOut() { return Energy_Outside_Mustache_; }
0044 float MustacheEtOut() { return Et_Outside_Mustache_; }
0045 float LowestMustClust() { return LowestClusterEInMustache_; }
0046 int InsideMust() { return included_; }
0047 int OutsideMust() { return excluded_; }
0048
0049 private:
0050 template <class RandomAccessPtrIterator>
0051 void MustacheID(const RandomAccessPtrIterator&,
0052 const RandomAccessPtrIterator&,
0053 int& nclusters,
0054 float& EoutsideMustache);
0055
0056 float Energy_In_Mustache_;
0057 float Energy_Outside_Mustache_;
0058 float Et_Outside_Mustache_;
0059 float LowestClusterEInMustache_;
0060 int excluded_;
0061 int included_;
0062 const EcalMustacheSCParameters* mustache_params_;
0063 };
0064
0065 }
0066
0067 #endif