Ejemplo n.º 1
0
Archivo: rec.C Proyecto: Gangbiao/cvmfs
void rec() {
  AliReconstruction reco;

  reco.SetWriteESDfriend();
  reco.SetWriteAlignmentData();

  reco.SetDefaultStorage(Form("local://%s/OCDB", gSystem->pwd()));
  reco.SetSpecificStorage("GRP/GRP/Data",
			  Form("local://%s",gSystem->pwd()));
  reco.SetRunPlaneEff(kTRUE);

  //reco.SetRunQA("ALL:ALL") ;
  
  reco.SetQARefDefaultStorage("local://$ALICE_ROOT/QAref") ;
  
  for (Int_t det = 0 ; det < AliQA::kNDET ; det++) {
    reco.SetQACycles((AliQAv1::DETECTORINDEX_t)det, 999) ;
    reco.SetQAWriteExpert((AliQAv1::DETECTORINDEX_t)det) ; 
  }
  
  TStopwatch timer;
  timer.Start();
  reco.Run();
  timer.Stop();
  timer.Print();
}
Ejemplo n.º 2
0
void Rec(TString file="raw.root")
{
  // Reconstruction of RAW data from the input file raw.root
  // Boris Polichtchouk, 13 Mar 2008

  //AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
  //AliCDBManager::Instance()->SetSpecificStorage("PHOS/*","local://BadMap");

  AliReconstruction rec ;
  rec.SetRunTracking("") ;
  rec.SetRunVertexFinder(kFALSE) ; 
  rec.SetRunLocalReconstruction("PHOS") ;
  rec.SetFillESD("PHOS") ;

  //Set rec. parameters different from the default ones.
  AliPHOSRecoParam* recEmc = new AliPHOSRecoParamEmc();
  recEmc->SetSubtractPedestals(kTRUE);
  recEmc->SetMinE(0.01);                     //Minimal Digit energy
  recEmc->SetClusteringThreshold(0.02);      //Minimal cluster seed energy
  recEmc->SetDecoderVersion("v1");           //Comment out to choose Max-Ped version
  recEmc->SetOldRCUFormat(kTRUE);

  AliPHOSReconstructor::SetRecoParamEmc(recEmc);

  rec.SetInput(file.Data());  // read RAW data
  rec.SetNumberOfEventsPerFile(5000);	
  rec.Run();


}
Ejemplo n.º 3
0
void rec() {
	//  AliLog::SetGlobalDebugLevel(10);
	AliCDBManager * man = AliCDBManager::Instance();
	man->SetDefaultStorage("alien://Folder=/alice/simulation/2008/v4-10-Release/Residual/");
	man->SetSpecificStorage("EMCAL/*","local://DB");
	
	AliReconstruction reco;
	AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 2, 1., 10., AliMagFMaps::k5kG);
	AliTracker::SetFieldMap(field,kTRUE);
	reco.SetUniformFieldTracking(kFALSE);
	reco.SetWriteESDfriend();
	reco.SetWriteAlignmentData();
  
	AliTPCRecoParam * tpcRecoParam = AliTPCRecoParam::GetLowFluxParam();
	AliTPCReconstructor::SetRecoParam(tpcRecoParam);
	AliTPCReconstructor::SetStreamLevel(0);
	reco.SetRunReconstruction("ITS TPC TRD TOF HMPID PHOS EMCAL MUON T0 VZERO FMD PMD ZDC");
	//reco.SetInput("raw.root") ;
	//AliPHOSRecoParam* recEmc = new AliPHOSRecoParamEmc();
