// ESAF : Euso Simulation and Analysis Framework // $Id: ChipTrackingTrgEngine0.hh,v 1.7 2005/10/24 09:06:42 pesce Exp $ // R. Pesce created /***************************************************************************** * ESAF: Euso Simulation and Analysis Framework * * * * Id: EusoElectronics * * Package: Electronics * * Coordinator: Marco.Pallavicini * * * *****************************************************************************/ #ifndef __CHIPTRACKINGTRGENGINE0_HH_ #define __CHIPTRACKINGTRGENGINE0_HH_ #include "euso.hh" #include "TriggerEngine.hh" #include "ChipTrackSegment.hh" /////////////////////////////////////////////////////////////////////////////// // // // ChipTrackingTrgEngine0 // // // // Tracking trigger built in front end chip logic. // // // // ALGORYTHM: // // each chip is capable of finding a track segment of consequtive and // // adjacent pixels. // // If the length of a given segment exceeds a threshold, trigger occurs // // If not, the macrocell checks if there are 2 segments in nearby front end // // chips that summed together exceed the threshold: if this happens, trigger // // occurs. // // // // Special class for studying background fake rate trigger // // A specific trigger word is filled respect to the length of recognized // // tracks. // // // /////////////////////////////////////////////////////////////////////////////// class ChipTrackingTrgEngine0 : public TriggerEngine { public: // ctor ChipTrackingTrgEngine0(); // dtor virtual ~ChipTrackingTrgEngine0(); // simulate trigger virtual void Simulate( MacroCellData* ); EsafConfigClass(Electronics,ChipTrackingTrgEngine0); private: ClassDef(ChipTrackingTrgEngine0,0) // trigger parameters Bool_t fRelativeThreshold; // true if the threshold is relative to the mean value // of the background in each chip: thresh = back + n*sqrt(back) Int_t fThreshold; // threshold on pixel hits in a gtu Int_t fMinTrackLength; // algorithm searches for tracks of length between Int_t fMaxTrackLength; // fMinTrackLength and fMaxTriggerTrackLength Int_t fMinTriggerTrackLength; // min trigger track length in a single chip Int_t fMinTriggerTwoLength; // min trigger track length in two nearby chips Int_t fMaxTwoLength; Bool_t fAcceptHole; // true if we accept an hole in a track in a single chip Bool_t fOnlyWithSignal; // if true processes only chip with signal // clear maps void Clear(); // fill root event void FillEEvent( Int_t ); // fill run parameters void FillRunPars(); // dump the number of tracks for each chip void Dump( Int_t ); map > fTrackSegments; //map for storing data // counter for trigger pattern type to insert in the triggerword Int_t fPatternCounter; // counters of tracks with a specific length Int_t nTracks[32]; }; #endif /* __CHIPTRACKINGTRGENGINE_HH0_ */