]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/TRD/macros/rec-hlt-trd.cxx
updating macros (Theo)
[u/mrichter/AliRoot.git] / HLT / TRD / macros / rec-hlt-trd.cxx
index 1641458e2644266e375bc050d2c11aef9dc680eb..f6cd90edcfe98d22e97e149295bd37107b610ed3 100644 (file)
@@ -1,4 +1,4 @@
-// This macro is used to simulate the HLT reconstruction
+// This macro is used to simulate the HLT::TRD reconstruction
 // usage: aliroot rec-hlt-trd.cxx("/data/run/raw.root")    reconstruct local raw root file (you might add "alien://" to reconstruct remotely)
 //    or: aliroot rec-hlt-trd.cxx("/data/run/")            reconstruct local raw ddls *1
 //    or copy into folder and aliroot rec-hlt-trd.cxx      reconstruct raw.root in pwd
@@ -36,6 +36,7 @@
 #include "AliExternalTrackParam.h"
 #endif
 
+#include "readCDBentry.h"
 
 int rec_hlt_trd(const TString input ="raw.root", TString outPath=gSystem->pwd());
 Int_t ExtractRunNumber(const TString str);
@@ -55,7 +56,7 @@ int rec_hlt_trd(const TString filename, TString outPath)
   //
   
   // What chains should be run? (usually would be: TRD-OffEsdFile)
-  TString chains="TRD-CalibFile";
+  TString chains="TRD-OffEsdFile";
 
   // cosmics or not
   Bool_t bCosmics=kFALSE;
@@ -69,15 +70,15 @@ int rec_hlt_trd(const TString filename, TString outPath)
   // If not use these SMs:
   Int_t TRDmodules[18] = {0,1,7,8,9,10,17,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1};
 
-  // Use custom arguments for components? i.e.: not reading OCDB arguments
-  Bool_t customArgs=kTRUE;
+  // Use custom arguments for components?
+  Bool_t customArgs=kFALSE;
 
   // Disable HLT flag?
   Bool_t disableHLTflag=kFALSE;
 
   ///////////////////////////////////////////////////////////////////////////////////////////////////
   //
-  // init the HLT system
+  // set paths
   //
   TString dataPath = outPath;
   dataPath.Resize(dataPath.Last('/')+1);
@@ -123,6 +124,10 @@ int rec_hlt_trd(const TString filename, TString outPath)
   gSystem->mkdir(outPath.Data());
   gSystem->ChangeDirectory(outPath.Data());
 
+  ///////////////////////////////////////////////////////////////////////////////////////////////////
+  //
+  // init the HLT system
+  //
   AliHLTSystem* gHLT=AliHLTPluginBase::GetInstance();
   
   Int_t usedModules=0;
@@ -153,9 +158,11 @@ int rec_hlt_trd(const TString filename, TString outPath)
       // Clusterizer
       arg = "";
       if(customArgs || disableHLTflag){
-       arg="output_percentage 700 -lowflux -experiment -tailcancellation -faststreamer -yPosMethod LUT";
+       arg = readCDBentry("HLT/ConfigTRD/ClusterizerComponent"); //output_percentage 100 -lowflux -experiment -tailcancellation -faststreamer -yPosMethod LUT
+       if(customArgs)
+         arg += "";
        if(disableHLTflag)
-         arg+=" -HLTflag no";
+         arg += " -HLTflag no";
       }
 
       cf.Form("TRD-CF_%02d", TRDmodules[module]);
@@ -167,9 +174,11 @@ int rec_hlt_trd(const TString filename, TString outPath)
       // Tracker
       arg="";
       if(customArgs || disableHLTflag){
-       arg="output_percentage 100 -lowflux -PIDmethod NN";
+       arg = readCDBentry("HLT/ConfigTRD/TrackerV1Component"); //"output_percentage 100 -lowflux -NTimeBins 24";
+       if(customArgs)
+         arg += "";
        if(disableHLTflag)
-         arg+=" -HLTflag no";
+         arg += " -HLTflag no";
       }
 
       tr.Form("TRD-TR_%02d", TRDmodules[module]);
