Belle II Software  release-05-01-25
utilities.cc
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2016 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Nils Braun *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 #include <hlt/softwaretrigger/calculations/utilities.h>
11 
12 namespace Belle2 {
17  namespace SoftwareTrigger {
18  double getRhoOfECLClusterWithMaximumRhoBelow(const StoreObjPtr<ParticleList>& pions,
19  const StoreObjPtr<ParticleList>& gammas,
20  const double belowLimit)
21  {
22  double maximumRho = -1.;
23 
24  for (const Particle& particle : *pions) {
25  const ECLCluster* tmpCluster = particle.getECLCluster();
26  if (not tmpCluster) {
27  continue;
28  }
29 
30  const double& currentRho = getRho(tmpCluster);
31 
32  if (currentRho >= belowLimit) {
33  continue;
34  }
35 
36  if (currentRho > maximumRho) {
37  maximumRho = currentRho;
38  }
39  }
40 
41  for (const Particle& particle : *gammas) {
42  const ECLCluster* tmpCluster = particle.getECLCluster();
43  if (not tmpCluster) {
44  continue;
45  }
46 
47  const double& currentRho = getRho(tmpCluster);
48 
49  if (currentRho >= belowLimit) {
50  continue;
51  }
52 
53  if (currentRho > maximumRho) {
54  maximumRho = currentRho;
55  }
56  }
57 
58  return maximumRho;
59  }
60  }
62 }
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19