00001
00009
00010
00011 #ifndef __ACD_DIGIRECON_H
00012 #define __ACD_DIGIRECON_H 1
00013 #include "GaudiKernel/Algorithm.h"
00014 #include "GaudiKernel/ObjectVector.h"
00015
00016 #include "GlastEvent/Digi/AcdDigi.h"
00017 #include "ntupleWriterSvc/INTupleWriterSvc.h"
00018 #include "GlastSvc/GlastDetSvc/IGlastDetSvc.h"
00019 #include "geometry/Point.h"
00020
00021 #include <string>
00022 #include <vector>
00023 #include <map>
00024
00025 class Ray;
00026 class Point;
00027 class Vector;
00028
00029 class AcdReconDigiAlg : public Algorithm
00030 {
00031 public:
00033 AcdReconDigiAlg(const std::string& name, ISvcLocator* pSvcLocator);
00034
00036 StatusCode initialize();
00038 StatusCode execute();
00040 StatusCode finalize();
00041
00042 protected:
00043
00044 private:
00045
00046
00047 void clear ();
00048
00049 void getParameters ();
00050
00051 void readThresholds();
00052
00053 StatusCode reconstruct (const AcdDigiVector* v);
00054
00055 StatusCode acdTileDOCA();
00056
00058 StatusCode writeNTuple();
00059
00061 double DOCA (const Point &x0, const Vector &dir, std::vector<double> &doca_values);
00062
00065 double hitTileDist(const Point &x0, const Vector &dir);
00066
00068 std::string m_tupleName;
00070 INTupleWriterSvc *ntupleWriteSvc;
00071
00073 IGlastDetSvc *m_glastDetSvc;
00074
00075
00076 double m_totEnergy, m_tileCount, m_gammaDOCA, m_DOCA, m_act_dist;
00077 std::vector<double> m_rowDOCA_vec;
00078
00079 AcdDigiVector *m_AcdData;
00080
00081 std::map<int, Point> m_tileCenters;
00082 std::map<int, Vector> m_tileDims;
00083 std::map<int, double> m_vetoThresh;
00084
00085 int m_numSideRows;
00086
00087 std::string m_xmlFileStr, m_vetoThreshFileStr;
00088 };
00089
00090 #endif