示例#1
0
//______________________________________________________________________________
void MUONStatusMap(AliMUONVStore*& vstatus,
                   AliMUONVStore*& vstatusMap,
                   const char* cdbStorage = "alien://folder=/alice/data/2011/OCDB",
                   Int_t runNumber=145292)
{

  AliCDBManager::Instance()->SetDefaultStorage(cdbStorage);
  AliCDBManager::Instance()->SetRun(runNumber);

  AliMUONCDB::LoadMapping();

  AliMUONRecoParam* recoParam = AliMUONCDB::LoadRecoParam();

  AliMUONCalibrationData cd(runNumber);

  AliMUONPadStatusMaker statusMaker(cd);

  statusMaker.SetLimits(*recoParam);

  UInt_t mask = recoParam->PadGoodnessMask();

  statusMaker.Report(mask);

  vstatus = static_cast<AliMUONVStore*>(statusMaker.StatusStore()->Clone());

  const Bool_t deferredInitialization = kFALSE;

  AliMUONPadStatusMapMaker statusMapMaker(cd,mask,deferredInitialization);

  vstatusMap = static_cast<AliMUONVStore*>(statusMapMaker.StatusMap()->Clone());
}
示例#2
0
//______________________________________________________________________________
void ChangeRecoParam(Int_t startRun,const char* fromURI,const char* toURI)
{
  AliCDBManager::Instance()->SetDefaultStorage(fromURI);
  AliCDBManager::Instance()->SetRun(startRun);
  
  AliCDBEntry* entry = AliCDBManager::Instance()->Get("MUON/Calib/RecoParam");
  
  AliMpCDB::LoadAll();

  if (!entry) return;
  
  TObject* o = entry->GetObject();
  
  if (!o)
  {
    cout << "Could not get recoparams ? Oups" << endl;
    return;
  }
  
  if ( o->IsA() != TObjArray::Class() ) 
  {
    cout << "This code only works with TObjArray recoparams. Sorry" << endl;
    return;
  }
  
  TObjArray* array = static_cast<TObjArray*>(o);
  for ( Int_t i = 0; i <= array->GetLast(); ++i ) 
  {
    AliDetectorRecoParam* p = static_cast<AliDetectorRecoParam*>(array->At(i));
    // if (AliRecoParam::Convert(p->GetEventSpecie())==AliRecoParam::kLowMult)
    // {
    //   cout << Form("array[%d]=%s %s %s",i,
    //                p ? p->ClassName() : "",
    //                p ? AliRecoParam::GetEventSpecieName(AliRecoParam::Convert(p->GetEventSpecie())) :"",
    //                p ? ( p->IsDefault() ? "default" : "") : "" ) << endl;
    //   p->Print("");
      AliMUONRecoParam* rp = dynamic_cast<AliMUONRecoParam*>(p);
      if (!rp) 
      {
        cout << "OUPS. OUPS" << endl;
        return;
      }
//      rp->SetHVLimit(2,1580);
      UInt_t mask = rp->PadGoodnessMask();
      mask |= ( (1<<7) << 24 );
      rp->SetPadGoodnessMask(mask);
      rp->Print("");
  }
  
  AliCDBManager::Instance()->SetDefaultStorage(toURI);
  
  AliMUONCDB::WriteToCDB(array, "MUON/Calib/RecoParam", startRun, AliCDBRunRange::Infinity(), 
                         "reconstruction parameters for MUON, patched to take into account the bit for bus patch removed online by PAR", "L. Aphecetche");
  
}
示例#3
0
//______________________________________________________________________________
void ChangeRecoParam(Int_t startRun=195767,const char* outputOCDB="alien://folder=/alice/cern.ch/user/l/laphecet/OCDB")
{
  AliCDBManager::Instance()->SetDefaultStorage("raw://");
  AliCDBManager::Instance()->SetRun(99999999);
  
  AliCDBEntry* entry = AliCDBManager::Instance()->Get("MUON/Calib/RecoParam");
  
  if (!entry) return;
  
  TObject* o = entry->GetObject();
  
  if (!o)
  {
    cout << "Could not get recoparams ? Oups" << endl;
    return;
  }
  
  if ( o->IsA() != TObjArray::Class() ) 
  {
    cout << "This code only works with TObjArray recoparams. Sorry" << endl;
    return;
  }
  
  TObjArray* array = static_cast<TObjArray*>(o);
  for ( Int_t i = 0; i <= array->GetLast(); ++i ) 
  {
    AliDetectorRecoParam* p = static_cast<AliDetectorRecoParam*>(array->At(i));
    if (AliRecoParam::Convert(p->GetEventSpecie())==AliRecoParam::kLowMult)
    {
      cout << Form("array[%d]=%s %s %s",i,
                   p ? p->ClassName() : "",
                   p ? AliRecoParam::GetEventSpecieName(AliRecoParam::Convert(p->GetEventSpecie())) :"",
                   p ? ( p->IsDefault() ? "default" : "") : "" ) << endl;
      p->Print("");
      AliMUONRecoParam* rp = dynamic_cast<AliMUONRecoParam*>(p);
      if (!rp) 
      {
        cout << "OUPS. OUPS" << endl;
        return;
      }
      rp->SetHVLimit(1,-99999);
      rp->SetPadGoodnessMask(0x400be93);
      rp->Print("");
    }
  }
  
  AliCDBManager::Instance()->SetDefaultStorage(outputOCDB);
  
  AliMUONCDB::WriteToCDB(array, "MUON/Calib/RecoParam", startRun, AliCDBRunRange::Infinity(), 
                         "reconstruction parameters for MUON, patched for event size limits (for DQM)", "L. Aphecetche");
  
}
示例#4
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") ;

  // 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");
  
  // tracker masks
  MuonRec.SetSpecificStorage("MUON/Calib/Gains","alien://Folder=/alice/cern.ch/user/b/bogdan/prod2009/cdb/rec");
  MuonRec.SetSpecificStorage("MUON/Calib/Pedestals","alien://Folder=/alice/cern.ch/user/b/bogdan/prod2009/cdb/rec");

  // reconstruction parameters
  AliMUONRecoParam *muonRecoParam = AliMUONRecoParam::GetLowFluxParam();
  muonRecoParam->SaveFullClusterInESD(kTRUE,100.);
  for (Int_t i = 0; i < 10; i++) {
    muonRecoParam->SetDefaultNonBendingReso(i, 0.1524);
    muonRecoParam->SetDefaultBendingReso(i, 0.05099);
  }
  //muonRecoParam->Print("FULL");
  MuonRec.SetRecoParam("MUON",muonRecoParam);

  MuonRec.SetNumberOfEventsPerFile(500);

  TStopwatch timer;
  timer.Start();
  MuonRec.Run();
  timer.Stop();
  timer.Print();
  
}
示例#5
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();
  
}
示例#6
0
//______________________________________________________________________________
Int_t GetBadChannels(Int_t runNumber,
                     Int_t& nbadped,
                     Int_t& nbadhv,
                     Int_t& nbadlv,
                     Int_t& nbadocc,
                     Int_t& nmissing,
                     Int_t& nreco,
                     Int_t chamber=-1)
{
  if (!AliCDBManager::Instance()->IsDefaultStorageSet())
  {
//    AliCDBManager::Instance()->SetDefaultStorage("alien://folder=/alice/data/2011/OCDB?cacheFold=/local/cdb");
    AliCDBManager::Instance()->SetDefaultStorage("raw://");
  }

  AliCDBManager::Instance()->SetRun(runNumber);

  AliMpCDB::LoadDDLStore();

  AliMUONCalibrationData cd(runNumber,true);

  AliMUONPadStatusMaker statusMaker(cd);

  AliMUONRecoParam* recoParam = AliMUONCDB::LoadRecoParam();

  statusMaker.SetLimits(*recoParam);

  AliMpManuIterator it;
  Int_t detElemId, manuId;

  Int_t pedCheck = (
                     AliMUONPadStatusMaker::kPedMeanZero |
                     AliMUONPadStatusMaker::kPedMeanTooLow |
                     AliMUONPadStatusMaker::kPedMeanTooHigh |
                     AliMUONPadStatusMaker::kPedSigmaTooLow |
                     AliMUONPadStatusMaker::kPedSigmaTooHigh );

  Int_t hvCheck = (
                   AliMUONPadStatusMaker::kHVError |
                   AliMUONPadStatusMaker::kHVTooLow |
                   AliMUONPadStatusMaker::kHVTooHigh |
                   AliMUONPadStatusMaker::kHVChannelOFF |
                   AliMUONPadStatusMaker::kHVSwitchOFF );


  Int_t occCheck = (
                    AliMUONPadStatusMaker::kManuOccupancyTooHigh
                   );

  Int_t lvCheck = ( AliMUONPadStatusMaker::kLVTooLow );

  Int_t ntotal(0);
  Int_t nbad(0);
  nbadped=0;
  nbadocc=0;
  nbadhv=0;
  nbadlv=0;
  nmissing=0;
  nreco=0;

  while ( it.Next(detElemId,manuId) )
  {
    AliMpDetElement* de = AliMpDDLStore::Instance()->GetDetElement(detElemId);

    if ( chamber >= 0 && AliMpDEManager::GetChamberId(detElemId) != chamber ) continue;

    for ( Int_t manuChannel = 0; manuChannel < AliMpConstants::ManuNofChannels(); ++manuChannel )
    {
      if ( de->IsConnectedChannel(manuId,manuChannel) )
      {
        ++ntotal;

        UInt_t status = statusMaker.PadStatus(detElemId, manuId, manuChannel);

        if (!status) continue;

        bool bad(false);

        if ( status & AliMUONPadStatusMaker::BuildStatus(pedCheck,0,0,0) )
        {
          ++nbadped;
          bad=true;
        }

        if ( status & AliMUONPadStatusMaker::BuildStatus(0,hvCheck,0,0) )
        {
          ++nbadhv;
          bad=true;
        }

        if ( status & AliMUONPadStatusMaker::BuildStatus(0,0,lvCheck,0) )
        {
          ++nbadlv;
          bad=true;
        }

        if ( status & AliMUONPadStatusMaker::BuildStatus(0,0,0,occCheck) )
        {
          ++nbadocc;
          bad=true;
        }

        if ( status & recoParam->PadGoodnessMask() )
        {
          ++nreco;
        }

        if ( status & AliMUONPadStatusMaker::BuildStatus(AliMUONPadStatusMaker::kMissing,0,0,AliMUONPadStatusMaker::kMissing) )
        {
          bad=true;
          ++nmissing;
        }

        if (bad) ++nbad;
      }
    }
  }

  if ( chamber<0 && ntotal!=NTOTALNUMBEROFPADS)
  {
    cerr << Form("ERROR ! NOT THE EXPECTED NUMBER OF CHANNELS (%d vs 1064008) FOR RUN %09d",
                 ntotal,runNumber) << endl;
  }
  else
  {
    cout << Form("Chamber %d - %d channels",chamber,ntotal) << endl;
    cout << Form("nbadped %5d nbadhv %5d nbadlv %5d nbadocc %5d nmissing %5d nreco %5d",
                 nbadped,nbadhv,nbadlv,nbadocc,nmissing,nreco) << endl;
  }

  AliCDBManager::Instance()->ClearCache();

  return nbad;
}