Пример #1
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();

}
Пример #2
0
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();
}
Пример #3
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();
}
Пример #4
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();
}
Пример #5
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();

}
Пример #6
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();
}