#include "AliDetector.h"
#include "AliHit.h"
#include "AliDigit.h"
+#include "TLorentzVector.h"
+#include "TVirtualMC.h"
+
class TMatrix;
+class AliTPCFastMatrix; //MI change
+class AliTPCFastVector; //MI change
+
class TTree;
class TFile;
class AliTPCParam;
class AliTPCDigitsArray;
class AliTPCClustersArray;
-class AliTPCTrackHits; // M.I.
+class AliTPCTrackHitsV2; // M.I.
+class AliTPCTrackHits; // M.I. -MI4 old hits - to be removed later
+
class AliTPC : public AliDetector {
protected:
AliTPCDigitsArray * fDigitsArray; //!detector digit object
AliTPCClustersArray * fClustersArray; //!detector cluster object
AliTPCParam *fTPCParam; // pointer to TPC parameters
- AliTPCTrackHits *fTrackHits; //!hits for given track M.I.
- Int_t fHitType; // if fNewHit = 1 old data structure if 2 new hits
- // 3 both types
+ 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
Int_t fDigitsSwitch; // digits type, 0->normal, 1->summable
//MK changes
virtual void BuildGeometry();
virtual void CreateGeometry() {}
virtual void CreateMaterials();
- virtual void Hits2Clusters(TFile *of, Int_t eventn);
+ virtual void Hits2Clusters(TFile *of, Int_t eventn=0);
virtual void Hits2ExactClustersSector(Int_t isec); // MI change calculate "exact" cluster position
- virtual void SDigits2Digits(Int_t eventnumber=0);
- virtual void Hits2SDigits(Int_t eventnumber=0);
- virtual void Digits2Reco(Int_t eventnumber=0);
+
+ virtual void SDigits2Digits(){;} //MI change -cycling to production
+ virtual void SDigits2Digits2(Int_t eventnumber=0);
+
+ virtual void Hits2SDigits(); // MI - cycling around
+ virtual void Hits2SDigits2(Int_t eventnumber=0);
+
+ virtual void Digits2Reco(Int_t firstevent=0,Int_t lastevent=0);
virtual void Hits2Digits(Int_t eventnumber=0); //MI change
virtual void Hits2DigitsSector(Int_t isec); //MI change
virtual void Init();
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);
void SetHitType(Int_t type){fHitType =type;} //set type of hit container
void SetDigitsSwitch(Int_t sw){fDigitsSwitch = sw;}
void SetDefSwitch(Int_t def){fDefaults = def;}
-
-
-private:
+ virtual void Merge(TTree * intree, Int_t *mask, Int_t nin, Int_t outid);
+ Float_t GetNoise(); //get Current noise
+ void GenerNoise(Int_t tablasize); // make noise table
+ Bool_t IsSectorActive(Int_t sec); // check if the sector is active
+ void SetActiveSectors(Int_t * sectors, Int_t n); //set active sectors
+ Int_t GetHitType(){return fHitType;}
+ void SetActiveSectors(Int_t flag=0); //loop over al hits and set active only hitted sectors
+
+// static functions
+ static AliTPCParam* LoadTPCParam(TFile *file);
+
+ private:
//
+ Bool_t TrackInVolume(Int_t id,Int_t track); //return true if current track is in volume
void SetDefaults();
void DigitizeRow(Int_t irow,Int_t isec,TObjArray **rowTriplet);
- Float_t GetSignal(TObjArray *p1, Int_t ntr, TMatrix *m1, TMatrix *m2,
- Int_t *IndexRange);
- void GetList (Float_t label,Int_t np,TMatrix *m,Int_t *IndexRange,
+ Float_t GetSignal(TObjArray *p1, Int_t ntr, AliTPCFastMatrix *m1,
+ AliTPCFastMatrix *m2,Int_t *IndexRange);
+ void GetList (Float_t label,Int_t np,AliTPCFastMatrix *m,Int_t *IndexRange,
Float_t **pList);
void MakeSector(Int_t isec,Int_t nrows,TTree *TH,Stat_t ntracks,TObjArray **row);
void TransportElectron(Float_t *xyz, Int_t *index);
// index[1] sector number,
// index[2] pad row number
// index[3] pad row number for which signal is calculated
-
- ClassDef(AliTPC,4) // Time Projection Chamber class
+ 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,9) // Time Projection Chamber class
};