//	recEmc->SetSubtractPedestals(kFALSE);
//	AliPHOSReconstructor::SetRecoParamEmc(recEmc);  
	reco.SetRunQA(kFALSE) ; 

	TStopwatch timer;
	timer.Start();
	reco.Run();
	timer.Stop();
	timer.Print();
}
Ejemplo n.º 4
0
void rec() {
  AliReconstruction reco;
  reco.SetUniformFieldTracking(kFALSE);
  reco.SetWriteESDfriend();
  reco.SetWriteAlignmentData();
  AliTPCRecoParam * tpcRecoParam = AliTPCRecoParam::GetLowFluxParam();
  AliTPCReconstructor::SetRecoParam(tpcRecoParam);
  AliTPCReconstructor::SetStreamLevel(1);
  //   reco.SetInput("raw.root");
  reco.SetRunReconstruction("ITS TPC TRD TOF HMPID PHOS EMCAL MUON VZERO T0 FMD PMD ZDC");
reco.SetDefaultStorage("alien://Folder=/alice/simulation/2008/v4-12-Release/Ideal/");
  reco.SetRunQA(kFALSE);
  reco.SetRunGlobalQA(kFALSE);

  TStopwatch timer;
  timer.Start();
  reco.Run();
  timer.Stop();
  timer.Print();
}
Ejemplo n.º 5
0
Archivo: rec.C Proyecto: ktf/AliPhysics
void rec() {

  AliReconstruction reco;

    reco.SetRunVertexFinder(kFALSE) ;
    reco.SetRunV0Finder(kFALSE) ;
    reco.SetRunMultFinder(kFALSE) ;

   AliQAManager::QAManager(AliQAv1::kSIMMODE) ;


  reco.SetCDBSnapshotMode("Sim/OCDBrec.root");
  reco.SetRunReconstruction("PHOS") ;
  reco.SetRunQA(":") ;
  reco.SetRunGlobalQA(kFALSE) ;

  TStopwatch timer;
  timer.Start();
  reco.Run();
  timer.Stop();
  timer.Print();
}
Ejemplo n.º 6
0
Archivo: rec.C Proyecto: ktf/AliRoot
void rec() {
  AliReconstruction reco;

  reco.SetWriteESDfriend();
  reco.SetWriteAlignmentData();

  reco.SetDefaultStorage("local://$ALICE_ROOT/OCDB");
  reco.SetSpecificStorage("GRP/GRP/Data",
			  Form("local://%s",gSystem->pwd()));
  reco.SetRunPlaneEff(kTRUE);

  reco.SetFractionFriends(1.);

  TStopwatch timer;
  timer.Start();
  reco.Run();
  timer.Stop();
  timer.Print();
}
Ejemplo n.º 7
0
void rec() {
  AliReconstruction reco;
  reco.SetUniformFieldTracking(kFALSE);
  reco.SetWriteESDfriend(kFALSE);
  reco.SetWriteAlignmentData(kFALSE);
  AliTPCRecoParam * tpcRecoParam = AliTPCRecoParam::GetHighFluxParam();
  AliTPCReconstructor::SetRecoParam(tpcRecoParam);
  AliTPCReconstructor::SetStreamLevel(0);
  reco.SetRunReconstruction("ITS TPC TRD TOF PHOS HMPID EMCAL MUON FMD ZDC T0 VZERO");

  reco.SetDefaultStorage("alien://Folder=/alice/simulation/2007/PDC07_1/Ideal/CDB/");

  AliCDBManager::Instance()->SetSpecificStorage("EMCAL/*","local://DBpp");

  TStopwatch timer;
  timer.Start();
  reco.Run();
  timer.Stop();
  timer.Print();
}
Ejemplo n.º 8
0
void rec() {

  AliReconstruction reco;
  reco.SetWriteESDfriend();
  reco.SetWriteAlignmentData();

  reco.SetDefaultStorage("alien://Folder=/alice/simulation/2008/v4-15-Release/Ideal/?cacheFold=/tmp/CDBCache?operateDisconnected=kFALSE");

  // No write access to the OCDB => specific storage
  reco.SetSpecificStorage("GRP/GRP/Data",
			  Form("local://%s",gSystem->pwd()));

  reco.SetRunQA("ALL:ALL");

  TStopwatch timer;
  timer.Start();
  reco.Run();
  timer.Stop();
  timer.Print();
}
Ejemplo n.º 9
0
Archivo: rec.C Proyecto: ktf/AliRoot
void rec() {
  if (!strcmp(gSystem->GetBuildArch(),"win32gcc")) {
    gSystem->Load("libProof");
    gSystem->Load("libGui");
    gROOT->Macro("loadlibsrec.C");
    new AliRun("gAlice","The ALICE Off-line Simulation Framework");
  }
  AliReconstruction reco;

  reco.SetWriteESDfriend();
  reco.SetWriteAlignmentData();

  reco.SetDefaultStorage("local://$ALICE_ROOT/OCDB");
  reco.SetSpecificStorage("GRP/GRP/Data",
			  Form("local://%s",gSystem->pwd()));
  reco.SetRunPlaneEff(kTRUE);

  TStopwatch timer;
  timer.Start();
  reco.Run();
  timer.Stop();
  timer.Print();
}
Ejemplo n.º 10
0
void AliPMDRec()
{
  // This macro for the full reconstruction chain. Only PMD is ON.
  //
  AliCDBManager * man = AliCDBManager::Instance();
  man->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
  man->SetRun(0);


  Int_t firstEvent = 0;
  Int_t lastEvent = 1;

  AliReconstruction rec;
  rec.SetRunReconstruction("PMD");
  rec.SetRunVertexFinder(kFALSE);
  rec.SetFillESD("PMD");
  rec.SetFillTriggerESD(kFALSE);

  //  rec.Run("./");
  //  rec.Run("raw.date");
  rec.Run("raw_6b_61.root",firstEvent,lastEvent);

}
Ejemplo n.º 11
0
void trackhisto(const char *filename, const char *cdbURI, int minEvent=-1, int maxEvent=-1, Bool_t bTracklets=kFALSE){

  if(!gSystem->AccessPathName("galice.root")){
    cerr << "Remove galice.root or run in a different folder." << endl;
    return;
  }

  if (!filename) {
    cerr << "please specify input or run without arguments" << endl;
    return;
  }
  

  ////////////////////////////////////////////////////////////////////
  //
  // init the HLT system in order to define the analysis chain below
  //
  ////////////////////////////////////////////////////////////////////
 
  
  AliHLTSystem *gHLT = AliHLTPluginBase::GetInstance();
 
  int iMinSlice =  0;
  int iMaxSlice = 35;
  int iMinPart  =  0;
  int iMaxPart  =  5;
  
  TString tracklets;
  
  for(int slice=iMinSlice; slice<=iMaxSlice; slice++){
      
      TString trackerInput;      
      for(int part=iMinPart; part<=iMaxPart; part++){
          
	  TString arg, publisher, cf;
          
          // raw data publisher components
          int ddlno=768;
          if (part>1) ddlno+=72+4*slice+(part-2);
          else ddlno+=2*slice+part;
      
          arg.Form("-minid %d -datatype 'DDL_RAW ' 'TPC '  -dataspec 0x%02x%02x%02x%02x -verbose", ddlno, slice, slice, part, part);
          publisher.Form("DP_%02d_%d", slice, part);
          AliHLTConfiguration pubconf(publisher.Data(), "AliRawReaderPublisher", NULL , arg.Data());

          // cluster finder components
          cf.Form("CF_%02d_%d", slice, part);
          AliHLTConfiguration cfconf(cf.Data(), "TPCClusterFinder32Bit", publisher.Data(), "");
     
          if (trackerInput.Length()>0) trackerInput+=" ";
          trackerInput+=cf;     
    }
    
    TString tracker, converted_tracklet;
    // tracker components
    tracker.Form("TR_%02d", slice);
    converted_tracklet.Form("CONVTR_%02d", slice);
    AliHLTConfiguration trackerconf(tracker.Data(), "TPCCATracker", trackerInput.Data(), "");
    AliHLTConfiguration convertedconf(converted_tracklet.Data(), "TPCCATrackerOutputConverter", tracker.Data(), "");    
       
    if (tracklets.Length()>0) tracklets+=" ";
    tracklets+=converted_tracklet;
  }
   
  TString histoInput;
   
  if(bTracklets==kTRUE){
     if(histoInput.Length()>0) 
     histoInput+=" ";
     histoInput+=tracklets;
     
     AliHLTConfiguration tracklethiconf("tracklethi", "TPCTrackHisto", histoInput.Data(), "");
     AliHLTConfiguration trackletrwfconf("trackletrfw", "ROOTFileWriter", "tracklethi", "-datafile TrackletHisto -concatenate-events -overwrite");
  }
  else {
     if(histoInput.Length()>0) 
     histoInput+=" ";
     histoInput+="TPC-clusters";
     histoInput+=" ";
     histoInput+="TPC-globalmerger";
  
     AliHLTConfiguration trhiconf("trhi", "TPCTrackHisto", histoInput.Data(), "");
     AliHLTConfiguration rwfconf("rfw", "ROOTFileWriter", "trhi", "-datafile TrackHisto -concatenate-events -overwrite");
  }


  AliReconstruction rec;

  rec.SetRunQA(":");
  rec.SetInput(filename);
  
  // connect to the GRID if we use a file or OCDB from the GRID
  TString struri  = cdbURI;
  TString strfile = filename;
  if(struri.BeginsWith("raw://") ||  strfile.Contains("://") && !strfile.Contains("local://")){
     TGrid::Connect("alien");
  }
  
  AliCDBManager *man = AliCDBManager::Instance();
  man->SetDefaultStorage(cdbURI);

  if(struri.BeginsWith("local://")) {
     // set specific storage for GRP entry
     // search in the working directory and one level above, the latter
     // follows the standard simulation setup like e.g. in test/ppbench
     if(!gSystem->AccessPathName("GRP/GRP/Data")) {
       man->SetSpecificStorage("GRP/GRP/Data", "local://$PWD");
     } 
     else if (!gSystem->AccessPathName("../GRP/GRP/Data")) {
          man->SetSpecificStorage("GRP/GRP/Data", "local://$PWD/..");
     }
  }

  if(minEvent>=0 || maxEvent>minEvent){
     if(minEvent<0) minEvent=0;
     if(maxEvent<minEvent) maxEvent=minEvent;
     rec.SetEventRange(minEvent,maxEvent);
  }
 
  rec.SetRunVertexFinder(kFALSE);
  rec.SetRunReconstruction("HLT"); 
 
  if(bTracklets==kTRUE){
     rec.SetOption("HLT", "loglevel=0x7c chains=trackletrfw");
  }
  else {
     rec.SetOption("HLT", "loglevel=0x7c chains=rfw");
  }

  rec.Run();

}
Ejemplo n.º 12
0
void rec() {

  AliReconstruction MuonRec;

  MuonRec.SetInput("raw.root");
  MuonRec.SetRunLocalReconstruction("MUON ITS VZERO");
  MuonRec.SetRunTracking("MUON ITS VZERO");
  MuonRec.SetRunVertexFinder(kTRUE);
  MuonRec.SetFillESD("MUON VZERO HLT");
  MuonRec.SetRunQA("MUON:ALL");
  
  MuonRec.SetDefaultStorage("alien://Folder=/alice/simulation/2008/v4-15-Release/Ideal/");

  // QA reference
  MuonRec.SetQARefDefaultStorage("local://$ALICE_ROOT/QAref") ;

  // GRP
  MuonRec.SetSpecificStorage("GRP/GRP/Data",Form("local://%s",gSystem->pwd()));
  
  // HLT
  MuonRec.SetSpecificStorage("HLT/ConfigMUON/DecisionComponent","alien://Folder=/alice/cern.ch/user/b/bogdan/prod2009/cdb");
  MuonRec.SetSpecificStorage("HLT/ConfigMUON/HitReconstructor","alien://Folder=/alice/cern.ch/user/b/bogdan/prod2009/cdb");
  MuonRec.SetSpecificStorage("HLT/ConfigMUON/MansoTrackerFSM","alien://Folder=/alice/cern.ch/user/b/bogdan/prod2009/cdb");
  MuonRec.SetSpecificStorage("HLT/ConfigMUON/TriggerReconstructor","alien://Folder=/alice/cern.ch/user/b/bogdan/prod2009/cdb");
  
  // CTP
  MuonRec.SetSpecificStorage("GRP/CTP/Config","alien://Folder=/alice/cern.ch/user/b/bogdan/prod2009/cdb");
  
  // alignment
  MuonRec.SetSpecificStorage("MUON/Align/Data","alien://Folder=/alice/cern.ch/user/b/bogdan/prod2009/cdb/ideal");
  
  // reconstruction parameters
  AliMUONRecoParam *muonRecoParam = AliMUONRecoParam::GetLowFluxParam();
  muonRecoParam->SaveFullClusterInESD(kTRUE,100.);
  //muonRecoParam->Print("FULL");
  MuonRec.SetRecoParam("MUON",muonRecoParam);

  MuonRec.SetNumberOfEventsPerFile(500);

  TStopwatch timer;
  timer.Start();
  MuonRec.Run();
  timer.Stop();
  timer.Print();
  
}
Ejemplo n.º 13
0
void rec() {
 
	AliReconstruction reco;
	reco.SetWriteESDfriend();
	reco.SetWriteAlignmentData();

	reco.SetRecoParam("ITS",AliITSRecoParam::GetLowFluxParam());
	reco.SetRecoParam("TPC",AliTPCRecoParam::GetLowFluxParam());
	reco.SetRecoParam("TRD",AliTRDrecoParam::GetLowFluxParam());
	reco.SetRecoParam("PHOS",AliPHOSRecoParam::GetDefaultParameters());
	reco.SetRecoParam("MUON",AliMUONRecoParam::GetLowFluxParam());
 	reco.SetRecoParam("EMCAL",AliEMCALRecParam::GetLowFluxParam());
 
	reco.SetDefaultStorage("alien://Folder=/alice/simulation/2008/v4-15-Release/Ideal/?cacheFold=/tmp/CDBCache?operateDisconnected=kFALSE");
 
        reco.SetSpecificStorage("GRP/GRP/Data",
                          Form("local://%s",gSystem->pwd()));

	// add TRD standalone tracks
	reco.SetOption("TRD", "sl_tr_1");

	reco.SetRunGlobalQA(kTRUE);

	TStopwatch timer;
	timer.Start();
	reco.Run();
	timer.Stop();
	timer.Print();
}
Ejemplo n.º 14
0
/*
 * Example macro to run the HLT vertexer embedded
 * into AliRoot reconstruction. The reconstruction is done from the raw data.
 *
 * Usage:
 * <pre>
 *   aliroot -b -q rec-vertexer.C | tee rec-vertexer.log
 * </pre>
 *
 * The chain to be run is defined by the macro given to the parameter
 * 'config='
 *
 * The macro asumes raw data to be available in the rawx folders, either
 * simulated or real data. A different input can be specified as parameter
 * <pre>
 *   aliroot -b -q rec-vertexer.C'("input.root")'
 * </pre>
 *
 * AliHLTTPCDigitReader32Bit is used to read the data
 *
 * In the first section, an analysis chain is defined. The scale of the
 * chain can be defined by choosing the range of sectors and partitions.
 *
 * The reconstruction is steered by the AliReconstruction object in the
 * usual way.
 *
 * @ingroup alihlt_global
 * @author 
 */
