2 gSystem->Load("libITSUpgradeSim");
3 gSystem->Load("libITSUpgradeBase");
4 gSystem->Load("libITSUpgradeRec");
5 gROOT->SetStyle("Plain");
8 Int_t xmax=50000;//00*1e-09;
10 const Int_t nLayers = 6;
12 AliITSsegmentationUpgrade *seg = new AliITSsegmentationUpgrade();
14 printf("no segmentation info available... Exiting");
19 for(Int_t i=0; i< nLayers; i++ ) {
20 hNel[i] = new TH1D(Form("hNel%i",i),Form("cluster charge distribution [ Layer %i] ",i),nbins,xmin,xmax);
21 hNel[i]->SetXTitle("N electrons");
23 TH1D * type = new TH1D("hCluType"," cluster type" , 50,0,15 );
25 TH2F *xyGlob = new TH2F("xyGlob"," X - Y Global coordinates ",100,-50,50,100,-50,50);
26 xyGlob->SetXTitle("cm");
27 xyGlob->SetMarkerStyle(7);
28 TH1F *zGlob = new TH1F("zGlob", " Z Global coordinates ",200, -100,100 );
29 zGlob->SetXTitle("cm");
33 AliRunLoader* runLoader = AliRunLoader::Open("galice.root");
34 runLoader->LoadgAlice();
36 gAlice = runLoader->GetAliRun();
38 runLoader->LoadHeader();
39 runLoader->LoadKinematics();
40 runLoader->LoadRecPoints();
42 AliITSLoader *dl = (AliITSLoader*)runLoader->GetDetectorLoader("ITS");
45 TTree *clusTree = 0x0;
47 TClonesArray statITSCluster("AliITSRecPoint");
49 for (Int_t iEvent = 0; iEvent < runLoader->GetNumberOfEvents(); iEvent++) {
50 runLoader->GetEvent(iEvent);
52 TClonesArray *ITSCluster = &statITSCluster;
53 TBranch* itsClusterBranch=clusTree->GetBranch("ITSRecPoints");
54 if (!itsClusterBranch) {
55 printf("can't get the branch with the ITS clusters ! \n");
58 itsClusterBranch->SetAddress(&ITSCluster);
59 clusTree->GetEntry(0);
61 Int_t nCluster = ITSCluster->GetEntriesFast();
62 for(Int_t i=0; i<nCluster; i++){
63 AliITSRecPoint *recp = (AliITSRecPoint*)ITSCluster->UncheckedAt(i);
64 Double_t xyz[3]={-1,-1,-1};
65 seg->DetToGlobal(recp->GetLayer(), recp->GetDetLocalX(), recp->GetDetLocalZ(), xyz[0],xyz[1],xyz[2]) ;
66 xyGlob->Fill(xyz[0],xyz[1]);
69 // cout<< "layer "<< recp->GetLayer() << " local system X "<< recp->GetDetLocalX() << " Z "<< recp->GetDetLocalZ() <<endl;
70 type->Fill(recp->GetType());
71 hNel[recp->GetLayer()]->Fill(charge);
76 TCanvas *xyCanv = new TCanvas("xvCanvClus","RecPoint X-Y Positions",500,500);
79 TCanvas *zCanv = new TCanvas("zCanvClus","RecPoint Z Positions",500,500);
85 TCanvas *c = new TCanvas("c","Cluster charge distribution",1000,800);
87 for(Int_t ip =1; ip<=6; ip++){