StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StjTowerEnergyVariationEnergy.h
1 // -*- mode: c++;-*-
2 // $Id: StjTowerEnergyVariationEnergy.h,v 1.1 2008/11/27 07:35:34 tai Exp $
3 // Copyright (C) 2008 Tai Sakuma <sakuma@bnl.gov>
4 #ifndef STJTOWERENERGYVARIATIONENERGY_H
5 #define STJTOWERENERGYVARIATIONENERGY_H
6 
7 #include "StjTowerEnergyVariation.h"
8 
10 
11 public:
12  StjTowerEnergyVariationEnergy(double ratio = 0.1)
13  : _ratio(ratio) { }
14  virtual ~StjTowerEnergyVariationEnergy() { }
15 
16  StjTowerEnergy operator()(const StjTowerEnergy& deposit)
17  {
18  StjTowerEnergy ret(deposit);
19 
20  ret.energy *= (1.0 + _ratio);
21 
22  return ret;
23  }
24 
25 private:
26 
27  double _ratio;
28 
30 
31 };
32 
33 #endif // STJTOWERENERGYVARIATIONENERGY_H