]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
New Fastpoint merger added.
authornilsen <nilsen@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 10 Jun 2002 17:32:17 +0000 (17:32 +0000)
committernilsen <nilsen@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 10 Jun 2002 17:32:17 +0000 (17:32 +0000)
ITS/AliITSFDigitizer.cxx [new file with mode: 0644]
ITS/AliITSFDigitizer.h [new file with mode: 0644]
ITS/ITSLinkDef.h
ITS/Makefile
ITS/libITS.pkg

diff --git a/ITS/AliITSFDigitizer.cxx b/ITS/AliITSFDigitizer.cxx
new file mode 100644 (file)
index 0000000..6cabedf
--- /dev/null
@@ -0,0 +1,128 @@
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+/*
+$Log$
+*/
+
+#include <stdlib.h>
+#include <iostream.h>
+#include <TObjArray.h>
+#include <TClonesArray.h>
+#include <TTree.h>
+#include <TBranch.h>
+#include <TFile.h>
+
+#include <AliRun.h>
+#include <AliRunDigitizer.h>
+
+#include "AliITSFDigitizer.h"
+// #include "AliITSpList.h"
+#include "AliITSmodule.h"
+#include "AliITSgeom.h"
+#include "AliITSsimulationFastPoints.h"
+
+ClassImp(AliITSFDigitizer)
+
+//______________________________________________________________________
+AliITSFDigitizer::AliITSFDigitizer() : AliDigitizer(){
+//
+// Default constructor.
+//
+    fITS      = 0;
+    fInit     = kFALSE;
+}
+//______________________________________________________________________
+AliITSFDigitizer::AliITSFDigitizer(AliRunDigitizer *mngr) : AliDigitizer(mngr){
+//
+// Standard constructor.
+//
+    fITS      = 0;
+    fInit     = kFALSE;
+}
+//______________________________________________________________________
+AliITSFDigitizer::~AliITSFDigitizer(){
+//
+// Default destructor. 
+//
+    fITS = 0; // don't delete fITS. Done else where.
+}
+//______________________________________________________________________
+Bool_t AliITSFDigitizer::Init(){
+//
+// Initialization. 
+// loads ITS and ITSgeom.
+// Inputs:
+//      none.
+// Outputs:
+//      none.
+
+  
+  fInit = kFALSE;
+  if(!gAlice) {
+    fITS      = 0;
+    Warning("Init","gAlice not found");
+    return fInit;
+  }
+  fITS = (AliITS *)(gAlice->GetDetector("ITS"));
+  if(!fITS){
+    Warning("Init","ITS not found");
+    return fInit;
+  } 
+  if(!fITS->GetITSgeom()){
+    Warning("Init","ITS geometry not found");
+    return fInit;
+  }
+  return fInit = kTRUE;
+}
+////////////////////////////////////////////////////////////////////////
+void AliITSFDigitizer::Exec(Option_t* opt){
+//
+// Main digitization function. 
+// Inputs:
+//      Option_t * opt  "deb" ... more verbose output 
+//
+
+  AliITSsimulationFastPoints *sim = new AliITSsimulationFastPoints();
+
+  TTree *outputTreeR = fManager->GetTreeR();
+  TClonesArray *recPoints = fITS->RecPoints();
+//  TBranch *branch =
+      fITS->MakeBranchInTree(outputTreeR,"ITSRecPointsF",
+                                          &recPoints,4000,0);
+  
+  Int_t nModules;
+  fITS->InitModules(-1,nModules);
+
+// load hits into modules
+
+  for (Int_t iFile = 0; iFile < fManager->GetNinputs(); iFile++) {
+    fITS->FillModules(fManager->GetInputTreeH(iFile),
+                     fManager->GetMask(iFile));
+  }
+  
+// transform hits to fast rec points
+
+  AliITSgeom *geom = fITS->GetITSgeom();
+  for(Int_t moduleIndex = 0; moduleIndex < geom->GetIndexMax(); moduleIndex++){
+    sim->CreateFastRecPoints(moduleIndex);
+//    branch->Fill();
+    outputTreeR->Fill();
+    fITS->ResetRecPoints();
+  }
+  outputTreeR->AutoSave();
+
+}
+////////////////////////////////////////////////////////////////////////
diff --git a/ITS/AliITSFDigitizer.h b/ITS/AliITSFDigitizer.h
new file mode 100644 (file)
index 0000000..3f92cde
--- /dev/null
@@ -0,0 +1,44 @@
+#ifndef ALIITSFDIGITZER_H
+#define ALIITSFDIGITZER_H
+/* Copyright (c) 1998-2001, ALICE Experiment at CERN, All rights reserved *
+ * See cxx source for full Copyright notice                               */
+
+/*
+  $Id$
+ */
+
+class TObjArray;
+class TTree;
+
+#include <TClonesArray.h> // function of this class used in inline functions.
+
+class AliRunDigitizer;
+
+#include "AliDigitizer.h" // Base class from which this one is derived
+#include "AliITS.h"   // ITS class functions used in inline functions.
+class AliITSmodule;
+
+class AliITSFDigitizer : public AliDigitizer{
+ public:
+    AliITSFDigitizer();
+    AliITSFDigitizer(AliRunDigitizer *manager);
+    virtual ~AliITSFDigitizer();
+    // Standard routines.
+    virtual Bool_t Init();
+    // Perform SDigits to Digits, with or without merging, depending on the
+    // number of files.
+    virtual void Exec(Option_t* opt=0);
+ private:
+    // Routines used internaly
+    // Returns a pointer to the TObjecArray of Modules.
+    TObjArray* GetModules(){return fITS->GetModules();}
+    // Returns a pointer to a  specific module.
+    AliITSmodule* GetModule(Int_t i){return fITS->GetModule(i);}
+ private:
+    AliITS *fITS;      //! local pointer to ITS
+    Bool_t  fInit;     //! flag to indicate Initilization when well.
+
+
+    ClassDef(AliITSFDigitizer,1) // Task to Digitize ITS from summable hits.
+};
+#endif
index e358bdcd70946bc213def96d7bda2f23c566ca4b..f9105c20931fcde0147b72e4c7f5bc287e2e7df2 100644 (file)
 #pragma link C++ class AliITSreconstruction+;
 #pragma link C++ class AliITSsDigitize+;
 #pragma link C++ class AliITSDigitizer+;
