]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliTPC.h
Test the existence of the both kink hypothesies
[u/mrichter/AliRoot.git] / TPC / AliTPC.h
index 29bb6317970cde8de6c9fb341ab353084e1b4803..49d4666e510d4a10869d0ea2eb44e4395322b2b3 100644 (file)
@@ -8,20 +8,23 @@
 ////////////////////////////////////////////////
 //  Manager class for TPC                     //
 ////////////////////////////////////////////////
-#include "AliDetector.h"
-#include "AliHit.h" 
-#include "AliDigit.h" 
-#include <TMatrixFfwd.h>
 
+class TFile;
 class TTree;
+#include <Htypes.h>
+#include <TMatrixFfwd.h>
+#include <TVector.h>
 
-class TFile;
-class AliTPCParam;
 class AliTPCDigitsArray;
-class AliTPCTrackHitsV2; // M.I.
-class AliTPCTrackHits; // M.I.  -MI4 old hits - to be removed later
-//class TLorentzVector;
 class AliTPCLoader;
+class AliTPCParam;
+class AliTPCTrackHitsV2; // M.I.
+class AliRawReader;
+class TTreeSRedirector;
+
+#include "AliDetector.h"
+#include "AliDigit.h" 
+#include "AliHit.h" 
 
 
 class AliTPC : public AliDetector {
@@ -29,15 +32,14 @@ class AliTPC : public AliDetector {
 public:
   AliTPC(); 
   AliTPC(const char *name, const char *title);
-  AliTPC(const AliTPC& t);
   
   virtual AliLoader* MakeLoader(const char* topfoldername);
-  
+  void          CreateDebugStremer();
   virtual      ~AliTPC();
   virtual void  AddHit(Int_t a1, Int_t *a2, Float_t *a3);
-  virtual void  BuildGeometry();
   virtual void  CreateGeometry() {}
   virtual void  CreateMaterials();
+  virtual void  AddAlignableVolumes() const {}
   
   virtual AliDigitizer* CreateDigitizer(AliRunDigitizer* manager) const;
   virtual void  SDigits2Digits(){;} //MI change -cycling to production
@@ -52,22 +54,22 @@ public:
   virtual void  Init();
   virtual Int_t IsVersion() const =0;
   virtual void  Digits2Raw();
+  virtual Bool_t Raw2SDigits(AliRawReader* rawReader);
   Int_t         GetNsectors() const  {return fNsectors;}
-  virtual void  MakeBranch(Option_t *opt=" ");
   virtual void  ResetDigits();
   virtual void  SetSens(Int_t sens);
   virtual void  SetSide(Float_t side);
 
 
   virtual void  StepManager()=0;
-  virtual void  DrawDetector() {}
+  virtual void  DrawDetector() const  {}
   AliTPCDigitsArray*  GetDigitsArray() {return fDigitsArray;} //MI change
   AliTPCParam *GetParam(){return fTPCParam;} // M.K, M.I changes
   void SetParam(AliTPCParam *param){fTPCParam=param;} // M.K, M.I changes
   void SetDigitsArray(AliTPCDigitsArray* param) {fDigitsArray=param;}  //MI change
 
 // additional function neccesary for the new hits 
-   virtual void MakeBranch2(Option_t *opt=" ", const char *file=0);  //
+   virtual void MakeBranch(Option_t *opt=" ");  //
    virtual void SetTreeAddress();
    virtual void SetTreeAddress2();
    virtual void AddHit2(Int_t a1,  Int_t *a2, Float_t *a3);  //
@@ -77,9 +79,6 @@ public:
    virtual AliHit* NextHit();
    virtual AliHit* FirstHit2(Int_t track);
    virtual AliHit* NextHit2();
-   virtual void LoadPoints(Int_t dummy);
-   virtual void LoadPoints2(Int_t dummy);
-   virtual void LoadPoints3(Int_t dumy);
    virtual void FinishPrimary();
    virtual void RemapTrackHitIDs(Int_t *map);
    void SetHitType(Int_t type){fHitType =type;} //set type of hit container
@@ -90,9 +89,13 @@ public:
    Bool_t  IsSectorActive(Int_t sec) const;    // check if the sector is active
    void    SetActiveSectors(Int_t * sectors, Int_t n);  //set active sectors
    Int_t GetHitType() const {return fHitType;}
-   void    SetActiveSectors(Int_t flag=0); //loop over al hits and set active only hitted sectors
+   void    SetActiveSectors(Int_t flag=1); //loop over al hits and set active only hitted sectors
    Bool_t  TrackInVolume(Int_t id,Int_t track);  //return true if current track is in volume
-
+   void    SetPrimaryIonisation(Bool_t flag = kTRUE) {fPrimaryIonisation = flag;}
+   void    SetGainFactor(Float_t gain){fGainFactor=gain;} //gas gain scaling factor
+   Float_t GetGainFactor()const {return fGainFactor;}//gas gain scaling factor
+   // LHC clock phase switch 0 - no phase, 1 - random, 2 - from the OCDB
+   void SetLHCclockPhase(Int_t sw){fLHCclockPhaseSw = sw;}
 // static functions
    static AliTPCParam* LoadTPCParam(TFile *file); 
 protected:
@@ -100,10 +103,10 @@ protected:
   Int_t          fSens;             // ISENS
   Int_t          fNsectors;         // Number of sectors in TPC
   //MI changes
-  AliTPCDigitsArray * fDigitsArray;              //!detector digit object  
+  AliTPCDigitsArray * fDigitsArray;              //! detector digit object  
   AliTPCParam *fTPCParam;           // pointer to TPC parameters 
-  AliTPCTrackHitsV2 *fTrackHits;      //!hits for given track M.I.
-  //  AliTPCTrackHits *fTrackHitsOld;      //!hits for given track M.I. MIold -
+  AliTPCTrackHitsV2 *fTrackHits;      //! hits for given track M.I.
+  //  AliTPCTrackHits *fTrackHitsOld;      //! hits for given track M.I. MIold -
 
   Int_t  fHitType; // if fNewHit = 1 old data structure if 2 new hits  if 4  old MI stucture
   //  3 both types 
@@ -112,8 +115,10 @@ protected:
   //MK changes
 
   Float_t        fSide;  // selects left(-1), right(+1), or both(0) sides of the TPC
-   
- private:
+  Bool_t     fPrimaryIonisation; //switch between Fluka(true) and geant3(false)
+ protected:
+  AliTPC(const AliTPC& t);
+  AliTPC &operator = (const AliTPC & param);
   //
   void SetDefaults();
   void DigitizeRow(Int_t irow,Int_t isec,TObjArray **rowTriplet);
@@ -127,12 +132,14 @@ protected:
                          // index[1] sector number, 
                          // index[2] pad row number  
                          // index[3] pad row number for which signal is calculated
-  Int_t      fNoiseDepth;  //!noise table
-  Float_t *  fNoiseTable;  //![fNoiseDepth] table with noise
-  Int_t      fCurrentNoise; //!index of the noise in  the noise table 
-  Bool_t*    fActiveSectors; //!bool indicating which sectors are active
-
-  ClassDef(AliTPC,11)  // Time Projection Chamber class
+  Int_t      fNoiseDepth;  //! noise table
+  Float_t *  fNoiseTable;  //! table with noise
+  Int_t      fCurrentNoise; //! index of the noise in  the noise table 
+  Bool_t*    fActiveSectors; //! bool indicating which sectors are active
+  Float_t    fGainFactor; // scaling factor
+  TTreeSRedirector *fDebugStreamer;     //!debug streamer
+  Int_t fLHCclockPhaseSw; //! lhc clock phase switch
+  ClassDef(AliTPC,14)  // Time Projection Chamber class
 };
 
 
@@ -146,7 +153,7 @@ public:
    Float_t   fTime;       //hit time
  
 public:
-   AliTPChit() {fTime = 0.;}
+   AliTPChit();
    AliTPChit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits);
    virtual ~AliTPChit() {}
    void SetX(Float_t x){fX = x;}
@@ -155,7 +162,7 @@ public:
 
    Float_t Time() const {return fTime;}
  
-   ClassDef(AliTPChit,2)  // Time Projection Chamber hits
+   ClassDef(AliTPChit,3)  // Time Projection Chamber hits
 };