void rec_vertexer(const char* input="./")
{
  
  if(!gSystem->AccessPathName("galice.root")){
    cerr << "please delete the galice.root or run at different place." << endl;
    return;
  }

  if (!input) {
    cerr << "please specify input or run without arguments" << endl;
    return;
  }

  ///////////////////////////////////////////////////////////////////////////////////////////////////
  //
  // init the HLT system in order to define the analysis chain below
  //
  AliHLTSystem* gHLT=AliHLTPluginBase::GetInstance();
 
  TString option="libAliHLTUtil.so libAliHLTRCU.so libAliHLTTPC.so libAliHLTGlobal.so loglevel=0x7c chains=";
  ///////////////////////////////////////////////////////////////////////////////////////////////////
  //
  // define the analysis chain to be run
  //
  int iMinSlice=0;
  int iMaxSlice=35;
  int iMinPart=0;
  int iMaxPart=5;
  TString writerInput;
  TString mergerInput;
  TString histoInput;
  TString histogramHandlerInputClusterFinder;
  TString cdumpInput;
  for (int slice=iMinSlice; slice<=iMaxSlice; slice++) {
    TString trackerInput;
    for (int part=iMinPart; part<=iMaxPart; part++) {
      TString arg, publisher, cf;
      TString clusterHistoOutput;
      // raw data publisher components
      int ddlno=768;
      if (part>1) ddlno+=72+4*slice+(part-2);
      else ddlno+=2*slice+part;
      arg.Form("-minid %d -datatype 'DDL_RAW ' 'TPC '  -dataspec 0x%02x%02x%02x%02x -verbose", ddlno, slice, slice, part, part);
      publisher.Form("DP_%02d_%d", slice, part);
      new AliHLTConfiguration(publisher.Data(), "AliRawReaderPublisher", NULL , arg.Data());

      // cluster finder components
      cf.Form("CF_%02d_%d", slice, part);
      new AliHLTConfiguration(cf.Data(), "TPCClusterFinder32Bit", publisher.Data(), "-solenoidBz -5");

      if (trackerInput.Length()>0) trackerInput+=" ";
      trackerInput+=cf;
      if (writerInput.Length()>0) writerInput+=" ";
      writerInput+=cf;
      if (histoInput.Length()>0) histoInput+=" ";
      histoInput+=cf;
      if (cdumpInput.Length()>0) cdumpInput+=" ";
      cdumpInput+=cf;
    }
    TString tracker;
    // tracker components
    tracker.Form("TR_%02d", slice);
    new AliHLTConfiguration(tracker.Data(), "TPCCATracker", trackerInput.Data(), "");

    if (writerInput.Length()>0) writerInput+=" ";
    writerInput+=tracker;
    if (mergerInput.Length()>0) mergerInput+=" ";
    mergerInput+=tracker;
    //add all slice tracks to histo input
    //if (histoInput.Length()>0) histoInput+=" ";
    //histoInput+=tracker;
  }

  // GlobalMerger component
    new AliHLTConfiguration("globalmerger","TPCCAGlobalMerger",mergerInput.Data(),"");
  
    //add all global tracks to histo input
  if (histoInput.Length()>0) histoInput+=" ";
  histoInput+="globalmerger";
  
  // specify whether to write all blocks separately or merge the tracks
  // and convert to ESD
  bool writeBlocks=false;

  // the esd converter configuration
  new AliHLTConfiguration("esd-converter", "GlobalEsdConverter"   , "globalmerger", "-fitTracksToVertex 1");
  
  new AliHLTConfiguration("global-vertexer", "GlobalVertexer"   , "esd-converter", "");
  
  new AliHLTConfiguration("v0HistoOut", "V0Histo"   , "global-vertexer", "");

  new AliHLTConfiguration("GVhistorootfile", "ROOTFileWriter", "global-vertexer" , "-datafile primaryVertexHistograms -concatenate-events -overwrite");
  
  new AliHLTConfiguration("v0historootfile", "ROOTFileWriter", "v0HistoOut" , "-datafile secondaryVertexHistograms -concatenate-events -overwrite");

  option+="v0historootfile";

  option+=",GVhistorootfile";

  ///////////////////////////////////////////////////////////////////////////////////////////////////
  //
  // Init and run the reconstruction
  // All but HLT reconstructio is switched off
  //
  AliReconstruction rec;


  rec.SetDefaultStorage("local://$ALICE_ROOT/OCDB");
  // rec.SetDefaultStorage("local://$HOME/HCDB"); 
  //rec.SetSpecificStorage("GRP/GRP/Data",
  //			 Form("local://%s",gSystem->pwd()));

  //  rec.SetSpecificStorage("GRP/GRP/Data","local:///opt/HLT-public/OCDB/LHC09c");
  //  rec.SetSpecificStorage("GRP/CTP/Config","local:///opt/HLT-public/OCDB/LHC09c");
  //  rec.SetSpecificStorage("GRP/CTP/Config", "local:///opt/HLT-public/rec/LHC09c/");

  rec.SetInput(input);
  rec.SetRunVertexFinder(kFALSE);
  rec.SetRunReconstruction("HLT");  //add TPC for comparison
  rec.SetLoadAlignFromCDB(0);
  rec.SetRunQA(":");
  rec.SetOption("HLT",option);
  // switch off cleanESD
  rec.SetCleanESD(kFALSE);
  //  rec.SetEventRange(0, 100);
  rec.Run();
}
Ejemplo n.º 15
0
void rec() {

  AliReconstruction reco;

//
// switch off cleanESD, write ESDfriends and Alignment data

  reco.SetCleanESD(kFALSE);
  reco.SetWriteESDfriend();
  reco.SetWriteAlignmentData();

//
// ITS Efficiency and tracking errors

  reco.SetRunPlaneEff(kTRUE);
  reco.SetUseTrackingErrorsForAlignment("ITS");

//
// Residual OCDB

  reco.SetDefaultStorage("alien://Folder=/alice/simulation/2008/v4-15-Release/Residual/");


//
// GRP from local OCDB

 reco.SetSpecificStorage("GRP/GRP/Data",
                          Form("local://%s",gSystem->pwd()));


//
// Vertex from RAW OCDB

  reco.SetSpecificStorage("GRP/Calib/MeanVertexTPC","alien://folder=/alice/data/2010/OCDB");
  reco.SetSpecificStorage("GRP/Calib/MeanVertex","alien://folder=/alice/data/2010/OCDB");
  reco.SetSpecificStorage("GRP/Calib/MeanVertexSPD", "alien://folder=/alice/data/2010/OCDB");

//
// EMCAL from RAW OCDB

  reco.SetSpecificStorage("EMCAL/Calib/Data","alien://Folder=/alice/data/2010/OCDB");
  reco.SetSpecificStorage("EMCAL/Calib/Pedestals","alien://Folder=/alice/data/2010/OCDB");

//
// PHOS from RAW OCDB

  reco.SetSpecificStorage("PHOS/Calib/EmcBadChannels","alien://Folder=/alice/data/2010/OCDB");

//
// SPD and SDD from RAW OCDB

  reco.SetSpecificStorage("ITS/Calib/SPDDead","alien://folder=/alice/data/2010/OCDB");
  reco.SetSpecificStorage("TRIGGER/SPD/PITConditions","alien://folder=/alice/data/2010/OCDB");
  reco.SetSpecificStorage("ITS/Calib/SPDNoise","alien://folder=/alice/data/2010/OCDB");
  reco.SetSpecificStorage("ITS/Calib/CalibSDD","alien://Folder=/alice/data/2010/OCDB");

//
// TRD from RAW OCDB

  reco.SetSpecificStorage("TRD/Calib/ChamberStatus","alien://folder=/alice/data/2010/OCDB");
  reco.SetSpecificStorage("TRD/Calib/PadStatus","alien://folder=/alice/data/2010/OCDB");

//
// TPC from RAW OCDB

  reco.SetSpecificStorage("TPC/Calib/PadGainFactor","alien://folder=/alice/data/2010/OCDB");

//
// V0 from RAW OCDB

  reco.SetSpecificStorage("VZERO/Trigger/Data","alien://folder=/alice/data/2010/OCDB");
  reco.SetSpecificStorage("VZERO/Calib/RecoParam","alien://folder=/alice/data/2010/OCDB");
  reco.SetSpecificStorage("VZERO/Calib/Data","alien://folder=/alice/data/2010/OCDB");
  reco.SetSpecificStorage("VZERO/Calib/TimeSlewing","alien://folder=/alice/data/2010/OCDB");
  reco.SetSpecificStorage("VZERO/Calib/TimeDelays","alien://folder=/alice/data/2010/OCDB");

//
// TOF from RAW OCDB

  reco.SetSpecificStorage("TOF/Calib/Status","alien://folder=/alice/data/2010/OCDB");

//
// FMD from RAW OCDB

  reco.SetSpecificStorage("FMD/Calib/Pedestal", "alien://folder=/alice/data/2010/OCDB");
  reco.SetSpecificStorage("FMD/Calib/PulseGain","alien://folder=/alice/data/2010/OCDB");
  reco.SetSpecificStorage("FMD/Calib/Dead", "alien://folder=/alice/data/2010/OCDB");
  reco.SetSpecificStorage("FMD/Calib/AltroMap","alien://folder=/alice/data/2010/OCDB");



//
  TStopwatch timer;
  timer.Start();
  reco.Run();
  timer.Stop();
  timer.Print();
}
Ejemplo n.º 16
0
void histogramHandlerTest(const char* input="./"){
  
  if (!input) {
    cerr << "please specify input or run without arguments" << endl;
    return;
  }
  
  
  /////////////////////////////////////////////////////////////////////////////////////////////////
  // 
  // init the HLT system in order to define the analysis chain below
  //
  AliHLTSystem* gHLT=AliHLTPluginBase::GetInstance();

  ///////////////////////////////////////////////////////////////////////////////////////////////////
  //
  // define the analysis chain to be run
  //
    
  int iMinSlice=0; 
  int iMaxSlice=35;
  int iMinPart=0;
  int iMaxPart=5;

  TString histogramHandlerInput1;
  TString histogramHandlerInput2;
  TString histogramHandlerOutput1;
  TString histogramHandlerOutput2;
  TString rootFileWriterInput1;
  TString rootFileWriterInput2;

  for (int slice=iMinSlice; slice<=iMaxSlice; slice++) {
    for (int part=iMinPart; part<=iMaxPart; part++) {
      TString clusterFinderOutput1;
      TString clusterFinderOutput2;
      TString clusterHistoInput1;
      TString clusterHistoInput2;
      TString clusterHistoOutput1;
      TString clusterHistoOutput2;
      TString arg, publisher;
      // digit publisher components
      int ddlno=768;
      if (part>1) ddlno+=72+4*slice+(part-2);
      else ddlno+=2*slice+part;
      arg.Form("-minid %d -datatype 'DDL_RAW ' 'TPC '  -dataspec 0x%02x%02x%02x%02x", ddlno, slice, slice, part, part);

      publisher.Form("DP_%02d_%d", slice, part);
      AliHLTConfiguration pubconf(publisher.Data(), "AliRawReaderPublisher", NULL , arg.Data());

      // first clusterfinder
      clusterFinderOutput1.Form("CF1_%02d_%d", slice, part);
      AliHLTConfiguration cfconf(clusterFinderOutput1.Data(), "TPCClusterFinderDecoder", publisher.Data(), "-timebins 446");//-timebins set to simulated data
      if (clusterHistoInput1.Length()>0) clusterHistoInput1+=" ";
      clusterHistoInput1+=clusterFinderOutput1;

      // second clusterfinder
      clusterFinderOutput2.Form("CF2_%02d_%d", slice, part);
      AliHLTConfiguration cfconf(clusterFinderOutput2.Data(), "TPCClusterFinderDecoder", publisher.Data(), "-timebins 446");//-timebins set to simulated data
      if (clusterHistoInput2.Length()>0) clusterHistoInput2+=" ";
      clusterHistoInput2+=clusterFinderOutput2;
    

      // first cluster histo component
      clusterHistoOutput1.Form("CH1_%02d_%d", slice, part);
      AliHLTConfiguration cfconf(clusterHistoOutput1.Data(), "TPCClusterHisto", clusterHistoInput1.Data(), "");
      if (histogramHandlerInput1.Length()>0) histogramHandlerInput1+=" ";
      histogramHandlerInput1+=clusterHistoOutput1;

      //second cluster histo component
      clusterHistoOutput2.Form("CH2_%02d_%d", slice, part);
      AliHLTConfiguration cfconf(clusterHistoOutput2.Data(), "TPCClusterHisto", clusterHistoInput2.Data(), "");
      if (histogramHandlerInput1.Length()>0) histogramHandlerInput1+=" ";
      histogramHandlerInput1+=clusterHistoOutput2;
      if (histogramHandlerInput2.Length()>0) histogramHandlerInput2+=" ";
      histogramHandlerInput2+=clusterHistoOutput2;

    }
  }
  
  // first histogram handler component
  histogramHandlerOutput1.Form("HH1_%02d_%d", slice, part);
  AliHLTConfiguration cfconf(histogramHandlerOutput1.Data(), "TPCHistogramHandler", histogramHandlerInput1.Data(), "-use-general");
  if (rootFileWriterInput1.Length()>0) rootFileWriterInput1+=" ";
  rootFileWriterInput1+=histogramHandlerOutput1;
  
  // second histogram handler component
  histogramHandlerOutput2.Form("HH2_%02d_%d", slice, part);
  AliHLTConfiguration cfconf(histogramHandlerOutput2.Data(), "TPCHistogramHandler", histogramHandlerInput2.Data(), "-use-general");
  if (rootFileWriterInput2.Length()>0) rootFileWriterInput2+=" ";
  rootFileWriterInput2+=histogramHandlerOutput2;
  
  AliHLTConfiguration rootFileWriter1("RootFileWriter1", "ROOTFileWriter", rootFileWriterInput1.Data() , "-datafile histogramHandlerFile1");

  AliHLTConfiguration rootFileWriter2("RootFileWriter2", "ROOTFileWriter", rootFileWriterInput2.Data() , "-datafile histogramHandlerFile2");


  ///////////////////////////////////////////////////////////////////////////////////////////////////
  //
  // Init and run the reconstruction
  // All but HLT reconstruction is switched off
  //
  AliReconstruction rec;
  rec.SetInput(input);
  rec.SetRunVertexFinder(kFALSE);
  rec.SetRunLocalReconstruction("HLT");
  rec.SetRunTracking("");
  rec.SetLoadAlignFromCDB(0);
  rec.SetRunQA(":");
  //rec.SetFillESD("HLT");
  rec.SetFillESD("");
  rec.SetFillTriggerESD(false);
  rec.SetOption("HLT", "libAliHLTUtil.so libAliHLTRCU.so libAliHLTTPC.so loglevel=0x7c chains=RootFileWriter1,RootFileWriter2");
  rec.Run();
}
Ejemplo n.º 17
0
void rec(const char *filename="raw.root", const char* options="")
{
  /////////////////////////////////////////////////////////////////////////////////////////
  //
  // Reconstruction script for RAW data
  //
  /////////////////////////////////////////////////////////////////////////////////////////

  
  AliReconstruction rec;
  // Set reconstruction flags (skip detectors here if neded with -<detector name>

  // do we extract the TPC recpoints in advance
  Int_t preclustTPC = TString(gSystem->Getenv("preclusterizeTPC")).Atoi();
  Bool_t noTPCLocalRec = preclustTPC==1;
  if (noTPCLocalRec) printf("preclustTPC = %d: TPC local reconstruction assumed to be already done\n", preclustTPC);
  else printf("preclustTPC = %d: TPC local reconstruction assumed to NOT be already done\n", preclustTPC);
  //
  if (noTPCLocalRec) {
    rec.SetRunReconstruction("ALL -HLT");
    rec.SetRunLocalReconstruction("ALL -TPC -HLT");
  }
  else {
    rec.SetRunLocalReconstruction("ALL");
  } 

  // Upload CDB entries from the snapshot (local root file) if snapshot exist
  if (gSystem->AccessPathName("OCDB.root", kFileExists)==0) {        
    rec.SetDefaultStorage("local://");
    rec.SetCDBSnapshotMode("OCDB.root");
  }
  else {
    // setup ocdb by custom (if any) or default settings
    if (gSystem->AccessPathName("OCDBconfig.C", kFileExists)==0) {
      gROOT->Macro("OCDBconfig.C");
    }
    else { // default settings
      AliCDBManager* man = AliCDBManager::Instance();
      man->SetRaw(kTRUE);
    }
    //
    TString cdbMode = gSystem->Getenv("OCDB_SNAPSHOT_CREATE");
    if (cdbMode == "kTRUE") {
      gROOT->LoadMacro("$ALIDPG_ROOT/MC/CreateSnapshot.C");
      CreateSnapshot("OCDB.root",filename);
      return;
    }
  }



  // removing apparently pile-up clusters to speadup reconstruction
  const double kZOutSectorCut = 3.; // cut on clusters on wrong side of CE (added to extendedRoadZ)
  AliTPCReconstructor::SetZOutSectorCut(kZOutSectorCut);


  // QA options
  //  rec.SetRunQA("Global:ESDs") ;
  //  rec.SetRunQA(":") ;
  //  rec.SetRunQA("ALL:ALL") ;
  rec.SetRunQA("Global MUON:ALL") ;
  rec.SetQARefDefaultStorage("local://$ALICE_ROOT/QAref") ;

  // AD stuff (see ALIROOT-6663)

  // rec.SetOption("AD", "+SaturationCorrection"); // --> not needed anymore, see https://alice.its.cern.ch/jira/browse/ALIROOT-6778

  // AliReconstruction settings
  rec.SetWriteESDfriend(kTRUE);
  rec.SetWriteAlignmentData();
  TString filenamewithopt = filename;
  filenamewithopt += options;
  rec.SetInput(filenamewithopt.Data());
  rec.SetUseTrackingErrorsForAlignment("ITS");

  // Specific AD storage, see https://alice.its.cern.ch/jira/browse/ALIROOT-6056
  //  rec.SetSpecificStorage("AD/Calib/TimeSlewing", "alien://Folder=/alice/simulation/2008/v4-15-Release/Ideal");

  // switch off cleanESD
  rec.SetCleanESD(kFALSE);

  //Ignore SetStopOnError
  rec.SetStopOnError(kFALSE);

  // Delete recpoints
  // Remove recpoints after each event
  TString delRecPoints="TPC TRD";
  if (noTPCLocalRec) delRecPoints.ReplaceAll("TPC","");
  rec.SetDeleteRecPoints(delRecPoints.Data()); 
  //

  // Set 0.7% as fraction of friends (Ruben, 2017-08-22)
  rec.SetFractionFriends(0.007);

  AliLog::Flush();
  rec.Run();

}
Ejemplo n.º 18
0
void AliTRDReconstructandFill() 
{
  //
  // This macro fills 2d histo or vectors during the reconstruction
  // If it is vectors, it fits them directly after the reconstruction
  // and writes the result in the file coeftest.root
  //
 
  TStopwatch timer;
  timer.Start();

  ////Set the parameters of AliTRDCalibra***************
  AliTRDCalibra *calibra = AliTRDCalibra::Instance();

  ////What do you want to use?
  calibra->SetMITracking(); //Offline tracking
  //calibra->Setmcmtracking();
  
  
  ////Do you want to try the correction due to the angles of the tracks for mcm tracklets?
  calibra->SetMcmCorrectAngle();
  
  ////What do you want to fill?
  calibra->SetCH2dOn();//relative gain calibration
  calibra->SetPH2dOn();//drift velocity and time0 calibration
  calibra->SetPRF2dOn();//Pad Response Function calibration


  ////How do you want to store the infos?
  calibra->SetVector2d();//vector method
  calibra->SetHisto2d();//2Dhistograms

  ////Which mode do you want?
  calibra->SetNz(2,2);//For the PRF z direction
  calibra->SetNrphi(2,2);//For The PRF rphi direction
  calibra->SetNz(0,0);//For the gain z direction
  calibra->SetNrphi(0,0);//For the gain rphi direction
  calibra->SetNz(1,3);//For the drift velocity and time0 z direction
  calibra->SetNrphi(1,3);//For the drift velocity and time 0 rphi direction

  ////How many bins?
  calibra->SetNumberBinCharge(100);
  calibra->SetNumberBinPRF(20);
  
  
  ////Do you want to accept more tracks?
  calibra->SetProcent(1.2);//For the gain if one group has a signal above 1.2 the other group then fill
  calibra->SetDifference(10);//For the drift velocity if one group has at least 10 time bins then fill
  calibra->SetNumberClusters(18);//For mcm tracklets only fill only with tracklet with at least 18 clusters
  
  ////Do you want to take only the middle pad for gain or Vdrift?
  //calibra->SetTraMaxPad();
  
  //Do you want to apply more strict cut on the clusters for the PRF calibration?
  calibra->SetThresholdClusterPRF1(2);//The neighbors pads must have a signal smaller than 2 ADC counts
  calibra->SetThresholdClusterPRF2(10);//The 3 pads in the cluster must have a signal above 10 ADC counts
  
  
  ////What do you want to write?
  calibra->SetWrite(0);//For the gain
  calibra->SetWrite(1);//For the average pulse height
  calibra->SetWrite(2);//For the PRF
  
  
  ////If you want to change the name of the file where it is stored (not very good)
  //calibra->SetWriteName("test.root");
  
  
  //Begin the reconstruction
  AliReconstruction rec;
  rec.SetGAliceFile("galice.root"); 
  rec.SetLoadAlignFromCDB(kFALSE);
  rec.SetRunHLTTracking(kFALSE);
  rec.SetFillESD("");
  rec.SetFillTriggerESD(kFALSE);
  rec.SetRunVertexFinder(kFALSE);
  rec.Run();
  timer.Stop();
  timer.Print();
  calibra->Write2d();    


  TStopwatch timerfit;
  timerfit.Start();
  ////Fit directly after having filling****

  ////Do you want to try with less statistics?
  calibra->SetMinEntries(10);//If there is at least 10 entries in the histo, it will fit

  ////Do you want to write the result?
  calibra->SetWriteCoef(0);//gain
  calibra->SetWriteCoef(1);//time 0 and drift velocity
  calibra->SetWriteCoef(2);//PRF

  ////Do you want to change the name of the file (TRD.coefficient.root)?
  calibra->SetWriteNameCoef("coeftest.root");

  ////Do you want to see something?
  calibra->SetDebug(1);

  ////Do you want to fit?
  calibra->FitPHOnline(); 
  calibra->FitCHOnline(); 
  calibra->FitPRFOnline();  
  
  
  timerfit.Stop();
  timerfit.Print();

}
Ejemplo n.º 19
0
void rec(const char *filename="raw.root")
{
  /////////////////////////////////////////////////////////////////////////////////////////
  //
  // Reconstruction script for 2011 RAW data - muon fast reco
  //
  /////////////////////////////////////////////////////////////////////////////////////////



  // Set the CDB storage location
  AliCDBManager * man = AliCDBManager::Instance();
  man->SetDefaultStorage("alien://folder=/alice/data/2011/OCDB");

  AliReconstruction rec;

  // Generate or use the local OCDB.root file
	//  rec.SetFromCDBSnapshot("OCDB.root");

  // Set reconstruction flags (skip detectors here if neded with -<detector name>
	//  rec.SetRunReconstruction("MUON ITS VZERO ZDC T0");
	rec.SetRunReconstruction("MUON ITS");

  // QA options
  rec.SetRunQA("Global MUON:ALL") ;
  rec.SetQARefDefaultStorage("local://$ALICE_ROOT/QAref") ;

  // MUON only reco - recoparameters
  rec.SetRecoParam("ITS",GetSpecialITSRecoParam());

  // AliReconstruction settings
  rec.SetWriteESDfriend(kTRUE);
  rec.SetWriteAlignmentData();
//  rec.SetInput(filename);
  rec.SetUseTrackingErrorsForAlignment("ITS");

  // switch off cleanESD
  rec.SetCleanESD(kFALSE);

  // Specific reco params for ZDC (why isn't this automatic?)
	//  rec.SetRecoParam("ZDC",AliZDCRecoParamPbPb::GetHighFluxParam(2760));

  //Ignore SetStopOnError
  rec.SetStopOnError(kFALSE);

  AliLog::Flush();
  rec.Run();

}
Ejemplo n.º 20
0
void rec() {  
  AliReconstruction reco;
  reco.SetRunReconstruction("ITS TPC TOF PHOS HMPID EMCAL MUON FMD ZDC PMD T0 VZERO");

  reco.SetWriteESDfriend();
  reco.SetWriteAlignmentData();

  reco.SetDefaultStorage("alien://Folder=/alice/data/2011/OCDB");

// Total number of specific storages - 28
//
// ITS (2 objects)

  reco.SetSpecificStorage("ITS/Align/Data",     "alien://folder=/alice/simulation/2008/v4-15-Release/Residual");
  reco.SetSpecificStorage("ITS/Calib/SPDNoisy", "alien://folder=/alice/simulation/2008/v4-15-Release/Residual");

//
// MUON (1 objects)
//      MCH

  reco.SetSpecificStorage("MUON/Align/Data",    "alien://Folder=/alice/simulation/2008/v4-15-Release/Residual/");

//
// TPC (25 objects)

  reco.SetSpecificStorage("TPC/Align/Data", "alien://Folder=/alice/simulation/2008/v4-15-Release/Residual/");
  reco.SetSpecificStorage("TPC/Calib/GainFactorDedx", "alien://Folder=/alice/simulation/2008/v4-15-Release/Residual/");
  reco.SetSpecificStorage("TPC/Calib/PadTime0", "alien://Folder=/alice/simulation/2008/v4-15-Release/Residual/");
  reco.SetSpecificStorage("TPC/Calib/ClusterParam", "alien://Folder=/alice/simulation/2008/v4-15-Release/Residual/");
  reco.SetSpecificStorage("TPC/Calib/Pedestals", "alien://Folder=/alice/simulation/2008/v4-15-Release/Residual/");
  reco.SetSpecificStorage("TPC/Calib/Parameters", "alien://Folder=/alice/simulation/2008/v4-15-Release/Residual/");
  reco.SetSpecificStorage("TPC/Calib/ExB", "alien://Folder=/alice/simulation/2008/v4-15-Release/Residual/");
  reco.SetSpecificStorage("TPC/Calib/Mapping", "alien://Folder=/alice/simulation/2008/v4-15-Release/Residual/");
  reco.SetSpecificStorage("TPC/Calib/PadNoise", "alien://Folder=/alice/simulation/2008/v4-15-Release/Residual/");
  reco.SetSpecificStorage("TPC/Calib/PadGainFactor", "alien://Folder=/alice/simulation/2008/v4-15-Release/Residual/");
  reco.SetSpecificStorage("TPC/Calib/Temperature", "alien://Folder=/alice/simulation/2008/v4-15-Release/Residual/");
  reco.SetSpecificStorage("TPC/Calib/RecoParam", "alien://Folder=/alice/simulation/2008/v4-15-Release/Residual/");
  reco.SetSpecificStorage("TPC/Calib/TimeGain", "alien://Folder=/alice/simulation/2008/v4-15-Release/Residual/");
  reco.SetSpecificStorage("TPC/Calib/AltroConfig", "alien://Folder=/alice/simulation/2008/v4-15-Release/Residual/");
  reco.SetSpecificStorage("TPC/Calib/CE", "alien://Folder=/alice/simulation/2008/v4-15-Release/Residual/");
  reco.SetSpecificStorage("TPC/Calib/Pulser", "alien://Folder=/alice/simulation/2008/v4-15-Release/Residual/");
  reco.SetSpecificStorage("TPC/Calib/Distortion", "alien://Folder=/alice/simulation/2008/v4-15-Release/Residual/");
  reco.SetSpecificStorage("TPC/Calib/Ref", "alien://Folder=/alice/simulation/2008/v4-15-Release/Residual/");
  reco.SetSpecificStorage("TPC/Calib/Raw", "alien://Folder=/alice/simulation/2008/v4-15-Release/Residual/");
  reco.SetSpecificStorage("TPC/Calib/QA", "alien://Folder=/alice/simulation/2008/v4-15-Release/Residual/");
  reco.SetSpecificStorage("TPC/Calib/TimeDrift", "alien://Folder=/alice/simulation/2008/v4-15-Release/Residual/");
  reco.SetSpecificStorage("TPC/Calib/Goofie", "alien://Folder=/alice/simulation/2008/v4-15-Release/Residual/");
  reco.SetSpecificStorage("TPC/Calib/HighVoltage", "alien://Folder=/alice/simulation/2008/v4-15-Release/Residual/");
  reco.SetSpecificStorage("TPC/Calib/LaserTracks", "alien://Folder=/alice/simulation/2008/v4-15-Release/Residual/");
  reco.SetSpecificStorage("TPC/Calib/Correction", "alien://Folder=/alice/simulation/2008/v4-15-Release/Residual/");

  TStopwatch timer;
  timer.Start();
  reco.Run();
  timer.Stop();
  timer.Print();
}
Ejemplo n.º 21
0
/**
 * @file cal-hlt-tpc-offline.C
 * @brief Test macro for the HLT TPC offline calibration.
 *
 * The macro runs an HLT chain of TPC analysis, using the offline
 * algorithms and appropriate wrappers. The final output is
 * processed by the TPCOfflineCalibration component.
 *
 * Usage:
 * <pre>
 *   aliroot -b -q cal-hlt-tpc-offline.C | tee cal-hlt-tpc-offline.log
 * </pre>
 *
 * The chain to be run is defined by the macro given to the parameter
 * 'config='
 *
 * The macro asumes raw data to be available in the rawx folders, either
 * simulated or real data. A different input can be specified as parameter
 * <pre>
 *   aliroot -b -q cal-hlt-tpc-offline.C'("input.root")'
 * </pre>
 *
 * In the first section, an analysis chain is defined. The scale of the
 * chain can be defined by choosing the range of sectors and partitions.
 *
 * The reconstruction is steered by the AliReconstruction object in the
 * usual way.
 *
 * @ingroup alihlt_tpc
 * @author Jacek Otwinowski <*****@*****.**>, [email protected]
 */
