00001
00015 #ifndef SHOWER_HH
00016 #define SHOWER_HH
00017
00018 #include "data_base.hh"
00019 #include "cluster.hh"
00020 #include <TVector3.h>
00021 namespace larlight{
00026 class shower : public data_base {
00027
00028 public:
00029
00031 shower(DATA::DATA_TYPE type=DATA::Shower);
00032
00034 shower(const shower& original) : data_base(original),
00035 fID(original.fID),
00036 fDCosStart(original.fDCosStart),
00037 fSigmaDCosStart(original.fSigmaDCosStart),
00038 fMaxWidthX(original.fMaxWidthX),
00039 fMaxWidthY(original.fMaxWidthY),
00040 fDistanceMaxWidth(original.fDistanceMaxWidth),
00041 fTotalCharge(original.fTotalCharge)
00042 {}
00043
00045 virtual ~shower(){}
00046
00047 virtual void clear_data();
00048
00049
00050 void set_id (Int_t id) { fID = id; }
00051 void set_total_charge (Double_t q) { fTotalCharge = q; }
00052 void set_direction (TVector3 dir) { fDCosStart = dir; }
00053 void set_direction_err (TVector3 dir_e) { fSigmaDCosStart = dir_e; }
00054 void set_max_width (Double_t x, Double_t y)
00055 { fMaxWidthX=x; fMaxWidthY=y; }
00056 void set_distance_max_width (Double_t d) { fDistanceMaxWidth = d; }
00057
00058
00059 inline Double_t TotalCharge() const { return fTotalCharge; }
00060 inline Int_t ID() const { return fID; }
00061 inline Double_t MaxWidthX() const { return fMaxWidthX; }
00062 inline Double_t MaxWidthY() const { return fMaxWidthY; }
00063 inline Double_t DistanceMaxWidth() const { return fDistanceMaxWidth; }
00064 inline const TVector3& Direction() const { return fDCosStart; }
00065 inline const TVector3& DirectionErr() const { return fSigmaDCosStart; }
00066
00067 protected:
00068
00069 Int_t fID;
00070 TVector3 fDCosStart;
00071 TVector3 fSigmaDCosStart;
00072 Double_t fMaxWidthX;
00073 Double_t fMaxWidthY;
00074 Double_t fDistanceMaxWidth;
00075 Double_t fTotalCharge;
00076
00077 private:
00078
00080 ClassDef(shower,3)
00082
00083 };
00084
00089 class event_shower : public std::vector<larlight::shower>, public event_base {
00090
00091 public:
00092
00094 event_shower(DATA::DATA_TYPE type=DATA::Shower);
00095
00097 event_shower(const event_shower& original) : std::vector<larlight::shower>(original), event_base(original)
00098 {}
00099
00101 ~event_shower(){}
00102
00104 virtual void clear_data(){event_base::clear_data(); clear();}
00105
00106 protected:
00107
00108 private:
00109
00111 ClassDef(event_shower,3)
00113 };
00114 }
00115 #endif
00116