]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - FMD/AliFMD.h
Fix range and binning on histograms
[u/mrichter/AliRoot.git] / FMD / AliFMD.h
index d55e13d559511323d7512090f52f9baec9808abb..9ba0853dac8d22db704b6c39b6ff3a78808623c8 100644 (file)
@@ -7,15 +7,23 @@
  *
  * See cxx source for full Copyright notice                               
  */
+/** @file    AliFMD.h
+    @author  Christian Holm Christensen <cholm@nbi.dk>
+    @date    Sun Mar 26 17:59:37 2006
+    @brief   Declaration of AliFMD detector driver 
+*/
 /** @mainpage ALICE FMD Off-line code 
     
     @b Contents 
     - @ref intro 
     - @ref structure 
-      - @ref base  (see also @ref FMD_base)
-      - @ref sim   (see also @ref FMD_sim)
-      - @ref rec   (see also @ref FMD_rec)
-      - @ref util  (see also @ref FMD_util)
+      - @ref base     (see also @ref FMD_base)
+      - @ref sim      (see also @ref FMD_sim)
+      - @ref rec      (see also @ref FMD_rec)
+      - @ref flow     (see also @ref FMD_flow)
+      - @ref ana      (see also @ref FMD_ana)
+      - @ref util     (see also @ref FMD_util)
+    - @ref script     (see also @ref FMD_script)
     - @ref quick
     - @ref authors
     
 
     - AliFMDRawReader: Classes to read raw data files. 
 
+    @subsection flow libFMDflow:
+    
+    This library contains flow analysis code that works similar to 
+    histograms. 
+
+    @subsection ana libFMDanalysis:
+    
+    This library contains analysis code.
+
+
     @subsection util libFMDutil:
 
     This currently (18th or March 2006) contains the classes 
       dummy) calibration and alignment         data.  These derive from
       TTask.  
 
+    @section script Scripts 
+    
+    Most scripts live in @c FMD/scripts.  The notiable exceptions are 
+    @ref Simulate.C, @ref Reconstruct.C, and @ref Config.C 
+
     @section quick Quick start 
 
     First, install ROOT.  Then Install TGeant3: 
 #ifndef ALIDETECTOR_H  
 # include <AliDetector.h>
 #endif
-#ifndef ROOT_TBranch
-# include <TBranch.h>
+#ifndef ROOT_TArrayI
+# include <TArrayI.h>
 #endif
 class TBranch;
 class TClonesArray;
 class TBrowser;
 class TMarker3DBox;
+class TArrayI;
 class AliDigitizer;
 class AliFMDHit;
 
@@ -280,15 +304,8 @@ public:
       @param name  Name of object.
       @param title Title of object. */
   AliFMD(const char *name, const char *title);
-  /** Copy constructor 
-      @param other Object to copy from */
-  AliFMD(const AliFMD& other);
   /** Destructor */
   virtual ~AliFMD(); 
-  /** Assignment operator 
-      @param other Object to assign from
-      @return Reference to this object  */
-  AliFMD& operator=(const AliFMD& other);
   /** Wheter to make a detailed geometry
       @param use If true, make detailed geometry  */
   void UseDetailed(Bool_t use=kTRUE) { fDetailed = use; }
@@ -299,6 +316,10 @@ public:
       AliFMDGeometry to construct the geometry.  This in turn calls
       AliFMDGeometryBuilder.   */
   virtual void   CreateGeometry();
+  /** Create entries for alignable volumes associating the symbolic volume
+      name with the corresponding volume path. Needs to be syncronized with
+      eventual changes in the geometry.   */
+  virtual void  AddAlignableVolumes() const;
   /** Create the tracking mediums used by the FMD.  This associates
       the tracking mediums defined with the FMD in the
       TVirtualMCApplication (AliMC). 
@@ -313,6 +334,57 @@ public:
       -        @c FMD @c Plastic$ Plastic (Support legs for the hybrid cards)
   */
   virtual void   CreateMaterials(); 
