AliTRDpid.cxx AliTRDpidLQ.cxx \
AliTRDmcTrack.cxx \
AliTRDsimple.cxx AliTRDsimpleMC.cxx \
- AliTRDsimpleGen.cxx
+ AliTRDsimpleGen.cxx
# C++ Headers
+++ /dev/null
-void slowClusterAna() {
-
-/////////////////////////////////////////////////////////////////////////
-//
-// Example macro for the analysis of the TRD cluster
-//
-/////////////////////////////////////////////////////////////////////////
-
- // Dynamically link some shared libs
- if (gClassTable->GetID("AliRun") < 0) {
- gROOT->LoadMacro("loadlibs.C");
- loadlibs();
- }
-
- // Input file name
- Char_t *alifile = "galice.root";
-
- // Event number
- Int_t nEvent = 0;
-
- // Define the histograms
- TH1F *hEnergy = new TH1F("hEnergy","Cluster energy",100,0.0,1000.0);
-
- // Connect the AliRoot file containing Geometry, Kine, Hits, and Digits
- TFile *gafl = (TFile*) gROOT->GetListOfFiles()->FindObject(alifile);
- if (!gafl) {
- cout << "Open the ALIROOT-file " << alifile << endl;
- gafl = new TFile(alifile);
- }
- else {
- cout << alifile << " is already open" << endl;
- }
-
- // Get AliRun object from file or create it if not on file
- gAlice = (AliRun*) gafl->Get("gAlice");
- if (gAlice)
- cout << "AliRun object found on file" << endl;
- else
- gAlice = new AliRun("gAlice","Alice test program");
-
- // Import the Trees for the event nEvent in the file
- Int_t nparticles = gAlice->GetEvent(nEvent);
- if (nparticles <= 0) break;
-
- // Get the pointer to the hit-tree
- Char_t treeName[14];
- sprintf(treeName,"TRDrecPoints%d", nEvent);
- TTree *RecTree = gafl->Get(treeName);
- RecTree->Print();
- // Get the pointer to the detector classes
- AliTRDv1 *TRD = (AliTRDv1*) gAlice->GetDetector("TRD");
- // Get the geometry
- AliTRDgeometry *TRDgeometry = TRD->GetGeometry();
- // Get the pointer to the hit container
- TObjArray *RecPointArray = TRD->RecPoints();
- // Set the branch address
- RecTree->GetBranch("TRDrecPoints")->SetAddress(&RecPointArray);
-
- Int_t nEntries = RecTree->GetEntries();
- cout << "nEntries = " << nEntries << endl;
-
- // Loop through all entries in the tree
- Int_t nbytes;
- for (Int_t iEntry = 0; iEntry < nEntries; iEntry++) {
-
- // Import the tree
- nbytes += RecTree->GetEvent(iEntry);
-
- // Get the number of points in the detector
- Int_t nRecPoint = RecPointArray->GetEntriesFast();
-
- // Loop through all TRD digits
- for (Int_t iRecPoint = 0; iRecPoint < nRecPoint; iRecPoint++) {
-
- // Get the information for this digit
- AliTRDrecPoint *RecPoint = (AliTRDrecPoint *) RecPointArray->UncheckedAt(iRecPoint);
- Int_t detector = RecPoint->GetDetector();
- Int_t sector = TRDgeometry->GetSector(detector);
- Int_t plane = TRDgeometry->GetPlane(detector);
- Int_t chamber = TRDgeometry->GetChamber(detector);
- Int_t energy = RecPoint->GetEnergy();
- TVector3 pos;
- RecPoint->GetLocalPosition(pos);
-
- hEnergy->Fill((Float_t) energy);
-
- }
-
- }
-
- TCanvas *c1 = new TCanvas("c1","Cluster",50,50,600,400);
- hEnergy->Draw();
-
-}
+++ /dev/null
-void slowClusterCreate() {
-
-/////////////////////////////////////////////////////////////////////////
-//
-// Creates cluster from the digit information.
-//
-/////////////////////////////////////////////////////////////////////////
-
- // Dynamically link some shared libs
- if (gClassTable->GetID("AliRun") < 0) {
- gROOT->LoadMacro("loadlibs.C");
- loadlibs();
- cout << "Loaded shared libraries" << endl;
- }
-
- // Input and output file names
- Char_t *infile = "galice.root";
- Char_t *outfile = "TRDclusters.root";
-
- // Create the clusterizer
- AliTRDclusterizerV1 *Clusterizer =
- new AliTRDclusterizerV1("clusterizer","slow clusterizer class");
-
- // Set the parameter
- Clusterizer->SetClusMaxThresh(0);
- Clusterizer->SetClusSigThresh(0);
- //Clusterizer->SetVerbose(1);
- Clusterizer->Dump();
-
- // Open the AliRoot file
- Clusterizer->Open(infile,0);
- //Clusterizer->Open(infile,outfile,0);
-
- // Load the digits
- Clusterizer->ReadDigits();
-
- // Find the cluster
- Clusterizer->MakeClusters();
-
- // Write the cluster tree into file AliTRDclusters.root
- Clusterizer->WriteClusters(-1);
-
- // Save the clusterizer class in the AliROOT file
- // Clusterizer->Write();
-
-}
+++ /dev/null
-void slowDigitsAna() {
-
-/////////////////////////////////////////////////////////////////////////
-//
-// Example macro for the analysis of the TRD digits and the use
-// of the AliTRDmatrix class.
-//
-/////////////////////////////////////////////////////////////////////////
-
- // Dynamically link some shared libs
- if (gClassTable->GetID("AliRun") < 0) {
- gROOT->LoadMacro("loadlibs.C");
- loadlibs();
- }
-
- // Input file name
- Char_t *alifile = "galice.root";
-
- // Event number
- Int_t nEvent = 0;
-
- // Define the objects
- AliTRDv1 *TRD;
- AliTRDgeometry *TRDgeometry;
- AliTRDdigit *Digit;
-
- Int_t track;
-
- // Connect the AliRoot file containing Geometry, Kine, Hits, and Digits
- TFile *gafl = (TFile*) gROOT->GetListOfFiles()->FindObject(alifile);
- if (!gafl) {
- cout << "Open the ALIROOT-file " << alifile << endl;
- gafl = new TFile(alifile);
- }
- else {
- cout << alifile << " is already open" << endl;
- }
-
- // Get AliRun object from file or create it if not on file
- gAlice = (AliRun*) gafl->Get("gAlice");
- if (gAlice)
- cout << "AliRun object found on file" << endl;
- else
- gAlice = new AliRun("gAlice","Alice test program");
-
- // Import the Trees for the event nEvent in the file
- Int_t nparticles = gAlice->GetEvent(nEvent);
- if (nparticles <= 0) break;
-
- // Get the pointer to the detector object
- TRD = (AliTRDv1*) gAlice->GetDetector("TRD");
-
- // Get the pointer to the geometry object
- if (TRD) {
- TRDgeometry = TRD->GetGeometry();
- }
- else {
- cout << "Cannot find the geometry" << endl;
- break;
- }
-
- // Create the digits manager
- AliTRDdigitsManager *DigitsManager = new AliTRDdigitsManager();
-
- // Read the digits from the file
- DigitsManager->ReadDigits();
-
- // Define the detector matrix for one chamber
- const Int_t iSec = 11;
- const Int_t iCha = 2;
- const Int_t iPla = 0;
- Int_t rowMax = TRDgeometry->GetRowMax(iPla,iCha,iSec);
- Int_t colMax = TRDgeometry->GetColMax(iPla);
- Int_t timeMax = TRDgeometry->GetTimeMax();
- cout << "Geometry: rowMax = " << rowMax
- << " colMax = " << colMax
- << " timeMax = " << timeMax << endl;
- AliTRDmatrix *TRDmatrix = new AliTRDmatrix(rowMax,colMax,timeMax,iSec,iCha,iPla);
-
- // Get the detector number
- Int_t iDet = TRDgeometry->GetDetector(iPla,iCha,iSec);
- cout << " iDet = " << iDet << endl;
-
- // Loop through the detector pixel
- for (Int_t time = 0; time < timeMax; time++) {
- for (Int_t col = 0; col < colMax; col++) {
- for (Int_t row = 0; row < rowMax; row++) {
-
- Digit = DigitsManager->GetDigit(row,col,time,iDet);
- track = DigitsManager->GetTrack(0,row,col,time,iDet);
-
- TRDmatrix->SetSignal(row,col,time,Digit->GetAmp());
-
- delete Digit;
-
- }
- }
- }
-
- // Display the detector matrix
- TRDmatrix->Draw();
- //TRDmatrix->DrawRow(18);
- //TRDmatrix->DrawCol(58);
- //TRDmatrix->DrawTime(20);
- TRDmatrix->ProjRow();
- TRDmatrix->ProjCol();
- TRDmatrix->ProjTime();
-
-}
+++ /dev/null
-void slowDigitsCreate() {
-
-/////////////////////////////////////////////////////////////////////////
-//
-// Creates the digits from the hit information.
-//
-/////////////////////////////////////////////////////////////////////////
-
- // Dynamically link some shared libs
- if (gClassTable->GetID("AliRun") < 0) {
- gROOT->LoadMacro("loadlibs.C");
- loadlibs();
- cout << "Loaded shared libraries" << endl;
- }
-
- // Input (and output) file name
- Char_t *alifile = "galice.root";
-
- // Create the TRD digitzer
- AliTRDdigitizer *Digitizer = new AliTRDdigitizer("digitizer","Digitizer class");
-
- // Open the AliRoot file
- Digitizer->Open(alifile);
-
- // Set the parameter
- Digitizer->SetDiffusion(0);
- Digitizer->SetVerbose(1);
- //Digitizer->SetTimeResponse(0);
- //Digitizer->SetExB();
- //Digitizer->SetElAttach();
- //Digitizer->SetAttachProb();
-
- // Create the digits
- Digitizer->MakeDigits();
-
- // Write the digits into the input file
- Digitizer->WriteDigits();
-
- // Save the digitizer class in the AliROOT file
- Digitizer->Write();
-
-}