//////////////////////////////////// // MicroBall Event Unpacker // for the Asy-Eos experiment // Apr 29, 2010 // revison 1/2011 // zibi //////////////////////////////////// #ifndef TMBALLEVENT_H #define TMBALLEVENT_H //#include #include "TH1.h" #include "TH2.h" #include "TList.h" #include "TString.h" #include "stdlib.h" #include using namespace std; class TMBALLEvent { protected: int mRawMult; //raw multiplicity int mMult; // multiplicity above ADC pedestal int mRawMultRing[4]; //raw multiplicity per ring int mMultRing[4]; // multiplicity per ring above ADC pedestal //03062011 TH1I* mAdc[4][32]; float mLookupTable[49][12]; float mLookupAdcThreshTable[128][3]; int GetDetector(int, int); // int GetDetectorFromTDC(int adc, int adcch); public: TMBALLEvent(); //constructor virtual ~TMBALLEvent(); //destructor int GetEvent(int *); int ProcessCurrentEventMBS(int *,int); TList *fMBALLHistoList; void LoadMapping(TString); void LoadThresholds(TString); void PassLists(TList*); void GetTiMeStamp(int *, int *, int *); int GetMBALLMultiplicity(); int GetMBALLRingMultiplicity(int); int GetMBALLRawMultiplicity(); int GetMBALLRingRawMultiplicity(int); Bool_t IsHaloFired(); // kTRUE = halo has been fired, kFALS = halo has not been fired int GetAdcPedestal(int module, int channel); //returns the ADC pedestal read from the file int GetDetectorPedestal(int ring, int det); int GetDetectorRing(int module, int adcch); int GetDetectorNumber(int module, int adcch); double* GetADCAngles(int module, int adcch); //returns theta and phi of a given ADC ch double GetTheta(int ring, int det); double GetPhi(int ring, int det); //return ADC module and channel of a given detector int GetADCModule(int ring, int det); //Energy tail ADC int GetADCChannel(int ring, int det);//Energy tail ADC int GetTDCModule(int ring, int det); int GetTDCChannel(int ring, int det); vector uBallModule; vector uBallChannel; vector uBallData; vector::size_type szM; //vector::size_type szC = uBallChannel.size(); //vector::size_type szD = uBallData.size(); //---------This var tells us if the halo detector has been fired (Paola 28Oct2011) Bool_t fIsHaloFired; //------------------------------------ void PrintEvent(int, int, int, int, int); }; extern TMBALLEvent *gmballevent; // a global instance to TMBALLEvent class #endif