/usr/include/ThePEG/Analysis/LWH/DataPoint.h is in libthepeg-dev 1.8.0-1.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | // -*- C++ -*-
//
// DataPoint.h is a part of ThePEG - Toolkit for HEP Event Generation
// Copyright (C) 1999-2011 Leif Lonnblad
//
// ThePEG is licenced under version 2 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef LWH_DataPoint_H
#define LWH_DataPoint_H
//
// This is the declaration of the DataPoint class representing
//
#include <limits>
#include <cmath>
#include <algorithm>
#include "AIDataPoint.h"
#include "Measurement.h"
namespace LWH {
using namespace AIDA;
/**
* An DataPoint represents a binned histogram axis. A 1D Histogram would have
* one DataPoint representing the X axis, while a 2D Histogram would have two
* axes representing the X and Y DataPoint.
*/
class DataPoint: public IDataPoint {
public:
/**
* Construct a data point with a given number of dimensions.
*/
DataPoint(int dim = 2)
: m(dim) {}
/**
* Copy constructor.
*/
DataPoint(const DataPoint & d)
: IDataPoint(d), m(d.m) {}
/**
* Copy from any IDataPoint.
*/
DataPoint(const IDataPoint & id)
: m(id.dimension()) {
for ( int i = 0, N = m.size(); i < N; ++i )
m[i] = Measurement(id.coordinate(i)->value(),
id.coordinate(i)->errorPlus(),
id.coordinate(i)->errorMinus());
}
/**
* Destructor.
*/
virtual ~DataPoint() {}
/**
* Get the dimension of the IDataPoint, i.e. the number
* of coordinates the point has.
* @return The dimension.
*/
int dimension() const {
return m.size();
}
/**
* Get the IMeasurement for a given coordinate.
* @param coord The coordinate.
* @return The corresponding IMeasurement.
*/
IMeasurement * coordinate(int coord) {
return &(m[coord]);
}
/**
* Get the IMeasurement for a given coordinate.
* @param coord The coordinate.
* @return The corresponding IMeasurement.
*/
const IMeasurement * coordinate(int coord) const {
return &(m[coord]);
}
private:
/**
* The included measurements.
*/
std::vector<Measurement> m;
};
}
#endif /* LWH_DataPoint_H */
|