source: trunk/MagicSoft/Mars/msimcamera/MSimTrigger.h@ 9437

Last change on this file since 9437 was 9318, checked in by tbretz, 16 years ago
*** empty log message ***
File size: 2.4 KB
Line 
1#ifndef MARS_MSimTrigger
2#define MARS_MSimTrigger
3
4#ifndef MARS_MTask
5#include "MTask.h"
6#endif
7
8#ifndef MARS_MLut
9#include "MLut.h"
10#endif
11
12class MParList;
13class MParameterD;
14class MAnalogChannels;
15class MRawEvtHeader;
16class MRawRunHeader;
17class MPedestalCam;
18
19class MSimTrigger : public MTask
20{
21private:
22 MAnalogChannels *fCamera; //! The analog input channels
23 MParameterD *fPulsePos; //! The intended pulse positon
24 MParameterD *fTrigger; //! The trigger position w.r.t. the analog channels
25 MRawRunHeader *fRunHeader; //! The run header storing infos about the digitization
26 MRawEvtHeader *fEvtHeader; //! The event header storing the trigger information
27 MPedestalCam *fElectronicNoise; //! Electronic noise (for baseline correction)
28 MPedestalCam *fGain; //! Gain of the pulses
29
30 MLut fRouteAC; // Combinination map for the AC channels
31 MLut fCoincidenceMap; // channels for which digital coincidence is checked
32
33 TString fNameRouteAC; // Name for the AC routing
34 TString fNameCoincidenceMap; // Name for the coincidence mape
35
36 Float_t fDiscriminatorThreshold; // Discriminator threshold
37 Float_t fDigitalSignalLength; // Length of the output of the discriminator
38 Float_t fCoincidenceTime; // Minimum coincidence time (gate)
39
40 Bool_t fShiftBaseline; // Shift the baseline back to 0 for the threshold (needs ElectronicNoise [MPedestalCam])
41 Bool_t fUngainSignal; // "Remove" the gain from the signal (needs Gain [MPedestalCam])
42
43 // MSimTrigger
44 TObjArray *CalcCoincidence(const TObjArray &arr1, const TObjArray &arr2, Float_t gate=0) const;
45
46 // MTask
47 Int_t PreProcess(MParList *pList);
48 Int_t Process();
49
50 // MParContainer
51 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print);
52
53public:
54 MSimTrigger(const char *name=NULL, const char *title=NULL);
55
56 void SetNameRouteAC(const char *name) { fNameRouteAC=name; }
57 void SetNameCoincidenceMap(const char *name) { fNameCoincidenceMap=name; }
58
59 void SetDiscriminatorThreshold(Float_t th) { fDiscriminatorThreshold=th; }
60 void SetDigitalSignalLength(Float_t ln) { fDigitalSignalLength=ln; }
61 void SetCoincidenceTime(Float_t tm) { fCoincidenceTime=tm; }
62
63 ClassDef(MSimTrigger, 0) // Task to simulate trigger electronics
64};
65
66#endif
Note: See TracBrowser for help on using the repository browser.