#pragma link C++ class AliACORDEReconstructor+;
#pragma link C++ class AliACORDEQADataMakerRec+;
+#pragma link C++ class AliACORDERecoParam+;
+
#endif
// there are 60 modules. Note that number of first module is 1 (one)
for(int t=0; t<60; t++)
{
- fEfficiencies[t] =calibda.GetEfficiency(t+1);
- fRates[t] = calibda.GetRate(t+1);
+ fEfficiencies[t] =calibda.GetEfficiency(t+1);
+ fRates[t] = calibda.GetRate(t+1);
+ fModulesActivity[t] = calibda.GetModuleActivity(t+1);
}
}
//_______________________________________________________________
// there are 60 modules. Note that number of first module is 1 (one)
for(int t=0; t<60; t++)
{
- fEfficiencies[t] =calibda.GetEfficiency(t+1);
- fRates[t] = calibda.GetRate(t+1);
+ fEfficiencies[t] =calibda.GetEfficiency(t+1);
+ fRates[t] = calibda.GetRate(t+1);
+ fModulesActivity[t] = calibda.GetModuleActivity(t+1);
}
return *this;
}
if(Rt) for (int t=0;t<60; t++) fRates[t] = Rt[t];
else for (int t=0;t<60; t++) fRates[t] = 0.0;
}
+
+void AliACORDECalibData::SetModulesActivity(Float_t* Mac)
+{
+ if(Mac) for (int t=0;t<60;t++) fModulesActivity[t] = Mac[t];
+ else for (int t=0;t<60;t++) fModulesActivity[t] = 0.0;
+}
+
Float_t GetEfficiency(Int_t i) const { return fEfficiencies[i-1];}
Float_t* GetRates() const {return (float*)fRates;}
Float_t GetRate(Int_t i) const {return fRates[i-1];}
+ Float_t* GetModulesActivity() const {return (float*)fModulesActivity;}
+ Float_t GetModuleActivity(Int_t i) const {return fModulesActivity[i-1];}
// TList* GetHistos()const {return Hist;}
void SetRates(Float_t* Rt);
void SetRate(Float_t rate, Int_t mod){fRates[mod-1]=rate;}
void AddHMultiHits(TH1D *Histo){fMultiHits=(TH1D*)Histo->Clone("MultiHits");}//
void AddHTMultiHits(TH1D *Histo){fTMultiHits=(TH1D*)Histo->Clone("Total Multi Hits");}
void Draw(Option_t *option="");
+ void SetModulesActivity(Float_t* Mac);
+ void SetModuleActivity(Float_t mac,Int_t mod){fModulesActivity[mod-1]=mac;}
protected:
Float_t fEfficiencies[60];
Float_t fRates[60];
+ Float_t fModulesActivity[60];
TH1D *fHits;
TH1D *fTHits;
TH1D *fMultiHits;
#include "AliQA.h"
#include "AliQAChecker.h"
#include "AliACORDEQAChecker.h"
+#include "AliCDBEntry.h"
+#include "AliQAManager.h"
ClassImp(AliACORDEQAChecker)
Double_t * AliACORDEQAChecker::Check(AliQA::ALITASK_t /*index*/, TObjArray ** list)
{
-
-// Super-basic check on the QA histograms on the input list:
- // look whether they are empty!
+ // We added one check to the ACORDE's QA histograms:
+ // 1.- We check if they are empty
+ // we check for the reference histogram to start the QAChecker. If not QAref object
+ // is found, we check that the number of hits per channel is not so far from
+ // the maximum number of hits.
Double_t * test = new Double_t[AliRecoParam::kNSpecies] ;
Int_t * count = new Int_t[AliRecoParam::kNSpecies] ;
+ Double_t * acoTest = new Double_t[AliRecoParam::kNSpecies];
+ Double_t acoHitsNorm = 0;
+ Double_t * acoRefTest = new Double_t[AliRecoParam::kNSpecies];
+
+ // Look at the QAref data for ACORDE
+
+ char * acoOCDBDir = Form("ACORDE/%s/%s",AliQA::GetRefOCDBDirName(),AliQA::GetRefDataDirName());
+ AliCDBEntry *acoQARefDir = AliQAManager::QAManager()->Get(acoOCDBDir);
+
+
for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
test[specie] = 0.0 ;
count[specie] = 0 ;
+ acoTest[specie] = 0.0;
}
for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
if (list[specie]->GetEntries() == 0){
test[specie] = 1. ; // nothing to check
+ acoTest[specie] = 1.;
}
else {
TIter next(list[specie]) ;
AliInfo(Form("%s -> %f", hdata->GetName(), rv)) ;
count[specie]++ ;
test[specie] += rv ;
+
+
+ // here we implement the second version for ACORDEQAChecker
+ // by the moment we only compare that the hits in every ACORDE's channel
+ // are close and > 0
+ for (Int_t i=0;i<60;i++)
+ {
+ acoHitsNorm = hdata->GetBinContent(i)/hdata->GetMaximum();
+ if (acoQARefDir)
+ {
+ AliWarning("Using the QA Reference data for ACORDE !!!");
+ test[specie] = CheckAcordeRefHits(list[specie],(TObjArray *)acoQARefDir->GetObject());
+ if ((test[specie] = 0.86) || (acoHitsNorm>0.50))
+ {
+ acoRefTest[specie]=0.78;printf("testMario: %f\n",acoRefTest[specie]);
+ }
+ }else{
+ AliWarning("Using the inner ACORDE QA Checker !!!");
+ if ( (acoHitsNorm>0.40) && (acoHitsNorm<=1) ) acoTest[specie] = 0.75;
+ if ( (acoHitsNorm>0.0020) && (acoHitsNorm<=0.40) ) acoTest[specie] = 0.251;
+ if ( (acoHitsNorm>0.0) && (acoHitsNorm<=0.0020) ) acoTest[specie] = 0.0010;
+ if ( (acoHitsNorm>-1.0) && (acoHitsNorm<=0.0) ) acoTest[specie] = -0.5;
+ }
+ }
}
else{
AliError("Data type cannot be processed") ;
test[specie] = 0.5; //upper limit value to set kWARNING flag for a task
}
else {
- test[specie] /= count[specie] ;
+ if (acoQARefDir) test[specie] = acoRefTest[specie];
+ else{
+ test[specie] = acoTest[specie];printf("testDyMa: %f\n",test[specie]);}
}
}
}
}
return test ;
}
-
+Double_t AliACORDEQAChecker::CheckAcordeRefHits(TObjArray *AcordeList, TObjArray *AcordeRef) const
+{
+ Double_t acoTest = 0;
+ TIter next(AcordeList);
+ TH1 * histo;
+
+ while ( (histo = dynamic_cast<TH1 *>(next())) )
+ {
+ if( histo->KolmogorovTest((TH1F *)AcordeRef->At(0))<0.8) acoTest = 0.86;
+ }
+ return acoTest;
+}
virtual Double_t * Check(AliQA::ALITASK_t index) ;
virtual Double_t * Check(AliQA::ALITASK_t index, TObjArray ** list) ;
-// Double_t CheckEntries(TObjArray * list) const ;/*--> to be implemented*/
+ Double_t CheckAcordeRefHits(TObjArray *AcordeList, TObjArray *AcordeRef) const;
private:
TClonesArray * hits = new TClonesArray("AliACORDEhit",1000);
TBranch * branch = hitTree->GetBranch("ACORDE");
- if (!branch)
- {
+ if (!branch) {
AliWarning("ACORDE branch in Hit Tree not found");
- }else
- {
- if (branch)
- {
- branch->SetAddress(&hits);
- }else
- {
- AliError("Branch ACORDE hit not found");
- exit(111);
- }
- Int_t ntracks = (Int_t)hitTree->GetEntries();
- if (ntracks<=0) return;
- for(Int_t track=0;track<ntracks;track++)
- {
+ } else {
+ branch->SetAddress(&hits);
+ for(Int_t track = 0 ; track < branch->GetEntries() ; track++) {
branch->GetEntry(track);
- Int_t nhits = hits->GetEntriesFast();
- for(Int_t ihit=1;ihit<=nhits;ihit++)
- {
+ for(Int_t ihit=0 ; ihit < hits->GetEntriesFast() ; ihit++) {
AliACORDEhit *AcoHit = (AliACORDEhit*) hits->UncheckedAt(ihit);
- if(!AcoHit)
- {
+ if(!AcoHit) {
AliError("The unchecked hit doesn't exist");
- break;
+ continue ;
}
GetHitsData(0)->Fill(AcoHit->GetModule()-1);
- }
- }
- }
-
+ }
+ }
+ }
}
//____________________________________________________________________________
void AliACORDEQADataMakerSim::MakeDigits( TTree *digitsTree)
{
//fills QA histos for Digits
-
-
- TClonesArray * digits = new TClonesArray("AliACORDEdigit",1000);
- TBranch * branch = digitsTree->GetBranch("ACORDEdigit");
- if (!branch)
- {
- AliWarning("ACORDE branch in Digits Tree not found");
- }else
- {
- if (branch)
- {
- branch->SetAddress(&digits);
- }else
- {
- AliError("Branch ACORDE digit not found");
- exit(111);
- }
- Int_t ntracks = (Int_t)digitsTree->GetEntries();
- if (ntracks<=0) return;
- printf("Entries in DigitsTree:%d\n",ntracks);
- for(Int_t track=0;track<ntracks;track++)
- {
- branch->GetEntry(track);
- Int_t ndigits = digits->GetEntriesFast();
- for(Int_t idigit=0;idigit<ndigits;idigit++)
- {
- AliACORDEdigit *AcoDigit = (AliACORDEdigit*) digits->UncheckedAt(idigit);
- if (!AcoDigit)
- {
- AliError("The unchecked digit doesn't exist");
- break;
- }
- GetDigitsData(0)->Fill(AcoDigit->GetModule()-1);
- }
- }
-
-
+ TClonesArray * digits = new TClonesArray("AliACORDEdigit",1000);
+ TBranch * branch = digitsTree->GetBranch("ACORDEdigit");
+ if (!branch) {
+ AliWarning("ACORDE branch in Digits Tree not found");
+ } else {
+ branch->SetAddress(&digits);
+ for(Int_t track = 0 ; track < branch->GetEntries() ; track++) {
+ branch->GetEntry(track);
+ for(Int_t idigit = 0 ; idigit < digits->GetEntriesFast() ; idigit++) {
+ AliACORDEdigit *AcoDigit = (AliACORDEdigit*) digits->UncheckedAt(idigit);
+ if (!AcoDigit) {
+ AliError("The unchecked digit doesn't exist");
+ continue ;
}
-
+ GetDigitsData(0)->Fill(AcoDigit->GetModule()-1);
+ }
+ }
+ }
}
#include "AliACORDERawStream.h"
#include "AliESDEvent.h"
#include "AliACORDEdigit.h"
+#include "AliACORDERecoParam.h"
ClassImp(AliACORDEReconstructor)
AliACORDEReconstructor:: AliACORDEReconstructor():
AliReconstructor(),
fESDACORDE(0x0),
+ fAcordeRecoParam(0x0),
fCalibData(0x0)
{
// Default constructor
// Get calibration data
- fCalibData = GetCalibData();
+ fCalibData = GetCalibData();
+ fAcordeRecoParam = GetRecoParam();
}
-//FALTA IMPLEMENTAR_______________________________________________________________________
+//_______________________________________________________________________
AliACORDECalibData *AliACORDEReconstructor::GetCalibData() const
{
- // TO BE IMPLEMENTED !!
+ return 0x0;
+}
+//____________________________________________________________________________
+AliACORDERecoParam *AliACORDEReconstructor::GetRecoParam() const
+{
return 0x0;
}
//_____________________________________________________________________________
AliACORDEReconstructor::~AliACORDEReconstructor()
{
// destructor
-//NECESITAS esta clase
delete fESDACORDE;
}
void AliACORDEReconstructor::Init()
{
// initializer
-//NECESITAS esta clase
fESDACORDE = new AliESDACORDE;
}
#include "AliReconstructor.h"
#include "AliLog.h"
+#include "AliACORDERecoParam.h"
class AliACORDECalibData;
class AliESDACORDE;
AliACORDECalibData *GetCalibData() const;
+ AliACORDERecoParam *GetRecoParam() const;
+
+
protected:
-//NO PODEMOS USARLOS X Q NO EXISTEN
+
AliESDACORDE* fESDACORDE; // ACORDE ESD object
-
+ AliACORDERecoParam* fAcordeRecoParam; // Pointer to the ACORDE's RecoParam
+
private:
AliACORDEReconstructor(const AliACORDEReconstructor& reconstructor);
AliACORDEReconstructor& operator = (const AliACORDEReconstructor& reconstructor);
AliACORDECalibData* fCalibData; //! calibration data
- ClassDef(AliACORDEReconstructor, 0) // class for the ACORDE reconstruction
+ ClassDef(AliACORDEReconstructor, 1) // class for the ACORDE reconstruction
};
#endif
#-*-Mode: Makefile-*-
SRCS = AliACORDEReconstructor.cxx \
- AliACORDEQADataMakerRec.cxx
+ AliACORDEQADataMakerRec.cxx \
+ AliACORDERecoParam.cxx
+
HDRS:= $(SRCS:.cxx=.h)
DHDR:=ACORDErecLinkDef.h