00001 #ifndef ANP_FILLSHORTEVENT_H
00002 #define ANP_FILLSHORTEVENT_H
00003
00004
00005
00006
00007
00008
00009 #include <string>
00010
00011
00012 #include "PhysicsNtuple/AlgEvent.h"
00013 #include "PhysicsNtuple/AlgSnarl.h"
00014 #include "PhysicsNtuple/Plot/Data.h"
00015 #include "PhysicsNtuple/ShortMu/StripLink.h"
00016
00017 class TDirectory;
00018 class TH1;
00019 class TH2;
00020
00021 namespace Anp
00022 {
00023 class FillShortEvent: public AlgSnarl
00024 {
00025 private:
00026
00027 typedef StripLink* StripLinkPtr;
00028
00029 typedef std::map<unsigned short, std::vector<Anp::StripIter> > PlaneMap;
00030 typedef std::map<unsigned short, std::vector<StripLinkPtr> > PlaneMapList;
00031
00032 public:
00033 FillShortEvent();
00034 virtual ~FillShortEvent();
00035 bool Run(Record &record);
00036 void Config(const Registry& reg);
00037 bool Init(const Header& );
00038
00039 void End( const DataBlock &);
00040 bool Explore( Event& ievent, const Record& record);
00041
00042 private:
00043 bool GetPlaneStrips(PlaneMap& plane_mapu, PlaneMap& plane_mapv, const Event ievent, const Record& record);
00044
00045 bool GetEventQuantities(PlaneMap plane_m, std::map<int,double>* vect);
00046 double BVD_BestLine(PlaneMap& map);
00047
00048
00049 double GetProbability(StripLink* cur, StripLink* cmp);
00050 bool FillLink(StripLink& striplink, double ins,double ext, double ddx, StripIter strip, StripLink* link);
00051 bool FillLink(StripLink& striplink, double ins,double ext, double ddx, StripIter strip);
00052
00053 double fRecoHighE;
00054 double fNEndPlanes;
00055 double fMinADCHit;
00056 double fNPlaneSkip;
00057 double fTimeWindow;
00058 int fStripWindow;
00059 int fKeyBase;
00060 int fMinDLength;
00061 double fCutOff;
00062 int fKeyPass;
00063 int fKeyPass2;
00064 std::string fDirName;
00065 TDirectory *fDir;
00066 bool fDebug;
00067 bool fErase;
00068 bool fPlot;
00069 int fNMiss;
00070 int fTooShort;
00071 int fBVDmiss;
00072
00073 };
00074
00075 }
00076
00077 #endif