void cal_hlt_tpc_offline(const char* input="./")
{
  if (!input) {
    cerr << "please specify input or run without arguments" << endl;
    return;
  }

  ///////////////////////////////////////////////////////////////////////////////////////////////////
  //
  // init the HLT system in order to define the analysis chain below
  //
  AliHLTSystem* gHLT=AliHLTPluginBase::GetInstance();

  //gHLT.SwitchAliLog(0);

  ///////////////////////////////////////////////////////////////////////////////////////////////////
  //
  // define the analysis chain to be run
  //

  bool sectorClusterer=true; // run clusterer on sector or DDL level
  // check if the AliRawReaderMemory supports multiple buffers
  TClass* info=TClass::GetClass("AliRawReaderMemory");
  TList* methods=info->GetListOfAllPublicMethods();
  if (sectorClusterer && !methods->FindObject("AddBuffer")) {
    cerr << "warning: AliRawReaderMemory does not support multiple buffers, falling back to run clusterer on DDL level" << endl;
    sectorClusterer=false;
  }
 
  int iMinSlice=0;
  int iMaxSlice=35;
  int iMinPart=0;
  int iMaxPart=5;

  int DDLNoFromSlicePatch(int, int);

  TString writerInput;
  TString trackerInput;
  TString calibratorInput;

  for (int slice=iMinSlice; slice<=iMaxSlice; slice++) {
    TString arg, clustererInput;
    for (int part=iMinPart; part<=iMaxPart; part++) {
      TString publisher, cf;

      // raw data publisher components
      int ddlno=DDLNoFromSlicePatch(slice, part);
      arg.Form("-minid %d -datatype 'DDL_RAW ' 'TPC '  -dataspec 0x%02x%02x%02x%02x -verbose", ddlno, slice, slice, part, part);
      publisher.Form("DP_%02d_%d", slice, part);
      AliHLTConfiguration pubconf(publisher.Data(), "AliRawReaderPublisher", NULL , arg.Data());

      if (!sectorClusterer) {
      // cluster finder components
      cf.Form("CF_%02d_%d", slice, part);
      AliHLTConfiguration cfconf(cf.Data(), "TPCOfflineClusterer", publisher.Data(), "");

      if (trackerInput.Length()>0) trackerInput+=" ";
      trackerInput+=cf;
      //if (writerInput.Length()>0) writerInput+=" ";
      //writerInput+=cf;
      } else {
	if (clustererInput.Length()>0) clustererInput+=" ";
	clustererInput+=publisher;
      }
    }
    if (sectorClusterer) {
      // cluster finder components
      cf.Form("CF_%02d", slice);
      AliHLTConfiguration cfconf(cf.Data(), "TPCOfflineClusterer", clustererInput.Data(), "");

      if (trackerInput.Length()>0) trackerInput+=" ";
      trackerInput+=cf;
    }
  }

  // one global tracker component
  TString tracker;
  tracker.Form("Global_TR");
  AliHLTConfiguration trackerconf(tracker.Data(), "TPCOfflineTrackerCalib", trackerInput.Data(), "");
  if (writerInput.Length()>0) writerInput+=" ";
  calibratorInput+=tracker;

  // one global calibration component
  TString calibrator;
  calibrator.Form("Global_Calib");
  AliHLTConfiguration calibconf(calibrator.Data(), "TPCOfflineCalibration", calibratorInput.Data(), "");
  if (writerInput.Length()>0) writerInput+=" ";
  writerInput+=calibrator;

  // the writer configuration
  AliHLTConfiguration rootfwconf("sink1", "ROOTFileWriter", writerInput.Data(), "-specfmt=_%d -subdir=out_%d -idfmt=_0x%08x");
  //AliHLTConfiguration esdwconf("sink1", "EsdCollector"   , writerInput.Data(), "-directory hlt-tpc-offline");

  ///////////////////////////////////////////////////////////////////////////////////////////////////
  //
  // Init and run the reconstruction
  // All but HLT reconstructio is switched off
  //
  AliReconstruction rec;
  rec.SetInput(input);
  rec.SetRunVertexFinder(kFALSE);
  rec.SetRunLocalReconstruction("HLT");
  rec.SetRunTracking("");
  rec.SetLoadAlignFromCDB(0);
  rec.SetFillESD("");
  rec.SetRunQA(":");
  rec.SetRunGlobalQA(kFALSE);
  rec.SetFillTriggerESD(kFALSE);
  rec.SetOption("HLT", "libAliHLTUtil.so libAliHLTRCU.so libANALYSIS.so libANALYSISalice.so libTPCcalib.so libAliHLTTPC.so loglevel=0x7c chains=sink1");
  rec.Run();
}
Ejemplo n.º 22
0
void main_recCPass1_OuterDet(const char *filename="raw.root",Int_t nevents=-1, const char *ocdb="raw://", Bool_t useFullITS=kFALSE)
{
  // Load some system libs for Grid and monitoring
  // Set the CDB storage location
  AliCDBManager * man = AliCDBManager::Instance();
  man->SetDefaultStorage(ocdb);
  // Reconstruction settings
  AliReconstruction rec;
  // Upload CDB entries from the snapshot (local root file) if snapshot exist
  if (gSystem->AccessPathName("OCDB.root", kFileExists)==0) {        
    man->SetDefaultStorage("local://");
    man->SetRaw(kFALSE);
    man->SetSnapshotMode("OCDB.root");
  }
  if (gSystem->AccessPathName("localOCDBaccessConfig.C", kFileExists)==0) {        
    gInterpreter->ProcessLine("localOCDBaccessConfig();");
  }

  if(!useFullITS){
    // only SPD-trackletting will be done
    printf("Special ITS configuration: only SPD-trackletting will be done\n");
    rec.SetRecoParam("ITS",GetSpecialITSRecoParam());
  }

  // All friends
  rec.SetFractionFriends(1.0);

 // AliReconstruction settings - hardwired MB trigger for calibration

  TString newfilename = filename;
  newfilename += "?Trigger=kCalibOuter";
  rec.SetInput(newfilename.Data());

  // Set protection against too many events in a chunk (should not happen)
  if (nevents>0) rec.SetEventRange(0,nevents);

  // Remove recpoints after each event
  rec.SetDeleteRecPoints("ITS MUON EMCAL PHOS VZERO T0");

  // Switch off the V0 finder - saves time!
  rec.SetRunV0Finder(kFALSE); 

  //
  // QA options - all QA is off
  //
  rec.SetRunQA(":");
  rec.SetRunGlobalQA(kFALSE);

  // AliReconstruction settings
  rec.SetWriteESDfriend(kFALSE);
  if(!useFullITS) rec.SetWriteAlignmentData(kFALSE);
  else rec.SetWriteAlignmentData();
  rec.SetUseTrackingErrorsForAlignment("ITS");
  rec.SetRunReconstruction("ITS MUON EMCAL PHOS VZERO T0");
  rec.SetFillESD("ITS MUON EMCAL PHOS VZERO T0");
  rec.SetCleanESD(kFALSE);

  // Specific reco params for ZDC (why isn't this automatic?)
//  rec.SetRecoParam("ZDC",AliZDCRecoParamPbPb::GetHighFluxParam(2760));

  //Ignore SetStopOnError
  rec.SetStopOnError(kFALSE);

  AliLog::Flush();
  rec.Run();
}
Ejemplo n.º 23
0
void rec() {
  /* AliLog::SetGlobalLogLevel(AliLog::kInfo);
  AliLog::SetClassDebugLevel("AliTOFtracker",2);
  AliLog::SetClassDebugLevel("AliTOFtrackerV1",2);
  AliLog::SetClassDebugLevel("AliTOFGeometry",2);*/

  AliReconstruction reco;


  reco.SetWriteESDfriend();
  reco.SetWriteAlignmentData();

  // reco.SetRecoParam("ITS",AliITSRecoParam::GetHighFluxParam());   
   AliITSRecoParam * itsRecoParam = AliITSRecoParam::GetHighFluxParam(); //Pb-Pb
 // trackleter options ...
  itsRecoParam->SetTrackleterOnlyOneTrackletPerC2(kFALSE);

  itsRecoParam->SetTrackleterPhiWindow(0.015); //rad
  itsRecoParam->SetTrackleterZetaWindow(0.03); //cm

  reco.SetRecoParam("ITS",itsRecoParam);

  reco.SetRecoParam("TPC",AliTPCRecoParam::GetHighFluxParam());
  reco.SetRecoParam("TRD",AliTRDrecoParam::GetHighFluxParam());
  reco.SetRecoParam("TOF",AliTOFRecoParam::GetPbPbparam());
  reco.SetRecoParam("PHOS",AliPHOSRecoParam::GetDefaultParameters());
  reco.SetRecoParam("MUON",AliMUONRecoParam::GetHighFluxParam());

  reco.SetRunVertexFinderTracks(kFALSE);

  reco.SetDefaultStorage("alien://Folder=/alice/simulation/2008/v4-15-Release/Ideal");
  reco.SetSpecificStorage("GRP/GRP/Data",
			  Form("local://%s",gSystem->pwd()));

  TStopwatch timer;
  timer.Start();
  reco.Run();
  timer.Stop();
  timer.Print();
}
Ejemplo n.º 24
0
Archivo: recraw.C Proyecto: ktf/AliRoot
void recraw() {

	// AliReconstruction settings
  AliReconstruction reco;

  reco.SetWriteESDfriend(kTRUE);
  reco.SetWriteAlignmentData();
  reco.SetInput("raw.root");

  reco.SetDefaultStorage("local://$ALICE_ROOT/OCDB");
  reco.SetSpecificStorage("GRP/GRP/Data",
			  Form("local://%s/..",gSystem->pwd()));


  reco.SetUseTrackingErrorsForAlignment("ITS");
	
  // all events in one single file
  reco.SetNumberOfEventsPerFile(-1);

  // switch off cleanESD
  reco.SetCleanESD(kFALSE);
	
  reco.SetRunQA("ALL:ALL") ;

  reco.SetQARefDefaultStorage("local://$ALICE_ROOT/OCDB") ;
  for (Int_t det = 0 ; det < AliQA::kNDET ; det++) {
    reco.SetQACycles(det, 9999) ;
    reco.SetQAWriteExpert(det) ; 
  }
  
  AliLog::Flush();
	
  TStopwatch timer;
  timer.Start();
  reco.Run();
  timer.Stop();
  timer.Print();
}
Ejemplo n.º 25
0
void recTPC(Int_t type, const char *filename="data.root")
{
  /// Set path to calibration data
  ///
  /// type variable = 0 - cosmic test
  ///               = 1 - laser test

  AliCDBManager * man = AliCDBManager::Instance();
  man->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
  //man->SetRun(0);
  //man->SetSpecificStorage("TPC/*/*","local:///afs/cern.ch/user/m/mivanov/public/Calib");
  //
  // Set reconstruction parameters
  //
  AliLog::SetClassDebugLevel("AliTPCclusterer",2);
  AliTPCRecoParam * tpcRecoParam = 0;
  if (type==0)  tpcRecoParam = AliTPCRecoParam::GetCosmicTestParam(kTRUE);
  if (type>0)  tpcRecoParam = AliTPCRecoParam::GetLaserTestParam(kTRUE);
  tpcRecoParam->Dump();
  AliTPCReconstructor::SetRecoParam(tpcRecoParam);
  AliTPCReconstructor::SetStreamLevel(1);
  //
  //
  //
  AliReconstruction rec;  
  rec.SetDefaultStorage("local://$ALICE_ROOT/OCDB");
  rec.SetSpecificStorage("TPC/*/*","local:///afs/cern.ch/user/m/mivanov/public/Calib");
  rec.SetLoadAlignData("");
  rec.SetWriteESDfriend(kTRUE);
  rec.SetInput(filename);
  rec.SetEquipmentIdMap("EquipmentIdMap.data");
  rec.SetRunReconstruction("TPC");
  rec.SetOption("TPC","PedestalSubtraction");
  //  rec.SetRunLocalReconstruction("");
  //  rec.SetRunTracking("TPC");
  rec.SetFillESD("TPC");
  rec.SetFillTriggerESD(kFALSE);
  rec.SetRunVertexFinder(kFALSE);
  rec.SetWriteAlignmentData(kTRUE);
  rec.Run();
}
Ejemplo n.º 26
0
/**
 * @file sampleRawAnalysis.C
 * @brief Example macro to run the AliHLTSampleRawAnalysisComponent in
 * AliReconstruction.
 *
 * The component subscribes to DDL raw data published by the
 * AliHLTRawReaderPublisherComponent. The macros requires a raw data file
 * and a corresponding GRP entry.
 *
 * <pre>
 * Usage: aliroot -b -q -l \
 *     sampleRawAnalysis.C'("rawfile", "cdb", minEvent, maxEvent)'
 *
 * Examples:
 *     sampleRawAnalysis.C'("raw.root", minEvent, MaxEvent)'
 *     sampleRawAnalysis.C'("./", minEvent, MaxEvent)'
 *     sampleRawAnalysis.C'("alien:///alice/data/2010/.../raw/....root")' 
 *
 * Defaults
 *     cdb="local://$ALICE_ROOT/OCDB" -> take local OCDB from distribution
 *     minEvent=-1   -> no lower event selection
 *     maxEvent=-1   -> no upper event selection
 *
 * </pre>
 *
 * The input file can be a local raw.root file but also a file from the
 * GRID. The separate DDL files generated in simulation can be accessed
 * using AliRawReaderFile by speficying "directory/".
 *
 * Since the macro runs AliReconstruction the OCDB needs to be set up, in
 * particular the GRP entry. If testing with a local OCDB you have to
 * simulate some events and run the macro in the folder of the simulation.
 * Also HLT components configure from objects in the OCDB.
 *
 * Note: You need a valid GRID token, if you want to access files directly
 * from the Grid, use 'alien-token-init' of your alien installation.
 *
 * @author [email protected]
 * @ingroup alihlt_tutorial
 */
