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 ()
 
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_
 

Detailed Description

Definition at line 18 of file Mustache.h.

Member Function Documentation

◆ FillMustacheVar()

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

Definition at line 231 of file Mustache.cc.

231  {
235  excluded_ = 0;
236  included_ = 0;
237  std::multimap<float, unsigned int> OrderedClust;
238  std::vector<unsigned int> insideMust;
239  std::vector<unsigned int> outsideMust;
240  MustacheClust(clusters, insideMust, outsideMust);
241  included_ = insideMust.size();
242  excluded_ = outsideMust.size();
243  for (unsigned int i = 0; i < insideMust.size(); ++i) {
244  unsigned int index = insideMust[i];
246  OrderedClust.insert(make_pair(clusters[index].energy(), index));
247  }
248  for (unsigned int i = 0; i < outsideMust.size(); ++i) {
249  unsigned int index = outsideMust[i];
252  }
253  std::multimap<float, unsigned int>::iterator it;
254  it = OrderedClust.begin();
255  unsigned int lowEindex = (*it).second;
256  LowestClusterEInMustache_ = clusters[lowEindex].energy();
257  }

References bsc_activity_cfg::clusters, HCALHighEnergyHPDFilter_cfi::energy, mps_fire::i, position, funct::sin(), and theta().

◆ InsideMust()

int reco::Mustache::InsideMust ( )
inline

Definition at line 34 of file Mustache.h.

34 { return included_; }

References included_.

◆ LowestMustClust()

float reco::Mustache::LowestMustClust ( )
inline

Definition at line 33 of file Mustache.h.

33 { 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 196 of file Mustache.cc.

198  {
199  unsigned int ncl = clusters.size();
200  if (!ncl)
201  return;
202 
203  //loop over all clusters to find the one with highest energy
204  float emax = 0;
205  int imax = -1;
206  for (unsigned int i = 0; i < ncl; ++i) {
207  float e = (clusters[i]).energy();
208  if (e > emax) {
209  emax = e;
210  imax = i;
211  }
212  }
213 
214  if (imax < 0)
215  return;
216  float eta0 = (clusters[imax]).eta();
217  float phi0 = (clusters[imax]).phi();
218 
219  for (unsigned int k = 0; k < ncl; k++) {
220  bool inMust =
221  MustacheKernel::inMustache(eta0, phi0, (clusters[k]).energy(), (clusters[k]).eta(), (clusters[k]).phi());
222  //return indices of Clusters outside the Mustache
223  if (!(inMust)) {
224  outsideMust.push_back(k);
225  } else { //return indices of Clusters inside the Mustache
226  insideMust.push_back(k);
227  }
228  }
229  }

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

◆ MustacheE()

float reco::Mustache::MustacheE ( )
inline

Definition at line 30 of file Mustache.h.

30 { return Energy_In_Mustache_; }

References Energy_In_Mustache_.

◆ MustacheEOut()

float reco::Mustache::MustacheEOut ( )
inline

Definition at line 31 of file Mustache.h.

31 { return Energy_Outside_Mustache_; }

References Energy_Outside_Mustache_.

◆ MustacheEtOut()

float reco::Mustache::MustacheEtOut ( )
inline

Definition at line 32 of file Mustache.h.

32 { 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 148 of file Mustache.cc.

148  {
149  MustacheID(clusters.begin(), clusters.end(), nclusters, EoutsideMustache);
150  }

References bsc_activity_cfg::clusters.

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

◆ MustacheID() [2/4]

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

Definition at line 157 of file Mustache.cc.

160  {
161  nclusters = 0;
162  EoutsideMustache = 0;
163 
164  unsigned int ncl = end - begin;
165  if (!ncl)
166  return;
167 
168  //loop over all clusters to find the one with highest energy
169  RandomAccessPtrIterator icl = begin;
170  RandomAccessPtrIterator clmax = end;
171  float emax = 0;
172  for (; icl != end; ++icl) {
173  const float e = (*icl)->energy();
174  if (e > emax) {
175  emax = e;
176  clmax = icl;
177  }
178  }
179 
180  if (end == clmax)
181  return;
182 
183  float eta0 = (*clmax)->eta();
184  float phi0 = (*clmax)->phi();
185 
186  bool inMust = false;
187  icl = begin;
188  for (; icl != end; ++icl) {
189  inMust = MustacheKernel::inMustache(eta0, phi0, (*icl)->energy(), (*icl)->eta(), (*icl)->phi());
190 
191  nclusters += (int)!inMust;
192  EoutsideMustache += (!inMust) * ((*icl)->energy());
193  }
194  }

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

◆ MustacheID() [3/4]

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

Definition at line 144 of file Mustache.cc.

144  {
145  MustacheID(sc.clustersBegin(), sc.clustersEnd(), nclusters, EoutsideMustache);
146  }

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

◆ MustacheID() [4/4]

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

Definition at line 152 of file Mustache.cc.

152  {
153  MustacheID(clusters.cbegin(), clusters.cend(), nclusters, EoutsideMustache);
154  }

References bsc_activity_cfg::clusters.

◆ OutsideMust()

int reco::Mustache::OutsideMust ( )
inline

Definition at line 35 of file Mustache.h.

35 { return excluded_; }

References excluded_.

Member Data Documentation

◆ Energy_In_Mustache_

float reco::Mustache::Energy_In_Mustache_
private

Definition at line 44 of file Mustache.h.

Referenced by MustacheE().

◆ Energy_Outside_Mustache_

float reco::Mustache::Energy_Outside_Mustache_
private

Definition at line 45 of file Mustache.h.

Referenced by MustacheEOut().

◆ Et_Outside_Mustache_

float reco::Mustache::Et_Outside_Mustache_
private

Definition at line 46 of file Mustache.h.

Referenced by MustacheEtOut().

◆ excluded_

int reco::Mustache::excluded_
private

Definition at line 48 of file Mustache.h.

Referenced by OutsideMust().

◆ included_

int reco::Mustache::included_
private

Definition at line 49 of file Mustache.h.

Referenced by InsideMust().

◆ LowestClusterEInMustache_

float reco::Mustache::LowestClusterEInMustache_
private

Definition at line 47 of file Mustache.h.

Referenced by LowestMustClust().

reco::Mustache::Et_Outside_Mustache_
float Et_Outside_Mustache_
Definition: Mustache.h:46
mps_fire.i
i
Definition: mps_fire.py:355
reco::Mustache::Energy_Outside_Mustache_
float Energy_Outside_Mustache_
Definition: Mustache.h:45
end
#define end
Definition: vmac.h:39
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
PVValHelper::eta
Definition: PVValidationHelpers.h:69
reco::Mustache::excluded_
int excluded_
Definition: Mustache.h:48
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:196
bsc_activity_cfg.clusters
clusters
Definition: bsc_activity_cfg.py:36
reco::Mustache::Energy_In_Mustache_
float Energy_In_Mustache_
Definition: Mustache.h:44
PVValHelper::phi
Definition: PVValidationHelpers.h:68
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:148
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:47
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
reco::MustacheKernel::inMustache
bool inMustache(const float maxEta, const float maxPhi, const float ClustE, const float ClusEta, const float ClusPhi)
Definition: Mustache.cc:9
reco::SuperCluster::clustersEnd
CaloCluster_iterator clustersEnd() const
last iterator over BasicCluster constituents
Definition: SuperCluster.h:89
begin
#define begin
Definition: vmac.h:32
reco::Mustache::included_
int included_
Definition: Mustache.h:49
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37