+#pragma link C++ class AliITSFDigitizer+;
 #endif
index 1cd46d883a8c9e689772ab9443ec66e2fcc91f0e..1974cdeaf98c179e6154465a3f6f872f9f403154 100644 (file)
@@ -46,7 +46,8 @@ SRCS          = AliITS.cxx AliITSv1.cxx AliITSv3.cxx AliITSv5.cxx \
                AliV0vertex.cxx AliV0vertexer.cxx \
                AliCascadeVertex.cxx AliCascadeVertexer.cxx \
                AliITSglobalRecPoint.cxx AliITSneuralTrack.cxx \
-               AliITSneuralTracker.cxx AliITSRiemannFit.cxx 
+               AliITSneuralTracker.cxx AliITSRiemannFit.cxx \
+               AliITSFDigitizer.cxx
 #              AliITSAlignmentTrack.cxx AliITSAlignmentModule.cxx \
 
 # Fortran sources
index 1398fdcbf5ad783f1ad4a259648b69614fc2c7a9..ebfd353394c69188d6c64f58b1b0e804c49a72a1 100644 (file)
@@ -36,7 +36,8 @@ SRCS          = AliITS.cxx AliITSv1.cxx AliITSv3.cxx AliITSv5.cxx \
                 AliCascadeVertexer.cxx  AliITSneuralTrack.cxx \
                 AliITSneuralTracker.cxx AliITSglobalRecPoint.cxx \
                 AliITSsDigitize.cxx AliITSDigitizer.cxx AliITSreconstruction.cxx \
-               AliITSRiemannFit.cxx 
+               AliITSRiemannFit.cxx \
+               AliITSFDigitizer.cxx
 #              AliITSAlignmentTrack.cxx AliITSAlignmentModule.cxx \
 
 HDRS:=  $(SRCS:.cxx=.h)