| 1 |
|
| 2 |
|
| 3 |
/** |
| 4 |
* \file PamLevel2.h |
| 5 |
* \author Elena Vannuccini |
| 6 |
*/ |
| 7 |
#ifndef pamlevel2_h |
| 8 |
#define pamlevel2_h |
| 9 |
|
| 10 |
#include <TRefArray.h> |
| 11 |
|
| 12 |
#include <TrkLevel2.h> |
| 13 |
#include <CaloLevel2.h> |
| 14 |
#include <ToFLevel2.h> |
| 15 |
#include <TrigLevel2.h> |
| 16 |
#include <S4Level2.h> |
| 17 |
#include <NDLevel2.h> |
| 18 |
#include <AcLevel2.h> |
| 19 |
#include <OrbitalInfo.h> |
| 20 |
|
| 21 |
#include <TTree.h> |
| 22 |
#include <TChain.h> |
| 23 |
#include <TFile.h> |
| 24 |
#include <TList.h> |
| 25 |
#include <TKey.h> |
| 26 |
#include <TSystemFile.h> |
| 27 |
#include <TSystemDirectory.h> |
| 28 |
|
| 29 |
#include <iostream> |
| 30 |
using namespace std; |
| 31 |
|
| 32 |
/** |
| 33 |
* \brief Class to describe particle tracks in the apparatus, including tracker and track-related variables from other detectors (calorimeter and TOF). |
| 34 |
* |
| 35 |
* This class inherites from TrkTrack, CaloTrkVar ecc... |
| 36 |
* |
| 37 |
*/ |
| 38 |
class PamTrack : public TrkTrack, public CaloTrkVar, public ToFTrkVar { |
| 39 |
|
| 40 |
private: |
| 41 |
|
| 42 |
TrkTrack* trk_track; |
| 43 |
CaloTrkVar* calo_track; |
| 44 |
ToFTrkVar* tof_track; |
| 45 |
|
| 46 |
public: |
| 47 |
|
| 48 |
PamTrack(); |
| 49 |
|
| 50 |
PamTrack(TrkTrack* , CaloTrkVar* , ToFTrkVar* ); |
| 51 |
|
| 52 |
ClassDef(PamTrack,1); |
| 53 |
}; |
| 54 |
|
| 55 |
/** |
| 56 |
* \brief Class to describe PAMELA LEVEL2 data. |
| 57 |
* |
| 58 |
* This class inherites from TrkLevel2, CaloLevel2 ecc... and it overrides the TrkLevel2:GetTrack(int it) and TrkLevel2:GetTrackImage(int it) methods. |
| 59 |
* This allows to solve the tracker ambiguity (that is, to choose between track images) by using also information from other detectors. |
| 60 |
*/ |
| 61 |
|
| 62 |
class PamLevel2 : public CaloLevel2, public TrkLevel2, public ToFLevel2, public TrigLevel2, public S4Level2, public NDLevel2, public AcLevel2, public OrbitalInfo { |
| 63 |
|
| 64 |
private: |
| 65 |
|
| 66 |
TrkLevel2* trk_obj; |
| 67 |
CaloLevel2* calo_obj; |
| 68 |
ToFLevel2* tof_obj; |
| 69 |
TrigLevel2* trig_obj; |
| 70 |
S4Level2* s4_obj; |
| 71 |
NDLevel2* nd_obj; |
| 72 |
AcLevel2* ac_obj; |
| 73 |
OrbitalInfo* orb_obj; |
| 74 |
|
| 75 |
TRefArray* sorted_tracks; // TEMPORANEO ... lo mettero` menbro di TrkLevel2 |
| 76 |
|
| 77 |
public: |
| 78 |
|
| 79 |
Bool_t CAL; |
| 80 |
Bool_t TRK; |
| 81 |
Bool_t TRG; |
| 82 |
Bool_t TOF; |
| 83 |
Bool_t S4; |
| 84 |
Bool_t ND; |
| 85 |
Bool_t AC; |
| 86 |
Bool_t ORB; |
| 87 |
|
| 88 |
PamLevel2(); |
| 89 |
~PamLevel2(); |
| 90 |
|
| 91 |
void Clear(); |
| 92 |
|
| 93 |
TrkLevel2* GetTrkLevel2() { return trk_obj; }; |
| 94 |
CaloLevel2* GetCaloLevel2() { return calo_obj; }; |
| 95 |
ToFLevel2* GetToFLevel2() { return tof_obj; }; |
| 96 |
TrigLevel2* GetTrigLevel2() { return trig_obj; }; |
| 97 |
S4Level2* GetS4Level2() { return s4_obj; }; |
| 98 |
NDLevel2* GetNDLevel2() { return nd_obj; }; |
| 99 |
AcLevel2* GetAcLevel2() { return ac_obj; }; |
| 100 |
OrbitalInfo* GetOrbitalInfo(){ return orb_obj; }; |
| 101 |
|
| 102 |
// ===================================== |
| 103 |
// methods needed to read Level2 trees |
| 104 |
// ===================================== |
| 105 |
void SetWhichTrees(TString); |
| 106 |
TList* GetListOfLevel2Files(TString, TString); |
| 107 |
Bool_t CheckLevel2File(TString); |
| 108 |
TTree* LoadPamTrees(TFile*); |
| 109 |
TTree* LoadPamTrees(TFile*,TString); |
| 110 |
TChain* LoadPamTrees(TList*,TString); |
| 111 |
|
| 112 |
// ===================================== |
| 113 |
// methods needed to set brach addresses |
| 114 |
// ===================================== |
| 115 |
void* GetPointerToTrk() {return &trk_obj;}; |
| 116 |
void* GetPointerToCalo() {return &calo_obj;}; |
| 117 |
void* GetPointerToToF() {return &tof_obj;}; |
| 118 |
void* GetPointerToTrig() {return &trig_obj;}; |
| 119 |
void* GetPointerToS4() {return &s4_obj;}; |
| 120 |
void* GetPointerToND() {return &nd_obj;}; |
| 121 |
void* GetPointerToAc() {return &ac_obj;}; |
| 122 |
void* GetPointerToOrb() {return &orb_obj;}; |
| 123 |
|
| 124 |
// ================================= |
| 125 |
// methods to retrieve pamela tracks |
| 126 |
// ================================= |
| 127 |
PamTrack* GetStoredTrack(Int_t itrk); |
| 128 |
void SortTracks(); //assign value to variable sorted_tracks |
| 129 |
TRefArray* GetTracks(); //return sorted_tracks |
| 130 |
PamTrack* GetTrack(int); |
| 131 |
PamTrack* GetTrackImage(int); |
| 132 |
|
| 133 |
ClassDef(PamLevel2,1); |
| 134 |
}; |
| 135 |
|
| 136 |
//=============================================================================================== |
| 137 |
// |
| 138 |
// |
| 139 |
// |
| 140 |
// |
| 141 |
//=============================================================================================== |
| 142 |
|
| 143 |
|
| 144 |
#endif |
| 145 |
|