]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSHits2DigitsDubna.C
Typo in the calculation of procetile-target distance is corrected
[u/mrichter/AliRoot.git] / ITS / AliITSHits2DigitsDubna.C
index 491cebd25d82b81f3ce81d65d94469a6f5eb4e0c..a03ca1cb4bffa39b99ffeedc40491199fc421743 100644 (file)
@@ -1,4 +1,15 @@
 Int_t AliITSHits2DigitsDubna(const char *inFile = "galice.root"){
+    ////////////////////////////////////////////////////////////////////
+    //      This macro will take hits from a galice.root file and 
+    // produce digits for the ITS using the settings for the detector 
+    // simulations defined in this file. Specificaly it replaces the
+    // default SPD simulation with that of Dubna It will measure the 
+    // time required to do so and the increase in the galice.root file. 
+    // There is only one input, that of the name of the root file 
+    // containing the hits and to which the digits will be written to. 
+    // This macro will process all of the events on the root file.
+    ////////////////////////////////////////////////////////////////////
+
     // Dynamically link some shared libs
     if (gClassTable->GetID("AliRun") < 0) {
        gROOT->LoadMacro("loadlibs.C");
@@ -26,7 +37,6 @@ Int_t AliITSHits2DigitsDubna(const char *inFile = "galice.root"){
        return 2;
     } // end if !gAlice
 
-    gAlice->GetEvent(0);
     AliITS *ITS = (AliITS*)gAlice->GetDetector("ITS");      
     if (!ITS) {
        cerr<<"ITSHits2Digits.C : AliITS object not found on file" << endl;
@@ -37,14 +47,6 @@ Int_t AliITSHits2DigitsDubna(const char *inFile = "galice.root"){
        return 4;
     } // end if
 
-    if(!gAlice->TreeD()){ 
-       cout << "Having to create the Digits Tree." << endl;
-       gAlice->MakeTree("D");
-    } // end if !gAlice->TreeD()
-    //make branch
-    ITS->MakeBranch("D");
-    ITS->SetTreeAddress();
-
     // SPD
     cout << "Changing from Default SPD simulation, and responce." << endl;
     AliITSDetType *iDetType=ITS->DetType(0);
@@ -109,10 +111,9 @@ Int_t AliITSHits2DigitsDubna(const char *inFile = "galice.root"){
     TStopwatch timer;
     Long_t size0 = file->GetSize();
     timer.Start();
-    ITS->Hits2Digits();
+    gAlice->Hits2Digits();
     timer.Stop(); timer.Print();
 
-    delete gAlice;   gAlice=0;
     file->Close();
     Long_t size1 = file->GetSize();
     cout << "File size before = " << size0 << " file size after = " << size1;