#include <TH1F.h>
#include <TH2F.h>
+#include "AliCDBPath.h"
+#include "AliCDBEntry.h"
+#include "AliCDBManager.h"
+#include "AliDetectorRecoParam.h"
#include "AliQAChecker.h"
#include "AliGlobalQADataMaker.h"
#include "AliGeomManager.h"
// create Raws histograms in Raws subdir
}
+//____________________________________________________________________________
+void AliGlobalQADataMaker::InitRecoParams()
+{
+ // Get the recoparam form the OCDB
+ if (!fRecoParam) {
+ TString name("GRP") ;
+ AliDebug(AliQAv1::GetQADebugLevel(), Form("Loading reconstruction parameter objects for detector %s", name.Data()));
+ AliCDBPath path(name.Data(),"Calib","RecoParam");
+ AliCDBEntry *entry=AliCDBManager::Instance()->Get(path.GetPath());
+ if(!entry) {
+ fRecoParam = NULL ;
+ AliDebug(AliQAv1::GetQADebugLevel(), Form("Couldn't find RecoParam entry in OCDB for detector %s",name.Data()));
+ }
+ else {
+ TObject * recoParamObj = entry->GetObject() ;
+ if ( strcmp(recoParamObj->ClassName(), "TObjArray") == 0 ) {
+ // The detector has only one set of reco parameters
+ AliDebug(AliQAv1::GetQADebugLevel(), Form("Array of reconstruction parameters found for detector %s",name.Data()));
+ TObjArray *recoParamArray = static_cast<TObjArray*>(recoParamObj) ;
+ for (Int_t iRP=0; iRP<recoParamArray->GetEntriesFast(); iRP++) {
+ fRecoParam = static_cast<AliDetectorRecoParam*>(recoParamArray->At(iRP)) ;
+ if (!fRecoParam)
+ break ;
+ else if (fRecoParam->IsDefault())
+ break ;
+ }
+ }
+ else if (recoParamObj->InheritsFrom("AliDetectorRecoParam")) {
+ // The detector has only one set of reco parameters
+ // Registering it in AliRecoParam
+ AliDebug(AliQAv1::GetQADebugLevel(), Form("Single set of reconstruction parameters found for detector %s",name.Data()));
+ fRecoParam = static_cast<AliDetectorRecoParam*>(recoParamObj) ;
+ static_cast<AliDetectorRecoParam*>(recoParamObj)->SetAsDefault();
+ } else {
+ AliError(Form("No valid RecoParam object found in the OCDB for detector %s",name.Data()));
+ }
+ }
+ }
+}
+
//____________________________________________________________________________
void AliGlobalQADataMaker::InitRecPoints() {
//------------------------------------------------------
// This function books the histograms of *track*residuals*
// as a part of global QA
//------------------------------------------------------
+ static Bool_t first = kTRUE ;
+ if ( ! first )
+ return ;
const Char_t *name[]={
"hGlobalSPD1ResidualsY","SPD1ResidualsZ",
"hGlobalSPD2ResidualsY","SPD2ResidualsZ",
new TH1F("hGlobalSSD2AbsoluteResidualsZPosZ",
"SSD2Absolute Residuals Z Pos Z",100,-3.,3.),47);
+ first = kFALSE ;
}
//____________________________________________________________________________
//------------------------------------------------------
const Bool_t expert = kTRUE ;
- const Bool_t image = kTRUE ;
- {// Cluster related QA
+ const Bool_t image = kTRUE ;
+
+ {// Event related QA
+ const Char_t *name[]={
+ "hGlobalPrimaryVertex"
+ };
+ const Char_t *title[]={
+ "Z-distribution of the primary vertex"
+ };
+ Add2ESDsList(new TH1F(name[0],title[0],100,-20.,20.),kEvt0,!expert,image);
+ }
+
+ {// Cluster related QA
const Char_t *name[]={
"hGlobalFractionAssignedClustersITS",
"hGlobalFractionAssignedClustersTPC",
// This function fills the ESD QA histograms
// as a part of global QA
//-----------------------------------------------------------
- // Check id histograms already created for this Event Specie
- if ( ! GetESDsData(kClr0) )
- InitESDs() ;
-
const AliESDEvent *esd=event;
+ // Event related QA
+ const AliESDVertex *vtx=esd->GetPrimaryVertex();
+ if (!vtx->GetStatus()) return;
+
+ Double_t xv=vtx->GetXv();
+ Double_t yv=vtx->GetYv();
+ Double_t zv=vtx->GetZv();
+ GetESDsData(kEvt0)->Fill(zv);
+
+
Int_t ntrk=esd->GetNumberOfTracks() ;
for (Int_t i=0; i<ntrk; i++) {
const AliESDtrack *track=esd->GetTrack(i);
GetESDsData(kClr0)->Fill(Float_t(n)/6.); //6 is the number of ITS layers
}
- for (Int_t i=0; i<6; i++) {
+ for (Int_t j=0; j<6; ++j) {
Int_t idet, sts;
Float_t xloc,zloc;
- if (!track->GetITSModuleIndexInfo(i,idet,sts,xloc,zloc)) continue;
- if (i>=2) idet+=240;
- if (i>=4) idet+=260;
+ if (!track->GetITSModuleIndexInfo(j,idet,sts,xloc,zloc)) continue;
+ if (j>=2) idet+=240;
+ if (j>=4) idet+=260;
if ((sts==1)||(sts==2)||(sts==4)) GetESDsData(kClr3)->Fill(idet);
}
// Track related QA
if (track->IsOn(AliESDtrack::kTPCrefit)) {
Float_t dz[2];
- track->GetDZ(0.,0.,0.,esd->GetMagneticField(),dz);
+ track->GetDZ(xv,yv,zv,esd->GetMagneticField(),dz);
if ((TMath::Abs(dz[0])<3.) && (TMath::Abs(dz[1])<3.)) { // beam pipe
Double_t phi=track->Phi();
GetESDsData(kTrk0)->Fill(phi);
const AliExternalTrackParam *innTrack=track->GetInnerParam();
if (tpcTrack)
if (innTrack) {
- const AliESDVertex *vtx=esd->GetPrimaryVertex();
- Double_t xv=vtx->GetXv();
- Double_t yv=vtx->GetYv();
- Double_t zv=vtx->GetZv();
Float_t dz[2];
tpcTrack->GetDZ(xv,yv,zv,esd->GetMagneticField(),dz);
dz[0]*=10.; // in mm
}
}
if (p>1.0) {
- if (track->IsOn(AliESDtrack::kTOFpid)) {
- Double_t times[10];
- track->GetIntegratedTimes(times);
- Double_t tof=track->GetTOFsignal();
- GetESDsData(kPid2)->Fill(times[2]-tof);
+ if (track->IsOn(AliESDtrack::kITSrefit))
+ if (track->IsOn(AliESDtrack::kTPCrefit))
+ if (track->IsOn(AliESDtrack::kTOFout)) {
+ Float_t dz[2];
+ track->GetDZ(xv,yv,zv,esd->GetMagneticField(),dz);
+ if (dz[1]<3.) {
+ Double_t times[10];
+ track->GetIntegratedTimes(times);
+ Double_t tof=track->GetTOFsignal()/*-847055 -1771207*/;
+ GetESDsData(kPid2)->Fill(times[2]-tof);
+ }
}
}
const AliExternalTrackParam *par=track->GetInnerParam();
Double_t mass;
AliESDv0 v0(*esd->GetV0(i));
+ Int_t nidx=TMath::Abs(v0.GetNindex());
+ AliESDtrack *ntrack1=esd->GetTrack(nidx);
+ if (!ntrack1->IsOn(AliESDtrack::kTPCrefit)) continue;
+
+ Int_t pidx=TMath::Abs(v0.GetPindex());
+ AliESDtrack *ptrack1=esd->GetTrack(pidx);
+ if (!ptrack1->IsOn(AliESDtrack::kTPCrefit)) continue;
+
v0.ChangeMassHypothesis(kK0Short);
mass=v0.GetEffMass();
if (v0.GetOnFlyStatus())