/[PAMELA software]/PamelaLevel2/inc/PamLevel2.h
ViewVC logotype

Diff of /PamelaLevel2/inc/PamLevel2.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6 by pam-fi, Tue Nov 28 10:58:34 2006 UTC revision 1.8 by pam-fi, Mon Dec 11 17:49:03 2006 UTC
# Line 26  Line 26 
26    
27    
28  #include <TTree.h>  #include <TTree.h>
29    #include <TFriendElement.h>
30  #include <TChain.h>  #include <TChain.h>
31  #include <TFile.h>  #include <TFile.h>
32  #include <TList.h>  #include <TList.h>
# Line 56  class PamTrack : public TrkTrack, public Line 57  class PamTrack : public TrkTrack, public
57    
58      PamTrack(TrkTrack* , CaloTrkVar* , ToFTrkVar* );      PamTrack(TrkTrack* , CaloTrkVar* , ToFTrkVar* );
59    
60        TrkTrack* GetTrkTrack(){return trk_track;};
61        CaloTrkVar* GetCaloTrack(){return calo_track;};
62        ToFTrkVar* GetToFTrack(){return tof_track;};
63    
64      ClassDef(PamTrack,1);      ClassDef(PamTrack,1);
65  };  };
66    
# Line 66  class PamTrack : public TrkTrack, public Line 71  class PamTrack : public TrkTrack, public
71   * This allows to solve the tracker ambiguity (that is, to choose between track images) by using also information from other detectors.   * This allows to solve the tracker ambiguity (that is, to choose between track images) by using also information from other detectors.
72   */   */
73                                    
74  class PamLevel2 : public CaloLevel2, public CaloLevel1, public TrkLevel2, public TrkLevel1, public TrkHough, public ToFLevel2, public TrigLevel2, public S4Level2, public NDLevel2, public AcLevel2, public OrbitalInfo {  class PamLevel2 : public CaloLevel2, public CaloLevel1, public ToFLevel2, public TrkLevel2, public TrkLevel1, public TrkHough, public TrigLevel2, public S4Level2, public NDLevel2, public AcLevel2, public OrbitalInfo {
75    
76   private:   private:
77     public:
78    
79      TrkLevel1*   trk1_obj;      TrkLevel1*   trk1_obj;
80      TrkLevel2*   trk2_obj;      TrkLevel2*   trk2_obj;
# Line 86  class PamLevel2 : public CaloLevel2, pub Line 92  class PamLevel2 : public CaloLevel2, pub
92                    
93      GL_RUN*      run_obj;      GL_RUN*      run_obj;
94            
95    /*     TrkLevel1*   trk1_clone; */
96    /*     TrkLevel2*   trk2_clone; */
97    /*     TrkHough*    trkh_clone; */
98    
99    /*     CaloLevel1*  calo1_clone; */
100    /*     CaloLevel2*  calo2_clone; */
101    
102    /*     ToFLevel2*   tof_clone; */
103    /*     TrigLevel2*  trig_clone; */
104    /*     S4Level2*    s4_clone; */
105    /*     NDLevel2*    nd_clone; */
106    /*     AcLevel2*    ac_clone; */
107    /*     OrbitalInfo* orb_clone; */
108    
109    /*     TTree*       T_clone; //tracker */
110    /*     TTree*       C_clone; //calo */
111    /*     TTree*       O_clone; //tof */
112    /*     TTree*       R_clone; //trigger */
113    /*     TTree*       S_clone; //s4 */
114    /*     TTree*       A_clone; //anti */
115    /*     TTree*       N_clone; //nd */
116    /*     TTree*       B_clone; //orbital */
117    
118        TTree*       tree_clone[8];
119    
120      TRefArray*   sorted_tracks;      TRefArray*   sorted_tracks;
121                    
 //    TChain*      Tout;  
           
  public:  
   
122      Bool_t CAL2; //level2 branch      Bool_t CAL2; //level2 branch
123      Bool_t CAL1; //level1 branch      Bool_t CAL1; //level1 branch
124    
# Line 111  class PamLevel2 : public CaloLevel2, pub Line 138  class PamLevel2 : public CaloLevel2, pub
138                    
139      void Clear();      void Clear();
140    
141      TrkLevel1*   GetTrkLevel1()  { return trk1_obj;  };  /*     TrkLevel1*   GetTrkLevel1()  { return trk1_obj;  }; */
142      TrkLevel2*   GetTrkLevel2()  { return trk2_obj;  };  /*     TrkLevel2*   GetTrkLevel2()  { return trk2_obj;  }; */
143      TrkHough*    GetTrkHough()   { return trkh_obj;  };  /*     TrkHough*    GetTrkHough()   { return trkh_obj;  }; */
144      CaloLevel1*  GetCaloLevel1() { return calo1_obj; };  /*     CaloLevel1*  GetCaloLevel1() { return calo1_obj; }; */
145      CaloLevel2*  GetCaloLevel2() { return calo2_obj; };  /*     CaloLevel2*  GetCaloLevel2() { return calo2_obj; }; */
146      ToFLevel2*   GetToFLevel2()  { return tof_obj;  };  /*     ToFLevel2*   GetToFLevel2()  { return tof_obj;  }; */
147      TrigLevel2*  GetTrigLevel2() { return trig_obj; };  /*     TrigLevel2*  GetTrigLevel2() { return trig_obj; }; */
148      S4Level2*    GetS4Level2()   { return s4_obj;   };  /*     S4Level2*    GetS4Level2()   { return s4_obj;   }; */
149      NDLevel2*    GetNDLevel2()   { return nd_obj;   };  /*     NDLevel2*    GetNDLevel2()   { return nd_obj;   }; */
150      AcLevel2*    GetAcLevel2()   { return ac_obj;   };  /*     AcLevel2*    GetAcLevel2()   { return ac_obj;   }; */
151      OrbitalInfo* GetOrbitalInfo(){ return orb_obj;  };  /*     OrbitalInfo* GetOrbitalInfo(){ return orb_obj;  }; */
152      GL_RUN*      GetRunInfo()    { return run_obj;  };  /*     TrkLevel1*   GetTrkLevel1()  { return ; }; */
153            /*     TrkLevel2*   GetTrkLevel2()  { return TrkLevel2::GetTrkLevel2(); }; */
154  //  =====================================  /*     TrkHough*    GetTrkHough()   { return TrkHough::GetTrkHough(); }; */
155  //  methods needed to read Level2 trees  /*     CaloLevel1*  GetCaloLevel1() { return CaloLevel1::GetCaloLevel1(); }; */
156  //  =====================================  /*     CaloLevel2*  GetCaloLevel2() { return CaloLevel2::GetCaloLevel2(); }; */
157    /*     ToFLevel2*   GetToFLevel2()  { return ToFLevel2::GetToFLevel2(); }; */
158    /*     TrigLevel2*  GetTrigLevel2() { return TrigLevel2::GetTrigLevel2(); }; */
159    /*     S4Level2*    GetS4Level2()   { return S4Level2::GetS4Level2(); }; */
160    /*     NDLevel2*    GetNDLevel2()   { return NDLevel2::GetNDLevel2(); }; */
161    /*     AcLevel2*    GetAcLevel2()   { return AcLevel2::GetAcLevel2(); }; */
162    /*     OrbitalInfo* GetOrbitalInfo(){ return OrbitalInfo::GetOrbitalInfo(); }; */
163        GL_RUN*      GetRunInfo()    { return run_obj; };
164            
165    //  =========================================
166    //  methods needed to read/write Level2 trees
167    //  =========================================
168      void    SetWhichTrees(TString);      void    SetWhichTrees(TString);
169        void    GetWhichTrees(TFile*);
170    
171        TTree*  GetPamTree(TFile*,TString);
172        TTree*  GetPamTree(TFile* f){return GetPamTree(f,"");};
173    
174      TList*  GetListOfLevel2Files(TString, TString);      TList*  GetListOfLevel2Files(TString, TString);
175      Bool_t  CheckLevel2File(TString);      Bool_t  CheckLevel2File(TString);
 //    void    SetBranchAddress();  
     TTree*  GetPamTree(TFile*,TString);  
     TTree*  GetPamTree(TFile* f){return GetPamTree(f,"+ALL");};  
176      TChain* GetPamTree(TList*,TString);      TChain* GetPamTree(TList*,TString);
177        TChain* GetPamTree(TString ddir,TString list,TString detlist){ return GetPamTree(GetListOfLevel2Files(ddir,list),detlist); };
178        TChain* GetPamTree(TString ddir,TString list){ return GetPamTree(GetListOfLevel2Files(ddir,list),""); };
179    
180      TTree*  GetRunTree(TFile*);      TTree*  GetRunTree(TFile*);
181      TChain* GetRunTree(TList*);      TChain* GetRunTree(TList*);
182        
183        void    CreateCloneTrees0(TChain *fChain, TFile* file);
184        void    CreateCloneTrees(TFile* file);
185        void    FillCloneTrees();
186        TTree  *GetCloneTree(TString);
187        void    WriteCloneTrees();
188    
189      void    SetBranchAddress(TTree *);      void    SetBranchAddress(TTree *);
190      void    SetBranchAddress(TChain *);      void    SetBranchAddress(TChain *);
191    
192  //  =====================================  //  =====================================
193  //  methods needed to set brach addresses  //  methods needed to set brach addresses
194  //  =====================================  //  =====================================
195      void*       GetPointerToTrk()  {return &trk2_obj;};  /*     void*       GetPointerToTrk(); */
196      void*       GetPointerToTrk(int s){  /*     void*       GetPointerToTrk(int s); */
197          switch (s) {  /*     void*       GetPointerToCalo(); */
198          case 1:  return &trk1_obj;  /*     void*       GetPointerToCalo(int s); */
199          case 2:  return &trk2_obj;  /*     void*       GetPointerToToF(); */
200          case 3:  return &trkh_obj;  /*     void*       GetPointerToTrig(); */
201          default: return 0;  /*     void*       GetPointerToS4(); */
202          };  /*     void*       GetPointerToND(); */
203      };  /*     void*       GetPointerToAc(); */
204      void*       GetPointerToCalo() {return &calo2_obj; };  /*     void*       GetPointerToOrb(); */
205      void*       GetPointerToCalo(int s){  /*     void*       GetPointerToRun(); */
         switch (s) {  
         case 1:  return &calo1_obj;  
         case 2:  return &calo2_obj;  
         default: return 0;  
         };  
     };  
     void*       GetPointerToToF()  {return &tof_obj;  };  
     void*       GetPointerToTrig() {return &trig_obj; };  
     void*       GetPointerToS4()   {return &s4_obj;   };  
     void*       GetPointerToND()   {return &nd_obj;   };  
     void*       GetPointerToAc()   {return &ac_obj;   };  
     void*       GetPointerToOrb()  {return &orb_obj;  };  
     void*       GetPointerToRun()  {return &run_obj;  };  
206      void*       GetPointerTo(const char*);      void*       GetPointerTo(const char*);
207    
208  //  ==============================================  //  ==============================================

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.23