source: JEM-EUSO/esaf_cc_at_lal/packages/reconstruction/modules/base/clustering/include/RobustModule.hh @ 114

Last change on this file since 114 was 114, checked in by moretto, 11 years ago

actual version of ESAF at CCin2p3

File size: 2.7 KB
Line 
1// ESAF : Euso Simulation and Analysis Framework
2// $Id$
3// Author: Svetlana Biktemerova   Okt, 20 2011
4
5#ifndef __ROBUSTMODULE_HH_
6#define __ROBUSTMODULE_HH_
7
8#include "euso.hh"
9#include "RecoModule.hh"
10
11#include <TROOT.h>
12#include <TVector2.h>
13#include <TF1.h>
14#include <vector>
15#include <map>
16
17#ifdef USE_VISUALIZATION
18class EnergyViewer;
19#endif
20class RecoEvent;
21class RecoRootEvent;
22class EOpticsResponse;
23class ERunParameters;
24class RecoPixelData;
25class RecoShowerTrack;
26class EnergyModule;
27class HmaxByShapeMethod;
28class TVector3;
29class TH1D;
30class TH2D;
31class TF1;
32class TGraph;
33class TFile;
34class EusoCluster;
35
36class RobustModule : public RecoModule  {
37public:
38        // ctor
39        RobustModule();
40        // dtor
41        virtual ~RobustModule();
42       
43       
44        // Init method: called at the beginning of a run
45        Bool_t Init();
46       
47        // called before each event process
48        Bool_t PreProcess();
49       
50        // event processing
51        Bool_t Process( RecoEvent* );
52       
53        // called after processing an event
54        Bool_t PostProcess();
55       
56        // save root output
57        virtual Bool_t SaveRootData( RecoRootEvent* );
58       
59        // save module output
60        Bool_t SaveGlobalData();
61       
62        // called at the end of each run
63        Bool_t Done();
64       
65        // memory clean
66        void UserMemoryClean();
67       
68        static RobustModule *Get();
69
70        class TrackInformation: public TObject {
71        public:
72                TrackInformation() : fLine("trackline", "[0]*x+[1]", 0., 1.) {};
73                ~TrackInformation() {};
74               
75                void Clear(){   fLine_point1.Set(0.,0.);
76                fLine_point2.Set(0.,0.);
77                fSig_point1=fSig_point2=0.;
78                fSignalPerGtu.clear();} 
79                TVector2 fLine_point1;
80                TVector2 fLine_point2;
81                double fSig_point1;
82                double fSig_point2;
83                map< int, vector<RecoPixelData*> > fSignalPerGtu;
84                TF1 fLine;
85                //      ClassDef(TrackInformation,1);
86        };
87       
88private:
89        // Private methods
90        Bool_t FindTrackOnFocalPlane(double *a=0);
91        void Coefficients(double &a, double &b, const map <int, TVector3 >& c);
92        double chi(const map <int, TVector3 >& c,double a,double b);
93        Bool_t GetSignalPixels(double a, double b, map <int, TVector3 >& pixel_map);
94        void PointsIntersection(double *px, double *py, double *x);
95        void GetLimits(TH1D* h,double par, double opt, double& l1, double& l2);
96        void SubtractBg(TH1D* h, double bg, double power);
97        void GetProjectionX(TH2D*, TH1D*);
98        void GetProjectionY(TH2D*, TH1D*);
99       
100        // Private variables
101        RecoEvent                    *fEvent;              // pointer to the current reco event object
102        ERunParameters               *fRunpars;            // ERunParameters
103       
104        double fx1;  // the coordinates of the box where our signal pixels are
105        double fx2;  //
106        double fy1;  //
107        double fy2;  //
108        double* fWeights; 
109       
110        static RobustModule *fMe;
111               
112        TrackInformation ftrack_info;
113        vector<int> sigpix;
114        ClassDef(RobustModule,0)
115};
116
117#endif  /* __ROBUSTMETHOD_HH_ */
Note: See TracBrowser for help on using the repository browser.