Belle II Software  release-05-01-25
CleoCones.cc
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Markus Röhrken, Pablo Goldenzweig (KIT) *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #include <analysis/ContinuumSuppression/CleoCones.h>
12 
13 
14 namespace Belle2 {
20  CleoCones::CleoCones(const std::vector<TVector3>& p3_cms_all,
21  const std::vector<TVector3>& p3_cms_roe,
22  const TVector3& thrustB,
23  bool calc_CleoCones_with_all,
24  bool calc_CleoCones_with_roe
25  )
26  {
27  m_cleo_cone_with_all.clear();
29 
30  // ----------------------------------------------------------------------
31  // Calculate momentum flow in 9 cones for all particles in event
32  // ----------------------------------------------------------------------
33  if (calc_CleoCones_with_all == true) {
34  for (int i = 1; i <= 9; i++) {
35  float momentum_flow_all = 0;
36  for (auto& iter0 : p3_cms_all) {
37 
38  /* Use the following intervals
39  0*10<= <1*10 0- 10 170-180 180-1*10< <=180-0*10
40  1*10<= <2*10 10- 20 160-170 180-2*10< <=180-1*10
41  2*10<= <3*10 20- 30 150-160 180-3*10< <=180-2*10
42  3*10<= <4*10 30- 40 140-150 180-4*10< <=180-3*10
43  4*10<= <5*10 40- 50 130-140 180-5*10< <=180-4*10
44  5*10<= <6*10 50- 60 120-130 180-6*10< <=180-5*10
45  6*10<= <7*10 60- 70 110-120 180-7*10< <=180-6*10
46  7*10<= <8*10 70- 80 100-110 180-8*10< <=180-7*10
47  8*10<= <9*10 80- 90 90-100 180-9*10< <=180-8*10
48  ==90 */
49 
50  float angle = ((180 * (thrustB.Angle(iter0))) / M_PI);
51  if (((((i - 1) * 10) <= angle) && (angle < (i * 10))) || (((180 - (i * 10)) < angle) && (angle <= (180 - ((i - 1) * 10))))) {
52  momentum_flow_all += iter0.Mag();
53  // B2DEBUG(19, "interval " << ((i-1)*10) << " to " << (i*10) << " and " << (180-(i*10)) << " to " << (180-((i-1)*10)) << " has value " << (180*(thrustB.angle(*iter0)))/M_PI << ", momentum flow is " << momentum_flow );
54  }
55  if ((i == 9) && (angle == 90)) {
56  momentum_flow_all += iter0.Mag();
57  }
58  }
59  m_cleo_cone_with_all.push_back(momentum_flow_all);
60  }
61  }
62 
63  // ----------------------------------------------------------------------
64  // Calculate momentum flow in 9 cones for all particles in rest of event
65  // ----------------------------------------------------------------------
66  if (calc_CleoCones_with_roe == true) {
67  for (int i = 1; i <= 9; i++) {
68  float momentum_flow_roe = 0;
69  for (auto& iter1 : p3_cms_roe) {
70  float angle = ((180 * (thrustB.Angle(iter1))) / M_PI);
71  if (((((i - 1) * 10) <= angle) && (angle < (i * 10))) || (((180 - (i * 10)) < angle) && (angle <= (180 - ((i - 1) * 10))))) {
72  momentum_flow_roe += iter1.Mag();
73  }
74  if ((i == 9) && (angle == 90)) {
75  momentum_flow_roe += iter1.Mag();
76  }
77  }
78  m_cleo_cone_with_roe.push_back(momentum_flow_roe);
79  }
80  }
81  }
82 
84 } // Belle2 namespace
Belle2::CleoCones::m_cleo_cone_with_all
std::vector< float > m_cleo_cone_with_all
Cleo Cones calculated from all tracks.
Definition: CleoCones.h:58
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::CleoCones::CleoCones
CleoCones(const std::vector< TVector3 > &p3_cms_all, const std::vector< TVector3 > &p3_cms_roe, const TVector3 &thrustB, bool calc_CleoCones_with_all, bool calc_CleoCones_with_roe)
Constructor.
Definition: CleoCones.cc:28
Belle2::CleoCones::m_cleo_cone_with_roe
std::vector< float > m_cleo_cone_with_roe
Cleo Cones calculated from only ROE tracks.
Definition: CleoCones.h:59