#ifndef __TMCPDET_H
#define __TMCPDET_H
#include <iostream>
#ifndef __ROOTDEFINE_H
#define __ROOTDEFINE_H
#include "rootDefine.h"
#endif
#ifndef __PACKETID_H
#define __PACKETID_H
#include "packetID.h"
#endif
#include <TBranch.h>
#include <TCutG.h>
#include <TF2.h>
#include <TGraphErrors.h>
#include <TGraph2DErrors.h>
#include <TH2.h>
#include <TObject.h>
#include <TRandom3.h>
#include <TROOT.h>
#include <TSpline.h>
#include <TTree.h>
#include <TVector3.h>
using namespace std;
class TMcp;
class TMcpDet : public TObject{
private:
TRandom3 fRandom;
Int_t fNGainStages;
public:
TSpline3 *fRowX[13];
TSpline3 *fRowY[13];
TSpline3 *fBicubicX;
TSpline3 *fBicubicY;
Double_t GridFX[13][13];
Double_t GridFY[13][13];
Double_t GridX[13];
Double_t GridY[13];
protected:
TString fName;
TString fTitle;
Int_t fId;
public:
TMcp *fCon;
TMcpDet *fConD;
TMcp *parent;
Int_t fMapOrder;
Bool_t fPosSumCorr;
Int_t fChargeMap[9];
Int_t fSigMap[9];
Int_t fMethod;
Double_t fHLSlope[4];
Double_t fHLOffset[4];
Double_t fHLLimits[4][2];
Double_t corner[12];
Double_t tSig;
Double_t xScale;
Double_t yScale;
Double_t rotAlign;
Double_t xOffset;
Double_t yOffset;
Double_t zOffset;
Double_t xShift;
Double_t yShift;
Double_t zShift;
Double_t foilAngle;
Double_t rotation;
Double_t fEulerPhi;
Double_t fEulerTheta;
Double_t fEulerPsi;
Double_t sumThresh;
Double_t cornerGain[8];
Double_t thresh[8];
Double_t ped[8];
Double_t xRaw;
Double_t yRaw;
Double_t xRawHG;
Double_t yRawHG;
Double_t xRawM;
Double_t yRawM;
Double_t x;
Double_t y;
Double_t xHG;
Double_t yHG;
Double_t z;
Double_t r;
Double_t sum;
Double_t sumHG;
Double_t cMult;
TVector3 posV;
TGraphErrors g_maskCentroids[5];
TGraph2DErrors g_maskHolesX[5];
TGraph2DErrors g_maskHolesY[5];
TF2 *fPolyX[5];
TF2 *fPolyY[5];
TF2 *fPosSumX[5];
TF2 *fPosSumY[5];
TBranch *b_xRaw;
TBranch *b_yRaw;
TBranch *b_x;
TBranch *b_y;
TBranch *b_xRawHG;
TBranch *b_yRawHG;
TBranch *b_xHG;
TBranch *b_yHG;
TBranch *b_xRawM;
TBranch *b_yRawM;
TBranch *b_z;
TBranch *b_r;
TBranch *b_sum;
TBranch *b_sumHG;
TBranch *b_cMult;
TBranch *b_tSig;
TBranch *b_corner;
TBranch *b_posVX;
TBranch *b_posVY;
TBranch *b_posVZ;
TTree *fChain;
Int_t fCurrent;
private:
Bool_t FitMask(Int_t mapOrder);
public:
TMcpDet(): fName(), fTitle() {fRandom.SetSeed(0);}
~TMcpDet();
TMcpDet(const TMcpDet &);
const Int_t GetId() const { return fId; }
const Char_t *GetName() const { return fName; }
const Char_t *GetTitle() const { return fTitle; }
void SetId(const Int_t Id);
void SetName(const Char_t *name);
void SetNameTitle(const Char_t *name, const Char_t *title);
void SetTitle(const Char_t *title="");
Int_t Calculate(Long64_t entry);
Int_t Calibrate(Long64_t entry);
void Clear(Option_t *option="");
void Copy(TObject &det) const;
Bool_t CreateMaskFile(TH2* histo);
Int_t GenPrime(Long64_t entry);
void InitClass(TString name,Int_t ID,Int_t nStages);
void InitTree(TTree *tree);
Bool_t LoadCorrections(Char_t *fileName);
Bool_t LoadMaskFile(Char_t *fileName,Int_t mapOrder,Int_t fUseErrors=0);
ClassDef(TMcpDet,7)
};
Double_t function(Double_t *x, Double_t *a);
Bool_t GetCentroid(TH2* histo,TCutG *cut,Double_t *centroid,Bool_t kPrint=kTRUE);
#endif
Last change: Sun Dec 21 12:38:50 2008
Last generated: 2008-12-21 12:38
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.