source: JEM-EUSO/esaf_lal/tags/v1_r0/esaf/packages/simulation/detector/electronics/include/ChipTrackingTrgEngine.hh @ 117

Last change on this file since 117 was 117, checked in by moretto, 11 years ago

ESAF version compilable on mac OS

File size: 3.7 KB
Line 
1// ESAF : Euso Simulation and Analysis Framework
2// $Id: ChipTrackingTrgEngine.hh 2385 2005-11-18 14:00:07Z pesce $
3// M. Pallavicini created Oct, 24 2003
4
5/*****************************************************************************
6 * ESAF: Euso Simulation and Analysis Framework                              *
7 *                                                                           *
8 *  Id: EusoElectronics                                                      *
9 *  Package: Electronics                                                     *
10 *  Coordinator: Marco.Pallavicini                                           *
11 *                                                                           *
12 *****************************************************************************/
13
14
15#ifndef __CHIPTRACKINGTRGENGINE_HH_
16#define __CHIPTRACKINGTRGENGINE_HH_
17
18#include "euso.hh"
19#include "TriggerEngine.hh"
20#include "ChipTrackSegment.hh"
21
22///////////////////////////////////////////////////////////////////////////////
23//                                                                           //
24//  ChipTrackingTrgEngine                                                    //
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///////////////////////////////////////////////////////////////////////////////
37
38
39class ChipTrackingTrgEngine : public TriggerEngine {
40public:
41    // ctor
42    ChipTrackingTrgEngine();
43   
44    // dtor
45    virtual ~ChipTrackingTrgEngine();
46
47    // simulate trigger
48    virtual void Simulate( MacroCellData* );
49
50    EsafConfigClass(Electronics,ChipTrackingTrgEngine);
51
52
53private:
54    // trigger parameters
55    Int_t fThreshold;                 //threshold on pixel hits in a gtu
56    Bool_t fRelativeThreshold;        // true if the threshold is relative to the mean value
57                                      // of the background in each chip: thresh = back + n*sqrt(back)
58   
59    Int_t fMinTrackLength;            //algorithm searches for tracks of length
60    Int_t fMaxTrackLength;            //between fMinTrackLength and fMaxTrackLength
61   
62    Int_t fMinTriggerTrackLength;     //min trigger track length in a single chip
63    Int_t fMinTriggerTwoLength;       //min trigger track length in two nearby chips
64    Int_t fMaxTwoLength;              // max length for trigger in two nearby chips
65   
66    Bool_t fAcceptHole;               //true if we accept an hole in a track in a single chip
67    Bool_t fOnlyWithSignal;           //if true the algorithm processes only chip with signal
68
69    // clear maps
70    void Clear();
71
72    // fill run parameters
73    void FillRunPars();
74
75    // fill rootfile event
76    void FillEEvent( Int_t );
77
78    // dump the number of tracks for each chip (debug method)
79    void Dump( Int_t );
80
81    map<Int_t, vector<ChipTrackSegment> > fTrackSegments;    //map for storing data
82   
83    ClassDef(ChipTrackingTrgEngine,0)
84};
85
86#endif  /* __CHIPTRACKINGTRGENGINE_HH_ */
87
Note: See TracBrowser for help on using the repository browser.