void sampleRawAnalysis(const char *filename,
		       const char *cdbURI,
		       int minEvent=-1,
		       int maxEvent=-1)
{
  if(!gSystem->AccessPathName("galice.root")){
    cerr << "AliReconstruction on raw data requires to delete galice.root, or run at different place." << endl;
    cerr << "!!! DO NOT DELETE the galice.root of your simulation, but create a subfolder !!!!" << endl;
    return;
  }

  if (gSystem->AccessPathName(filename)) {
    cerr << "can not find file " << filename << endl;
    return;
  }

  // connect to the GRID if we use a file or OCDB from the GRID
  TString struri=cdbURI;
  TString strfile=filename;
  if (struri.BeginsWith("raw://") ||
      strfile.Contains("://") && !strfile.Contains("local://")) {
    TGrid::Connect("alien");
  }

  // Set the CDB storage location
  AliCDBManager * man = AliCDBManager::Instance();
  man->SetDefaultStorage(cdbURI);
  if (struri.BeginsWith("local://")) {
    // set specific storage for GRP entry
    // search in the working directory and one level above, the latter
    // follows the standard simulation setup like e.g. in test/ppbench
    if (!gSystem->AccessPathName("GRP/GRP/Data")) {
      man->SetSpecificStorage("GRP/GRP/Data", "local://$PWD");
    } else if (!gSystem->AccessPathName("../GRP/GRP/Data")) {
      man->SetSpecificStorage("GRP/GRP/Data", "local://$PWD/..");      
    } else {
      cerr << "can not find a GRP entry, please run the macro in the folder" << endl;
      cerr << "of a simulated data sample, or specify a GRID OCDB" << endl;
      sampleRawAnalysis();      
      return;
    }
  }

  //////////////////////////////////////////////////////////////////////////////////////
  //
  // Reconstruction settings
  AliReconstruction rec;

  if (minEvent>=0 || maxEvent>minEvent) {
    if (minEvent<0) minEvent=0;
    if (maxEvent<minEvent) maxEvent=minEvent;
    rec.SetEventRange(minEvent,maxEvent);
  }
  rec.SetRunReconstruction("HLT");
  rec.SetLoadAlignFromCDB(kFALSE);
  rec.SetWriteESDfriend(kFALSE);
  // due to bug ...
  // StopOnError needs to be disabled
  rec.SetStopOnError(kFALSE);
  rec.SetRunVertexFinder(kFALSE);
  rec.SetInput(filename);

  // QA options
  rec.SetRunQA(":") ;
  //rec.SetQARefDefaultStorage("local://$ALICE_ROOT/QAref") ;

  //////////////////////////////////////////////////////////////////////////////////////
  //
  // setup the HLT system
  AliHLTSystem* pHLT=AliHLTPluginBase::GetInstance();

  // define a data publisher configuration
  // arguments:
  //  1) id of the configuartion, later used to refer to this configuration
  //  2) id of the component to run
  //  3) parents, no parents for publisher components
  //  4) optional component arguments
  //              publish link #512, the first link (numbered 0) of SSD
  AliHLTConfiguration publisher("RAW-Publisher", 
				"AliRawReaderPublisher", 
				"", 
				"-minid 512 "
				"-datatype 'DDL_RAW ' 'ISSD' "
				"-dataspec 0x01"
				);

  // define configuration of the SampleRawAnalyis component
  // arguments:
  //  1) id of the configuartion, later used to refer to this configuration
  //  2) id of the component to run
  //  3) parents, here the publisher configuration defined above
  //  4) optional component arguments
  AliHLTConfiguration rawanalysis("RAW-Analysis", 
				  "SampleRawAnalysis", 
				  "RAW-Publisher", 
				  "-mandatory1 test "
				  "-verbose"
				  );

  // set option for the HLT module in AliReconstruction
  // arguments
  //  - ignore-hltout : ignore the HLTOUT payload from the HLT DDLs
  //  - libraries to be used as plugins
  //  - loglevel=0x7c : Important, Info, Warning, Error, Fatal
  //  - chains=RAW-Analysis : chains to be run
  rec.SetOption("HLT",
		"ignore-hltout " 
		"libAliHLTUtil.so libAliHLTSample.so "
		"loglevel=0x7c "
		"chains=RAW-Analysis "
		);

  rec.SetRunPlaneEff(kFALSE);

  // switch off cleanESD
  rec.SetCleanESD(kFALSE);

  AliLog::Flush();
  rec.Run();

}
Ejemplo n.º 27
0
// ---------------------------------------------------------------------------- 
void HLTT0Test(const Char_t *filename, const Char_t *cdbURI,
		  Int_t minEvent=-1, Int_t maxEvent=-1) {
  
  printf (" ============================================= \n\n");
  printf ("        TEST T0 RECONSTRUCTION              \n\n");
  printf (" ============================================= \n");

  if(!gSystem->AccessPathName("galice.root")){
    cerr << "AliReconstruction on raw data requires to delete galice.root, ";
    cerr << "or run at different place." << endl;
    cerr << "!!! DO NOT DELETE the galice.root of your simulation, ";
    cerr << "but create a subfolder !!!!" << endl;
    return;
  }
    TGrid::Connect("alien");

  if (gSystem->AccessPathName(filename)) {
    cerr << "can not find file " << filename << endl;
    return;
  }

  // -- connect to the GRID if we use a file or OCDB from the GRID
  TString struri=cdbURI;
  TString strfile=filename;
  if (struri.BeginsWith("raw://") ||
      strfile.Contains("://") && !strfile.Contains("local://")) {
    TGrid::Connect("alien");
  }

  // -- Set the CDB storage location
  AliCDBManager * man = AliCDBManager::Instance();
  man->SetDefaultStorage(cdbURI);
  if (struri.BeginsWith("local://")) {
    // set specific storage for GRP entry
    // search in the working directory and one level above, the latter
    // follows the standard simulation setup like e.g. in test/ppbench
    if (!gSystem->AccessPathName("GRP/GRP/Data")) {
      man->SetSpecificStorage("GRP/GRP/Data", "local://$PWD");
    } else if (!gSystem->AccessPathName("../GRP/GRP/Data")) {
      man->SetSpecificStorage("GRP/GRP/Data", "local://$PWD/..");      
    } else {
      cerr << "can not find a GRP entry, please run the macro in the folder" << endl;
      cerr << "of a simulated data sample, or specify a GRID OCDB" << endl;
      HLTT0Test();      
      return;
    }
  }

  //////////////////////////////////////////////////////////////////////////////////////
  //
  // Reconstruction settings
  AliReconstruction rec;

  if (minEvent>=0 || maxEvent>minEvent) {
    if (minEvent<0) minEvent=0;
    if (maxEvent<minEvent) maxEvent=minEvent;
    rec.SetEventRange(minEvent,maxEvent);
  }

  rec.SetRunReconstruction("HLT");
  rec.SetLoadAlignFromCDB(kFALSE);
  rec.SetWriteESDfriend(kFALSE);

  // due to bug ...
  // StopOnError needs to be disabled
  rec.SetStopOnError(kFALSE);
  rec.SetRunVertexFinder(kFALSE);
  rec.SetInput(filename);

  // QA options
  rec.SetRunQA(":") ;
  //rec.SetQARefDefaultStorage("local://$ALICE_ROOT/QAref") ;

  //////////////////////////////////////////////////////////////////////////////////////
  //
  // setup the HLT system
  AliHLTSystem* pHLT=AliHLTPluginBase::GetInstance();
  /*
  // define a data publisher configuration for T0 raw data
  AliHLTConfiguration publisher("RAW-Publisher", 
				"AliRawReaderPublisher", 
				"", 
				"-equipmentid 3584 "
				"-datatype 'DDL_RAW ' 'VZRO' "
				"-dataspec 0x01"
				);

  // define configuration of the T0Reconstruction component
  AliHLTConfiguration vzeroReco("T0-Reconstruction", 
				"T0Reconstruction", 
				"RAW-Publisher",
				""
				);

  // define configuration of the GlobalEsdConverter component
  AliHLTConfiguration esdConverter("GLOBAL-ESD-Converter",
				   "GlobalEsdConverter", 
				   "T0-Reconstruction",
				   ""
				   );

  // define configuration for Root file writer of T0 output
  AliHLTConfiguration rootWriter("RootWriter", 
				 "ROOTFileWriter",
				 "T0-Reconstruction GLOBAL-ESD-Converter",
				 "-directory analysis -datafile vzeroRec"
				 );

  */

  // set option for the HLT module in AliReconstruction
  // arguments
  //  - ignore-hltout : ignore the HLTOUT payload from the HLT DDLs
  //  - libraries to be used as plugins
  //  - loglevel=0x7c : Important, Info, Warning, Error, Fatal
  rec.SetOption("HLT",
		"ignore-hltout " 
		"libAliHLTUtil.so libAliHLTGlobal.so libAliHLTITS.so libAliHLTT0.so "
		"loglevel=0x7c "
		"chains=T0-RECO"//"GLOBAL-ESD-Converter,RootWriter"
		);

  rec.SetRunPlaneEff(kFALSE);

  // switch off cleanESD
  rec.SetCleanESD(kFALSE);

  AliLog::Flush();
  rec.Run();
}
Ejemplo n.º 28
0
void rec() {

  AliReconstruction Rec;
 
  Rec.SetRunQA("ALL:ALL");
  Rec.SetDefaultStorage("alien://Folder=/alice/simulation/2008/v4-15-Release/Residual");

  // QA reference
  Rec.SetQARefDefaultStorage("local://$ALICE_ROOT/QAref") ;

  //GRP
  Rec.SetSpecificStorage("GRP/GRP/Data",Form("local://%s",gSystem->pwd()));

 // Vertex
  Rec.SetSpecificStorage("GRP/Calib/MeanVertexSPD",     "alien://folder=/alice/data/2009/OCDB");
  Rec.SetSpecificStorage("GRP/Calib/MeanVertex",        "alien://folder=/alice/data/2009/OCDB");
  Rec.SetSpecificStorage("GRP/Calib/MeanVertexTPC",     "alien://folder=/alice/data/2009/OCDB");

 // SPD
  Rec.SetSpecificStorage("ITS/Calib/SPDDead","alien://Folder=/alice/data/2009/OCDB");
  Rec.SetSpecificStorage("TRIGGER/SPD/PITConditions","alien://folder=/alice/data/2009/OCDB");
//
// Reco Param
  Rec.SetSpecificStorage("ITS/Calib/RecoParam","alien://folder=/alice/data/2009/OCDB");
  Rec.SetSpecificStorage("GRP/Calib/RecoParam","alien://folder=/alice/data/2009/OCDB");
//
// TPC
//
  Rec.SetSpecificStorage("TPC/Calib/PadGainFactor",     "alien://folder=/alice/data/2009/OCDB");
//
// PMD: this object is missing in the MC OCDB
//
  Rec.SetSpecificStorage("PMD/Calib/NoiseCut",     "alien://folder=/alice/data/2009/OCDB");

  TStopwatch timer;
  timer.Start();
  Rec.Run();
  timer.Stop();
  timer.Print();

}
Ejemplo n.º 29
0
void runReconstruction(int seed, const char* input, const char* recoptions, bool rawocdb)
{ 
  AliCDBManager* man = AliCDBManager::Instance();
  
  if ( rawocdb ) 
  {
    cout << "**** WILL USE RAW OCDB" << endl;
    man->SetDefaultStorage("raw://"); //alien://folder=/alice/data/2011/OCDB?cacheFold=/Users/laurent/OCDBcache");
    man->SetSpecificStorage("ITS/Calib/RecoParam","alien://folder=/alice/cern.ch/user/p/ppillot/OCDB_PbPbSim");
  } 
  else
  {
    man->SetDefaultStorage("local://$ALICE_ROOT/OCDB");

    man->SetSpecificStorage("GRP/GRP/Data",
                            Form("local://%s",gSystem->pwd()));

  }
  
  gRandom->SetSeed(seed);
  
  AliReconstruction* MuonRec = new AliReconstruction("galice.root");
  MuonRec->SetInput(gSystem->ExpandPathName(input));
  MuonRec->SetRunReconstruction("MUON ITS");
  MuonRec->SetFillESD("HLT");
  MuonRec->SetOption("HLT", "libAliHLTMUON.so");
  MuonRec->SetNumberOfEventsPerFile(10000);
  MuonRec->SetOption("MUON",recoptions);
  MuonRec->SetRunQA("MUON:ALL");
  MuonRec->SetQAWriteExpert(AliQAv1::kMUON);
  MuonRec->SetQARefDefaultStorage("local://$ALICE_ROOT/QAref") ;
  MuonRec->SetWriteESDfriend(kFALSE);
  MuonRec->SetCleanESD(kFALSE);  
  MuonRec->SetStopOnError(kFALSE);
  
  // uncomment the following lines if you want to set custom RecoParam
  // instead of getting them from the OCDB
  //  AliMUONRecoParam *muonRecoParam = AliMUONRecoParam::GetLowFluxParam();
  //  muonRecoParam->SaveFullClusterInESD(kTRUE,100.);
  //  MuonRec->SetRecoParam("MUON",muonRecoParam);
  
  MuonRec->Run();
  
  delete MuonRec;
  
  //gObjectTable->Print();
}
Ejemplo n.º 30
0
void recCPass0(const char *filename="raw.root",Int_t nevents=-1, const char *ocdb="raw://", const char* options="?Trigger=kCalibBarrel")
{

  if (gSystem->Getenv("ALIROOT_FORCE_COREDUMP"))
  {
    printf("ALIROOT_FORCE_COREDUMP set\n");
    gSystem->ResetSignal(kSigFloatingException);
    gSystem->ResetSignal(kSigSegmentationViolation);
  }
  // addopt errors to account for calibration imprefection before cpass0
  // 1) For TPC
  Double_t tpcSystematicErrors[5]={1,1.5,1./100.,1./100.,0.1};
  Double_t tpcSystematicErrorClusters[2]={1.5,1.5};
  Double_t tpcExtendedRoads[2]={2.5,2.5};
  Double_t tpcPrimDCACuts[2] = {10.,30.}; // Y,Z
  TVectorD *vectpcSystematicErrors=new TVectorD(5, tpcSystematicErrors);
  TVectorD *vectpcSystematicErrorClusters=new TVectorD(2, tpcSystematicErrorClusters);
  TVectorD *vectpcExtendedRoads= new TVectorD(2, tpcExtendedRoads);
  TVectorD *vectpcPrimDCACuts = new TVectorD(2, tpcPrimDCACuts);
  const double kZOutSectorCut = 3.; // cut on clusters on wrong side of CE (added to extendedRoadZ)
  const double kPrimaryZ2XCut = 1.2; // cut on clusters Z/X (large eta)
  AliTPCReconstructor::SetSystematicError(vectpcSystematicErrors);
  AliTPCReconstructor::SetSystematicErrorCluster(vectpcSystematicErrorClusters);
  AliTPCReconstructor::SetExtendedRoads(vectpcExtendedRoads);
  AliTPCReconstructor::SetPrimaryDCACut(vectpcPrimDCACuts);
  AliTPCReconstructor::SetZOutSectorCut(kZOutSectorCut);
  AliTPCReconstructor::SetPrimaryZ2XCut(kPrimaryZ2XCut);
  //
  if (gSystem->Getenv("streamLevel")){
    SetStreamLevel( AliTPCtracker::kStreamErrParam| AliTPCtracker::kStreamTransform);
  }
  // 2) For ITS
  AliITSReconstructor::SetCheckInvariant(kFALSE); // no invariant check with extended TPC errors
  // 3) For TOF
  // extra tolerance on top of default from recoparam
  AliTOFReconstructor::SetExtraTolerance(5.0);
  // 4) For TRD
  AliTRDReconstructor::SetExtraMaxClPerLayer(3); // to allow >6 cluster candidates per layer
  AliTRDReconstructor::SetExtraBoundaryTolerance(3); // relax boundary check
  AliTRDReconstructor::SetExtraRoadY(4); // extra road in Y
  AliTRDReconstructor::SetExtraRoadZ(6); // extra road in Z
  AliTRDReconstructor::SetExtraChi2Out(25); // extra chi2 tolerance on backpropagation
  //
  // Load some system libs for Grid and monitoring
  // Set the CDB storage location
  AliCDBManager * man = AliCDBManager::Instance();
  man->SetDefaultStorage(ocdb);
  // Reconstruction settings
  AliReconstruction rec;
  //
  // do we extract the TPC recpoints in advance
  Int_t preclustTPC = TString(gSystem->Getenv("preclusterizeTPC")).Atoi();
  Bool_t noTPCLocalRec = preclustTPC==1;
  if (noTPCLocalRec) printf("preclustTPC = %d: TPC local reconstruction assumed to be already done\n", preclustTPC);
  else printf("preclustTPC = %d: TPC local reconstruction assumed to NOT be already done\n", preclustTPC);
  //
  if (gSystem->Getenv("disableOuter")!=NULL){
    TString disOuter = gSystem->Getenv("disableOuter");
    TString disOuterLoc = disOuter;
    if (noTPCLocalRec) {
      disOuterLoc.ReplaceAll("TPC","");
      disOuterLoc.ReplaceAll("HLT","");
    }
    rec.SetRunReconstruction(disOuter.Data());
    rec.SetRunLocalReconstruction(disOuterLoc.Data());
  } 
  else if (noTPCLocalRec) {
    rec.SetRunReconstruction("ALL -HLT");
    rec.SetRunLocalReconstruction("ALL -TPC -HLT");
  }
  else {
    rec.SetRunLocalReconstruction("ALL");
  }

  // Upload CDB entries from the snapshot (local root file) if snapshot exist
  if (gSystem->AccessPathName("OCDB.root", kFileExists)==0) {        
    rec.SetDefaultStorage("local://");
    rec.SetCDBSnapshotMode("OCDB.root");
  }
  else {
    // setup ocdb by custom (if any) or default settings
    if (gSystem->AccessPathName("localOCDBaccessConfig.C", kFileExists)==0) {        
      gROOT->LoadMacro("localOCDBaccessConfig.C");
      localOCDBaccessConfig();
    }else { // default settings
      AliCDBManager* man = AliCDBManager::Instance();
      man->SetRaw(kTRUE);
    }
    TString cdbMode = gSystem->Getenv("OCDB_SNAPSHOT_CREATE");
    if (cdbMode == "kTRUE") {
      gROOT->LoadMacro("$ALIDPG_ROOT/MC/CreateSnapshot.C");
      CreateSnapshot("OCDB.root",filename);
      return;
    }
  }

  // All friends
  rec.SetFractionFriends(2.0);

 // AliReconstruction settings - hardwired MB trigger for calibration

  TString newfilename = filename;
  newfilename += options;
  rec.SetInput(newfilename.Data());

  // Set protection against too many events in a chunk (should not happen)
  if (nevents>0) rec.SetEventRange(0,nevents);

  // Remove recpoints after each event
  TString delRecPoints="TPC TRD ITS";
  if (noTPCLocalRec) delRecPoints.ReplaceAll("TPC","");
  rec.SetDeleteRecPoints(delRecPoints.Data()); 
  //


  // Switch off the V0 finder - saves time!
  //  rec.SetRunMultFinder(kFALSE);
  rec.SetRunV0Finder(kFALSE); 

  //
  // QA options - all QA is off
  //
  rec.SetRunQA(":");
  rec.SetRunGlobalQA(kFALSE);

  // AliReconstruction settings
  rec.SetWriteESDfriend(kTRUE);
  rec.SetWriteAlignmentData();
  rec.SetUseTrackingErrorsForAlignment("ITS");
  rec.SetCleanESD(kFALSE);

  // ITS options (see ALIROOT-7179)
  float itsErrY2[6]={0., 0., 0.1*0.1, 0.1*.1, 0.,0.};
  TVectorF *vecITSErrY2 = new TVectorF(6, itsErrY2);
  AliITSReconstructor::SetExtraErrorY2(vecITSErrY2);
  
  //Ignore SetStopOnError
  rec.SetStopOnError(kFALSE);

  AliLog::Flush();
  rec.Run();
}