1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
24 // lu@physi.uni-heidelberg.de
30 #include "TCollection.h"
32 #include "AliTRDdEdxBaseUtils.h"
33 #include "AliTRDdEdxCalibHistArray.h"
35 ClassImp(AliTRDdEdxCalibHistArray);
37 AliTRDdEdxCalibHistArray::AliTRDdEdxCalibHistArray(const Bool_t kNoInv):
38 TObjArray(kNoInv ? 4: 8)
43 SetName(GetArrayName());
46 const Int_t nbin[2]={AliTRDdEdxBaseUtils::NTRDtimebin(), 200};
47 const Double_t xmin[2]={0, 0.01};
48 const Double_t xmax[2]={nbin[0], 10};
49 const TString aname[2]={"globalTimeBin", "trdqovertpc"};
50 const TString atitle[2]={"det * AliTRDseedV1::kNtb + itb", "TRD-Cluster-Q / TPC-Signal"};
52 for(Int_t iter=0; iter<GetSize(); iter++){
53 THnBase *hi = new THnF(GetNameAt(iter), "", 2, nbin, xmin, xmax);
54 for(Int_t iaxis=0; iaxis<2; iaxis++){
55 TAxis *xi = hi->GetAxis(iaxis);
56 xi->SetName(aname[iaxis]);
57 xi->SetTitle(atitle[iaxis]);
60 AliTRDdEdxBaseUtils::BinLogX(xi);
67 AliTRDdEdxCalibHistArray::AliTRDdEdxCalibHistArray(const AliTRDdEdxCalibHistArray &obj):
75 AliTRDdEdxCalibHistArray & AliTRDdEdxCalibHistArray::operator=(const AliTRDdEdxCalibHistArray &obj)
81 if(&obj == this) return *this;
83 TObjArray::operator=(obj);
88 Long64_t AliTRDdEdxCalibHistArray::Merge(const TCollection* list)
91 // Merge list of objects (needed by PROOF)
100 TIterator* iter = list->MakeIterator();
104 while((obj = iter->Next()) != 0)
106 AliTRDdEdxCalibHistArray * entry = dynamic_cast<AliTRDdEdxCalibHistArray*>(obj);
107 if (entry == 0) continue;
109 if(GetSize()!= entry->GetSize()){
110 printf("AliTRDdEdxCalibHistArray::Merge GetSize()!= entry->GetSize() %d %d\n", GetSize(), entry->GetSize()); exit(1);
113 for(Int_t ii=0; ii<GetSize(); ii++){
114 THnBase *h0 = (THnBase*) At(ii);
115 THnBase *h1 = (THnBase*) entry->At(ii);