]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Macros now work with one or more events in a file. Shell scripts are
authornilsen <nilsen@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 13 Oct 2001 01:27:59 +0000 (01:27 +0000)
committernilsen <nilsen@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 13 Oct 2001 01:27:59 +0000 (01:27 +0000)
accordingly modified.

ITS/AliITSHits2Digits.C
ITS/AliITSHits2DigitsDefault.C
ITS/AliITSHits2DigitsDubna.C
ITS/ITStestV1.sh
ITS/ITStestV1hbt.sh

index c440f8b6f86751887f2bcc3af2d7bac0dd74e63d..e4b89df56edc9e1f030fdce3402a300e2428a244 100644 (file)
@@ -1,4 +1,13 @@
 Int_t AliITSHits2Digits(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. 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) {
@@ -27,7 +36,6 @@ Int_t AliITSHits2Digits(const char *inFile = "galice.root"){
        return 2;
     } // end if !gAlice
 
-    gAlice->GetEvent(0);
     AliITS *ITS = (AliITS*)gAlice->GetDetector("ITS");      
     if (!ITS) {
        cerr<<"AliITSHits2Digits.C : AliITS object not found on file" 
@@ -97,22 +105,14 @@ Int_t AliITSHits2Digits(const char *inFile = "galice.root"){
     AliITSsimulationSSD *sim2 = new AliITSsimulationSSD(seg2,res2);
     ITS->SetSimulationModel(2,sim2);
 
-    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();
     cout << "Digitizing ITS..." << endl;
 
     TStopwatch timer;
     Long_t size0 = file->GetSize();
     timer.Start();
-    ITS->Hits2Digits();
+    gAlice->Hits2Digits("ITS");
     timer.Stop(); timer.Print();
 
-    delete gAlice;   gAlice=0;
     file->Close();
     Long_t size1 = file->GetSize();
     cout << "File size before = " << size0 << " file size after = " << size1;
index 4f42bfc4bd234390147ab805cd8504e775d68a08..d42c47a183ee533b36a6586d05ed1280e8df7000 100644 (file)
@@ -1,4 +1,13 @@
 Int_t AliITSHits2DigitsDefault(const char *inFile = "galice.root"){
+    ////////////////////////////////////////////////////////////////////
+    //      This macro will take hits from a galice.root file and 
+    // produce digits for the ITS using the standard detector 
+    // simulations. 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) {
@@ -27,7 +36,6 @@ Int_t AliITSHits2DigitsDefault(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,23 +45,14 @@ Int_t AliITSHits2DigitsDefault(const char *inFile = "galice.root"){
        cerr << " AliITSgeom not found. Can't digitize with out it." << endl;
        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();
     cout << "Digitizing ITS..." << endl;
 
     TStopwatch timer;
     Long_t size0 = file->GetSize();
     timer.Start();
-    ITS->Hits2Digits();
+    gAlice->Hits2Digits("ITS");
     timer.Stop(); timer.Print();
 
-    delete gAlice;   gAlice=0;
     file->Close();
     Long_t size1 = file->GetSize();
     cout << "File size before = " << size0 << " file size after = " << size1;
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;
index ad9e1835aabaaaa8b53c7976b8283f4f4e9fd21e..69418c06241a3bb5089b2669ef1ea7a0988ccd94 100755 (executable)
@@ -8,7 +8,7 @@ aliroot -q -b "$ALICE_ROOT/TPC/AliTPCHits2Digits.C($1)"
 # prepare TPC tracks for matching with the ITS
 aliroot -q -b "$ALICE_ROOT/ITS/TPCtracking.C($1)"
 # digitize ITS
-aliroot -q -b "$ALICE_ROOT/ITS/AliITSHitsToDigitsDefault.C(0,$[$1-1])"
+aliroot -q -b "$ALICE_ROOT/ITS/AliITSHits2DigitsDefault.C"
 # create reconstructed points for the ITS
 aliroot -q -b "$ALICE_ROOT/ITS/ITSDigitsToClusters.C(0,$[$1-1])"
 # prepare for tracking
index 36e9f5f824845ad8ebd05a4c217baab8cca7883c..6fd09af6eaa2e2d1a21ed631a1fa560c710a372c 100755 (executable)
@@ -8,7 +8,7 @@ aliroot -q -b "$ALICE_ROOT/TPC/AliTPCHits2Digits.C($1)"
 # prepare TPC tracks for matching with the ITS
 aliroot -q -b "$ALICE_ROOT/ITS/TPCtracking.C($1)"
 # digitize ITS
-aliroot -q -b "$ALICE_ROOT/ITS/AliITSHitsToDigitsDefault.C(0,$[$1-1])"
+aliroot -q -b "$ALICE_ROOT/ITS/AliITSHits2DigitsDefault.C"
 # create reconstructed points for the ITS
 aliroot -q -b "$ALICE_ROOT/ITS/ITSDigitsToClusters.C(0,$[$1-1])"
 # prepare for tracking