2 gSystem->Load("libITSUpgradeBase");
3 gSystem->Load("libITSUpgradeSim");
4 gSystem->Load("libITSUpgradeRec");
5 gROOT->SetStyle("Plain");
6 gStyle->SetOptStat(1111111);
9 Int_t xmax=50000;//00*1e-09;
12 AliITSsegmentationUpgrade *seg = new AliITSsegmentationUpgrade();
14 printf("no segmentation info available... Exiting");
17 Int_t nLayers = seg->GetNLayers();
19 TH1D **hNel, **hNsect;
20 hNel = new TH1D[nLayers];
21 hNsect = new TH1D[nLayers];
23 for(Int_t i=0; i< nLayers; i++ ) {
24 hNel[i] = new TH1D(Form("hNel%i",i),Form("cluster charge distribution [ Layer %i] ",i),nbins,xmin,xmax);
25 hNel[i]->SetXTitle("N electrons");
26 hNsect[i] = new TH1D(Form("hNsect%i",i),Form("cluster entries per sector [ Layer %i] ",i),seg->GetNSectors(),-0.5,seg->GetNSectors()-0.5);
27 hNsect[i]->SetXTitle("Sector Number");
28 hNsect[i]->SetYTitle("# clusters");
29 hNsect[i]->SetMinimum(0);
32 TH1D * type = new TH1D("hCluType"," cluster type" , 50,0,15 );
34 TH2F *xyGlob = new TH2F("xyGlob"," X - Y Global coordinates ",100,-50,50,100,-50,50);
35 xyGlob->SetXTitle("cm");
36 xyGlob->SetMarkerStyle(7);
37 TH1F *zGlob = new TH1F("zGlob", " Z Global coordinates ",200, -50,50 );
38 zGlob->SetXTitle("cm");
41 AliRunLoader* runLoader = AliRunLoader::Open("galice.root");
42 runLoader->LoadgAlice();
44 gAlice = runLoader->GetAliRun();
46 runLoader->LoadHeader();
47 runLoader->LoadKinematics();
48 runLoader->LoadRecPoints();
50 AliITSLoader *dl = (AliITSLoader*)runLoader->GetDetectorLoader("ITS");
52 TTree *clusTree = 0x0;
54 TClonesArray statITSCluster("AliITSRecPointU");
56 for (Int_t iEvent = 0; iEvent < runLoader->GetNumberOfEvents(); iEvent++) {
57 runLoader->GetEvent(iEvent);
59 TClonesArray *ITSCluster = &statITSCluster;
60 TBranch* itsClusterBranch=clusTree->GetBranch("ITSRecPoints");
61 if (!itsClusterBranch) {
62 printf("can't get the branch with the ITS clusters ! \n");
65 itsClusterBranch->SetAddress(&ITSCluster);
66 clusTree->GetEntry(0);
68 Int_t nCluster = ITSCluster->GetEntriesFast();
69 for(Int_t i=0; i<nCluster; i++){
70 AliITSRecPointU *recp = (AliITSRecPointU*)ITSCluster->UncheckedAt(i);
71 // cout<<"layer "<<recp->GetLayer()<<endl;
72 Double_t xyz[3]={-1,-1,-1};
73 seg->DetToGlobal(recp->GetLayer(), recp->GetModule(), recp->GetDetLocalX(), recp->GetDetLocalZ(), xyz[0],xyz[1],xyz[2]) ;
74 xyGlob->Fill(xyz[0],xyz[1]);
77 type->Fill(recp->GetType());
78 hNel[recp->GetLayer()]->Fill(charge);
79 hNsect[recp->GetLayer()]->Fill(recp->GetModule());
85 TCanvas *xyCanv = new TCanvas("xvCanvClus","RecPoint X-Y Positions",10,10,size,size);
89 TCanvas *zCanv = new TCanvas("zCanvClus","RecPoint Z Positions",size+20,10,size,size);
92 TCanvas *typeCanv = new TCanvas("ClusType","Cluster type distribution",10,size+40,2*size+10,size);
96 TCanvas *c = new TCanvas("c","Cluster charge distribution",900,0, 1000,550);
97 c->Divide(3,(nLayers/3)+1);
98 for(Int_t ip =1; ip<=nLayers; ip++){
103 TCanvas *cS = new TCanvas("cS","clusters in sectors",900,640,1000,550);
104 cS->Divide(3,(nLayers/3)+1);
105 for(Int_t ip =1; ip<=nLayers; ip++){
107 hNsect[ip-1]->Draw();