+#if 0
+  /** 
+   * Declare tracking parameters for a medium 
+   * 
+   * Cut offs are in GeV. 
+   * @param imed                     Medium identifier
+   * @param gamma                    Cut off for tracking photons
+   * @param electron                 Cut off for tracking electrons
+   * @param neutral_hadron           Cut off for tracking neutral hadrons
+   * @param charged_hadron           Cut off for tracking charged hadrons
+   * @param muon                     Cut off for tracking muons
+   * @param electron_bremstrahlung   Cut off for tracking electron brehmstralung
+   * @param muon__bremstrahlung      Cut off for tracking muon brehmstralung
+   * @param electron_delta           Cut off for tracking delta electrons
+   * @param muon_delta               Cut off for tracking delta muons
+   * @param muon_pair                Cut off for muon->ee pair production
+   * @param annihilation             Enable annihilation
+   * @param bremstrahlung            Enable brehmstralung
+   * @param compton_scattering       Enable Compton scattering
+   * @param decay                    Enable decays
+   * @param delta_ray                Enable delta rays
+   * @param hadronic                 Enable hadronic interactions
+   * @param energy_loss              Enable energy loss
+   * @param multiple_scattering      Enable multiple scattering
+   * @param pair_production          Enable pair production
+   * @param photon_production        Enable cherenkov photon production
+   * @param rayleigh_scattering      Enable rayleigh scattering
+   */ 
+  void SetTrackingParameters(Int_t imed, 
+                            Float_t gamma,                 
+                            Float_t electron, 
+                            Float_t neutral_hadron, 
+                            Float_t charged_hadron, 
+                            Float_t muon,
+                            Float_t electron_bremstrahlung, 
+                            Float_t muon__bremstrahlung, 
+                            Float_t electron_delta,
+                            Float_t muon_delta,
+                            Float_t muon_pair,
+                            Int_t   annihilation, 
+                            Int_t   bremstrahlung, 
+                            Int_t   compton_scattering, 
+                            Int_t   decay,
+                            Int_t   delta_ray, 
+                            Int_t   hadronic, 
+                            Int_t   energy_loss, 
+                            Int_t   multiple_scattering, 
+                            Int_t   pair_production, 
+                            Int_t   photon_production, 
+                            Int_t   rayleigh_scattering);
+#endif
   /** Initialize this detector */
   virtual void   Init();
   /** This member function is called when ever a track deposites
@@ -326,26 +398,6 @@ public:
   virtual void   FinishEvent();
   /** @}*/
   
-  /** @{*/
-  /** @name Graphics and event display */
-  /** Build simple ROOT TNode geometry for event display. With the new
-      geometry modeller, TGeoManager, this seems rather redundant. */
-  virtual        void   BuildGeometry();
-  /** Draw a shaded view of the Forward multiplicity detector.  This 
-      isn't really useful anymore. */
-  virtual        void   DrawDetector();
-  /** Calculate the distance from the mouse to the FMD on the screen
-      Dummy routine */
-  virtual        Int_t  DistanceToPrimitive(Int_t px, Int_t py);
-  /** Store x, y, z of all hits in memory for display. 
-      Normally, the hits are drawn using TPolyMarker3D - however, that
-      is not very useful for the FMD.  Therefor, this member function
-      is overloaded to make TMarker3D, via the class AliFMDPoints.
-      AliFMDPoints is a local class. 
-      @param track the track number to load the hits for */
-  virtual        void   LoadPoints(Int_t track);
-  /** @}*/
-  
   /** @{ */
   /** @name Hit and digit management */
   /* Create Tree branches for the FMD.
@@ -357,6 +409,9 @@ public:
   /** Set the TClonesArray to read hits into.
       @param b The branch to containn the hits */
   virtual void          SetHitsAddressBranch(TBranch *b);
+  /** Set the TClonesArray to read sdigits into.
+      @param b The branch to containn the sdigits */
+  virtual void          SetSDigitsAddressBranch(TBranch *b);
   /** Set branch address for the Hits, Digits, and SDigits Tree. */
   virtual void          SetTreeAddress();
   /** Get the array of summable digits
@@ -434,22 +489,30 @@ public:
       @param count1    ADC count (a 10-bit word)
       @param count2    ADC count (a 10-bit word), or -1 if not used
       @param count3    ADC count (a 10-bit word), or -1 if not used */
