1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
18 Revision 1.1.2.1 2002/07/24 09:27:50 alibrary
21 Revision 1.1 2002/06/10 17:32:17 nilsen
22 New Fastpoint merger added.
28 #include <TObjArray.h>
29 #include <TClonesArray.h>
35 #include <AliRunDigitizer.h>
37 #include "AliITSFDigitizer.h"
38 // #include "AliITSpList.h"
39 #include "AliITSmodule.h"
40 #include "AliITSgeom.h"
41 #include "AliITSsimulationFastPoints.h"
43 ClassImp(AliITSFDigitizer)
45 //______________________________________________________________________
46 AliITSFDigitizer::AliITSFDigitizer() : AliDigitizer(){
48 // Default constructor.
53 //______________________________________________________________________
54 AliITSFDigitizer::AliITSFDigitizer(AliRunDigitizer *mngr) : AliDigitizer(mngr){
56 // Standard constructor.
61 //______________________________________________________________________
62 AliITSFDigitizer::~AliITSFDigitizer(){
64 // Default destructor.
66 fITS = 0; // don't delete fITS. Done else where.
68 //______________________________________________________________________
69 Bool_t AliITSFDigitizer::Init(){
72 // loads ITS and ITSgeom.
82 Warning("Init","gAlice not found");
85 fITS = (AliITS *)(gAlice->GetDetector("ITS"));
87 Warning("Init","ITS not found");
90 if(!fITS->GetITSgeom()){
91 Warning("Init","ITS geometry not found");
96 ////////////////////////////////////////////////////////////////////////
97 void AliITSFDigitizer::Exec(Option_t* opt){
99 // Main digitization function.
101 // Option_t * opt "deb" ... more verbose output
104 AliITSsimulationFastPoints *sim = new AliITSsimulationFastPoints();
106 TTree *outputTreeR = fManager->GetTreeR();
107 TClonesArray *recPoints = fITS->RecPoints();
109 fITS->MakeBranchInTree(outputTreeR,"ITSRecPointsF",
113 fITS->InitModules(-1,nModules);
115 // load hits into modules
117 for (Int_t iFile = 0; iFile < fManager->GetNinputs(); iFile++) {
118 fITS->FillModules(fManager->GetInputTreeH(iFile),
119 fManager->GetMask(iFile));
122 // transform hits to fast rec points
124 AliITSgeom *geom = fITS->GetITSgeom();
125 for(Int_t moduleIndex = 0; moduleIndex < geom->GetIndexMax(); moduleIndex++){
126 sim->CreateFastRecPoints(moduleIndex);
129 fITS->ResetRecPoints();
131 outputTreeR->AutoSave();
134 ////////////////////////////////////////////////////////////////////////