Line | |
---|
1 | #ifndef __MMcTrig__
|
---|
2 | #define __MMcTrig__
|
---|
3 |
|
---|
4 | #include <stdlib.h>
|
---|
5 | #include <stdio.h>
|
---|
6 | #include <string.h>
|
---|
7 | #include <unistd.h>
|
---|
8 | #include <fcntl.h>
|
---|
9 |
|
---|
10 | #include <iostream.h>
|
---|
11 | #include "MParContainer.h"
|
---|
12 |
|
---|
13 | #include "MTriggerDefine.h"
|
---|
14 |
|
---|
15 | class MMcTrig : public MParContainer {
|
---|
16 | private:
|
---|
17 |
|
---|
18 | Short_t fNumFirstLevel ; // Number of First Level Trigger in this Event
|
---|
19 | Short_t fNumSecondLevel ; // Number of Second Level Trigger in this Event
|
---|
20 |
|
---|
21 | Float_t fTimeFirst[((Int_t)(TOTAL_TRIGGER_TIME/LEVEL1_DEAD_TIME))+1];
|
---|
22 | // Time when it triggers
|
---|
23 | Byte_t fPixelsFirst[((Int_t)(TRIGGER_PIXELS/8))+1][((Int_t)(TOTAL_TRIGGER_TIME/LEVEL1_DEAD_TIME))+1];
|
---|
24 | // Pixel which are above threshold when trigger happens
|
---|
25 | Short_t fFirstToSecond[((Int_t)(TOTAL_TRIGGER_TIME/LEVEL2_DEAD_TIME))+1];
|
---|
26 |
|
---|
27 | public:
|
---|
28 | MMcTrig() ;
|
---|
29 |
|
---|
30 | ~MMcTrig();
|
---|
31 |
|
---|
32 | void Clear(Option_t *opt=NULL);
|
---|
33 |
|
---|
34 | void Print(Option_t *);
|
---|
35 |
|
---|
36 | void SetFirstLevel ( Short_t nTr ) {
|
---|
37 | fNumFirstLevel = nTr ;
|
---|
38 | }
|
---|
39 | void SetSecondLevel ( Short_t nTr ) {
|
---|
40 | fNumSecondLevel = nTr ;
|
---|
41 | }
|
---|
42 |
|
---|
43 | void SetTime( Float_t t, Int_t i){
|
---|
44 | if (i>TOTAL_TRIGGER_TIME/LEVEL1_DEAD_TIME+1 || i<1){
|
---|
45 | cout<<"fNumFirstLevel out of range. Time will be -99"<<endl;
|
---|
46 | }
|
---|
47 | else{
|
---|
48 | fTimeFirst[i-1]=t;
|
---|
49 | }
|
---|
50 | }
|
---|
51 |
|
---|
52 | void SetMapPixels(Byte_t *map,Int_t nfirst){
|
---|
53 | //
|
---|
54 | // It sets the map of pixel that are above the trheshold
|
---|
55 | //
|
---|
56 |
|
---|
57 | int i;
|
---|
58 |
|
---|
59 | for(i=0;i<((Int_t)(TRIGGER_PIXELS/8))+1;i++){
|
---|
60 | fPixelsFirst[i][nfirst]=map[i];
|
---|
61 | }
|
---|
62 | cout<<endl;
|
---|
63 | }
|
---|
64 |
|
---|
65 | Int_t GetFirstLevel() {
|
---|
66 | return ( fNumFirstLevel );
|
---|
67 | }
|
---|
68 |
|
---|
69 | Byte_t IsPixelFired(Int_t npix, Int_t nfirstlevel);
|
---|
70 |
|
---|
71 | ClassDef(MMcTrig, 1) //Stores Montecarlo Information
|
---|
72 |
|
---|
73 | };
|
---|
74 |
|
---|
75 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.