CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
reco::Mustache Class Reference

#include <Mustache.h>

Public Member Functions

void FillMustacheVar (const std::vector< CaloCluster > &clusters)
 
int InsideMust ()
 
float LowestMustClust ()
 
 Mustache (const EcalMustacheSCParameters *mustache_params)
 
void MustacheClust (const std::vector< CaloCluster > &clusters, std::vector< unsigned int > &insideMust, std::vector< unsigned int > &outsideMust)
 
float MustacheE ()
 
float MustacheEOut ()
 
float MustacheEtOut ()
 
void MustacheID (const CaloClusterPtrVector &clusters, int &nclusters, float &EoutsideMustache)
 
void MustacheID (const reco::SuperCluster &sc, int &nclusters, float &EoutsideMustache)
 
void MustacheID (const std::vector< const CaloCluster * > &, int &nclusers, float &EoutsideMustache)
 
int OutsideMust ()
 

Private Member Functions

template<class RandomAccessPtrIterator >
void MustacheID (const RandomAccessPtrIterator &, const RandomAccessPtrIterator &, int &nclusters, float &EoutsideMustache)
 

Private Attributes

float Energy_In_Mustache_
 
float Energy_Outside_Mustache_
 
float Et_Outside_Mustache_
 
int excluded_
 
int included_
 
float LowestClusterEInMustache_
 
const EcalMustacheSCParametersmustache_params_
 

Detailed Description

Definition at line 28 of file Mustache.h.

Constructor & Destructor Documentation

◆ Mustache()

reco::Mustache::Mustache ( const EcalMustacheSCParameters mustache_params)

Definition at line 89 of file Mustache.cc.

89 : mustache_params_(mustache_params) {}

Member Function Documentation

◆ FillMustacheVar()

void reco::Mustache::FillMustacheVar ( const std::vector< CaloCluster > &  clusters)

Definition at line 178 of file Mustache.cc.

178  {
182  excluded_ = 0;
183  included_ = 0;
184  std::multimap<float, unsigned int> OrderedClust;
185  std::vector<unsigned int> insideMust;
186  std::vector<unsigned int> outsideMust;
187  MustacheClust(clusters, insideMust, outsideMust);
188  included_ = insideMust.size();
189  excluded_ = outsideMust.size();
190  for (unsigned int i = 0; i < insideMust.size(); ++i) {
191  unsigned int index = insideMust[i];
193  OrderedClust.insert(make_pair(clusters[index].energy(), index));
194  }
195  for (unsigned int i = 0; i < outsideMust.size(); ++i) {
196  unsigned int index = outsideMust[i];
199  }
200  std::multimap<float, unsigned int>::iterator it;
201  it = OrderedClust.begin();
202  unsigned int lowEindex = (*it).second;
203  LowestClusterEInMustache_ = clusters[lowEindex].energy();
204  }

References bsc_activity_cfg::clusters, HCALHighEnergyHPDFilter_cfi::energy, Energy_In_Mustache_, Energy_Outside_Mustache_, Et_Outside_Mustache_, excluded_, mps_fire::i, included_, LowestClusterEInMustache_, MustacheClust(), position, funct::sin(), and theta().

◆ InsideMust()

int reco::Mustache::InsideMust ( )
inline

Definition at line 46 of file Mustache.h.

46 { return included_; }

References included_.

◆ LowestMustClust()

float reco::Mustache::LowestMustClust ( )
inline

Definition at line 45 of file Mustache.h.

45 { return LowestClusterEInMustache_; }

References LowestClusterEInMustache_.

◆ MustacheClust()

void reco::Mustache::MustacheClust ( const std::vector< CaloCluster > &  clusters,
std::vector< unsigned int > &  insideMust,
std::vector< unsigned int > &  outsideMust 
)

Definition at line 143 of file Mustache.cc.