@@ -179,12 +188,11 @@ int rec_hlt_trd(const TString filename, TString outPath)
       afterTr+=tr;
 
       // Offline Tracker (for debug purposes only)
-      arg="";
-      if(customArgs || disableHLTflag){
-       arg="output_percentage 100 -lowflux -PIDmethod NN -highLevelOutput yes -emulateHLTTracks yes";
-       if(disableHLTflag)
-         arg+=" -HLTflag no";
-      }
+      arg = readCDBentry("HLT/ConfigTRD/TrackerV1Component"); //"output_percentage 100 -lowflux -NTimeBins 24";
+      if(customArgs)
+       arg += " -highLevelOutput yes -emulateHLToutput no";
+      if(disableHLTflag)
+       arg+=" -HLTflag no";
 
       trOff.Form("TRD-TROFF_%02d", TRDmodules[module]);
       AliHLTConfiguration trOffConf(trOff.Data(), "TRDOfflineTrackerV1", cf.Data(), arg.Data());
@@ -211,22 +219,24 @@ int rec_hlt_trd(const TString filename, TString outPath)
   // root file writer (with esd friends) (you may use tr or trOff here)
   AliHLTConfiguration writerOffConf("TRD-OffEsdFile", "TRDEsdWriter", afterTr.Data(), "-concatenate-events -concatenate-blocks");
 
-
   ///////////////////////////////////////////////////////////////////////////////////////////////////
   //
   // Init CDBManager and trigger
   //
   AliCDBManager * man = AliCDBManager::Instance();
-  Int_t run = ExtractRunNumber(filename);
+  Int_t run = 0;
   if(bRealData){
     man->SetDefaultStorage("alien://folder=/alice/data/2009/OCDB");
+    //man->SetDefaultStorage("alien://folder=/alice/data/2009/OCDB?cacheFold=/lustre/alice/local/alice/data/2009/OCDB"); 
+    //man->SetSpecificStorage("GRP/GRP/Data","alien://folder=/alice/data/2009/OCDB?cacheFold=/lustre/alice/local/alice/data/2009/OCDB");
+    run = ExtractRunNumber(filename);
   }else{
     man->SetDefaultStorage("local://$ALICE_ROOT/OCDB"); 
     man->SetSpecificStorage("GRP/GRP/Data", Form("local://%s",dataPath.Data()));
     //rec.SetSpecificStorage("GRP/GRP/Data", Form("local://%s",gSystem->pwd()));
   }
   man->SetRun(run);
-  
+
   if(bCosmics){
     // no magnetic field
     AliExternalTrackParam::SetMostProbablePt(8.);
@@ -246,10 +256,17 @@ int rec_hlt_trd(const TString filename, TString outPath)
       AliTriggerCluster * trg_clust = (AliTriggerCluster *)trg_class->GetCluster();
       
       printf("ioj[%d]\n", iobj); trg_class->Print(0x0);
-      
-      if(TString(trg_class->GetName()).Contains("TRD")){ // cosmic run 2009
-       triggerconfs.push_back(trg_class->GetMask());
+
+      // cosmic run 2009                                                                                                                                                                                       
+      // if(TString(trg_class->GetName()).Contains("TRD")){                                                                                                                                                    
+      //        triggerconfs.push_back(trg_class->GetMask());                                                                                                                                                  
+      // }                                                                                                                                                                                                     
+
+      // pp run 2009                                                                                                                                                                                           
+      if(TString(trg_class->GetName()).Contains("CINT1B-ABCE-NOPF-ALL")){
+        triggerconfs.push_back(trg_class->GetMask());
       }
+
     }
     
     Int_t itrg = 0;
@@ -268,7 +285,7 @@ int rec_hlt_trd(const TString filename, TString outPath)
 
   ///////////////////////////////////////////////////////////////////////////////////////////////////
   //
-  // Init and run the reconstruction
+  // init and run the reconstruction
   //
   AliReconstruction rec;
   rec.SetInput(filestring.Data());