-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJetWithTowers.h
71 lines (67 loc) · 2.57 KB
/
JetWithTowers.h
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
//
// Class for jets with towers
//
// first version: Hartmut Stadie 2008/12/25
// $Id: Jet.h,v 1.1 2008/12/16 15:21:27 stadie Exp $
//
#ifndef JETWITHTOWERS_H
#define JETWITHTOWERS_H
#include"Jet.h"
#include <vector>
#include <map>
class JetWithTowers : public Jet
{
public:
JetWithTowers(double Et, double EmEt, double HadEt ,double OutEt, double E,
double eta,double phi, Flavor flavor,
double const(*func)(TMeasurement *const x, double *const par),
double err, double* firstpar, int id, int npars);
virtual ~JetWithTowers();
virtual void ChangeParAddress(double* oldpar, double* newpar);
virtual double correctedEt(double Et) const;
//varies the i'th parameter for this jet by eps and returns its overall
// parameter id and sets the Et for the par + eps and par - eps result
virtual int varyPar(int i, double eps, double Et, double scale, double& upperEt, double& lowerEt);
void addTower(double Et, double EmEt, double HadEt ,double OutEt, double E,
double eta,double phi,
double const(*func)(TMeasurement *const x, double *const par),
double err, double* firstpar, int id, int npars);
protected:
class Tower : public TMeasurement {
public:
Tower(double Et, double EmEt, double HadEt ,double OutEt, double E,
double eta,double phi, double alpha,
double const(*func)(TMeasurement *const x, double *const par),
double err, double* firstpar, int id, int npars);
double Et() const {return pt;}
double EmEt() const {return EMF;}
double HadEt() const {return HadF;}
double OutEt() const {return OutF;}
double E() const {return TMeasurement::E;}
double eta() const {return TMeasurement::eta;}
double phi() const {return TMeasurement::phi;}
double projectionToJetAxis() const {return alpha;}
void ChangeParAddress(double* oldpar, double* newpar) {par += newpar - oldpar;}
double correctedEt(double Et) const;
double lastCorrectedEt() const { return lastCorEt;}
double Error() const {return error;}
int nPar() const {return npar;}
int FirstPar() const {return parid;}
double *Par() const {return par;}
private:
double alpha;
double* par;//address to first parameter for this jet
int npar,parid;
double error;
mutable TMeasurement temp;
mutable double lastCorEt;
double const(*f)(TMeasurement *const x, double *const par);
};
typedef std::vector<Tower*> TowerColl;
typedef TowerColl::iterator TowerCollIter;
typedef TowerColl::const_iterator TowerCollConstIter;
TowerColl towers;
int njetpars,ntowerpars;
std::map<int,double*> towerpars;
};
#endif