3 gROOT->SetStyle("Plain");
5 gSystem->Load("libITSUpgradeBase");
6 gSystem->Load("libITSUpgradeSim");
8 TH2F *xyGlob = new TH2F("xyGlob"," X - Y Global coordinates ",100,-50,50,100,-50,50);
9 xyGlob->SetXTitle("cm");
10 xyGlob->SetMarkerStyle(7);
11 TH1F *zGlob = new TH1F("zGlob", " Z Global coordinates ",200, -100,100 );
12 zGlob->SetXTitle("cm");
16 Int_t xmax=0.1;//00*1e-09;
18 const Int_t nLayers = 6;
20 TH1D *hDeLoss[nLayers];
21 for(Int_t i=0; i< nLayers; i++ ) {
22 hDeLoss[i] = new TH1D(Form("hDeLossl%i",i),Form("E loss distribution [ Layer %i] ",i),nbins,xmin,xmax);
23 hDeLoss[i]->SetXTitle("GeV");
27 AliRunLoader* runLoader = AliRunLoader::Open("galice.root");
28 runLoader->LoadgAlice();
30 gAlice = runLoader->GetAliRun();
32 runLoader->LoadHeader();
33 runLoader->LoadKinematics();
34 runLoader->LoadSDigits();
35 runLoader->LoadHits();
37 AliLoader *dl = runLoader->GetDetectorLoader("ITS");
42 TClonesArray *hitList=new TClonesArray("AliITShit");
44 AliITSsegmentationUpgrade *segmentation = new AliITSsegmentationUpgrade();
45 for (Int_t iEvent = 0; iEvent < runLoader->GetNumberOfEvents(); iEvent++) {
47 runLoader->GetEvent(iEvent);
50 hitTree->SetBranchAddress("ITSupgrade",&hitList);
51 for(Int_t iEnt=0;iEnt<hitTree->GetEntries();iEnt++){//entries loop degli hits
52 hitTree->GetEntry(iEnt);
53 for(Int_t iHit=0; iHit<hitList->GetEntries();iHit++){
55 AliITShit *pHit = (AliITShit*)hitList->At(iHit);
57 if(pHit->GetParticle()->IsPrimary()){
59 pHit->GetPositionG(xg,yg,zg);
62 hDeLoss[pHit->GetModule()]->Fill(pHit->GetIonization());
69 TCanvas *xyCanv = new TCanvas("xyCanv","Hit X-Y positions",500,500);
72 TCanvas *zCanv = new TCanvas("zCanv","Hit Z positions",500,500);
76 TCanvas *c = new TCanvas("c","E loss distribution per layer",1000,800);
78 for(Int_t ip =1; ip<=6; ip++){
80 hDeLoss[ip-1]->Draw();