// ESAF : Euso Simulation and Analysis Framework // $Id: EnergyModule.hh,v 1.40 2005/11/12 18:20:51 naumov Exp $ // Naumov Dmitry created Jul, 4 2004 #ifndef __ENERGYMODULE_HH_ #define __ENERGYMODULE_HH_ /***************************************************************************** * ESAF: Euso Simulation and Analysis Framework * * * * Id: EnergyModule * * Package: energy * * Coordinator: Dmitry.Naumov * * * *****************************************************************************/ #include "euso.hh" #include "RecoModule.hh" #include "EarthVector.hh" #include "EnergyTypes.hh" #include "EDetector.hh" #include #include // ROOT classes class TH1F; class TH2F; class TProfile; class TGraph; // ESAF classes class RecoEvent; class FluoCalculator; class EOpticsResponse; class ERunParameters; class RecoPixelData; class RecoShowerTrack; class EnergyViewer; class EnergyModule; ////////////////////////////////////////////////////////////////////////////// // // // EnergyModule // // // // // ////////////////////////////////////////////////////////////////////////////// class EnergyModule : public RecoModule, public TObject { // make a friend of this class friend class EnergyViewer; public: EnergyModule(); // ctor void Constructor(); // default initializations virtual ~EnergyModule(); // dtor Bool_t Init(); // Init method: called at the beginning of a run Bool_t PreProcess(); // called before each event process Bool_t Process( RecoEvent* ); // event processing Bool_t PostProcess(); // called after processing an event virtual Bool_t SaveRootData( RecoRootEvent* ); // save root output Bool_t Done(); // called at the end of each run void UserMemoryClean(); // memory clean Float_t ThetaFoV(Float_t time); // ThetaFoV(Float_t time) Float_t PhiFoV(Float_t time); // PhiFoV(Float_t time) Float_t BgrPerPixelPerGtu(Float_t time); inline RecoEvent *GetRecoEvent() { return fEvent; } inline Float_t GetQuantumEff() { return fRunpars->GetPmtData().GetQuantum();} inline TProfile *GetPsfMeanOverlap() { return fHistoOverlap; } inline RecoShowerTrack *GetRecoShowerTrack() { return fShowerTrack; } inline Float_t *GetFCtime() { return fFCtime; } inline GtuPixels_t GetMyGtuPixels() { return fGtuMyPixels; } EsafConfigClass(Reco, EnergyModule) private: // Workers Bool_t LoadModules(); // workers void SortGtu(); // prepares map void DumpGtuSorted(); // dump gtu sorted information for DEBUG void InitHisto(); // histogram initialization void BuildFoVAngleFunctions(); // build ThetaFoV() and PhiFoV() functions void BuildMyPixels(); // Build pixels around signal Bool_t BuildRecoveryFunction(); // Build Recovery Function along the track Float_t MakeFluorYield(); // computes fluorescence yield for the reconstructed altitude void EstimateBackground(); // Estimate background p.e. per pixel per GTU from the data void FindCherenkovPeak(TH1F *); // Searching for Cherenkov signal // Getters TVector2 XYCluster(Float_t); // cluster position as a function of time // Cleaning void ClearGraphs(); // Clear graphs void CreateAuxilaryObjects(); // Create temp objects (histos, graphs, etc) // Fitting void FitTimeDistribution(); // Fit Time Distribution void BuildShowerTrack(); // Private variables RecoEvent *fEvent; // pointer to the current reco event object // Detector EOpticsResponse *fOpticsResponse; // Optics Response object (handles efficacies, etc) ERunParameters *fRunpars; // ERunParameters RecoShowerTrack *fShowerTrack; // pointer to a reco shower track object // information from previous modules const RecoModuleData *fTDM; // pointer to the track direction module const RecoModuleData *fGtuCM; // pointer to the GTU Clustering module const RecoModuleData *fHmaxShapeM; // pointer to HmaxByShapeMethod module const RecoModuleData *fHmaxProtonM; // pointer to HmaxForProtonMethod module Pixels_t fAllActivePixels; // vector of all active pixels Pixels_t fActivePixels; // vector of active pixels around signal Pixels_t fPixelsCluster; // vector of RecoPixelData of pixels in the cluster Pixels_t fMyPixelsCluster; // vector of RecoPixelData of pixels presumably of the signal (fPixelsCluster + border pixels) Double_t fTheta; // reconstrustructed from the previous module Theta zenith angle Double_t fPhi; // reconstrustructed from the previous module Phi azimuthal angle TVector3 fShowerDir; // unit vector opposite to shower direction Double_t fAltitude; // reconstructed altitude of shower maximum Int_t fGtuMin; // minimum Gtu in the selected cluster Int_t fGtuMax; // maximum Gtu in the selected cluster Int_t fMyGtuMin; // minimum Gtu in the all pixels Int_t fMyGtuMax; // maximum Gtu in the all pixels // configuration data Int_t fMinuitOutputLevel; // see EnergyModule.cfg for explanations Int_t fUseTrueAngles; // 1 - use true Theta and Phi angles, 0 - use reconstructed angles // (see EnergyModule.cfg for explanations) // Fit information Double_t fEnergy; // reconstructed energy Double_t fEnergyError; // reconstructed energy error Double_t fEnergyChi2; // Chi2/NDF for energy fit Double_t fBackGround; // Background contamination // computed information (FIXME must be redone for each GTU) Float_t fGtuTimeAtMax; // Time at the Shower Maximum (may be different from fGtuMax) Float_t fThetaFoVAtMax; // Theta FoV at Shower Maximum Float_t fPhiFoVAtMax; // Phi FoV at Shower Maximum Float_t fBackground; // Estimated background of p.e. per pixel per GTU Float_t fFCtime[4]; // array with fluo+cherenkov times // auxilary data GtuPixels_t fGtuPixels; // map with vector of pixels for each Gtu hit belonging to the cluster GtuPixels_t fGtuMyPixels; // map with vector of pixels for each Gtu hit belonging to my cluster Int_t fDebugPs; // yes/no save or not eps files // Event Viewer data TGraph *fGraphTheta; // ThetaFoV graph for the pixels in cluster TGraph *fGraphPhi; // PhiFoV graph for the pixels in cluster TGraph *fGraphXY; // X,Y graph for the pixels in cluster TGraph *fGraphX; // X graph for the pixels in cluster TGraph *fGraphY; // Y graph for the pixels in cluster TH2F *fHistoTheta; // ThetaFoV histo for the pixels in signal cluster TH2F *fHistoPhi; // PhiFoV histo for the pixels in signal cluster TH2F *fHistoXY; // X,Y histo for the pixels in signal cluster TH2F *fHistoX; // X histo for the pixels in signal cluster TH2F *fHistoY; // Y histo for the pixels in signal cluster TProfile *fHistoOverlap; // efficacy overlap with pixels in cluster TProfile *fHistoIdealOverlap; // efficacy overlap with pixels in cluster Float_t fXmin; // Minimum X of View Float_t fXmax; // Maximum X of View Float_t fYmin; // Minimum Y of View Float_t fYmax; // Maximum Y of View Float_t fPhiMin; // Minimum phi of View Float_t fPhiMax; // Maximum phi of View Float_t fThetaMin; // Minimum theta of View Float_t fThetaMax; // Maximum theta of View PMTs_t fPmts; // Container of active PMT's PMTs_t fMyPixels; // Container of signal pixels PMTs_t fPixelsBgr; // Container of background pixels PMTs_t fECells; // Container of elementary cells EnergyViewer *fEnergyViewer; ClassDef(EnergyModule,0) }; #endif /* __ENERGYMODULE_HH_ */