]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSDDLRawData.C
New classes added
[u/mrichter/AliRoot.git] / ITS / AliITSDDLRawData.C
CommitLineData
2e9f335b 1#if !defined(__CINT__) || defined(__MAKECINT__)
2
3#include <iostream.h>
4#include "AliITSDDLRawData.h"
5#endif
6
7/*
8Before running this macro it is necessary comment the following line of the method
9AddDigit in the class AliITSsimulationSDD
10//if( fResponse->Do10to8() ) signal = Convert8to10( signal );
11In this way the amplitude value for signal coming from SDD takes only 8 bits and not 10.
12*/
13
14void AliITSDDLRawData(char* DigitsFile="galice.root"){
15 #ifdef __NOCOMPILED__
16 if (gClassTable->GetID("AliRun") < 0) {
17 gROOT->LoadMacro("loadlibs.C");
18 loadlibs();
19 }
20 else {
21#endif
22 if(gAlice){
23 delete gAlice;
24 gAlice=0;
25 }
26#ifdef __NOCOMPILED__
27 }
28#endif
29 // Connect the Root input file containing Geometry, Kine and Hits
30 // galice.root file by default
31 char* filename="galice.root";
32 // TFile *file = (TFile*)gROOT->GetListOfFiles()->FindObject(filename);
33 TFile *file = (TFile*)gROOT->GetListOfFiles()->FindObject(DigitsFile);
34 if (!file){
35 // file = new TFile(filename);
36 file = new TFile(DigitsFile);
37 cout<<"NEW FILE CREATED !!!"<<endl;
38 }//end if
39 file->ls();
40 // Get AliRun object from file
41 if (!gAlice) {
42 gAlice = (AliRun*)file->Get("gAlice");
43 if (gAlice)cout<<"AliRun object found on file "<<filename<<endl;
44 if(!gAlice){
45 cout<<"Can't access AliRun object on file "<<filename<<endl;
46 cout<<"Macro execution stopped!!!"<<endl;
47 }
48 }
49 // gAlice->SetTreeDFileName("digits.root");
50 gAlice->SetTreeDFileName(DigitsFile);
51 Int_t nparticles = gAlice->GetEvent(0);
52 //
53 // ITS
54 AliITS *ITS = (AliITS*)gAlice->GetModule("ITS");
55 Int_t nmodules;
56 ITS->InitModules(-1,nmodules);
57
58 cout<<"Number of ITS modules= "<<nmodules<<endl;
59 //cout<<"Filling modules... It takes a while, now. Please be patient"<<endl;
60 //ITS->FillModules(0,0,nmodules," "," ");
61 //cout<<"ITS modules .... DONE!"<<endl;
62 // DIGITS
63 TTree *TD = gAlice->TreeD();
64
65 AliITSDDLRawData *util=new AliITSDDLRawData();
66 TStopwatch timer;
67
68 //SILICON PIXEL DETECTOR
69 cout<<"Formatting data for SPD"<<endl;
70 timer.Start();
71 util->RawDataSPD(ITS,TD);
72 timer.Stop();
73 timer.Print();
74
75 //SILICON DRIFT DETECTOR
76 cout<<"Formatting data for SDD"<<endl;
77 timer.Start();
78 util->RawDataSDD(ITS,TD);
79 timer.Stop();
80 timer.Print();
81
82 //SILICON STRIP DETECTOR
83 cout<<"Formatting data for SSD"<<endl;
84 timer.Start();
85 util->RawDataSSD(ITS,TD);
86 timer.Stop();
87 timer.Print();
88
89 delete util;
90 return;
91}