Beispiel #1
0
//_________________________________________________________________________________________________
void GroupByChamber(AliMergeableCollection& hc, int timeResolution)
{
  for ( Int_t ich = 1; ich <= 10; ++ich )
  {
    AliMpDEIterator it;
  
    it.First(ich-1);
  
    TH1* hchamberLeft(0x0);
    TH1* hchamberRight(0x0);
    TList listLeft;
    TList listRight;
    listLeft.SetOwner(kFALSE);
    listRight.SetOwner(kFALSE);
    
    AliMpDCSNamer dcs("TRACKER");

    while (!it.IsDone())
    {
      Int_t detElemId = it.CurrentDEId();

       AliMpDetElement* de = AliMpDDLStore::Instance()->GetDetElement(detElemId);
    
      TH1* h = hc.Histo(Form("/DE/HITS/%ds/DE%04d",timeResolution,detElemId));
      
      if (dcs.DCSAliasName(detElemId).Contains("Left"))
      {
        if (!hchamberLeft)
        {
          hchamberLeft = static_cast<TH1*>(h->Clone(Form("CHAMBER%dLEFT",ich)));
        }
        else
        {
          listLeft.Add(h);
        }
      }
      else
      {
        if (!hchamberRight)
        {
          hchamberRight = static_cast<TH1*>(h->Clone(Form("CHAMBER%dRIGHT",ich)));
        }
        else
        {
          listRight.Add(h);
        }
      }
      
      it.Next();
    }
    
    hchamberLeft->Merge(&listLeft);
    hchamberRight->Merge(&listRight);
    hc.Adopt(Form("/CHAMBER/HITS/%ds",timeResolution),hchamberLeft);
    hc.Adopt(Form("/CHAMBER/HITS/%ds",timeResolution),hchamberRight);
    TH1* hchamber = static_cast<TH1*>(hchamberLeft->Clone(Form("CHAMBER%d",ich)));
    hchamber->Add(hchamberRight);
    hc.Adopt(Form("/CHAMBER/HITS/%ds",timeResolution),hchamber);
  }
}
Beispiel #2
0
void testDE() 
{
  AliMpCDB::LoadMpSegmentation2();

  AliMpDEIterator it;
  for ( it.First(); ! it.IsDone(); it.Next() ) {
    cout << "In detection element: " << it.CurrentDEId() << endl;

    // Create/get segmentation via factory
    const AliMpVSegmentation* kSegmentation 
      = AliMpSegmentation::Instance()
          ->GetMpSegmentation(it.CurrentDEId(), AliMp::kCath0);
      
    // Print number of pads
   cout << "   number of pads: " << kSegmentation->NofPads() << endl;   
      
    // Find pad by indices in this DE
    Int_t ix = kSegmentation->MaxPadIndexX()/2;
    Int_t iy = kSegmentation->MaxPadIndexY()/2;
    AliMpPad pad = kSegmentation->PadByIndices(ix, iy, false);
    
    cout << "   found pad: " << pad << endl << endl;
  }
}
Beispiel #3
0
//_________________________________________________________________________________________________
void GroupByDE(AliMergeableCollection& hc, int timeResolution)
{
   AliMpDEIterator it;
  
  it.First();
  
  while (!it.IsDone())
  {
    Int_t detElemId = it.CurrentDEId();
    
    AliMpDetElement* de = AliMpDDLStore::Instance()->GetDetElement(detElemId);
    
    TList list;
    list.SetOwner(kFALSE);
    TH1* hde(0x0);
    
    if ( de->GetStationType() != AliMp::kStationTrigger)
    {
      for ( Int_t i = 0; i < de->GetNofBusPatches(); ++i )
      {
        Int_t busPatchId = de->GetBusPatchId(i);
        
        TH1* h = hc.Histo(Form("/BUSPATCH/HITS/%ds/BP%04d",timeResolution,busPatchId));
        
        if (!hde)
        {
          hde = static_cast<TH1*>(h->Clone());
          hde->SetName(Form("DE%04d",detElemId));
        }
        else
        {
          list.Add(h);
        }
      }
      
      hde->Merge(&list);
      hc.Adopt(Form("/DE/HITS/%ds",timeResolution),hde);
    }
    
    it.Next();
  }

}