145  {
146  unsigned int ncl = clusters.size();
147  if (!ncl)
148  return;
149 
150  //loop over all clusters to find the one with highest energy
151  float emax = 0;
152  int imax = -1;
153  for (unsigned int i = 0; i < ncl; ++i) {
154  float e = (clusters[i]).energy();
155  if (e > emax) {
156  emax = e;
157  imax = i;
158  }
159  }
160 
161  if (imax < 0)
162  return;
163  float eta0 = (clusters[imax]).eta();
164  float phi0 = (clusters[imax]).phi();
165 
166  for (unsigned int k = 0; k < ncl; k++) {
167  bool inMust = MustacheKernel::inMustache(
168  mustache_params_, eta0, phi0, (clusters[k]).energy(), (clusters[k]).eta(), (clusters[k]).phi());
169  //return indices of Clusters outside the Mustache
170  if (!(inMust)) {
171  outsideMust.push_back(k);
172  } else { //return indices of Clusters inside the Mustache
173  insideMust.push_back(k);
174  }
175  }
176  }

References bsc_activity_cfg::clusters, MillePedeFileConverter_cfg::e, HCALHighEnergyHPDFilter_cfi::energy, PVValHelper::eta, mps_fire::i, reco::MustacheKernel::inMustache(), dqmdumpme::k, and mustache_params_.

Referenced by FillMustacheVar().

◆ MustacheE()

float reco::Mustache::MustacheE ( )
inline

Definition at line 42 of file Mustache.h.

42 { return Energy_In_Mustache_; }

References Energy_In_Mustache_.

◆ MustacheEOut()

float reco::Mustache::MustacheEOut ( )
inline

Definition at line 43 of file Mustache.h.

43 { return Energy_Outside_Mustache_; }

References Energy_Outside_Mustache_.

◆ MustacheEtOut()

float reco::Mustache::MustacheEtOut ( )
inline

Definition at line 44 of file Mustache.h.

44 { return Et_Outside_Mustache_; }

References Et_Outside_Mustache_.

◆ MustacheID() [1/4]

void reco::Mustache::MustacheID ( const CaloClusterPtrVector clusters,
int &  nclusters,
float &  EoutsideMustache 
)

Definition at line 95 of file Mustache.cc.

95  {
96  MustacheID(clusters.begin(), clusters.end(), nclusters, EoutsideMustache);
97  }

References bsc_activity_cfg::clusters.

Referenced by PFElectronTranslator::createGsfElectrons(), PFPhotonTranslator::createPhotons(), and MustacheID().

◆ MustacheID() [2/4]

template<class RandomAccessPtrIterator >
void reco::Mustache::MustacheID ( const RandomAccessPtrIterator &  begin,
const RandomAccessPtrIterator &  end,
int &  nclusters,
float &  EoutsideMustache 
)
private

Definition at line 104 of file Mustache.cc.

107  {
108  nclusters = 0;
109  EoutsideMustache = 0;
110 
111  unsigned int ncl = end - begin;
112  if (!ncl)
113  return;
114 
115  //loop over all clusters to find the one with highest energy
116  RandomAccessPtrIterator icl = begin;
117  RandomAccessPtrIterator clmax = end;
118  float emax = 0;
119  for (; icl != end; ++icl) {
120  const float e = (*icl)->energy();
121  if (e > emax) {
122  emax = e;
123  clmax = icl;
124  }
125  }
126 
127  if (end == clmax)
128  return;
129 
130  float eta0 = (*clmax)->eta();
131  float phi0 = (*clmax)->phi();
132 
133  bool inMust = false;
134  icl = begin;
135  for (; icl != end; ++icl) {
136  inMust = MustacheKernel::inMustache(mustache_params_, eta0, phi0, (*icl)->energy(), (*icl)->eta(), (*icl)->phi());
137 
138  nclusters += (int)!inMust;
139  EoutsideMustache += (!inMust) * ((*icl)->energy());
140  }
141  }

References MillePedeFileConverter_cfg::e, mps_fire::end, reco::MustacheKernel::inMustache(), createfilelist::int, and mustache_params_.

◆ MustacheID() [3/4]

void reco::Mustache::MustacheID ( const reco::SuperCluster sc,
int &  nclusters,
float &  EoutsideMustache 
)

Definition at line 91 of file Mustache.cc.

91  {
92  MustacheID(sc.clustersBegin(), sc.clustersEnd(), nclusters, EoutsideMustache);
93  }

References reco::SuperCluster::clustersBegin(), reco::SuperCluster::clustersEnd(), and MustacheID().

◆ MustacheID() [4/4]

void reco::Mustache::MustacheID ( const std::vector< const CaloCluster * > &  clusters,
int &  nclusers,
float &  EoutsideMustache 
)

Definition at line 99 of file Mustache.cc.

