ATLAS Offline Software
Loading...
Searching...
No Matches
eflowFirstIntParameters.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5/********************************************************************
6
7NAME: eflowFirstIntParameters.h
8PACKAGE: offline/Reconstruction/eflowRec
9
10AUTHORS: M.Hodgkinson, R Duxfield (based on R.Duxfields Root package)
11CREATED: 18th Aug, 2005
12
13********************************************************************/
14
15//Athena Headers
19#include <iostream>
20
22
24 m_parameters(eflowCalo::nRegions) {
25 for (int i = 0; i < eflowCalo::nRegions; i++) {
27 for (int j = 0; j < m_nShapeParams; j++) m_parameters[i][j] = 0.0;
28 }
29}
30
32 if (!(bin1 && bin2)) { return false; }
33
34 double fudgeMean = w1 * bin1->fudgeMean() + (1.0 - w1) * bin2->fudgeMean();
35 double fudgeStdDev = w1 * bin1->fudgeStdDev() + (1.0 - w1) * bin2->fudgeStdDev();
36 std::vector<double> par(m_nShapeParams);
37
40
41 for (int j = 0; j < eflowCalo::nRegions; j++) {
43
44 const std::vector<double>& par1 = bin1->getShapeParameters(layer);
45 const std::vector<double>& par2 = bin2->getShapeParameters(layer);
46
47 for (int k = 0; k < m_nShapeParams; k++) {
48 par[k] = w1 * par1[k] + (1.0 - w1) * par2[k];
49 }
50
51 setShapeParameters(layer, par);
52 }
53
54 return true;
55}
This defines the eflowCalo enum, which is used to label calorimeter layers in a simplified scheme whi...
static const int nRegions
bool getWeightedParameters(const eflowFirstIntParameters *bin1, const eflowFirstIntParameters *bin2, const double w1)
void setShapeParameters(eflowCaloENUM layer, const std::vector< double > &p)
std::vector< std::vector< double > > m_parameters
double fudgeMean() const
void setFudgeMean(double fudgeMean)
double fudgeStdDev() const
void setFudgeStdDev(double fudgeStdDev)
eflowCalo::LAYER eflowCaloENUM