o improve
authorwiechula <wiechula@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 19 Jul 2013 11:35:50 +0000 (11:35 +0000)
committerwiechula <wiechula@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 19 Jul 2013 11:35:50 +0000 (11:35 +0000)
TPC/Upgrade/macros/runSimRec.C

index 42bd54b..1ff502b 100644 (file)
@@ -2,8 +2,11 @@ void runSimRec(Int_t simtype, Int_t SCtype, Int_t nevents, Int_t ntracks, Int_t
 {
   //rate is in kHz
 
-  Int_t recoType=simtype/100;
-  simtype%=100;
+  Int_t recoType=simtype/10;
+  recoType%=10;
+  Int_t subRecoType=simtype/100;
+  simtype%=10;
+  
   //simulation part
   AliToyMCEventGeneratorSimple s;
 
@@ -14,6 +17,9 @@ void runSimRec(Int_t simtype, Int_t SCtype, Int_t nevents, Int_t ntracks, Int_t
     case 0:
       outputFile.Append(Form("_fixed_%dkHz",rate));
       break;
+    case 1:
+      outputFile.Append(Form("_train_%dkHz",rate));
+      break;
   }
   
   switch (SCtype) {
@@ -51,30 +57,30 @@ void runSimRec(Int_t simtype, Int_t SCtype, Int_t nevents, Int_t ntracks, Int_t
 
   if (recoType==0){
     rec.SetRecoSettings(1,0,AliToyMCReconstruction::kNoCorrection);
-    rec.RunReco(outputFile.Data());
+    if (!subRecoType||subRecoType==1) rec.RunReco(outputFile.Data());
 
     rec.SetRecoSettings(1,1,AliToyMCReconstruction::kIdeal);
-    rec.RunReco(outputFile.Data());
+    if (!subRecoType||subRecoType==2) rec.RunReco(outputFile.Data());
 
     rec.SetRecoSettings(0,1,AliToyMCReconstruction::kIdeal);
-    rec.RunReco(outputFile.Data());
+    if (!subRecoType||subRecoType==3) rec.RunReco(outputFile.Data());
 
     rec.SetRecoSettings(0,1,AliToyMCReconstruction::kAverageEta);
-    rec.RunReco(outputFile.Data());
+    if (!subRecoType||subRecoType==4) rec.RunReco(outputFile.Data());
 
     rec.SetRecoSettings(0,1,AliToyMCReconstruction::kNoCorrection);
-    rec.RunReco(outputFile.Data());
+    if (!subRecoType||subRecoType==5) rec.RunReco(outputFile.Data());
 
     rec.SetRecoSettings(0,0,AliToyMCReconstruction::kNoCorrection);
-    rec.RunReco(outputFile.Data());
+    if (!subRecoType||subRecoType==6) rec.RunReco(outputFile.Data());
   }
 
   if (recoType==1) {
     rec.SetRecoSettings(0,1,AliToyMCReconstruction::kNoCorrection);
-    rec.RunFullTracking(outputFile.Data());
+    if (!subRecoType||subRecoType==1) rec.RunFullTracking(outputFile.Data());
     
     rec.SetRecoSettings(0,0,AliToyMCReconstruction::kNoCorrection);
-    rec.RunFullTracking(outputFile.Data());
+    if (!subRecoType||subRecoType==2) rec.RunFullTracking(outputFile.Data());
   }
   
 }