]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITS.h
Removing obsolete macros
[u/mrichter/AliRoot.git] / ITS / AliITS.h
index f7ba02c3abdb43db0b9ecac0b15212329a37c11e..5acac25f969964b75fc84702479c3eca8395a9bd 100644 (file)
 ////////////////////////////////////////////////////////////////////////
 
 #include <TObjArray.h> // used in inline function GetModule.
+#include <TBranch.h>   // used in inline function SetHitsAddressBranch
 
+#include "AliRun.h"
 #include "AliDetector.h"
+#include "AliITSDetType.h"
 
 class TString;
 class TTree;
 class TFile;
 
-class AliITSDetType;
+//class AliITSDetType;
 class AliITSsimulation;
 class AliITSClusterFinder;
 class AliITSsegmentation;
@@ -54,6 +57,8 @@ class AliITS : public AliDetector {
     //-------------------- 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
@@ -67,16 +72,26 @@ class AliITS : public AliDetector {
     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;}
     //---------- Configuration Methods (per detector type) -------------
+    // Determines which ITS subdetectors will be processed. Effects
+    // digitization, and Reconstruction only.
+    void SetDetectors(Option_t *opt="All"){fOpt = opt;}
+    // Returns the list of ITS subdetectors that will be processed.
+    Option_t* GetDetectors(){return fOpt;}
     // Set response 
     virtual void SetResponseModel(Int_t id, AliITSresponse *response);
     // Set segmentation 
     virtual void SetSegmentationModel(Int_t id, AliITSsegmentation *seg);
     // Set simulation - temporary 
     virtual void SetSimulationModel(Int_t id, AliITSsimulation *sim);
+    // Set simulation - temporary 
+    virtual AliITSsimulation* GetSimulationModel(Int_t id){
+       return ((AliITSDetType*)(fDetTypes->At(id)))->GetSimulationModel();}
     // Set reconstruction 
     virtual void SetReconstructionModel(Int_t id, AliITSClusterFinder *rec);
     // Set class names for digit and rec point 
@@ -87,6 +102,7 @@ class AliITS : public AliDetector {
     virtual void AddHit(Int_t track, Int_t *vol, Float_t *hits);
     //------------ sort hits by module for Digitisation ----------------
     virtual void InitModules(Int_t size,Int_t &nmodules);  
+    virtual void FillModules(TTree *treeH, Int_t mask = 0);
     virtual void FillModules(Int_t evnt,Int_t bgrev,Int_t nmodules,
                             Option_t *opt,Text_t *filename);
     virtual void ClearModules();
@@ -94,11 +110,15 @@ class AliITS : public AliDetector {
     //===================== 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
@@ -146,7 +166,8 @@ class AliITS : public AliDetector {
                    {return ((TClonesArray *) (*fCtype)[id]);}
 
     //=================== Reconstruction ===============================
-    void MakeBranchR(const char *file);
+    void MakeBranchR(const char *file, Option_t *opt=" ");
+    void MakeBranchRF(const char *file){MakeBranchR(file,"Fast");}
     void SetTreeAddressR(TTree *treeR);
     void AddRecPoint(const AliITSRecPoint &p);
     void HitsToFastRecPoints(Int_t evNumber,Int_t bgrev,Int_t size,
@@ -160,18 +181,18 @@ class AliITS : public AliDetector {
  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
@@ -179,12 +200,12 @@ class AliITS : public AliDetector {
 
     TObjArray    *fCtype;      // List of clusters
     Int_t        *fNctype;     //[fNDetTypes] Num. of clust. per type of det.
-    TTree        *fTreeC;      // Tree for raw clusters
+    TTree        *fTreeC;      //! Tree for raw clusters
 
     TClonesArray *fRecPoints;  // List of reconstructed points
     Int_t         fNRecPoints; // Number of rec points
 
-    ClassDef(AliITS,1) // Base class for ITS
+    ClassDef(AliITS,2) // Base class for ITS
 };
 
 #endif