ROOT logo
// $Id$
/*
 * @file mcSeeds.C
 * @brief Calculating AliTPCseed objects for estimating dEdx.
 *
 * Example macro to run the HLT tracker embedded into
 * AliRoot simulation. The reconstruction is done from the TPC digits.
 * The seed making process carries the MC label information for comparison
 * of the HLT seeds with the offline ones.
 *
 * Usage: aliroot -b -q mcSeeds.C | tee seeds.log
 *
 * The macro assumes the data to be already simulated. If it should run
 * within the initial simulation, comment the corresponding functions
 * below (SetRunGeneration etc.)
 *
 * @author Kalliopi.Kanaki@ift.uib.no
 * @ingroup alihlt_tpc
 */

void mcSeeds(){
   
  ///////////////////////////////////////////////////////////////////////////////////////////////////
  //
  // init the HLT system in order to define the analysis chain below
  //

  AliHLTSystem *gHLT = AliHLTPluginBase::GetInstance();

  // load TPCParam from OCDB
  AliCDBManager* pMan=AliCDBManager::Instance();
  if (pMan) {
    if (!pMan->IsDefaultStorageSet()) {
      pMan->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
      pMan->SetRun(0);
    }
  }
  
  gSystem->Load("libANALYSIS");
  gSystem->Load("libTPCcalib");
 
  TString seedMakerInput;
  if(seedMakerInput.Length()>0) seedMakerInput+=" ";
  seedMakerInput+="TPC-clusters TPC-globalmerger TPC-mcTrackMarker";

  AliHLTConfiguration seedconf("seeds", "TPCCalibSeedMaker", seedMakerInput.Data(), "");
  //AliHLTConfiguration dedxconf("dedx", "TPCdEdx", seedMakerInput.Data(), "");

  AliHLTConfiguration rfwconf("rfw", "ROOTFileWriter", "seeds", "-datafile hlt_seeds -idfmt=_%d");
  //AliHLTConfiguration rfwconf("rfw", "ROOTFileWriter", "seeds", "-datafile dedx.root -concatenate-events -overwrite");
  
  

  ///////////////////////////////////////////////////////////////////////////////////////////////////
  ///////////////////////////////////////////////////////////////////////////////////////////////////
  //
  // Init and run the HLT simulation
  // All but HLT simulation is switched off
  //
  AliSimulation sim;

  // switch off simulation and data generation
  // comment all that stuff to also simulate the events and data
  sim.SetRunGeneration(kFALSE);
  sim.SetMakeDigits("");
  sim.SetMakeSDigits("");
  sim.SetMakeDigitsFromHits("");
  //sim.SetMakeTrigger("");
  sim.SetRunQA(":");

  // the normal simulation sets the specific storage for the GRP entry
  if (gSystem->AccessPathName("GRP/GRP/Data")) {
    cerr << "*********************************************************" << endl;
    cerr << "error: no GRP entry found in the currect directory, simulation might be incomplete. Skip setting specific storage for GRP entry" << endl;
    cerr << "*********************************************************" << endl << endl;
  } else {
    sim.SetSpecificStorage("GRP/GRP/Data",  Form("local://%s",gSystem->pwd()));
  }

  // set the options for the HLT simulation
  sim.SetRunHLT("libAliHLTUtil.so libAliHLTTPC.so libAliHLTGlobal.so libAliHLTTPCCalibration.so loglevel=0x7c chains=rfw");
  sim.Run();

}



 mcSeeds.C:1
 mcSeeds.C:2
 mcSeeds.C:3
 mcSeeds.C:4
 mcSeeds.C:5
 mcSeeds.C:6
 mcSeeds.C:7
 mcSeeds.C:8
 mcSeeds.C:9
 mcSeeds.C:10
 mcSeeds.C:11
 mcSeeds.C:12
 mcSeeds.C:13
 mcSeeds.C:14
 mcSeeds.C:15
 mcSeeds.C:16
 mcSeeds.C:17
 mcSeeds.C:18
 mcSeeds.C:19
 mcSeeds.C:20
 mcSeeds.C:21
 mcSeeds.C:22
 mcSeeds.C:23
 mcSeeds.C:24
 mcSeeds.C:25
 mcSeeds.C:26
 mcSeeds.C:27
 mcSeeds.C:28
 mcSeeds.C:29
 mcSeeds.C:30
 mcSeeds.C:31
 mcSeeds.C:32
 mcSeeds.C:33
 mcSeeds.C:34
 mcSeeds.C:35
 mcSeeds.C:36
 mcSeeds.C:37
 mcSeeds.C:38
 mcSeeds.C:39
 mcSeeds.C:40
 mcSeeds.C:41
 mcSeeds.C:42
 mcSeeds.C:43
 mcSeeds.C:44
 mcSeeds.C:45
 mcSeeds.C:46
 mcSeeds.C:47
 mcSeeds.C:48
 mcSeeds.C:49
 mcSeeds.C:50
 mcSeeds.C:51
 mcSeeds.C:52
 mcSeeds.C:53
 mcSeeds.C:54
 mcSeeds.C:55
 mcSeeds.C:56
 mcSeeds.C:57
 mcSeeds.C:58
 mcSeeds.C:59
 mcSeeds.C:60
 mcSeeds.C:61
 mcSeeds.C:62
 mcSeeds.C:63
 mcSeeds.C:64
 mcSeeds.C:65
 mcSeeds.C:66
 mcSeeds.C:67
 mcSeeds.C:68
 mcSeeds.C:69
 mcSeeds.C:70
 mcSeeds.C:71
 mcSeeds.C:72
 mcSeeds.C:73
 mcSeeds.C:74
 mcSeeds.C:75
 mcSeeds.C:76
 mcSeeds.C:77
 mcSeeds.C:78
 mcSeeds.C:79
 mcSeeds.C:80
 mcSeeds.C:81
 mcSeeds.C:82
 mcSeeds.C:83
 mcSeeds.C:84
 mcSeeds.C:85
 mcSeeds.C:86
 mcSeeds.C:87
 mcSeeds.C:88