source: branches/Mars_McMismatchStudy/mmc/MMcTrig.hxx@ 18066

Last change on this file since 18066 was 7880, checked in by tbretz, 18 years ago
*** empty log message ***
File size: 1.7 KB
Line 
1#ifndef MARS_MMcTrig
2#define MARS_MMcTrig
3
4#ifndef MARS_MParContainer
5#include "MParContainer.h"
6#endif
7#ifndef MARS_MTriggerDefine
8#include "MTriggerDefine.h"
9#endif
10#ifndef MARS_Mdefine
11#include "Mdefine.h"
12#endif
13
14class MMcTrig : public MParContainer {
15 private:
16
17 Short_t fNumFirstLevel ; // Number of First Level Trigger in this Event
18 Short_t fNumSecondLevel ; // Number of Second Level Trigger in this Event
19
20 Float_t fTimeFirst[((Int_t)(TOTAL_TRIGGER_TIME/LEVEL1_DEAD_TIME))+1];
21 // Time when it triggers
22 Byte_t fPixelsFirst[((Int_t)(CAMERA_PIXELS/8))+1][((Int_t)(TOTAL_TRIGGER_TIME/LEVEL1_DEAD_TIME))+1];
23 // Pixel which are above threshold when trigger happens
24 Short_t fFirstToSecond[((Int_t)(TOTAL_TRIGGER_TIME/LEVEL2_DEAD_TIME))+1];
25
26 public:
27 MMcTrig(const char *name=NULL, const char *title=NULL);
28
29 ~MMcTrig();
30
31 void Clear(Option_t *opt=NULL);
32
33 void Print(Option_t *opt=NULL) const;
34
35 void SetFirstLevel ( Short_t nTr ) {
36 fNumFirstLevel = nTr ;
37 }
38 void SetSecondLevel ( Short_t nTr ) {
39 fNumSecondLevel = nTr ;
40 }
41
42 void SetTime( Float_t t, Int_t i);
43
44 void SetMapPixels(Byte_t *map,Int_t nfirst){
45 //
46 // It sets the map of pixel that are above the trheshold
47 //
48
49 int i;
50
51 for(i=0;i<((Int_t)(CAMERA_PIXELS/8))+1;i++){
52 fPixelsFirst[i][nfirst]=map[i];
53 }
54 }
55
56 Int_t GetFirstLevel() const {
57 return ( fNumFirstLevel );
58 }
59
60 Int_t GetNumFirstLevel() const {
61 return ( fNumFirstLevel );
62 }
63
64 Byte_t IsPixelFired(Int_t npix, Int_t nfirstlevel);
65
66 ClassDef(MMcTrig, 4) //Stores Montecarlo Information (number of 1st, 2nd level triggers)
67
68};
69
70#endif
Note: See TracBrowser for help on using the repository browser.