| 1 |
pam-fi |
1.1 |
#ifndef caloshape_h |
| 2 |
|
|
#define caloshape_h |
| 3 |
|
|
|
| 4 |
|
|
|
| 5 |
|
|
#if !defined(__CINT__) || defined(__MAKECINT__) |
| 6 |
|
|
|
| 7 |
|
|
#include <PamLevel2.h> |
| 8 |
|
|
|
| 9 |
|
|
#include <TMinuit.h> |
| 10 |
|
|
#include <TPaveStats.h> |
| 11 |
|
|
#include <TStyle.h> |
| 12 |
|
|
#include <TSystem.h> |
| 13 |
|
|
#include <TCanvas.h> |
| 14 |
|
|
#include <TGraphErrors.h> |
| 15 |
|
|
#include <TH1F.h> |
| 16 |
|
|
#include <TGraphErrors.h> |
| 17 |
|
|
#include <TF2.h> |
| 18 |
|
|
#include <TH2F.h> |
| 19 |
|
|
|
| 20 |
|
|
#include <iostream> |
| 21 |
|
|
#include <iomanip> |
| 22 |
|
|
using namespace std; |
| 23 |
|
|
|
| 24 |
|
|
#endif |
| 25 |
|
|
/////////////////////////////////////////////////// |
| 26 |
|
|
/// |
| 27 |
|
|
/// |
| 28 |
|
|
/// CLASS FOR INITIALIZATIONS & PARAMETERS |
| 29 |
|
|
/// |
| 30 |
|
|
/// |
| 31 |
|
|
/////////////////////////////////////////////////// |
| 32 |
|
|
class CaloShape_parameters : public TObject{ |
| 33 |
|
|
|
| 34 |
|
|
private: |
| 35 |
|
|
|
| 36 |
|
|
CaloShape_parameters(){ SetDefault(); }; |
| 37 |
|
|
|
| 38 |
|
|
static CaloShape_parameters * _parameters; |
| 39 |
|
|
|
| 40 |
|
|
public: |
| 41 |
|
|
|
| 42 |
|
|
static CaloShape_parameters *Get(){ |
| 43 |
|
|
if(_parameters==0) { |
| 44 |
|
|
// cout << "**NEW**"<<endl; |
| 45 |
|
|
_parameters = new CaloShape_parameters(); |
| 46 |
|
|
} |
| 47 |
|
|
return _parameters; |
| 48 |
|
|
} |
| 49 |
|
|
|
| 50 |
|
|
void SetDefault(); |
| 51 |
|
|
// ------ |
| 52 |
|
|
//general |
| 53 |
|
|
// ------ |
| 54 |
|
|
|
| 55 |
|
|
ClassDef(CaloShape_parameters,1); |
| 56 |
|
|
|
| 57 |
|
|
}; |
| 58 |
|
|
/////////////////////////////////////////////////// |
| 59 |
|
|
/// |
| 60 |
|
|
/// |
| 61 |
|
|
/// CLASS INPLEMENTATION |
| 62 |
|
|
/// |
| 63 |
|
|
/// |
| 64 |
|
|
/////////////////////////////////////////////////// |
| 65 |
|
|
class CaloShape : public TObject{ |
| 66 |
|
|
|
| 67 |
|
|
private: |
| 68 |
|
|
|
| 69 |
|
|
public: |
| 70 |
|
|
|
| 71 |
|
|
int nstrip[23]; |
| 72 |
|
|
float qtot[23];//q |
| 73 |
|
|
float delta[23];//<x-x0> (=0 if evaluated relative to mean, !=0 if evaluated relative to the track) |
| 74 |
|
|
float rms[23];//<(x-x0)**2> |
| 75 |
|
|
float skew[23];//<(x-x0)**3> |
| 76 |
|
|
float kurt[23];//<(x-x0)**4> |
| 77 |
|
|
float qtrk[23];//charge along the track (3 strips) |
| 78 |
|
|
float mean[23];//<x> |
| 79 |
|
|
|
| 80 |
|
|
float qmax; //maximum energy release in a strip |
| 81 |
|
|
float qtotmax;//maximum energy release in a plane |
| 82 |
|
|
int pmax;// plane with maximum release |
| 83 |
|
|
|
| 84 |
|
|
|
| 85 |
|
|
CaloShape(){ Reset(); }; |
| 86 |
|
|
CaloShape(CaloLevel1* l1, CaloTrkVar* ca2, int view, Bool_t usemechal) |
| 87 |
|
|
{ Reset(); Set(l1,ca2,view,usemechal); }; |
| 88 |
|
|
CaloShape(PamLevel2* l2, int ntr, int view, Bool_t usemechal) |
| 89 |
|
|
{ Reset(); Set(l2,ntr,view,usemechal); }; |
| 90 |
|
|
|
| 91 |
|
|
bool Set(PamLevel2*,int,int,Bool_t); |
| 92 |
|
|
bool Set(CaloLevel1*,CaloTrkVar*,int,bool); |
| 93 |
|
|
void Init(); |
| 94 |
|
|
void Reset(){ Init(); }; |
| 95 |
|
|
void Print(); |
| 96 |
|
|
|
| 97 |
|
|
ClassDef(CaloShape,1); |
| 98 |
|
|
|
| 99 |
|
|
}; |
| 100 |
|
|
|
| 101 |
|
|
#endif |