+++ /dev/null
-void DrawITS()
-{
- gMC->Gsatt("*", "seen", -1);
- gMC->Gsatt("alic", "seen", 0);
- gROOT->LoadMacro("ViewITS.C");
- gInterpreter->ProcessLine("ViewITS()");
- gMC->Gdopt("hide", "on");
- gMC->Gdopt("shad", "on");
- gMC->Gsatt("*", "fill", 7);
- gMC->SetClipBox(".");
- gMC->SetClipBox("*", 0, 300, -300, 300, -300, 300);
- gMC->DefaultRange();
- gMC->Gdraw("alic", 40, 30, 0, 9, 10, .1, .1);
- gMC->Gdhead(1111, "Inner Tracking System");
- gMC->Gdman(16, 6, "MAN");
-}
+++ /dev/null
-void ViewITS()
-{
- gMC->Gsatt("ITSV","seen",0);
- gMC->Gsatt("IT12","seen",0);
- gMC->Gsatt("ITS1","seen",0);
- gMC->Gsatt("ITS2","seen",0);
- gMC->Gsatt("IT34","seen",0);
- gMC->Gsatt("ITS3","seen",0);
- gMC->Gsatt("ITS4","seen",0);
- gMC->Gsatt("IT56","seen",0);
- gMC->Gsatt("ITS5","seen",0);
- gMC->Gsatt("ITS6","seen",0);
-
- gMC->Gsatt("IPV1","seen",0);
- gMC->Gsatt("IPB1","seen",0);
- gMC->Gsatt("ICH1","seen",0);
- gMC->Gsatt("IBU1","seen",1);
- gMC->Gsatt("IPV2","seen",0);
- gMC->Gsatt("IPB2","seen",0);
- gMC->Gsatt("ICH2","seen",0);
- gMC->Gsatt("IBU2","seen",1);
-
- gMC->Gsatt("SPIX","seen",1);
- gMC->Gsatt("SARC","seen",0);
- gMC->Gsatt("IDV1","seen",0);
-
- gMC->Gsatt("IR11","seen",0);
- gMC->Gsatt("IR12","seen",0);
- gMC->Gsatt("IR13","seen",0);
- gMC->Gsatt("IR14","seen",0);
- gMC->Gsatt("IR15","seen",0);
- gMC->Gsatt("IR16","seen",0);
- gMC->Gsatt("IR17","seen",0);
- gMC->Gsatt("IEL1","seen",1);
- gMC->Gsatt("IEL2","seen",1);
- gMC->Gsatt("IEL3","seen",1);
- gMC->Gsatt("IEL4","seen",1);
-
- gMC->Gsatt("IDV2","seen",0);
- gMC->Gsatt("IR21","seen",1);
- gMC->Gsatt("IR22","seen",1);
- gMC->Gsatt("IR23","seen",1);
- gMC->Gsatt("IR24","seen",1);
- gMC->Gsatt("IR25","seen",1);
- gMC->Gsatt("IR26","seen",1);
- gMC->Gsatt("IR27","seen",1);
-
- gMC->Gsatt("IDV3","seen",0);
- gMC->Gsatt("IR31","seen",0);
- gMC->Gsatt("IR32","seen",0);
- gMC->Gsatt("IR33","seen",0);
- gMC->Gsatt("IR34","seen",0);
- gMC->Gsatt("IR35","seen",0);
- gMC->Gsatt("IR36","seen",0);
- gMC->Gsatt("IR37","seen",0);
- gMC->Gsatt("IEL5","seen",1);
- gMC->Gsatt("IEL6","seen",1);
- gMC->Gsatt("IEL7","seen",1);
- gMC->Gsatt("IEL8","seen",1);
- gMC->Gsatt("IDV4","seen",0);
- gMC->Gsatt("IR41","seen",1);
- gMC->Gsatt("IR42","seen",1);
- gMC->Gsatt("IR43","seen",1);
- gMC->Gsatt("IR44","seen",1);
- gMC->Gsatt("IR45","seen",1);
- gMC->Gsatt("IR46","seen",1);
- gMC->Gsatt("IR47","seen",1);
-
- gMC->Gsatt("ISV1","seen",0);
- gMC->Gsatt("SSV1","seen",0);
- gMC->Gsatt("ELL5","seen",0);
- gMC->Gsatt("SCH5","seen",1);
- gMC->Gsatt("STB5","seen",1);
- gMC->Gsatt("SWT5","seen",1);
- gMC->Gsatt("SFR5","seen",1);
- gMC->Gsatt("SCE5","seen",1);
- gMC->Gsatt("EPL5","seen",0);
- gMC->Gsatt("ECU5","seen",1);
- gMC->Gsatt("EPX5","seen",0);
- gMC->Gsatt("ESI5","seen",1);
- gMC->Gsatt("ISV2","seen",0);
- gMC->Gsatt("SSV2","seen",0);
- gMC->Gsatt("ELL6","seen",0);
- gMC->Gsatt("SCH6","seen",1);
- gMC->Gsatt("STB6","seen",1);
- gMC->Gsatt("SWT6","seen",0);
- gMC->Gsatt("SFR6","seen",1);
- gMC->Gsatt("SCE6","seen",1);
- gMC->Gsatt("EPL6","seen",0);
- gMC->Gsatt("ECU6","seen",1);
- gMC->Gsatt("EPX6","seen",1);
- gMC->Gsatt("ESI6","seen",1);
- gMC->Gsatt("TR01","seen",1);
- gMC->Gsatt("TR02","seen",1);
- gMC->Gsatt("TR03","seen",1);
- gMC->Gsatt("TR04","seen",1);
- gMC->Gsatt("TR05","seen",1);
- gMC->Gsatt("TR06","seen",1);
- gMC->Gsatt("TR07","seen",1);
- gMC->Gsatt("TR08","seen",1);
- gMC->Gsatt("TR11","seen",1);
- gMC->Gsatt("TR12","seen",1);
- gMC->Gsatt("TR13","seen",1);
- gMC->Gsatt("TR14","seen",1);
- gMC->Gsatt("TR15","seen",1);
- gMC->Gsatt("TR16","seen",1);
- gMC->Gsatt("TR17","seen",1);
- gMC->Gsatt("TR18","seen",1);
- gMC->Gsatt("TR19","seen",1);
- gMC->Gsatt("TR20","seen",1);
- gMC->Gsatt("TR21","seen",1);
- gMC->Gsatt("TR22","seen",1);
- gMC->Gsatt("TR23","seen",1);
- gMC->Gsatt("TR24","seen",1);
- gMC->Gsatt("TR25","seen",1);
- gMC->Gsatt("TR26","seen",1);
- gMC->Gsatt("RCON","seen",0);
- gMC->Gsatt("RTB1","seen",1);
- gMC->Gsatt("RTB2","seen",1);
- gMC->Gsatt("RP03","seen",1);
- gMC->Gsatt("RP04","seen",1);
- gMC->Gsatt("RP05","seen",1);
- gMC->Gsatt("RP06","seen",1);
- gMC->Gsatt("LCON","seen",0);
- gMC->Gsatt("LTB1","seen",1);
- gMC->Gsatt("LTB2","seen",1);
- gMC->Gsatt("LP03","seen",1);
- gMC->Gsatt("LP04","seen",1);
- gMC->Gsatt("LP05","seen",1);
- gMC->Gsatt("LP06","seen",1);
-}
+++ /dev/null
-void ViewITS_v3()
-{
- gMC->Gsatt("ITSV","seen",0);
- gMC->Gsatt("IT12","seen",0);
- gMC->Gsatt("ITS1","seen",0);
- gMC->Gsatt("ITS2","seen",0);
- gMC->Gsatt("IT34","seen",0);
- gMC->Gsatt("ITS3","seen",0);
- gMC->Gsatt("ITS4","seen",0);
- gMC->Gsatt("IT56","seen",0);
- gMC->Gsatt("ITS5","seen",0);
- gMC->Gsatt("ITS6","seen",0);
-
- gMC->Gsatt("IPV1","seen",0);
- gMC->Gsatt("IPB1","seen",0);
- gMC->Gsatt("ICH1","seen",0);
- gMC->Gsatt("IBU1","seen",1);
- gMC->Gsatt("IPV2","seen",0);
- gMC->Gsatt("IPB2","seen",0);
- gMC->Gsatt("ICH2","seen",0);
- gMC->Gsatt("IBU2","seen",1);
-
- gMC->Gsatt("SPIX","seen",1);
- gMC->Gsatt("SARC","seen",0);
- gMC->Gsatt("IDV1","seen",0);
-
- gMC->Gsatt("IR11","seen",0);
- gMC->Gsatt("IR12","seen",0);
- gMC->Gsatt("IR13","seen",0);
- gMC->Gsatt("IR14","seen",0);
- gMC->Gsatt("IR15","seen",0);
- gMC->Gsatt("IR16","seen",0);
- gMC->Gsatt("IR17","seen",0);
- gMC->Gsatt("IEL1","seen",1);
- gMC->Gsatt("IEL2","seen",1);
- gMC->Gsatt("IEL3","seen",1);
- gMC->Gsatt("IEL4","seen",1);
-
- gMC->Gsatt("IDV2","seen",0);
- gMC->Gsatt("IR21","seen",1);
- gMC->Gsatt("IR22","seen",1);
- gMC->Gsatt("IR23","seen",1);
- gMC->Gsatt("IR24","seen",1);
- gMC->Gsatt("IR25","seen",1);
- gMC->Gsatt("IR26","seen",1);
- gMC->Gsatt("IR27","seen",1);
-
- gMC->Gsatt("IDV3","seen",0);
- gMC->Gsatt("IR31","seen",0);
- gMC->Gsatt("IR32","seen",0);
- gMC->Gsatt("IR33","seen",0);
- gMC->Gsatt("IR34","seen",0);
- gMC->Gsatt("IR35","seen",0);
- gMC->Gsatt("IR36","seen",0);
- gMC->Gsatt("IR37","seen",0);
- gMC->Gsatt("IEL5","seen",1);
- gMC->Gsatt("IEL6","seen",1);
- gMC->Gsatt("IEL7","seen",1);
- gMC->Gsatt("IEL8","seen",1);
- gMC->Gsatt("IDV4","seen",0);
- gMC->Gsatt("IR41","seen",1);
- gMC->Gsatt("IR42","seen",1);
- gMC->Gsatt("IR43","seen",1);
- gMC->Gsatt("IR44","seen",1);
- gMC->Gsatt("IR45","seen",1);
- gMC->Gsatt("IR46","seen",1);
- gMC->Gsatt("IR47","seen",1);
-
- gMC->Gsatt("ISV1","seen",0);
- gMC->Gsatt("SSV1","seen",0);
- gMC->Gsatt("ELL5","seen",0);
- gMC->Gsatt("SCH5","seen",1);
- gMC->Gsatt("STB5","seen",1);
- gMC->Gsatt("SWT5","seen",1);
- gMC->Gsatt("SFR5","seen",1);
- gMC->Gsatt("SCE5","seen",1);
- gMC->Gsatt("EPL5","seen",0);
- gMC->Gsatt("ECU5","seen",1);
- gMC->Gsatt("EPX5","seen",0);
- gMC->Gsatt("ESI5","seen",1);
- gMC->Gsatt("ISV2","seen",0);
- gMC->Gsatt("SSV2","seen",0);
- gMC->Gsatt("ELL6","seen",0);
- gMC->Gsatt("SCH6","seen",1);
- gMC->Gsatt("STB6","seen",1);
- gMC->Gsatt("SWT6","seen",0);
- gMC->Gsatt("SFR6","seen",1);
- gMC->Gsatt("SCE6","seen",1);
- gMC->Gsatt("EPL6","seen",0);
- gMC->Gsatt("ECU6","seen",1);
- gMC->Gsatt("EPX6","seen",1);
- gMC->Gsatt("ESI6","seen",1);
- gMC->Gsatt("TR01","seen",1);
- gMC->Gsatt("TR02","seen",1);
- gMC->Gsatt("TR03","seen",1);
- gMC->Gsatt("TR04","seen",1);
- gMC->Gsatt("TR05","seen",1);
- gMC->Gsatt("TR06","seen",1);
- gMC->Gsatt("TR07","seen",1);
- gMC->Gsatt("TR08","seen",1);
- gMC->Gsatt("TR11","seen",1);
- gMC->Gsatt("TR12","seen",1);
- gMC->Gsatt("TR13","seen",1);
- gMC->Gsatt("TR14","seen",1);
- gMC->Gsatt("TR15","seen",1);
- gMC->Gsatt("TR16","seen",1);
- gMC->Gsatt("TR17","seen",1);
- gMC->Gsatt("TR18","seen",1);
- gMC->Gsatt("TR19","seen",1);
- gMC->Gsatt("TR20","seen",1);
- gMC->Gsatt("TR21","seen",1);
- gMC->Gsatt("TR22","seen",1);
- gMC->Gsatt("TR23","seen",1);
- gMC->Gsatt("TR24","seen",1);
- gMC->Gsatt("TR25","seen",1);
- gMC->Gsatt("TR26","seen",1);
- gMC->Gsatt("RCON","seen",0);
- gMC->Gsatt("RTB1","seen",1);
- gMC->Gsatt("RTB2","seen",1);
- gMC->Gsatt("RP03","seen",1);
- gMC->Gsatt("RP04","seen",1);
- gMC->Gsatt("RP05","seen",1);
- gMC->Gsatt("RP06","seen",1);
- gMC->Gsatt("LCON","seen",0);
- gMC->Gsatt("LTB1","seen",1);
- gMC->Gsatt("LTB2","seen",1);
- gMC->Gsatt("LP03","seen",1);
- gMC->Gsatt("LP04","seen",1);
- gMC->Gsatt("LP05","seen",1);
- gMC->Gsatt("LP06","seen",1);
-}
+++ /dev/null
-void analITS (Int_t evNumber=0)
-{
-/////////////////////////////////////////////////////////////////////////
-// This macro is a small example of a ROOT macro
-// illustrating how to read the output of GALICE
-// and fill some histograms.
-//
-// Root > .L analITS.C //this loads the macro in memory
-// Root > analITS(); //by default process first event
-// Root > analITS(2); //process third event
-//Begin_Html
-/*
-<img src="figures/analITS_ref.gif">
-</pre>
-<br clear=left>
-<font size=+2 color=red>
-<p>A reference plot produced by analITS.C.
-</font>
-<pre>
- */
-//End_Html
-/////////////////////////////////////////////////////////////////////////
-
-
-// Dynamically link some shared libs
- if (gClassTable->GetID("AliRun") < 0) {
- gROOT->LoadMacro("loadlibs.C");
- loadlibs();
- } // end if gClassTable...
-
-// Connect the Root Galice file containing Geometry, Kine and Hits
- TFile *file = (TFile*)gROOT->GetListOfFiles()->FindObject("galice.root");
- if (!file) file = new TFile("galice.root");
-
-// Get AliRun object from file or create it if not on file
- if (!gAlice) {
- gAlice = (AliRun*)file->Get("gAlice");
- if (gAlice) printf("AliRun object found on file\n");
- if (!gAlice) gAlice = new AliRun("gAlice","Alice test program");
- }
-
-// Import the Kine and Hits Trees for the event evNumber in the file
- Int_t nparticles = gAlice->GetEvent(evNumber);
- if (nparticles <= 0) return;
- Float_t x,y,z,mass,e,r;
- Int_t nbytes = 0;
- Int_t j,hit,ipart;
- Int_t nhits;
- Int_t sector,plane;
- TParticle *particle;
- AliTPChit *tpcHit;
- AliITShit *itsHit;
-
-// Get pointers to Alice detectors and Hits containers
- AliDetector *TPC = gAlice->GetDetector("TPC");
- AliDetector *ITS = gAlice->GetDetector("ITS");
- TClonesArray *Particles = gAlice->Particles();
- if (TPC) TClonesArray *TPChits = TPC->Hits();
- if (ITS) TClonesArray *ITShits = ITS->Hits();
-
- TTree *TH = gAlice->TreeH();
- Int_t ntracks = TH->GetEntries();
-
- // Create histograms
- TH1F *hITSZ = new TH1F("hITSZ","Z of hits in ITS",100,-50.,50.);
- TH1F *hITSR = new TH1F("hITSR","R of hits in ITS",100,0.,50.);
- TH1F *hITSlayer= new TH1F("hITSlayer","JLAY of hits in ITS",6, 0., 6.);
- TH1F *hITSTr = new TH1F("hITSTr","Track number for hits in ITS",100,0.,50000.);
-
-// Start loop on tracks in the hits containers
- for (Int_t track=0; track<ntracks;track++) {
- gAlice->ResetHits();
- nbytes += TH->GetEvent(track);
- Int_t i=0;
- if (ITS) {
- nhits = ITShits->GetEntriesFast();
- for (hit=0;hit<nhits;hit++) {
- itsHit = (AliITShit*)ITShits->UncheckedAt(hit);
- // With this new version, to be able to do proper detector
- // simulations, the requirment that a "hit" leave some
- // energy deposited has been removed.
- if(itsHit->GetIonization()<=0.0) continue;
- ipart = itsHit->fTrack;
- particle = (TParticle*)Particles->UncheckedAt(ipart);
- z = itsHit->GetZG();
- hITSZ->Fill(z);
- r = sqrt(itsHit->GetXG()*itsHit->GetXG() +
- itsHit->GetYG()*itsHit->GetYG());
- hITSR->Fill(r);
- hITSlayer->Fill((Float_t)itsHit->GetLayer());
- hITSTr->Fill(itsHit->fTrack);
- i++;
- }
- }
- }
-
-//Create a canvas, set the view range, show histograms
- TCanvas *c1 = new TCanvas("c1","Alice TPC and ITS hits",400,10,600,700);
- c1->Divide(2,2);
- c1->cd(1);
- gPad->SetFillColor(33);
- hITSZ->SetFillColor(33);
- hITSZ->Draw();
- c1->cd(2);
- gPad->SetFillColor(33);
- hITSR->SetFillColor(46);
- hITSR->Draw();
- c1->cd(3);
- gPad->SetFillColor(33);
- hITSlayer->SetFillColor(46);
- hITSlayer->Draw();
- c1->cd(4);
- gPad->SetFillColor(33);
- hITSTr->SetFillColor(46);
- hITSTr->Draw();
- c1->Print("analITS.gif");
-}
+++ /dev/null
-void analITSgeom (const char *filename="galice.root",Int_t evNumber=0){
-/////////////////////////////////////////////////////////////////////////
-// This macro is a small example of a ROOT macro
-// illustrating how to read the output of GALICE
-// and fill some histograms.
-//
-// Root > .L analITSgeom.C //this loads the macro in memory
-// Root > analITSgeom(); //by default process first event
-// Root > analITgeomS(2); //process third event
-//Begin_Html
-/*
-<img src="figures/analITSgeom_ref.gif">
-</pre>
-<br clear=left>
-<font size=+2 color=red>
-<p>A reference plot produced by analITSgeom.C.
-</font>
-<pre>
- */
-//End_Html
-/////////////////////////////////////////////////////////////////////////
-
-
-// Dynamically link some shared libs
- if (gClassTable->GetID("AliRun") < 0) {
- gROOT->LoadMacro("loadlibs.C");
- loadlibs();
- } // end if gClassTable...
-
-// Connect the Root Galice file containing Geometry, Kine and Hits
- TFile *file = (TFile*)gROOT->GetListOfFiles()->FindObject(filename);
- if (!file) file = new TFile(filename);
-
-// Get AliRun object from file or create it if not on file
- if (!gAlice) {
- gAlice = (AliRun*)file->Get("gAlice");
- if (gAlice) printf("AliRun object found on file\n");
- if (!gAlice) gAlice = new AliRun("gAlice","Alice test program");
- }
-
-// Import the Kine and Hits Trees for the event evNumber in the file
- Int_t nparticles = gAlice->GetEvent(evNumber);
- if (nparticles <= 0) return;
- Float_t x,y,z,mass,e,r,phi,flad;
- Int_t nbytes = 0;
- Int_t j,hit,ipart,lay;
- Int_t nhits;
- Int_t sector,plane;
- TParticle *particle;
- AliITShit *itsHit;
-
-// Get pointers to Alice detectors and Hits containers
- AliDetector *ITS = gAlice->GetDetector("ITS");
- if(!ITS) return;
- TClonesArray *Particles = gAlice->Particles();
- TClonesArray *ITShits = ITS->Hits();
- AliITSgeom *gm = ((AliITS *)ITS)->GetITSgeom();
-
- TTree *TH = gAlice->TreeH();
- Int_t ntracks = TH->GetEntries();
-
- // Create histograms
- Float_t pi2 = 2.0*TMath::Pi();
- Int_t Nlad = gm->GetNladders(1);
- TH2F *hITS1 = new TH2F("hITS1","Ladder# vs. angle for Layer 1",
- Nlad,0.5,(Float_t)Nlad+0.5,100,0.0,pi2);
- Int_t Nlad = gm->GetNladders(2);
- TH2F *hITS2 = new TH2F("hITS2","Ladder# vs. angle for Layer 2",
- Nlad,0.5,(Float_t)Nlad+0.5,100,0.0,pi2);
- Int_t Nlad = gm->GetNladders(3);
- TH2F *hITS3 = new TH2F("hITS3","Ladder# vs. angle for Layer 3",
- Nlad,0.5,(Float_t)Nlad+0.5,100,0.0,pi2);
- Int_t Nlad = gm->GetNladders(4);
- TH2F *hITS4 = new TH2F("hITS4","Ladder# vs. angle for Layer 4",
- Nlad,0.5,(Float_t)Nlad+0.5,100,0.0,pi2);
- Int_t Nlad = gm->GetNladders(5);
- TH2F *hITS5 = new TH2F("hITS5","Ladder# vs. angle for Layer 5",
- Nlad,0.5,(Float_t)Nlad+0.5,100,0.0,pi2);
- Int_t Nlad = gm->GetNladders(6);
- TH2F *hITS6 = new TH2F("hITS6","Ladder# vs. angle for Layer 6",
- Nlad,0.5,(Float_t)Nlad+0.5,100,0.0,pi2);
-
-// Start loop on tracks in the hits containers
- for (Int_t track=0; track<ntracks;track++) {
- gAlice->ResetHits();
- nbytes += TH->GetEvent(track);
- Int_t i=0;
- nhits = ITShits->GetEntriesFast();
- for (hit=0;hit<nhits;hit++) {
- itsHit = (AliITShit*)ITShits->UncheckedAt(hit);
- // With this new version, to be able to do proper detector
- // simulations, the requirment that a "hit" leave some
- // energy deposited has been removed.
- if(itsHit->GetIonization()<=0.0) continue;
- phi = TMath::ATan2(itsHit->GetYG(),itsHit->GetXG());
- if(phi<0.0) phi += pi2;
- lay = itsHit->GetLayer();
- flad = ((Float_t)itsHit->GetLadder()) + 0.5;
- if(lay==1) hITS1->Fill(flad,phi,1.0);
- if(lay==2) hITS2->Fill(flad,phi,1.0);
- if(lay==3) hITS3->Fill(flad,phi,1.0);
- if(lay==4) hITS4->Fill(flad,phi,1.0);
- if(lay==5) hITS5->Fill(flad,phi,1.0);
- if(lay==6) hITS6->Fill(flad,phi,1.0);
- } // end for hit
- } // end for track
-
-//Create a canvas, set the view range, show histograms
- TCanvas *c1 = new TCanvas("c1"," ITS geometry test",400,10,600,700);
- c1->Divide(2,3);
- c1->cd(1);
- hITS1->Draw();
- c1->cd(2);
- hITS2->Draw();
- c1->cd(3);
- hITS3->Draw();
- c1->cd(4);
- hITS4->Draw();
- c1->cd(5);
- hITS5->Draw();
- c1->cd(6);
- hITS6->Draw();
- c1->Print("analITSgeom.gif");
-}