ATLAS Offline Software
Loading...
Searching...
No Matches
EventShapes.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef EVENTSHAPES_EVENTSHAPES_H
6#define EVENTSHAPES_EVENTSHAPES_H
7
8#include <string>
9#include <vector>
10
12{
13 public:
14
15 template<class T>
17
19 THRUST = 0x0001, /* Thrust */
20 THRUST_MINOR = 0x0002, /* Thrust Minor */
21 HEAVY_JETMASS = 0x0007, /* heavy jet mass */
22 LIGHT_JETMASS = 0x0008, /* light jet mass */
23 TOTAL_BROADENING = 0x0009, /* total jet broadening */
24 WIDE_BROADENING = 0x000A, /* wide-jet broadening */
25 THRUST_PHI = 0x000B, /* phi value of Thrust axis */
26 THRUST_ETA = 0x000C, /* eta value of Thrust axis, if calculated in 3 dimensions */
27
28 TRANSVERSESPHERICITY = 0x000D, /* transverse sphericity defined in JHEP08(2000) 017 */
29
30 CPARAMETER = 0x0010, /* C parameter */
31
32 FOXWOLFRAM = 0x0080, /* Fox Wolfram H0 */
33 FLIPVALUES = 0x0081, /* flipvalue y23 */
34 EEC_PHI = 0x0082, /* EEC along phi */
35 EEC_ETA = 0x0083, /* EEC along eta */
36 EEC_RAD = 0x0084, /* EEC along rad */
37
38 FORWARD_TERM = 0x00F0, /* exponentially suppressed forward term */
39 CENTRAL_CUT = 0x00F1, /* cut for central region and forward region */
40 JET_ETA_CUT = 0x00F2, /* cut for eta of first two jets */
41 JET1_ET = 0x00F3, /* E_T of jet 1 */
42 JET2_ET = 0x00F4, /* E_T of jet 2 */
43
44 UNKNOWN = 0xFFFF /* unknown */
45 };
46
48
50 : m_type(type)
51 { m_values.push_back(value); };
52
53 EventShapes(EventShapeType type, std::vector<double>& values, bool canSwap = false)
54 : m_type(type)
55 {
56 if ( canSwap )
57 m_values.swap(values);
58 else
59 m_values = values;
60 };
61
63
64 EventShapeType getType() const { return m_type; };
65
66 unsigned int getSize() const { return m_values.size(); };
67
68 double getValue( unsigned int index = 0 ) const
69 {
70 return index < m_values.size() ? m_values[index] : 0;
71 };
72
73 void getValues( std::vector<double>& vec ) const
74 {
75 vec.resize( m_values.size() );
76 for ( unsigned int i=0; i<m_values.size(); ++i )
77 vec[i] = m_values[i];
78 return;
79 };
80
82 {
83 m_values.swap(es.m_values);
84 };
85
86 void setValue( double value, unsigned int index = 0 )
87 {
88 if ( index > m_values.size() )
89 m_values.resize(index, 0);
90 m_values[index]=value;
91 return;
92 };
93
94 void setValues( std::vector<double>& values, bool canSwap = false )
95 {
96 if ( canSwap )
97 {
98 m_values.swap(values);
99 }
100 else
101 {
102 m_values.resize( values.size() );
103 for ( unsigned int i=0; i<values.size(); ++i )
104 m_values[i] = values[i];
105 }
106 return;
107 };
108
109 std::string getName();
110
111 private:
112
114
115 std::vector<double> m_values;
116};
117
119CLASS_DEF(EventShapes, 255442581, 1)
120
121#endif
std::vector< size_t > vec
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
EventShapes(EventShapeType type, std::vector< double > &values, bool canSwap=false)
Definition EventShapes.h:53
EventShapeType m_type
void getValues(std::vector< double > &vec) const
Definition EventShapes.h:73
std::string getName()
void setValue(double value, unsigned int index=0)
Definition EventShapes.h:86
void setValues(std::vector< double > &values, bool canSwap=false)
Definition EventShapes.h:94
friend class EventShapeStoreConverterBase
Definition EventShapes.h:16
std::vector< double > m_values
double getValue(unsigned int index=0) const
Definition EventShapes.h:68
@ TRANSVERSESPHERICITY
Definition EventShapes.h:28
EventShapes(EventShapeType type, double value)
Definition EventShapes.h:49
EventShapeType getType() const
Definition EventShapes.h:64
unsigned int getSize() const
Definition EventShapes.h:66
void swapValues(EventShapes &es)
Definition EventShapes.h:81
Definition index.py:1