#include <TPDGCode.h>
#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"
#include "AliESDEvent.h"
#include "AliESDv0.h"
#include "AliRawReader.h"
+#include "AliESDVZERO.h"
+#include "AliMultiplicity.h"
ClassImp(AliGlobalQADataMaker)
// 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",
- "hGlobalFractionAssignedClustersTRD"
+ "hGlobalFractionAssignedClustersTRD",
+ "hGlobalClustersPerITSModule"
};
const Char_t *title[]={
"Fraction of the assigned clusters in ITS",
"Fraction of the assigned clusters in TPC",
- "Fraction of the assigned clusters in TRD"
+ "Fraction of the assigned clusters in TRD",
+ "Number of clusters per an ITS module"
};
Add2ESDsList(new TH1F(name[0],title[0],100,0.,2.),kClr0, !expert, image);
Add2ESDsList(new TH1F(name[1],title[1],100,0.,2.),kClr1, !expert, image);
Add2ESDsList(new TH1F(name[2],title[2],100,0.,2.),kClr2, !expert, image);
+ Add2ESDsList(new TH1F(name[3],title[3],2201,-0.5,2200.5),kClr3, !expert, image);
}
{// Track related QA
const Char_t *name[]={
"hGlobalITSdEdx",
"hGlobalTPCdEdx",
- "hGlobalTOFTrackingvsMeasured"
- };
+ "hGlobalTOFTrackingvsMeasured",
+ "hGlobalTPCdEdxvsMomentum"
+ };
const Char_t *title[]={
"ITS: dEdx (ADC) for particles with momentum 0.4 - 0.5 (GeV)",
"TPC: dEdx (ADC) for particles with momentum 0.4 - 0.5 (GeV)",
- "TOF: tracking - measured (ps)"
- };
+ "TOF: tracking - measured (ps)",
+ "TPC: dEdx (A.U.) vs momentum (GeV)"
+ };
Add2ESDsList(new TH1F(name[0],title[0],50,0.00,200.),kPid0, !expert, image);
Add2ESDsList(new TH1F(name[1],title[1],50,0.00,100.),kPid1, !expert, image);
Add2ESDsList(new TH1F(name[2],title[2],50,-3500.,3500.),kPid2, !expert, image);
+ Add2ESDsList(new TH2F(name[3],title[3],1500,0.05,15.,700,0.,700.),kPid3,!expert,image);
+ }
+ {// Multiplicity related QA
+ const Char_t *name[]={
+ "hGlobalV0AvsITS",
+ "hGlobalV0CvsITS"
+ };
+ const Char_t *title[]={
+ "Multiplicity: V0A vs ITS",
+ "Multiplicity: V0C vs ITS"
+ };
+ TH2F *h0=new TH2F(name[0],title[0],41,-0.5,40.5, 33,-0.5,32.5);
+ Add2ESDsList(h0,kMlt0, !expert, image);
+ TH2F *h1=new TH2F(name[1],title[1],41,-0.5,40.5, 33,-0.5,32.5);
+ Add2ESDsList(h1,kMlt1, !expert, image);
}
}
// 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 j=0; j<6; ++j) {
+ Int_t idet, sts;
+ Float_t xloc,zloc;
+ 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);
+ }
+
if (track->IsOn(AliESDtrack::kTPCrefit)) {
Int_t n =track->GetTPCNcls();
Int_t nf=track->GetTPCNclsF(); // number of crossed TPC pad rows
// 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();
+ if (par) {
+ Double_t pp=par->GetP();
+ Double_t dedx=track->GetTPCsignal();
+ TH2F *h = dynamic_cast<TH2F*>(GetESDsData(kPid3));
+ h->Fill(pp,dedx);
+ }
+
}
+ // Multiplicity related QA
+ AliESDVZERO *mltV0 =esd->GetVZEROData();
+ const AliMultiplicity *mltITS=esd->GetMultiplicity();
+ if (mltV0)
+ if (mltITS) {
+ Short_t nv0a=mltV0->GetNbPMV0A();
+ Short_t nv0c=mltV0->GetNbPMV0C();
+ Int_t nits=mltITS->GetNumberOfTracklets();
+ TH2F *h0=dynamic_cast<TH2F*>(GetESDsData(kMlt0));
+ h0->Fill(nits,nv0a);
+ TH2F *h1=dynamic_cast<TH2F*>(GetESDsData(kMlt1));
+ h1->Fill(nits,nv0c);
+ }
+
+
TH1 *tpc=GetESDsData(kTrk2); tpc->Sumw2();
TH1 *its=GetESDsData(kTrk3); its->Sumw2();
TH1 *tof=GetESDsData(kTrk4); tof->Sumw2();
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())