99  {
100  MustacheID(clusters.cbegin(), clusters.cend(), nclusters, EoutsideMustache);
101  }

References bsc_activity_cfg::clusters, and MustacheID().

◆ OutsideMust()

int reco::Mustache::OutsideMust ( )
inline

Definition at line 47 of file Mustache.h.

47 { return excluded_; }

References excluded_.

Member Data Documentation

◆ Energy_In_Mustache_

float reco::Mustache::Energy_In_Mustache_
private

Definition at line 56 of file Mustache.h.

Referenced by FillMustacheVar(), and MustacheE().

◆ Energy_Outside_Mustache_

float reco::Mustache::Energy_Outside_Mustache_
private

Definition at line 57 of file Mustache.h.

Referenced by FillMustacheVar(), and MustacheEOut().

◆ Et_Outside_Mustache_

float reco::Mustache::Et_Outside_Mustache_
private

Definition at line 58 of file Mustache.h.

Referenced by FillMustacheVar(), and MustacheEtOut().

◆ excluded_

int reco::Mustache::excluded_
private

Definition at line 60 of file Mustache.h.

Referenced by FillMustacheVar(), and OutsideMust().

◆ included_

int reco::Mustache::included_
private

Definition at line 61 of file Mustache.h.

Referenced by FillMustacheVar(), and InsideMust().

◆ LowestClusterEInMustache_

float reco::Mustache::LowestClusterEInMustache_
private

Definition at line 59 of file Mustache.h.

Referenced by FillMustacheVar(), and LowestMustClust().

◆ mustache_params_

const EcalMustacheSCParameters* reco::Mustache::mustache_params_
private

Definition at line 62 of file Mustache.h.

Referenced by MustacheClust(), and MustacheID().

reco::Mustache::Et_Outside_Mustache_
float Et_Outside_Mustache_
Definition: Mustache.h:58
mps_fire.i
i
Definition: mps_fire.py:428
reco::MustacheKernel::inMustache
bool inMustache(const EcalMustacheSCParameters *params, const float maxEta, const float maxPhi, const float ClustE, const float ClusEta, const float ClusPhi)
Definition: Mustache.cc:8
reco::Mustache::Energy_Outside_Mustache_
float Energy_Outside_Mustache_
Definition: Mustache.h:57
reco::Mustache::mustache_params_
const EcalMustacheSCParameters * mustache_params_
Definition: Mustache.h:62
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
PVValHelper::eta
Definition: PVValidationHelpers.h:70
mps_fire.end
end
Definition: mps_fire.py:242
reco::Mustache::excluded_
int excluded_
Definition: Mustache.h:60
theta
Geom::Theta< T > theta() const
Definition: Basic3DVectorLD.h:150
HCALHighEnergyHPDFilter_cfi.energy
energy
Definition: HCALHighEnergyHPDFilter_cfi.py:5
dqmdumpme.k
k
Definition: dqmdumpme.py:60
reco::Mustache::MustacheClust
void MustacheClust(const std::vector< CaloCluster > &clusters, std::vector< unsigned int > &insideMust, std::vector< unsigned int > &outsideMust)
Definition: Mustache.cc:143
bsc_activity_cfg.clusters
clusters
Definition: bsc_activity_cfg.py:36
reco::Mustache::Energy_In_Mustache_
float Energy_In_Mustache_
Definition: Mustache.h:56
PVValHelper::phi
Definition: PVValidationHelpers.h:69
position
static int position[264][3]
Definition: ReadPGInfo.cc:289
reco::Mustache::MustacheID
void MustacheID(const CaloClusterPtrVector &clusters, int &nclusters, float &EoutsideMustache)
Definition: Mustache.cc:95
createfilelist.int
int
Definition: createfilelist.py:10
reco::SuperCluster::clustersBegin
CaloCluster_iterator clustersBegin() const
fist iterator over BasicCluster constituents
Definition: SuperCluster.h:86
reco::Mustache::LowestClusterEInMustache_
float LowestClusterEInMustache_
Definition: Mustache.h:59
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
reco::SuperCluster::clustersEnd
CaloCluster_iterator clustersEnd() const
last iterator over BasicCluster constituents
Definition: SuperCluster.h:89
reco::Mustache::included_
int included_
Definition: Mustache.h:61
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37