Belle II Software  release-08-01-10
utilities.cc
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 #include <hlt/softwaretrigger/calculations/utilities.h>
9 
10 namespace Belle2 {
15  namespace SoftwareTrigger {
16  double getRhoOfECLClusterWithMaximumRhoBelow(const StoreObjPtr<ParticleList>& pions,
17  const StoreObjPtr<ParticleList>& gammas,
18  const double belowLimit)
19  {
20  double maximumRho = -1.;
21 
22  for (const Particle& particle : *pions) {
23  const ECLCluster* tmpCluster = particle.getECLCluster();
24  if (not tmpCluster) {
25  continue;
26  }
27 
28  const double& currentRho = getRho(tmpCluster);
29 
30  if (currentRho >= belowLimit) {
31  continue;
32  }
33 
34  if (currentRho > maximumRho) {
35  maximumRho = currentRho;
36  }
37  }
38 
39  for (const Particle& particle : *gammas) {
40  const ECLCluster* tmpCluster = particle.getECLCluster();
41  if (not tmpCluster) {
42  continue;
43  }
44 
45  const double& currentRho = getRho(tmpCluster);
46 
47  if (currentRho >= belowLimit) {
48  continue;
49  }
50 
51  if (currentRho > maximumRho) {
52  maximumRho = currentRho;
53  }
54  }
55 
56  return maximumRho;
57  }
58  }
60 }
Abstract base class for different kinds of events.