////////////////////////////////////////////////////////////////////////
#include <TObjArray.h> // used in inline function GetModule.
+#include <TBranch.h> // used in inline function SetHitsAddressBranch
+#include "AliRun.h"
#include "AliDetector.h"
class TString;
//-------------------- Geometry Transformations --------------------
// ITS geometry functions
AliITSgeom *GetITSgeom() const {return fITSgeom;}
+ // Sets ITS geometry ! be very careful using this function.
+ void SetITSgeom(AliITSgeom *geom) {fITSgeom = geom;}
// return pointer to the array of modules
TObjArray *GetModules() const {return fITSmodules;}
// return pointer to a particular module
virtual void SetDefaultClusterFinders();
virtual void MakeBranch(Option_t *opt=" ", const char *file=0);
virtual void SetTreeAddress();
+ // For a give branch from the treeH sets the TClonesArray address.
+ virtual void SetHitsAddressBranch(TBranch *b){b->SetAddress(&fHits);}
// Return pointer to DetType #id
AliITSDetType *DetType(Int_t id);
//Int_t NDetTypes() {return fNDetTypes;}
//===================== Digitisation ===============================
void MakeBranchS(const char *file);
void SetTreeAddressS(TTree *treeS);
- void MakeBranchD(const char *file);
+ TClonesArray * GetSDigits() { return fSDigits; }
+ void MakeBranchInTreeD(TTree *treeD,const char *file=0);
+ void MakeBranchD(const char *file){
+ MakeBranchInTreeD(gAlice->TreeD(),file);}
void SetTreeAddressD(TTree *treeD);
void Hits2SDigits(); // Turn hits into SDigits
void Hits2PreDigits(); // Turn hits into SDigits
- void SDigits2Digits(); // Turn SDigits to Digits
+ void SDigits2Digits(){SDigitsToDigits("All");} // Turn SDigits to Digits
+ void SDigitsToDigits(Option_t *opt="All"); // Turn SDigits to Digits
void Hits2Digits(); // Turn hits straight into Digits.
//------------------ Internal functions ----------------------------
// Standard Hits To SDigits function
protected:
//================== Data Members ==================================
AliITSgeom *fITSgeom; // Pointer to ITS geometry
- Bool_t fEuclidOut; // Flag to write geometry in euclid format
+ Bool_t fEuclidOut; // Flag to write geometry in euclid format
TObjArray *fITSmodules; //! Pointer to ITS modules
Option_t *fOpt; //! Detector option ="All" unless changed.
- Int_t fIdN; // the number of layers
+ Int_t fIdN; // the number of layers
Int_t *fIdSens; //[fIdN] layer identifier
TString *fIdName; //[fIdN] layer identifier
- Int_t fNDetTypes; // Number of detector types
+ Int_t fNDetTypes; // Number of detector types
TObjArray *fDetTypes; // List of detector types
-// TObjArray *fSDigits; // List of Summable digits.
- TClonesArray *fSDigits; // List of Summable digits.
+ TClonesArray *fSDigits; // List of Summable digits.
Int_t fNSDigits; // Number of Summable Digits.
TObjArray *fDtype; // List of digits