00001
00002
00003
00004
00005
00006
00007
00009 #ifndef ALGSHOWERCAM_H
00010 #define ALGSHOWERCAM_H
00011
00012 #include "Algorithm/AlgBase.h"
00013 #include "AtNuReco/CandShowerAtNuHandle.h"
00014 #include <vector>
00015 using std::vector;
00016
00017 class HitCamAtNu;
00018 class ShowerCamAtNu;
00019 class UgliGeomHandle;
00020
00021 typedef struct{
00022 double U;
00023 double V;
00024 double Z;
00025 double Q;
00026 double dS;
00027 double dSsteel;
00028 double Qm;
00029 double Qp;
00030 double CTm;
00031 double CTp;
00032 double Wm;
00033 double Wp;
00034 int plnvuw;
00035 int plnnum;
00036 }PlaneInfo;
00037
00038 class AlgShowerCam : public AlgBase
00039 {
00040
00041 public:
00042 AlgShowerCam();
00043 ~AlgShowerCam();
00044 void RunAlg(AlgConfig &ac, CandHandle &ch, CandContext &cx);
00045 void Trace(const char *c) const;
00046
00047 private:
00048 vector <PlaneInfo> fPlaneInfo;
00049 vector<HitCamAtNu*> fHitArr[500];
00050 double vtxu;
00051 double vtxv;
00052 double vtxx;
00053 double vtxy;
00054 double vtxz;
00055 int vtxpln;
00056 bool vtxshw;
00057 double diru;
00058 double dirv;
00059 double dirz;
00060 double dirs;
00061 double direrru;
00062 double direrrv;
00063 void ExtractHitProperties(const ShowerCamAtNu* shw, const int& bpln, CandShowerHandle& shower)
00064 ;
00065 void FindTransversePositions();
00066 void SetupTimingInfo(UgliGeomHandle* ugh, const double& fFibreIndex);
00067 void SetShowerCoordinates(const int& bpln, CandShowerAtNuHandle& shower);
00068 void FindShowerVertex( ShowerCamAtNu* shwu, ShowerCamAtNu* shwv, double& trkscr, const int& bpln, const int& epln );
00069 void DetermineDirection( ShowerCamAtNu* shwu, ShowerCamAtNu* shwv, double& offset, double& trkscr, double& shwscr, double& dirscr);
00070 void CalculateShowerEnergy(CandShowerHandle& shower, const double& totph, double& energy );
00071 ClassDef(AlgShowerCam,1)
00072
00073 };
00074
00075 #endif