source: trunk/Mars/mfilter/MFSoftwareTrigger.h@ 12582

Last change on this file since 12582 was 6858, checked in by tbretz, 20 years ago
*** empty log message ***
File size: 1.8 KB
Line 
1#ifndef MARS_MFSoftwareTrigger
2#define MARS_MFSoftwareTrigger
3
4#ifndef MARS_MFilter
5#include "MFilter.h"
6#endif
7
8class MMcEvt;
9class MGeomCam;
10class MSignalCam;
11class MSignalPix;
12class MArrivalTime;
13
14class MFSoftwareTrigger : public MFilter
15{
16public:
17 enum TriggerType_t {
18 kSinglePixelNeighbors,
19 kAnyPattern/*,
20 kMagicLvl1*/
21 };
22
23private:
24 const MGeomCam *fCam; // Camera Geometry
25 const MSignalCam *fEvt; // Cerenkov Photon Event
26 const MArrivalTime *fTme;
27
28 Float_t fThreshold; // nuber of minimum required photons
29 Float_t fTimeWindow; // Window for time coincidence
30 Byte_t fNumNeighbors; // number of required neighbours
31
32 Int_t fCut[2];
33
34 Bool_t fResult;
35
36 TriggerType_t fType;
37
38 enum {
39 kWasChecked = BIT(21),
40 kAboveThreshold = BIT(22),
41 kIsCoincident = BIT(23)
42 };
43
44 Int_t PreProcess(MParList *pList);
45 Int_t Process();
46 Int_t PostProcess();
47
48 void ResetBits(Int_t bits) const;
49 const MSignalPix *CheckPixel(Int_t i) const;
50 Bool_t SwTrigger() const;
51 Bool_t SwCoincidence() const;
52 //Int_t CheckCoincidence(Int_t idx, Float_t tm0) const;
53 //Bool_t MagicLvl1Trigger() const;
54 Int_t CountPixels(Int_t idx, Float_t tm) const;
55 Bool_t ClusterTrigger() const;
56
57 Bool_t IsExpressionTrue() const { return fResult; }
58
59public:
60 MFSoftwareTrigger(const char *name=NULL, const char *title=NULL);
61
62 void SetThreshold(Float_t min) { fThreshold = min; }
63 void SetNumNeighbors(Byte_t num) { fNumNeighbors = num; }
64 void SetTimeWindow(Float_t win=-1) { fTimeWindow = win; }
65 void SetTriggerType(TriggerType_t type) { fType = type; }
66
67 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print=kFALSE);
68
69 ClassDef(MFSoftwareTrigger, 0) // Filter for software trigger
70};
71
72#endif
Note: See TracBrowser for help on using the repository browser.