--- PamelaLevel2/inc/PamLevel2.h 2008/12/12 14:11:47 1.40 +++ PamelaLevel2/inc/PamLevel2.h 2009/04/01 09:25:36 1.41 @@ -24,11 +24,11 @@ #include #include #include -#include // EMILIANO, now this library is included in libDarthVader.so - // and the header installed in $PAM_INC. If you get the +#include // EMILIANO, now this library is included in libDarthVader.so + // and the header installed in $PAM_INC. If you get the // error "Cannot find InclinationInfo.h" update your DV installation -#include // EMILIANO, now this library is included in libDarthVader.so - // and the header installed in $PAM_INC. If you get the +#include // EMILIANO, now this library is included in libDarthVader.so + // and the header installed in $PAM_INC. If you get the // error "Cannot find InclinationInfo.h" update your DV installation #include #include @@ -61,7 +61,7 @@ ///////////////////////////////////////////////////////////////////////////// /** * \brief Class to describe GP output (to be moved to PamelaDigitizer) - * + * */ class GPamela : public TObject { @@ -217,8 +217,8 @@ /** * \brief Class to describe particle tracks in the apparatus, including tracker and track-related variables from other detectors (calorimeter and TOF). * - * This class inherites from TrkTrack, CaloTrkVar ecc... - * + * This class inherites from TrkTrack, CaloTrkVar ecc... + * */ //class PamTrack : public TrkTrack, public CaloTrkVar, public ToFTrkVar { class PamTrack : public TObject { @@ -264,10 +264,10 @@ /** * \brief Class to describe PAMELA LEVEL2 data. * - * This class inherites from TrkLevel2, CaloLevel2 ecc... and it overrides the TrkLevel2:GetTrack(int it) and TrkLevel2:GetTrackImage(int it) methods. + * This class inherites from TrkLevel2, CaloLevel2 ecc... and it overrides the TrkLevel2:GetTrack(int it) and TrkLevel2:GetTrackImage(int it) methods. * This allows to solve the tracker ambiguity (that is, to choose between track images) by using also information from other detectors. */ - + //class PamLevel2 : public CaloLevel2, public CaloLevel1, public ToFLevel2, public TrkLevel2, public TrkLevel1, public TrkHough, public TrigLevel2, public S4Level2, public NDLevel2, public AcLevel2, public OrbitalInfo { class PamLevel2 : public TObject { @@ -291,16 +291,16 @@ // ------------------------------------------- // variables to store total live and dead time // ------------------------------------------- - ULong64_t totdltime[3];// 0=live 1=dead 2=n.events + ULong64_t totdltime[3];// 0=live 1=dead 2=n.events // --------------------------------- // variables to retrieve level0 info // --------------------------------- TFile* l0_file; TTree* l0_tree; - Int_t iroot; + Int_t iroot; Int_t prevshift; // to remember if any shift is needed to synchronize l0 and l2 data instead of calculating any time - Int_t maxshift; // EMILIANO maximum discrepancy between L2 and L0 data (the bigger the better concering synch but the processing speed drops) default = 10 + Int_t maxshift; // EMILIANO maximum discrepancy between L2 and L0 data (the bigger the better concering synch but the processing speed drops) default = 10 // -------------------------------------------- // variables to store Level0 info (if required) // -------------------------------------------- @@ -323,7 +323,7 @@ TTree* pam_tree_clone[NCLONES]; // -------------------------------------------- - // variables to store Level1-2 info + // variables to store Level1-2 info // -------------------------------------------- TrkLevel1* trk1_obj; TrkLevel2* trk2_obj; @@ -349,10 +349,12 @@ // ----------------------------------- TClonesArray *tsorted; TClonesArray *timage; - PamTrack *track; //store the last required + PamTrack *track; //store the last required TString howtosort; Float_t sortthr; + Bool_t issorted; // true if the current event has already been sorted with the current sort criteria + Long64_t lastsorted; // the last event whose tracks has been sorted // -------------------------------------- // flags to load level0-1-2 trees/braches // -------------------------------------- @@ -389,18 +391,18 @@ public: - + PamLevel2(TString ddir,TList *list,TString detlist); PamLevel2(TString ddir,TString list,TString detlist); PamLevel2(TString ddir,TString list); PamLevel2(); ~PamLevel2(){Delete();}; - + void Clear(); void Reset(); void Delete(); - + // ============================================= // methods needed to read/write Level0-1-2 trees // ============================================= @@ -408,7 +410,7 @@ void GetWhichTrees(TFile*); TTree* GetPamTree(TFile*,TString); - TTree* GetPamTree(TFile* f){return GetPamTree(f,"");}; + TTree* GetPamTree(TFile* f){return GetPamTree(f,"");}; TList* GetListOfLevel2Files(TString, TString); Bool_t CheckLevel2File(TString); @@ -436,10 +438,11 @@ // Int_t GetEntry(Int_t); Int_t GetEntry(Long64_t); - Int_t GetYodaEntry(); + Long64_t GetReadEntry(); + Int_t GetYodaEntry(); void SetMaxShift(Int_t sh){ maxshift = sh; return;}; // EMILIANO method to change the maxshift variable - + Long64_t GetEntries(){return pam_tree->GetEntries();}; TChain* GetPamTree(){return pam_tree;}; TChain* GetRunTree(){return run_tree;}; @@ -494,7 +497,7 @@ PamTrack* GetPamTrackAlong(TrkTrack*); // PamTrack* GetPamTrackAlong(CaloTrkVar*); //se serve // PamTrack* GetPamTrackAlong(ToFTrkVar*); //se serve - + // ================================= // methods to retrieve pamela tracks // ================================= @@ -506,11 +509,11 @@ TClonesArray* GetTracks(); //return sorted_tracks PamTrack* GetTrack(int); PamTrack* GetTrackImage(int); - void SetSortingMethod(TString how){ howtosort = how; return;}; + void SetSortingMethod(TString how); TString GetSortingMethod(){return howtosort;}; void SetNucleiSortingThreshold(Float_t nucleithr){ sortthr = nucleithr; return;}; Float_t GetNucleiSortingThreshold(){ return sortthr;}; - + // ================================= // other methods // ================================= @@ -546,7 +549,7 @@ Bool_t IsGood(Bool_t strict=true); Int_t IsSELLI(){return SELLI;}; //trees of selected events (there is a selection list) - void SetSELLI(Int_t selli){SELLI=selli;}; + void SetSELLI(Int_t selli){SELLI=selli;}; Bool_t IsGP(){return ISGP;}; @@ -554,6 +557,7 @@ void SetDebug(Bool_t set){ DBG=set; TrkParams::SetVerboseMode(); }; + ClassDef(PamLevel2,1); };