#ifndef _GEvent #define _GEvent ////////////////////////////////////////////////////////////////////////// // // // GEvent // // // // Description of the GEANT event and track parameters // // // ////////////////////////////////////////////////////////////////////////// #include "TMath.h" #include "math.h" #include #include #include "TArray.h" #include "TArrayI.h" #include "TArrayF.h" #include "TString.h" #include #include "TH1.h" #include "Trap.h" #include "Elec.h" #include "GSignals.h" #include "TClonesArray.h" #include "TObjArray.h" #include "TRandom.h" #define ekv 277.77777778 #define numpar 10 //extern FILE *in; struct event_header { long samno; int track; int lenght; }; struct drift { long strip; float x[2]; float y[2]; float de; float dist; }; struct steprec { long samno; int track; int step; float data[numpar]; }; struct pathrec { float entryp[3]; float exitp[3]; float lenght; float eloss; int ds; }; class GEvent : public TObject { private: Int_t Event; // Event number Float_t Shift; // Select the strip for taking signal Int_t Lenght; // Lenght of Event TArrayI DriftStrip; // drift strip TArrayF EpX; // Entry point X TArrayF ExpX; // Exit point X TArrayF EpY; // Entry point Y TArrayF ExpY; // Exit point Y TArrayF EnergyLoss; // energy loss in step [electrons] TArrayF PathLenght; // path lenght in step TClonesArray *histop; //Array of positive charge drift histograms TClonesArray *histon; //Array of negative charge drift histograms void DoProccesedFile(Char_t *,Char_t *, Float_t , Float_t, Int_t , Int_t); public: // void Next(); //GEvent(Char_t *name, Float_t x) {if((in=fopen(name,"rb+"))==NULL) {printf("Can not open file specified!"); exit(0);} Shift=x;}; GEvent(Float_t=50); GEvent(Char_t *, Char_t *,Float_t=50, Float_t=50,Float_t=2,Int_t=1 ,Int_t=0); ~GEvent(); Int_t Next(FILE *,Int_t=0); void NextX(Float_t, Float_t,Float_t,Int_t); void Reset(); Float_t EventEnergy(){return(EnergyLoss.GetSum());} void AddStrip(Int_t, TH1F *,TH1F *); Float_t GetEpX(Int_t d) {return(EpX[d]);}; Float_t GetEpY(Int_t d) {return(EpY[d]);}; Float_t GetExpX(Int_t d) {return(ExpX[d]);}; Float_t GetExpY(Int_t d) {return(ExpY[d]);}; Float_t GetELoss(Int_t d) {return(EnergyLoss[d]);}; Int_t GetStrip(Int_t d) {return(DriftStrip[d]);}; Float_t GetPathLen(Int_t d) {return(PathLenght[d]);}; Int_t GetLenght() {return(Lenght);}; void DrawHisto(Int_t,char*); void PrintEvent(); Int_t ClusterSize(); Int_t ClusterSize(Int_t, Int_t *); TClonesArray *GetArrayN() {return histon;}; TClonesArray *GetArrayP() {return histop;}; void GetHitMap(Int_t*); void Signals(Float_t *,Int_t *); void Signals(Float_t *,Int_t *,Trap*, Trap*,TH1F *,TH1F *,Elec *,Int_t); void Signals(GSignals *,Int_t *,Trap*, Trap*,TH1F *,TH1F *,Elec *,Int_t); void SignalsI(GSignals *,Float_t *,Int_t *,Trap*, Trap*,TH1F *,TH1F *,Elec *,Int_t); void SignalsI(GSignals *,GSignals *,Float_t *,Int_t *,Trap*, Trap*,TH1F *,TH1F *,Elec *,Int_t); void GetHisto(Int_t,TH1F *,char*); ClassDef(GEvent,1) }; #endif