-  virtual        void   AddDigitByFields(UShort_t detector=0, 
-                                        Char_t   ring='\0', 
-                                        UShort_t sector=0, 
-                                        UShort_t strip=0, 
-                                        UShort_t count1=0, 
-                                        Short_t  count2=-1, 
-                                        Short_t  count3=-1);
+  virtual        void   AddDigitByFields(UShort_t       detector=0, 
+                                        Char_t         ring='\0', 
+                                        UShort_t       sector=0, 
+                                        UShort_t       strip=0, 
+                                        UShort_t       count1=0, 
+                                        Short_t        count2=-1, 
+                                        Short_t        count3=-1, 
+                                        Short_t        count4=-1, 
+                                        UShort_t       nrefs=0,
+                                        Int_t*         refs=0);
   /** Add a digit to the Digit tree 
       @param digits
       - digits[0]  [UShort_t] Detector #
       - digits[1]  [Char_t]   Ring ID
       - digits[2]  [UShort_t] Sector #
       - digits[3]  [UShort_t] Strip #
-      - digits[4]  [UShort_t] ADC Count 
-      - digits[5]  [Short_t]  ADC Count, -1 if not used
-      - digits[6]  [Short_t]  ADC Count, -1 if not used  */
+      - digits[4]  [Float_t]  Edep
+      - digits[5]  [UShort_t] ADC Count 
+      - digits[6]  [Short_t]  ADC Count, -1 if not used
+      - digits[7]  [Short_t]  ADC Count, -1 if not used  
+      - digits[8]  [Short_t]  ADC Count, -1 if not used
+      - digits[9]  [UShort_t] N total particles
+      - digits[10] [UShort_t] N total primary particles
+  */
   virtual        void   AddSDigit(Int_t *digits);
   /** add a summable digit - as coming from data
       @param detector  Detector # (1, 2, or 3)                      
@@ -460,14 +523,18 @@ public:
       @param count1    ADC count (a 10-bit word)
       @param count2    ADC count (a 10-bit word), or -1 if not used 
       @param count3    ADC count (a 10-bit word), or -1 if not used */
-  virtual        void   AddSDigitByFields(UShort_t detector=0, 
-                                         Char_t   ring='\0', 
-                                         UShort_t sector=0, 
-                                         UShort_t strip=0, 
-                                         Float_t  edep=0,
-                                         UShort_t count1=0, 
-                                         Short_t  count2=-1, 
-                                         Short_t  count3=-1);
+  virtual        void   AddSDigitByFields(UShort_t       detector=0, 
+                                         Char_t         ring='\0', 
+                                         UShort_t       sector=0, 
+                                         UShort_t       strip=0, 
+                                         Float_t        edep=0,
+                                         UShort_t       count1=0, 
+                                         Short_t        count2=-1, 
+                                         Short_t        count3=-1,
+                                         Short_t        count4=-1, 
+                                         UShort_t       ntot=0, 
+                                         UShort_t       nprim=0,
+                                         Int_t*         refs=0);
   /** @}*/
 
   /** @{ */
@@ -486,16 +553,30 @@ public:
 
   /** @{ */
   /** @name Raw data */
-  /** Turn digits into raw data. This uses the class AliFMDRawWriter
-      to do the job.   Please refer to that class for more
-      information. */
-  virtual        void   Digits2Raw();
+  /** 
+   * Turn digits into raw data. This uses the class AliFMDRawWriter to
+   * do the job.  Please refer to that class for more information.
+   */
+  virtual void   Digits2Raw();
+  /** 
+   * Convert raw data to sdigits
+   * 
+   * @param reader Raw reader
+   * 
+   * @return @c true on success
+   */
+  virtual Bool_t Raw2SDigits(AliRawReader* reader);
   /** @}*/
 
   /** @{ */
-  /** @name Utility */
-  /** Browse this object 
-      @param b Browser to show this object in */
+  /** 
+   * @name Utility 
+   */
+  /** 
+   * Browse this object 
+   *
+   * @param b Browser to show this object in 
+   */
   void   Browse(TBrowser* b);
   /** @}*/
 protected:
@@ -525,11 +606,21 @@ protected:
     kAlId,                 // ID index of Al medium
     kCarbonId,             // ID index of Carbon medium
     kCopperId,             // ID index of Copper Medium
-    kKaptonId              // ID index of Kapton Medium
+    kKaptonId,             // ID index of Kapton Medium
+    kSteelId               // ID index of Steel medium
   };  
 
   TObjArray*         fBad;                  //! debugging - bad hits 
-  
+
+private:  
+  /** Copy constructor 
+      @param other Object to copy from */
+  AliFMD(const AliFMD& other);
+  /** Assignment operator 
+      @param other Object to assign from
+      @return Reference to this object  */
+  AliFMD& operator=(const AliFMD& other);
+
   ClassDef(AliFMD,11)     // Base class FMD entry point
 };