LCOV - code coverage report
Current view: top level - TPC/TPCsim - AliTPC.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 10 25 40.0 %
Date: 2016-06-14 17:26:59 Functions: 13 37 35.1 %

          Line data    Source code
       1             : #ifndef ALITPC_H
       2             : #define ALITPC_H
       3             : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
       4             :  * See cxx source for full Copyright notice                               */
       5             : 
       6             : /* $Id$ */
       7             : 
       8             : ////////////////////////////////////////////////
       9             : //  Manager class for TPC                     //
      10             : ////////////////////////////////////////////////
      11             : 
      12             : class TFile;
      13             : class TTree;
      14             : #include <Htypes.h>
      15             : #include <TMatrixFfwd.h>
      16             : #include <TVector.h>
      17             : 
      18             : class AliTPCDigitsArray;
      19             : class AliTPCLoader;
      20             : class AliTPCParam;
      21             : class AliTPCTrackHitsV2; // M.I.
      22             : class AliRawReader;
      23             : class TTreeSRedirector;
      24             : 
      25             : #include "AliDetector.h"
      26             : #include "AliDigit.h" 
      27             : #include "AliHit.h" 
      28             : 
      29             : using std::fstream;
      30             : 
      31             : class AliTPC : public AliDetector {
      32             : 
      33             : public:
      34             :   AliTPC(); 
      35             :   AliTPC(const char *name, const char *title);
      36             :   
      37             :   virtual AliLoader* MakeLoader(const char* topfoldername);
      38             :   void          CreateDebugStremer();
      39             :   virtual      ~AliTPC();
      40             :   virtual void  AddHit(Int_t a1, Int_t *a2, Float_t *a3);
      41           0 :   virtual void  CreateGeometry() {}
      42             :   virtual void  CreateMaterials();
      43           0 :   virtual void  AddAlignableVolumes() const {}
      44             :   
      45             :   virtual AliDigitizer* CreateDigitizer(AliDigitizationInput* digInput) const;
      46           0 :   virtual void  SDigits2Digits(){;} //MI change -cycling to production
      47             :   virtual void  SDigits2Digits2(Int_t eventnumber=0);
      48             : 
      49             :   virtual void  Hits2SDigits(); // MI - cycling around
      50             :   virtual void  Hits2SDigits2(Int_t eventnumber=0);
      51             : 
      52             :   virtual void  Hits2Digits();
      53             :   virtual void  Hits2Digits(Int_t eventnumber);   //MI change
      54             :   virtual void  Hits2DigitsSector(Int_t isec);  //MI change
      55             :   virtual void  Init();
      56             :   virtual Int_t IsVersion() const =0;
      57             :   virtual void  Digits2Raw();
      58             :   virtual Bool_t Raw2SDigits(AliRawReader* rawReader);
      59           0 :   Int_t         GetNsectors() const  {return fNsectors;}
      60             :   virtual void  ResetDigits();
      61             :   virtual void  SetSens(Int_t sens);
      62             :   virtual void  SetSide(Float_t side);
      63           0 :   virtual void SetGEM(Int_t isGEM) {fIsGEM=isGEM; }
      64             : 
      65             :   virtual void  StepManager()=0;
      66          24 :   AliTPCDigitsArray*  GetDigitsArray() {return fDigitsArray;} //MI change
      67           0 :   AliTPCParam *GetParam(){return fTPCParam;} // M.K, M.I changes
      68           2 :   void SetParam(AliTPCParam *param){fTPCParam=param;} // M.K, M.I changes
      69          16 :   void SetDigitsArray(AliTPCDigitsArray* param) {fDigitsArray=param;}  //MI change
      70             : 
      71             : // additional function neccesary for the new hits 
      72             :    virtual void MakeBranch(Option_t *opt=" ");  //
      73             :    virtual void SetTreeAddress();
      74             :    virtual void SetTreeAddress2();
      75             :    virtual void AddHit2(Int_t a1,  Int_t *a2, Float_t *a3);  //
      76             :    virtual void ResetHits();
      77             :    virtual void ResetHits2();     
      78             :    virtual AliHit* FirstHit(Int_t track);
      79             :    virtual AliHit* NextHit();
      80             :    virtual AliHit* FirstHit2(Int_t track);
      81             :    virtual AliHit* NextHit2();
      82             :    virtual void FinishPrimary();
      83             :    virtual void RemapTrackHitIDs(Int_t *map);
      84           0 :    void SetHitType(Int_t type){fHitType =type;} //set type of hit container
      85           0 :    void SetDigitsSwitch(Int_t sw){fDigitsSwitch = sw;}
      86           0 :    void SetDefSwitch(Int_t def){fDefaults = def;}
      87             :    Float_t GetNoise();  //get Current noise  
      88             :   void    GenerNoise(Int_t tablasize, Bool_t normType=kFALSE);  // make noise table
      89             :    Bool_t  IsSectorActive(Int_t sec) const;    // check if the sector is active
      90             :    void    SetActiveSectors(Int_t * sectors, Int_t n);  //set active sectors
      91           0 :    Int_t GetHitType() const {return fHitType;}
      92             :    void    SetActiveSectors(Int_t flag=1); //loop over al hits and set active only hitted sectors
      93             :    Bool_t  TrackInVolume(Int_t id,Int_t track);  //return true if current track is in volume
      94           0 :    void    SetPrimaryIonisation(Bool_t flag = kTRUE) {fPrimaryIonisation = flag;}
      95           0 :    void    SetGainFactor(Float_t gain){fGainFactor=gain;} //gas gain scaling factor
      96           0 :    Float_t GetGainFactor()const {return fGainFactor;}//gas gain scaling factor
      97             :    // LHC clock phase switch 0 - no phase, 1 - random, 2 - from the OCDB
      98           0 :    void SetLHCclockPhase(Int_t sw){fLHCclockPhaseSw = sw;}
      99             : // static functions
     100             :    static AliTPCParam* LoadTPCParam(TFile *file); 
     101             : protected:
     102             :    Int_t          fDefaults; // defaults switch
     103             :   Int_t          fSens;             // ISENS
     104             :   Int_t          fNsectors;         // Number of sectors in TPC
     105             :   //MI changes
     106             :   AliTPCDigitsArray * fDigitsArray;              //! detector digit object  
     107             :   AliTPCParam *fTPCParam;           // pointer to TPC parameters 
     108             :   AliTPCTrackHitsV2 *fTrackHits;      //! hits for given track M.I.
     109             :   //  AliTPCTrackHits *fTrackHitsOld;      //! hits for given track M.I. MIold -
     110             : 
     111             :   Int_t  fHitType; // if fNewHit = 1 old data structure if 2 new hits  if 4  old MI stucture
     112             :   //  3 both types 
     113             :   Int_t fDigitsSwitch; // digits type, 0->normal, 1->summable
     114             : 
     115             :   //MK changes
     116             : 
     117             :   Float_t        fSide;  // selects left(-1), right(+1), or both(0) sides of the TPC
     118             :   Bool_t     fPrimaryIonisation; //switch between Fluka(true) and geant3(false)
     119             :  protected:
     120             :   AliTPC(const AliTPC& t);
     121             :   AliTPC &operator = (const AliTPC & param);
     122             :   //
     123             :   void SetDefaults();
     124             :   void DigitizeRow(Int_t irow,Int_t isec,TObjArray **rowTriplet);
     125             :   Float_t GetSignal(TObjArray *p1, Int_t ntr, TMatrixF *m1, 
     126             :                    TMatrixF *m2,Int_t *IndexRange);
     127             :   void GetList (Float_t label,Int_t np,TMatrixF *m,Int_t *IndexRange,
     128             :                 Float_t **pList);
     129             :   void MakeSector(Int_t isec,Int_t nrows,TTree *TH,Stat_t ntracks,TObjArray **row);
     130             :   void TransportElectron(Float_t *xyz, Int_t *index);
     131             :   Int_t fCurrentIndex[4];// index[0] indicates coordinate system, 
     132             :                          // index[1] sector number, 
     133             :                          // index[2] pad row number  
     134             :                          // index[3] pad row number for which signal is calculated
     135             :   Int_t      fNoiseDepth;  //! noise table
     136             :   Float_t *  fNoiseTable;  //! table with noise
     137             :   Int_t      fCurrentNoise; //! index of the noise in  the noise table 
     138             :   Bool_t*    fActiveSectors; //! bool indicating which sectors are active
     139             :   Float_t    fGainFactor; // scaling factor
     140             :   TTreeSRedirector *fDebugStreamer;     //!debug streamer
     141             :   Int_t fLHCclockPhaseSw; //! lhc clock phase switch
     142             :   Int_t fIsGEM;        // flag isGEM readout
     143          20 :   ClassDef(AliTPC,15)  // Time Projection Chamber class
     144             : };
     145             : 
     146             : 
     147             : //_____________________________________________________________________________
     148             :  
     149           0 : class AliTPChit : public AliHit {
     150             : public:
     151             :    Int_t     fSector;     //sector number
     152             :    Int_t     fPadRow;     //Pad Row number
     153             :    Float_t   fQ ;         //charge
     154             :    Float_t   fTime;       //hit time
     155             :  
     156             : public:
     157             :    AliTPChit();
     158             :    AliTPChit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits);
     159          12 :    virtual ~AliTPChit() {}
     160    14999712 :    void SetX(Float_t x){fX = x;}
     161    14999712 :    void SetY(Float_t y){fY = y;}
     162    14999712 :    void SetZ(Float_t z){fZ = z;}
     163             : 
     164     4862932 :    Float_t Time() const {return fTime;}
     165             :  
     166          12 :    ClassDef(AliTPChit,3)  // Time Projection Chamber hits
     167             : };
     168             : 
     169             : 
     170             : #endif
     171             : 
     172             : 
     173             : 
     174             : 
     175             : 
     176             : 
     177             : 
     178             : 
     179             : 

Generated by: LCOV version 1.11