]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/Upgrade/AliToyMCEventGenerator.h
o fixes
[u/mrichter/AliRoot.git] / TPC / Upgrade / AliToyMCEventGenerator.h
index 224dd31fc018ad9921c6ace1dbb1789c5fe6affe..7a7a024ae5af2751def0053e6a71d955c0ffa061 100644 (file)
@@ -5,6 +5,7 @@
 
 class TFile;
 class TTree;
+class TObjArray;
 
 class AliTPCParam;
 class AliTPCCorrection;
@@ -74,34 +75,51 @@ class AliToyMCEventGenerator : public TObject {
 
   void SetIsLaser(Bool_t use) { fIsLaser=use;    }
   Bool_t GetIsLaser() const   { return fIsLaser; }
+
+  void   SetSCListFile(const char* file) { fSCListFile=file;              }
+  const char* GetSCListFile() const      { return fSCListFile.Data();     }
+  void   SetPrereadSCList(Bool_t b)      { fPrereadSCList=b;              }
+  Bool_t GetPrereadSCList() const        { return fPrereadSCList;         }
+  Bool_t HasSCList() const               { return  !fSCListFile.IsNull(); }
+
+  static Float_t GetSCScalingFactor(AliTPCCorrection *corr, AliTPCCorrection *averageCorr, Float_t &chi2);
+  static void SetCorrectionFromFile(TString file, AliTPCCorrection* &corr);
   
  protected:
-  AliTPCParam *fTPCParam;
-  AliToyMCEvent *fEvent;
+  AliTPCParam *fTPCParam;                //! TPC params
+  AliToyMCEvent *fEvent;                 //! Toy event
   
   Bool_t ConnectOutputFile();
   Bool_t CloseOutputFile();
   void FillTree();
-
+  void IterateSC(Int_t ipos=-1);
+  void SetSCScalingFactor();
+  
   UInt_t fCurrentTrack;                  // unique track id within the current event generation
 
   
  private:
   AliToyMCEventGenerator& operator= (const AliToyMCEventGenerator& );
    
-  AliTPCCorrection *fTPCCorrection;
-
-  TString fCorrectionFile;
-  TString fOutputFileName;
-  TFile   *fOutFile;
-  TTree   *fOutTree;
-
-  Bool_t fUseStepCorrection;
-  Bool_t fUseMaterialBudget;
-  Bool_t fIsLaser;
+  AliTPCCorrection *fTPCCorrection;      //! distortion correction
+  AliTPCCorrection *fTPCCorrectionAv;    //! average distortion correction
+  
+  TObjArray   *fSCList;                  //! list with
+  TString fSCListFile;                   // file with a list of space charge files
+  TString fCorrectionFile;               // name of a sinfle SC file
+  TString fOutputFileName;               // name of the output file
+  TFile   *fOutFile;                     //! output file
+  TTree   *fOutTree;                     //! output tree
+
+  Bool_t fUseStepCorrection;             // use integralDz method?
+  Bool_t fUseMaterialBudget;             // use material budget in tracking?
+  Bool_t fIsLaser;                       // is a laser event?
+  Bool_t fPrereadSCList;                 // preread all SC files from the SC list
+
+  void InitSpaceChargeList();
   
   ClassDef(AliToyMCEventGenerator, 1)
-     
+  
 };
 
 #endif