]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - FMD/AliFMDInput.h
Removed generated files@
[u/mrichter/AliRoot.git] / FMD / AliFMDInput.h
index 2a99a1415ccd8abddc812e1b308ecc3a8267feb0..214879c1a19f7dc867702e220f8e8662eee68806 100644 (file)
@@ -114,9 +114,9 @@ public:
     kESD,             // Load ESD's
     kRaw,             // Read raw data 
     kGeometry,        // Not really a tree 
-    kTracks,         // Hits and tracs - for BG study  
     kTrackRefs,       // Track references - also for BG study
-    kRawCalib         // Read raws and calibrate them
+    kRawCalib,        // Read raws and calibrate them
+    kUser
   };
   /** CTOR  */
   AliFMDInput();
@@ -158,7 +158,7 @@ public:
   virtual Bool_t Finish() { return kTRUE; }
   /** Run a full job. 
       @return @c false on error  */
-  virtual Bool_t Run();
+  virtual Bool_t Run(UInt_t maxEvents=0);
 
   /** Loop over all hits, and call ProcessHit with that hit, and
       optionally the corresponding kinematics track. 
@@ -172,6 +172,10 @@ public:
       that track
       @return @c false on error  */
   virtual Bool_t ProcessTracks();
+  /** Loop over all tracks, and call ProcessTrack with each hit for
+      that track
+      @return @c false on error  */
+  virtual Bool_t ProcessStack();
   /** Loop over all digits, and call ProcessDigit for each digit.
       @return @c false on error  */
   virtual Bool_t ProcessDigits();
@@ -194,6 +198,9 @@ public:
   /** Loop over all ESD data, and call ProcessESD for each entry.
       @return  @c false on error  */
   virtual Bool_t ProcessESDs();
+  /** Loop over all strips and ask user routine to supply the data.
+      @return  @c false on error  */
+  virtual Bool_t ProcessUsers();
 
   /** Process one hit, and optionally it's corresponding kinematics
       track.  Users should over this to process each hit. 
@@ -214,6 +221,11 @@ public:
       @param h Associated Hit
       @return  @c false on error   */
   virtual Bool_t ProcessTrack(Int_t i, TParticle* p, AliFMDHit* h);
+  /** Process stack particle 
+      @param i Track number 
+      @param p Track  
+      @return  @c false on error   */
+  virtual Bool_t ProcessParticle(Int_t i , TParticle* p);
   /** Process one digit.  Users should over this to process each
       digit. 
       @param digit Digit
@@ -248,8 +260,18 @@ public:
       @param eta  Psuedo-rapidity 
       @param mult Psuedo-multiplicity 
       @return  @c false on error  */
-  virtual Bool_t ProcessESD(UShort_t, Char_t, UShort_t, UShort_t, 
-                           Float_t, Float_t);
+  virtual Bool_t ProcessESD(UShort_t d, Char_t r, UShort_t s, UShort_t t, 
+                           Float_t eta, Float_t mult);
+  /** Process User data for the FMD.  Users should overload this to
+      deal with ESD data. 
+      @param d    Detector number (1-3)
+      @param r    Ring identifier ('I' or 'O')
+      @param s    Sector number (0-19, or 0-39)
+      @param t    Strip number (0-511, or 0-255)
+      @param v    Value
+      @return  @c false on error  */
+  virtual Bool_t ProcessUser(UShort_t d, Char_t r, UShort_t s, UShort_t t, 
+                            Float_t v);
   /** Service function to make a logarithmic axis. 
       @param n    Number of bins 
       @param min  Minimum of axis 
@@ -296,11 +318,23 @@ protected:
       fTreeMask(0),
       fRawFile(""),      
       fIsInit(kFALSE),
-      fEventCount(0)
+      fEventCount(0),
+      fNEvents(-1)
   {}
   /** Assignement operator 
       @return  REference to this */
   AliFMDInput& operator=(const AliFMDInput&) { return *this; }
+  /** 
+   * Get user supplued data
+   * 
+   * @param d Detector
+   * @param r Ring
+   * @param s Sector
+   * @param t Strip
+   * 
+   * @return Value
+   */
+  virtual Float_t GetSignal(UShort_t d, Char_t r, UShort_t s, UShort_t t);
 
   TString          fGAliceFile; // File name of gAlice file
   AliRunLoader*    fLoader;     // Loader of FMD data 
@@ -333,6 +367,7 @@ protected:
   TString          fRawFile;    // Raw input file
   Bool_t           fIsInit;     // Have we been initialized 
   Int_t            fEventCount; // Event counter 
+  Int_t            fNEvents;    // The maximum number of events
   ClassDef(AliFMDInput,0)  //Hits for detector FMD
 };
 
@@ -341,6 +376,7 @@ inline Bool_t AliFMDInput::ProcessTrackRef(AliTrackReference*,
                                           TParticle*) { return kTRUE; }
 inline Bool_t AliFMDInput::ProcessTrack(Int_t,TParticle*,
                                        AliFMDHit*) { return kTRUE; }
+inline Bool_t AliFMDInput::ProcessParticle(Int_t,TParticle*) { return kTRUE; }
 inline Bool_t AliFMDInput::ProcessDigit(AliFMDDigit*) { return kTRUE; }
 inline Bool_t AliFMDInput::ProcessSDigit(AliFMDSDigit*) { return kTRUE; }
 inline Bool_t AliFMDInput::ProcessRawDigit(AliFMDDigit*) { return kTRUE; }
@@ -348,6 +384,10 @@ inline Bool_t AliFMDInput::ProcessRawCalibDigit(AliFMDDigit*) { return kTRUE; }
 inline Bool_t AliFMDInput::ProcessRecPoint(AliFMDRecPoint*) { return kTRUE; }
 inline Bool_t AliFMDInput::ProcessESD(UShort_t,Char_t,UShort_t,UShort_t,
                                      Float_t,Float_t) { return kTRUE; }
+inline Bool_t AliFMDInput::ProcessUser(UShort_t,Char_t,UShort_t,UShort_t,
+                                      Float_t) { return kTRUE; }
+inline Float_t AliFMDInput::GetSignal(UShort_t, Char_t, UShort_t, UShort_t) { 
+  return 0.; }
 
 
 #endif