]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Corrected scaling and merging for PYTHIA analyses
authorkread <kread@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 20 Oct 2009 17:11:03 +0000 (17:11 +0000)
committerkread <kread@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 20 Oct 2009 17:11:03 +0000 (17:11 +0000)
PWG4/macros/electrons/MergeFileInBins.C
PWG4/macros/electrons/anaJete.C
PWG4/macros/electrons/mylauncher.C
PWG4/macros/electrons/mymerger.C

index 8190bd27135cae66393a114b031580a4695556f7..eb0afadebfb923c87b06e5b1ee4413c31ec59e18 100755 (executable)
@@ -23,7 +23,7 @@ void MergeFileInBins()
   TFile * sfile;\r
   TList* list;\r
   TList* newlist;\r
-  TString binlist = "0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15";\r
+  TString binlist = "00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16";\r
 \r
   if (binlist.Length()) {\r
     arr = binlist.Tokenize(" ");\r
index cc843c9e9516f5704bc9627a4f771515dcb84ef7..220ace96c5b098bb341735b758642a695587e589 100755 (executable)
@@ -657,8 +657,10 @@ void GetXsection(Int_t nEventsPerFile, TString filexs)
       continue;\r
     }          \r
     xsection += hxs->GetBinContent(1);\r
-    ntrials  += htrial->GetBinContent(1)/htrial->GetEntries()/nEventsPerFile;\r
-    cout << "Chain: xsection " <<hxs->GetBinContent(1)<<" ntrials "<<htrial->GetBinContent(1)/htrial->GetEntries()<<endl; \r
+    ntrials  += htrial->GetBinContent(1)/nEventsPerFile;\r
+    cout << "Chain: xsection " <<hxs->GetBinContent(1)<<" ntrials "<<htrial->GetBinContent(1)<<endl; \r
+    cout << "nEventsPerFile = " << nEventsPerFile <<endl;      \r
+    cout << "Accumulating ntrials/event = " << ntrials << endl;\r
   }\r
   else {\r
     Double_t xs = 0;\r
@@ -669,7 +671,9 @@ void GetXsection(Int_t nEventsPerFile, TString filexs)
     xstree->GetEntry(0);\r
     cout << "Chain: xsection " <<xs<<" ntrials "<<ntr<<endl;\r
     xsection += xs ;\r
-    ntrials += ntr/nEventsPerFile;     \r
+    ntrials += (float) ntr/nEventsPerFile;\r
+    cout << "Latest values read are ntr = " << ntr << " and nEventsPerFile = " << nEventsPerFile <<endl;       \r
+    cout << "Accumulating ntrials/event = " << ntrials <<endl;\r
   }  \r
 }\r
 \r
index 9eb2bcac30e375027ae8503674cebb678319ba20..9af1031cfc20706e51f32a47e75be1bfba32ac6e 100644 (file)
@@ -63,7 +63,7 @@ void mylauncher()
           while ((os=(TObjString*)next())) {
            TGridResult *res;
             Info("Find", "Making collection for %s", os->GetString().Data());
-            res = gGrid->Command(Form("find -x collection %s %s > mycollect%d.xml", os->GetString().Data(),datatype.Data(),count));
+            res = gGrid->Command(Form("find -x collection %s %s > mycollect%02d.xml", os->GetString().Data(),datatype.Data(),count));
             if(!res) Info("Find", "Failed making collection for %s \n",os->GetString().Data());
             delete res;
             count++;
@@ -99,8 +99,8 @@ void mylauncher()
          TGridResult *res;
           TString jobID = "";
           if(kMultiMode){
-            res = gGrid->Command(Form("submit %s %s %d", jdlfilename.Data(),worksubdir.Data(),index));
-            Info("Launcher:",     "Submitting %s %s %d", jdlfilename.Data(),worksubdir.Data(),index);
+            res = gGrid->Command(Form("submit %s %s %02d", jdlfilename.Data(),worksubdir.Data(),index));
+            Info("Launcher:",     "Submitting %s %s %02d", jdlfilename.Data(),worksubdir.Data(),index);
           }
           else{
             res = gGrid->Command(Form("submit %s", jdlfilename.Data()));
index fabf83d0e0158d02b4b0b327d337baaed5eb289a..3c3ded32ee936bb9dfc2b26bb2379c13584c9578 100644 (file)
@@ -35,8 +35,8 @@ void mymerger()
         for (Int_t index = 0; index <= maxbin; index++) {
          TGridResult *res;
           TString jobID = "";
-          res = gGrid->Command(Form("submit %s %s %d", jdlfilename.Data(),worksubdir.Data(),index));
-          Info("Launcher:",     "Submitting %s %s %d", jdlfilename.Data(),worksubdir.Data(),index);
+          res = gGrid->Command(Form("submit %s %s %02d", jdlfilename.Data(),worksubdir.Data(),index));
+          Info("Launcher:",     "Submitting %s %s %02d", jdlfilename.Data(),worksubdir.Data(),index);
           if (res) {
             const char *cjobId = res->GetKey(0,"jobId");
             if (!cjobId) {