/[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.45 by mocchiut, Wed Dec 14 16:38:30 2011 UTC revision 1.52 by mocchiut, Fri Oct 17 15:58:07 2014 UTC
# Line 32  Line 32 
32                           // error "Cannot find InclinationInfo.h" update your DV installation                           // error "Cannot find InclinationInfo.h" update your DV installation
33  #include <RunInfo.h>  #include <RunInfo.h>
34  #include <GLTables.h>  #include <GLTables.h>
35    #include <ExtTrack.h>
36    
37    
38  #include <TTree.h>  #include <TTree.h>
# Line 39  Line 40 
40  #include <TChain.h>  #include <TChain.h>
41  #include <TChainElement.h>  #include <TChainElement.h>
42  #include <TFile.h>  #include <TFile.h>
43    #include <TTimeStamp.h>
44  #include <TList.h>  #include <TList.h>
45  #include <TKey.h>  #include <TKey.h>
46  #include <TSystemFile.h>  #include <TSystemFile.h>
# Line 225  class PamTrack : public TObject { Line 227  class PamTrack : public TObject {
227    
228   private:   private:
229    
230        ExtTrack*   trk_ext_track;
231      TrkTrack*   trk_track;      TrkTrack*   trk_track;
232      CaloTrkVar* calo_track;      CaloTrkVar* calo_track;
233      ToFTrkVar*  tof_track;      ToFTrkVar*  tof_track;
# Line 239  class PamTrack : public TObject { Line 242  class PamTrack : public TObject {
242    
243      PamTrack();      PamTrack();
244      PamTrack(TrkTrack* , CaloTrkVar* , ToFTrkVar*, OrbitalInfoTrkVar* );      PamTrack(TrkTrack* , CaloTrkVar* , ToFTrkVar*, OrbitalInfoTrkVar* );
245        PamTrack(ExtTrack* , CaloTrkVar* , ToFTrkVar*, OrbitalInfoTrkVar* );
246      PamTrack(const PamTrack&);      PamTrack(const PamTrack&);
247      ~PamTrack(){ Delete(); };      ~PamTrack(){ Delete(); };
248    
249      void Clear();      void Clear(Option_t *option);
250      void Clear(Option_t *option){Clear();};      void Clear(){Clear("");};
251      void Delete();      void Delete();
252    
253      Bool_t IsSolved(){if ((pscore-iscore)>0) return true; return false;};      Bool_t IsSolved(){if ((pscore-iscore)>0) return true; return false;};
# Line 253  class PamTrack : public TObject { Line 257  class PamTrack : public TObject {
257      void SetPScore(Int_t p){pscore=p;};      void SetPScore(Int_t p){pscore=p;};
258      void SetIScore(Int_t i){iscore=i;};      void SetIScore(Int_t i){iscore=i;};
259    
260        ExtTrack*   GetExtTrack(){return trk_ext_track;};
261      TrkTrack*   GetTrkTrack(){return trk_track;};      TrkTrack*   GetTrkTrack(){return trk_track;};
262      CaloTrkVar* GetCaloTrack(){return calo_track;};      CaloTrkVar* GetCaloTrack(){return calo_track;};
263      ToFTrkVar*  GetToFTrack(){return tof_track;};      ToFTrkVar*  GetToFTrack(){return tof_track;};
264      OrbitalInfoTrkVar*  GetOrbitalInfoTrack(){return orb_track;};      OrbitalInfoTrkVar*  GetOrbitalInfoTrack(){return orb_track;};
265    
266      ClassDef(PamTrack,2);      ClassDef(PamTrack,3);
267  };  };
268    
269  /**  /**
# Line 290  class PamLevel2 : public TObject { Line 295  class PamLevel2 : public TObject {
295      UInt_t    pktnum; // current packet number      UInt_t    pktnum; // current packet number
296      Bool_t isFragment;      Bool_t isFragment;
297      Bool_t isSync; ///< the file is fully sinchronized between L2 and L0/DB data      Bool_t isSync; ///< the file is fully sinchronized between L2 and L0/DB data
298      Bool_t hasL0EE; ///< backward compatibility flag for preselected event list          //    Bool_t hasL0EE; ///< backward compatibility flag for preselected event list
299      Long64_t il0entry; ///< entry of level0 file in selection list      Long64_t il0entry; ///< entry of level0 file in selection list
300      TChain*   run_tree;      TChain*   run_tree;
301      TTree*    run_tree_clone;      TTree*    run_tree_clone;
302        TChain*   proc_tree;
303        TTree*    proc_tree_clone;
304      TChain*   sel_tree;      TChain*   sel_tree;
305      TTree*    sel_tree_clone;      TTree*    sel_tree_clone;
306      int *irunoffset;      int *irunoffset;
307      GL_TIMESYNC *gltsync; // Emiliano      GL_TIMESYNC *gltsync; // Emiliano
308      Bool_t fUpdateRunInfo; // Emiliano      Bool_t fUpdateRunInfo; // Emiliano
309        Bool_t fUseDBinRunInfo; // Emiliano
310    
311        Bool_t fDiscarded; ///< true if any file from a list is missing
312    
313      // -------------------------------------------      // -------------------------------------------
314      // variables to store total live and dead time      // variables to store total live and dead time
# Line 343  class PamLevel2 : public TObject { Line 353  class PamLevel2 : public TObject {
353      TrkHough*    trkh_obj;      TrkHough*    trkh_obj;
354      CaloLevel1*  calo1_obj;      CaloLevel1*  calo1_obj;
355      CaloLevel2*  calo2_obj;      CaloLevel2*  calo2_obj;
356      ToFLevel2*   tof_obj;      ToFLevel2*   tof2_obj;
357      TrigLevel2*  trig_obj;      TrigLevel2*  trig_obj;
358      S4Level2*    s4_obj;      S4Level2*    s4_obj;
359      NDLevel2*    nd_obj;      NDLevel2*    nd_obj;
360      AcLevel2*    ac_obj;      AcLevel2*    ac_obj;
361      OrbitalInfo* orb_obj;      OrbitalInfo* orb2_obj;
362      GL_RUN*      run_obj;      GL_RUN*      run_obj;
363      SoftInfo*    soft_obj; // Emiliano      SoftInfo*    soft_obj; // Emiliano
364        ProcInfo*    proc_obj; //EM
365    
366    
367    
368        Int_t extAlgFlag;
369    
370        TClonesArray* trk_ext_obj;
371        TClonesArray* trk_ext_nuc_obj;
372        TClonesArray* trk_nuc_obj;
373    
374    
375        TClonesArray* calo_ext_obj;
376        TClonesArray* calo_ext_nuc_obj;
377        TClonesArray* calo_nuc_obj;
378    
379        TClonesArray* tof_ext_obj;
380        TClonesArray* tof_ext_nuc_obj;
381        TClonesArray* tof_nuc_obj;
382    
383        TClonesArray* orb_ext_obj;
384        TClonesArray* orb_ext_nuc_obj;
385        TClonesArray* orb_nuc_obj;
386    
387    
388        TrkLevel2*   trk2_nuc_obj;
389        CaloLevel2*  calo2_nuc_obj;
390        ToFLevel2*   tof2_nuc_obj;
391        OrbitalInfo* orb2_nuc_obj;
392    
393    
394    
395      // --------------------------------------------      // --------------------------------------------
396      // variables to handle GP      // variables to handle GP
# Line 362  class PamLevel2 : public TObject { Line 402  class PamLevel2 : public TObject {
402      // -----------------------------------      // -----------------------------------
403      TClonesArray *tsorted;      TClonesArray *tsorted;
404      TClonesArray *timage;      TClonesArray *timage;
405        TClonesArray *text; //array of pamtrack objects built from extended algorythm
406        TClonesArray *tsorted_nuc;
407        TClonesArray *timage_nuc;
408        TClonesArray *text_nuc; //array of pamtrack objects built from extended algorythm
409    
410      PamTrack    *track; //store the last required      PamTrack    *track; //store the last required
411      TString howtosort;      TString howtosort;
412      Float_t sortthr;      Float_t sortthr;
413    
414      Bool_t issorted;     // true if the current event has already been sorted with the current sort criteria      Bool_t issorted;     // true if the current event has already been sorted with the current sort criteria
415      Long64_t lastsorted; // the last event whose tracks has been sorted      Long64_t lastsorted; // the last event whose tracks has been sorted
416    
417    
418        Bool_t issorted_new;     // true if the current event has already been sorted with the current sort criteria
419        Long64_t lastsorted_new; // the last event whose tracks has been sorted
420    
421      // --------------------------------------      // --------------------------------------
422      // flags to load level0-1-2 trees/braches      // flags to load level0-1-2 trees/braches
423      // --------------------------------------      // --------------------------------------
# Line 391  class PamLevel2 : public TObject { Line 441  class PamLevel2 : public TObject {
441    
442      Bool_t GP; //GP simulation tree      Bool_t GP; //GP simulation tree
443    
444    
445        Bool_t EXT;//get tracks from extended tracking algorythm
446        Bool_t NUC;//get tracks from nuclei algorythm
447    
448        Bool_t PROC;//EM
449    
450        const char*  trkAlg;
451    
452      // -----------      // -----------
453      // other flags      // other flags
454      // -----------      // -----------
# Line 441  class PamLevel2 : public TObject { Line 499  class PamLevel2 : public TObject {
499    
500      void    SkipRunInfoUpdate(); // Emiliano      void    SkipRunInfoUpdate(); // Emiliano
501      void    DoRunInfoUpdate(){fUpdateRunInfo = true;}; // [default] Emiliano      void    DoRunInfoUpdate(){fUpdateRunInfo = true;}; // [default] Emiliano
502        void    UseDBinRunInfo(){fUseDBinRunInfo = true;}; // [default] Emiliano
503        void    NoDBinRunInfo(){fUseDBinRunInfo = false;}; // EM
504      void    NoDBconnections(){SkipRunInfoUpdate();}; // Emiliano      void    NoDBconnections(){SkipRunInfoUpdate();}; // Emiliano
505    
506      void    CreateCloneTrees0(TChain *fChain, TFile* file);      void    CreateCloneTrees0(TChain *fChain, TFile* file);
# Line 457  class PamLevel2 : public TObject { Line 517  class PamLevel2 : public TObject {
517      Int_t   GetEntry(Long64_t);      Int_t   GetEntry(Long64_t);
518      Long64_t GetReadEntry();      Long64_t GetReadEntry();
519      Int_t   GetYodaEntry();      Int_t   GetYodaEntry();
     Int_t   GetYodaEntry_bckw_compat();  
520    
521      void SetMaxShift(Int_t sh); // EMILIANO method to change the maxshift variable      void SetMaxShift(Int_t sh); // EMILIANO method to change the maxshift variable
522    
523      Long64_t GetEntries(){return pam_tree->GetEntries();};      Long64_t GetEntries(){return pam_tree->GetEntries();};
524      TChain* GetPamTree(){return pam_tree;};      TChain* GetPamTree(){return pam_tree;};
525      TChain* GetRunTree(){return run_tree;};      TChain* GetRunTree(){return run_tree;};
526        TChain* GetProcessingInfoTree(){return proc_tree;};
527      TTree*  GetYodaTree();      TTree*  GetYodaTree();
528    
529      TFile*  GetYodaFile(){return l0_file;}; // can be useful to know the name of level0 file we are using or similar things      TFile*  GetYodaFile(){return l0_file;}; // can be useful to know the name of level0 file we are using or similar things
# Line 494  class PamLevel2 : public TObject { Line 554  class PamLevel2 : public TObject {
554      TrkHough     *GetTrkHough()   { return trkh_obj; };      TrkHough     *GetTrkHough()   { return trkh_obj; };
555      CaloLevel1   *GetCaloLevel1() { return calo1_obj;};      CaloLevel1   *GetCaloLevel1() { return calo1_obj;};
556      CaloLevel2   *GetCaloLevel2() { return calo2_obj;};      CaloLevel2   *GetCaloLevel2() { return calo2_obj;};
557      ToFLevel2    *GetToFLevel2()  { return tof_obj;  };      ToFLevel2    *GetToFLevel2()  { return tof2_obj;  };
558      TrigLevel2   *GetTrigLevel2() { return trig_obj; };      TrigLevel2   *GetTrigLevel2() { return trig_obj; };
559      S4Level2     *GetS4Level2()   { return s4_obj;   };      S4Level2     *GetS4Level2()   { return s4_obj;   };
560      NDLevel2     *GetNDLevel2()   { return nd_obj;   };      NDLevel2     *GetNDLevel2()   { return nd_obj;   };
561      AcLevel2     *GetAcLevel2()   { return ac_obj;   };      AcLevel2     *GetAcLevel2()   { return ac_obj;   };
562      OrbitalInfo  *GetOrbitalInfo(){ return orb_obj;  };      OrbitalInfo  *GetOrbitalInfo(){ return orb2_obj;  };
563      GL_RUN       *GetRunInfo()    { return run_obj;  };      GL_RUN       *GetRunInfo()    { return run_obj;  };
564      SoftInfo     *GetSoftInfo()   { return soft_obj; }; // Emiliano      SoftInfo     *GetSoftInfo()   { return soft_obj; }; // Emiliano
565        ProcInfo     *GetProcInfo()   { return proc_obj; }; // Emiliano
566      GPamela      *GetGPamela()    { return gp_obj;   };      GPamela      *GetGPamela()    { return gp_obj;   };
567    
568  //  ==============================================  //  ==============================================
# Line 525  class PamLevel2 : public TObject { Line 586  class PamLevel2 : public TObject {
586      void          SortTracks();          //assign value to variable sorted_tracks      void          SortTracks();          //assign value to variable sorted_tracks
587  //    TRefArray*    GetTracks();                  //return sorted_tracks  //    TRefArray*    GetTracks();                  //return sorted_tracks
588      TClonesArray* GetTracks();                  //return sorted_tracks      TClonesArray* GetTracks();                  //return sorted_tracks
589      PamTrack*     GetTrack(int);      PamTrack*     GetTrackOld(int);
590      PamTrack*     GetTrackImage(int);      PamTrack*     GetTrackImageOld(int);
591      void          SetSortingMethod(TString how);      PamTrack*     GetTrack(int i){ return GetTrackOld(i); };
592        PamTrack*     GetTrackImage(int i){ return GetTrackImageOld(i); };
593       void          SetSortingMethod(TString how);
594      TString       GetSortingMethod(){return howtosort;};      TString       GetSortingMethod(){return howtosort;};
595      void          SetNucleiSortingThreshold(Float_t nucleithr){ sortthr = nucleithr; return;};      void          SetNucleiSortingThreshold(Float_t nucleithr){ sortthr = nucleithr; return;};
596      Float_t       GetNucleiSortingThreshold(){ return sortthr;};      Float_t       GetNucleiSortingThreshold(){ return sortthr;};
597    
598    
599    
600    
601    //  =================================
602    //  methods to handle new tracking algorythms
603    //  =================================
604    /*     Int_t GetTrackingAlgorythmFlag(){return extAlgFlag;}; */
605    /*     void  SetTrackingAlgorythm(const char * alg); */
606    /*     const char* GetTrackingAlgorythm(); */
607    
608        Int_t  GetNTracks(const char*);
609        PamTrack*     GetTrack(int,const char*);
610        PamTrack*     GetTrackImage(int, const char*);
611    
612    
613    /*     Int_t  GetNTracks(){return GetNTracks(trkAlg); }; */
614    /*     PamTrack*     GetTrack(int i) { return GetTrack(i,trkAlg); }; */
615    /*     PamTrack*     GetTrackImage(int i){ return GetTrackImage(i,trkAlg); }; */
616    
617        void          SortTracksNew();          //assign value to variable sorted_tracks
618    
619    
620  //  =================================  //  =================================
621  //  other methods  //  other methods
622  //  =================================  //  =================================
# Line 564  class PamLevel2 : public TObject { Line 649  class PamLevel2 : public TObject {
649    
650      Bool_t IsRUN(){return RUN;};      Bool_t IsRUN(){return RUN;};
651    
652        Bool_t IsEXT(){return EXT;};
653        Bool_t IsNUC(){return NUC;};
654    
655      Bool_t IsGood(Bool_t strict=true);      Bool_t IsGood(Bool_t strict=true);
656    
657      Int_t  IsSELLI(){return SELLI;}; //trees of selected events (there is a selection list)      Int_t  IsSELLI(){return SELLI;}; //trees of selected events (there is a selection list)
658      void  SetSELLI(Int_t selli){SELLI=selli;};      void  SetSELLI(Int_t selli){SELLI=selli;};
659    
660        Bool_t IsPROC(){return PROC;};//EM
661    
662        Bool_t HasDiscardedFiles(){return fDiscarded;}; ///< true if something went wrong and not all files were processed
663    
664      Bool_t IsGP(){return ISGP;};      Bool_t IsGP(){return ISGP;};
665    
666      void   SetGP(Bool_t tt){ISGP=tt;};      void   SetGP(Bool_t tt){ISGP=tt;};
667    
668      void SetDebug(Bool_t set){ DBG=set; TrkParams::SetVerboseMode(); };      void SetDebug(Bool_t set){ DBG=set; TrkParams::SetVerboseMode(); };
669    
670    
671      ClassDef(PamLevel2,2);      ClassDef(PamLevel2,4);
672  };  };
673    
674  //===============================================================================================  //===============================================================================================

Legend:
Removed from v.1.45  
changed lines
  Added in v.1.52

  ViewVC Help
Powered by ViewVC 1.1.23