1 | // ESAF : Euso Simulation and Analysis Framework |
---|
2 | // $Id: ChipTrackingTrgEngine1.hh 2385 2005-11-18 14:00:07Z pesce $ |
---|
3 | // R. Pesce created |
---|
4 | // Special multiple configurations is built directly inside |
---|
5 | |
---|
6 | /***************************************************************************** |
---|
7 | * ESAF: Euso Simulation and Analysis Framework * |
---|
8 | * * |
---|
9 | * Id: ChipTrackingTrgEngine1 * |
---|
10 | * Package: Electronics * |
---|
11 | * Coordinator: Marco.Pallavicini * |
---|
12 | * * |
---|
13 | *****************************************************************************/ |
---|
14 | |
---|
15 | #ifndef __CHIPTRACKINGTRGENGINE1_HH_ |
---|
16 | #define __CHIPTRACKINGTRGENGINE1_HH_ |
---|
17 | |
---|
18 | #include "euso.hh" |
---|
19 | #include "TriggerEngine.hh" |
---|
20 | #include "ChipTrackSegment.hh" |
---|
21 | |
---|
22 | /////////////////////////////////////////////////////////////////////////////// |
---|
23 | // // |
---|
24 | // ChipTrackingTrgEngine1 // |
---|
25 | // // |
---|
26 | // Tracking trigger built in front end chip logic. // |
---|
27 | // // |
---|
28 | // ALGORYTHM: // |
---|
29 | // each chip is capable of finding a track segment of consequtive and // |
---|
30 | // adjacent pixels. // |
---|
31 | // If the length of a given segment exceeds a threshold, trigger occurs // |
---|
32 | // If not, the macrocell checks if there are 2 segments in nearby front end // |
---|
33 | // chips that summed together exceed the threshold: if this happens, trigger // |
---|
34 | // occurs. // |
---|
35 | // // |
---|
36 | // Special multiple configurations is built directly inside // |
---|
37 | // A specific trigger word is filled respect to the length of recognized // |
---|
38 | // tracks. // |
---|
39 | // // |
---|
40 | /////////////////////////////////////////////////////////////////////////////// |
---|
41 | |
---|
42 | class ChipTrackingTrgEngine1 : public TriggerEngine { |
---|
43 | public: |
---|
44 | // ctor |
---|
45 | ChipTrackingTrgEngine1(); |
---|
46 | |
---|
47 | // dtor |
---|
48 | virtual ~ChipTrackingTrgEngine1(); |
---|
49 | |
---|
50 | // simulate trigger |
---|
51 | virtual void Simulate( MacroCellData* ); |
---|
52 | |
---|
53 | protected: |
---|
54 | // ctor for child classes |
---|
55 | ChipTrackingTrgEngine1( string, ETriggerTypeIdentifier ); |
---|
56 | |
---|
57 | // trigger parameters |
---|
58 | Bool_t fRelativeThreshold; // true if the threshold is relative to the mean value |
---|
59 | // of the background in each chip: thresh = back + n*sqrt(back) |
---|
60 | Int_t fThreshold; // threshold on pixel hits in a gtu or value of n for relative thresholds |
---|
61 | Int_t fMinTrackLength; // algorithm searches for tracks of length between |
---|
62 | Int_t fMaxTrackLength; // fMinTrackLength and fMaxTriggerTrackLength |
---|
63 | |
---|
64 | Int_t fMinTriggerTrackLength; // min trigger track length in a single chip |
---|
65 | Int_t fMinTriggerTwoLength; // min trigger track length in two nearby chips |
---|
66 | |
---|
67 | Int_t fMaxTwoLength; // max length for trigger in two nearby chips |
---|
68 | |
---|
69 | Bool_t fAcceptHole; // true if we accept an hole in a track in a single chip |
---|
70 | Bool_t fOnlyWithSignal; // if true processes only chip with signal |
---|
71 | |
---|
72 | // counter for trigger pattern type to insert in the triggerword |
---|
73 | Int_t fPatternCounter; |
---|
74 | |
---|
75 | // clear maps |
---|
76 | virtual void Clear(); |
---|
77 | |
---|
78 | // fill run parameters |
---|
79 | void FillRunPars(); |
---|
80 | |
---|
81 | // fill root event |
---|
82 | virtual void FillEEvent( Int_t ); |
---|
83 | |
---|
84 | // dump the number of tracks for each chip |
---|
85 | virtual void Dump( Int_t ); |
---|
86 | |
---|
87 | map<Int_t, vector<ChipTrackSegment> > fTrackSegments; //map for storing data |
---|
88 | |
---|
89 | private: |
---|
90 | EsafConfigClass(Electronics,ChipTrackingTrgEngine1); |
---|
91 | ClassDef(ChipTrackingTrgEngine1,0) |
---|
92 | }; |
---|
93 | |
---|
94 | #endif /* __CHIPTRACKINGTRGENGINE1_HH_ */ |
---|
95 | |
---|