Line | |
---|
1 | #ifndef __MHeaderTrig__
|
---|
2 | #define __MHeaderTrig__
|
---|
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 "TObject.h"
|
---|
12 |
|
---|
13 | #ifndef __MARS__
|
---|
14 | #include "../../Simulation/Detector/include-MTrigger/MTriggerDefine.h"
|
---|
15 | #else
|
---|
16 | //
|
---|
17 | // From the include file above
|
---|
18 | //
|
---|
19 | #define TRIGGER_PIXELS 271
|
---|
20 | #endif
|
---|
21 |
|
---|
22 | class MHeaderTrig : public TObject {
|
---|
23 | private:
|
---|
24 |
|
---|
25 | Short_t topology ; // Topology of the trigger
|
---|
26 | // 0 = N-1 neighbours of one pixel
|
---|
27 | // 1 = N neighbours
|
---|
28 | // 2 = N closed pack
|
---|
29 | Short_t multiplicity ; // Pixel multiplicity of trigger configuration
|
---|
30 | Float_t threshold[TRIGGER_PIXELS] ; // Threshold for trigger
|
---|
31 | UInt_t TriggerPattern[2]; // Used to inddentify with
|
---|
32 | // RawEvt::Trigger Pattern identification
|
---|
33 |
|
---|
34 | public:
|
---|
35 | MHeaderTrig() ;
|
---|
36 |
|
---|
37 | ~MHeaderTrig();
|
---|
38 |
|
---|
39 | void Print(Option_t *);
|
---|
40 |
|
---|
41 | void SetTopology(Short_t nTop) {
|
---|
42 | topology=nTop;
|
---|
43 | }
|
---|
44 |
|
---|
45 | void SetMultiplicity(Short_t nMul) {
|
---|
46 | multiplicity=nMul;
|
---|
47 | }
|
---|
48 |
|
---|
49 | void SetThreshold(Float_t fthr[]){
|
---|
50 | int i;
|
---|
51 | for(i=0;i<TRIGGER_PIXELS;i++){
|
---|
52 | threshold[i]=fthr[i];
|
---|
53 | }
|
---|
54 | }
|
---|
55 |
|
---|
56 | void SetTriggerPattern (UInt_t upi, UInt_t loi){
|
---|
57 |
|
---|
58 | if (upi==loi==0) {
|
---|
59 | TriggerPattern[0]= (UInt_t) threshold[0];
|
---|
60 | TriggerPattern[1]= (UInt_t) (100*multiplicity+topology);
|
---|
61 | }
|
---|
62 | else {
|
---|
63 | TriggerPattern[0]=upi;
|
---|
64 | TriggerPattern[1]=loi;
|
---|
65 | }
|
---|
66 | }
|
---|
67 |
|
---|
68 | ClassDef(MHeaderTrig, 1) //Stores Montecarlo Information
|
---|
69 |
|
---|
70 | };
|
---|
71 |
|
---|
72 | #endif
|
---|
73 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.