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.2 2002/10/14 14:57:00 hristov
19 Merging the VirtualMC branch to the main development branch (HEAD)
21 Revision 1.1.2.1 2002/07/24 09:27:50 alibrary
24 Revision 1.1 2002/06/10 17:32:17 nilsen
25 New Fastpoint merger added.
30 #include <Riostream.h>
31 #include <TObjArray.h>
32 #include <TClonesArray.h>
38 #include <AliRunDigitizer.h>
40 #include "AliITSFDigitizer.h"
41 // #include "AliITSpList.h"
42 #include "AliITSmodule.h"
43 #include "AliITSgeom.h"
44 #include "AliITSsimulationFastPoints.h"
46 ClassImp(AliITSFDigitizer)
48 //______________________________________________________________________
49 AliITSFDigitizer::AliITSFDigitizer() : AliDigitizer(){
51 // Default constructor.
56 //______________________________________________________________________
57 AliITSFDigitizer::AliITSFDigitizer(AliRunDigitizer *mngr) : AliDigitizer(mngr){
59 // Standard constructor.
64 //______________________________________________________________________
65 AliITSFDigitizer::~AliITSFDigitizer(){
67 // Default destructor.
69 fITS = 0; // don't delete fITS. Done else where.
71 //______________________________________________________________________
72 Bool_t AliITSFDigitizer::Init(){
75 // loads ITS and ITSgeom.
85 Warning("Init","gAlice not found");
88 fITS = (AliITS *)(gAlice->GetDetector("ITS"));
90 Warning("Init","ITS not found");
93 if(!fITS->GetITSgeom()){
94 Warning("Init","ITS geometry not found");
99 ////////////////////////////////////////////////////////////////////////
100 void AliITSFDigitizer::Exec(Option_t* opt){
102 // Main digitization function.
104 // Option_t * opt "deb" ... more verbose output
107 AliITSsimulationFastPoints *sim = new AliITSsimulationFastPoints();
109 TTree *outputTreeR = fManager->GetTreeR();
110 TClonesArray *recPoints = fITS->RecPoints();
112 fITS->MakeBranchInTree(outputTreeR,"ITSRecPointsF",
116 fITS->InitModules(-1,nModules);
118 // load hits into modules
120 for (Int_t iFile = 0; iFile < fManager->GetNinputs(); iFile++) {
121 fITS->FillModules(fManager->GetInputTreeH(iFile),
122 fManager->GetMask(iFile));
125 // transform hits to fast rec points
127 AliITSgeom *geom = fITS->GetITSgeom();
128 for(Int_t moduleIndex = 0; moduleIndex < geom->GetIndexMax(); moduleIndex++){
129 sim->CreateFastRecPoints(moduleIndex);
132 fITS->ResetRecPoints();
134 outputTreeR->AutoSave();
137 ////////////////////////////////////////////////////////////////////////