1 |
/** |
2 |
* \file ExtTrkingAlg.h |
3 |
* \author Elena Vannuccini |
4 |
*/ |
5 |
#ifndef exttrkingalg_h |
6 |
#define exttrkingalg_h |
7 |
|
8 |
// PAMELA classes |
9 |
#include <TrkLevel1.h> |
10 |
#include <TrkLevel2.h> |
11 |
|
12 |
#include <ToFLevel2.h> |
13 |
|
14 |
#include <CaloLevel1.h> |
15 |
#include <CaloLevel2.h> |
16 |
|
17 |
//#include <ExtTrack.h> |
18 |
|
19 |
// ROOT classes |
20 |
#include <TClonesArray.h> |
21 |
|
22 |
|
23 |
|
24 |
#include <stdlib.h> |
25 |
#include <map> |
26 |
#include <iostream> |
27 |
#include <iomanip> |
28 |
|
29 |
class ExtTrkingAlg : public TObject { |
30 |
|
31 |
private: |
32 |
|
33 |
Int_t _whichAlg; ///< algorythm id |
34 |
|
35 |
|
36 |
TClonesArray *_trkArray; ///< array of tracks |
37 |
|
38 |
TrkLevel1* _trk_l1; |
39 |
TrkLevel2* _trk_l2; |
40 |
|
41 |
CaloLevel1* _cal_l1; |
42 |
CaloLevel2* _cal_l2; |
43 |
|
44 |
ToFLevel2* _tof_l2; |
45 |
|
46 |
|
47 |
Int_t _sel_nClstrMAX; ///< selection parameter: maximum number of cluster |
48 |
Int_t _sel_nPlaneXMIN; ///< selection parameter: minimum number of hit x-views |
49 |
Int_t _sel_nPlaneYMIN; ///< selection parameter: minimum number of hit y-views |
50 |
|
51 |
Int_t _alg_nClFixX; ///< algorythm parameter: n.hits required on X view |
52 |
Int_t _alg_nClFixY; ///< algorythm parameter:n.hits required on X view |
53 |
Int_t _alg_nTrackMAX; ///< algorythm parameter: maximum num. of track candidates |
54 |
|
55 |
Bool_t _debug; |
56 |
|
57 |
public: |
58 |
|
59 |
void Reset(); ///< Reset the algorythm |
60 |
void Clear(Option_t* option = ""); ///< Clear the event |
61 |
void Delete(){ delete _trkArray; }; |
62 |
|
63 |
ExtTrkingAlg(Int_t id=0); |
64 |
// ExtTrkingAlg(){ ExtTrkingAlg(0); }; |
65 |
~ExtTrkingAlg(){ Delete(); }; |
66 |
|
67 |
// ExtTrkingAlg(Int_t id); |
68 |
|
69 |
void SetTrkLevel1( TrkLevel1* trkl1 = NULL ) { _trk_l1 = trkl1;}; |
70 |
void SetTrkLevel2( TrkLevel2* trkl2 = NULL ) { _trk_l2 = trkl2; }; |
71 |
void SetToFLevel2( ToFLevel2* tofl2 = NULL ) { _tof_l2 = tofl2; }; |
72 |
void SetCaloLevel1( CaloLevel1* call1 = NULL ) { _cal_l1 = call1; }; |
73 |
void SetCaloLevel2( CaloLevel2* call2 = NULL ) { _cal_l2 = call2; }; |
74 |
|
75 |
Bool_t CheckEvent(); ///< pre-selection |
76 |
void ProcessEvent(Bool_t force = false); ///< apply tracking algorythm |
77 |
|
78 |
TClonesArray *GetTrackArray(Bool_t reset = false); |
79 |
|
80 |
void SetSelectionParams(double* par); |
81 |
void SetAlgorythmParams(double* par); |
82 |
|
83 |
void SetDebug(Bool_t dbg = false){ _debug = dbg; }; |
84 |
|
85 |
void Dump(); |
86 |
|
87 |
TClonesArray** GetPointerToTrackArray(){ return &_trkArray; }; |
88 |
|
89 |
}; |
90 |
|
91 |
|
92 |
|
93 |
#endif |