fProfPtPtSigma1Pt(0x0),
fHistList(0)
{
+ //
+ // Constructor
+ //
SetNVariables(25);
fPtBinEdges[0][0] = 10.;
//________________________________________________________________________
void AliPWG4HighPtTrackQA::SetPtBinEdges(Int_t region, Double_t ptmax, Double_t ptBinWidth) {
+ //
+ // Set variable bin sizes for pT axis in histos
+ //
if(region<3) {
fPtBinEdges[region][0] = ptmax;
fHistList->Add(fh1NTracksAll);
fh1NTracksReject = new TH1F("fh1NTracksReject","fh1NTracksReject",1,-0.5,0.5);
+ fh1NTracksReject->Fill("noHybridTrack",0);
fh1NTracksReject->Fill("noESDtrack",0);
fh1NTracksReject->Fill("noTPCInner",0);
fh1NTracksReject->Fill("FillTPC",0);
if(binsDCA2D) delete [] binsDCA2D;
if(binsDCAZ) delete [] binsDCAZ;
if(binsNPointITS) delete [] binsNPointITS;
+ if(binsITSClusterMap) delete [] binsITSClusterMap;
if(binsNSigmaToVertex) delete [] binsNSigmaToVertex;
if(binsChi2C) delete [] binsChi2C;
if(binsEta) delete [] binsEta;
}
//________________________________________________________________________
-Int_t AliPWG4HighPtTrackQA::CalculateCentrality(AliAODEvent *aod){
+Int_t AliPWG4HighPtTrackQA::CalculateCentrality(const AliAODEvent *aod){
//
// Get centrality from AOD
//
}
//________________________________________________________________________
-Int_t AliPWG4HighPtTrackQA::GetCentralityClass(Float_t cent) {
+Int_t AliPWG4HighPtTrackQA::GetCentralityClass(Float_t cent) const {
//
// Get centrality class
//
20: nClustersTPCShared
21: Golden Chi2 - global vs TPC constrained
22: Chi2 between global and global constrained
+ 23: #crossed rows from fit map
+ 24: (#crossed rows)/(#findable clusters) from fit map
*/
for (Int_t iTrack = 0; iTrack < nTracks; iTrack++) {
if(fTrackType==1)
track = AliESDtrackCuts::GetTPCOnlyTrack(fESD,esdtrack->GetID());
else if(fTrackType==2 || fTrackType==4) {
- track = AliESDtrackCuts::GetTPCOnlyTrack(fESD,esdtrack->GetID());
+ track = AliESDtrackCuts::GetTPCOnlyTrack(const_cast<AliESDEvent*>(fESD),esdtrack->GetID());
if(!track) {
fh1NTracksReject->Fill("noTPConly",1);
if(origtrack) delete origtrack;
if (!(fTrackCuts->AcceptTrack(track)) && fTrackType!=4 && fTrackType!=5 && fTrackType!=6) {
fh1NTracksReject->Fill("trackCuts",1);
if(fTrackType==1 || fTrackType==2 || fTrackType==7) {
- if(track) delete track;
+ if(track) delete track;
}
if(origtrack) delete origtrack;
continue;
//________________________________________________________________________
void AliPWG4HighPtTrackQA::DoAnalysisAOD() {
-
+ //
+ // Do QA on AOD input
+ //
AliAODEvent *aod = dynamic_cast<AliAODEvent*>(fEvent);
- if(!aod)return;
- AliExternalTrackParam *exParam = new AliExternalTrackParam();
+ if(!aod) return;
+ AliExternalTrackParam exParam;
for (Int_t iTrack = 0; iTrack < fEvent->GetNumberOfTracks(); iTrack++) {
AliAODTrack *aodtrack = aod->GetTrack(iTrack);
- if( !aodtrack->TestFilterMask(fFilterMask) ) continue;
+ if( !aodtrack->TestFilterMask(fFilterMask) ) {
+ fh1NTracksReject->Fill("noHybridTrack",1);
+ continue;
+ }
fVariables->Reset(0.);
fVariables->SetAt(0.,8);
fVariables->SetAt(GetTrackLengthTPC(aodtrack),9);
fVariables->SetAt(aodtrack->Chi2perNDF(),10);
- fVariables->SetAt(GetTPCClusterInfo(aodtrack,2,1),11);
+ fVariables->SetAt(GetTPCClusterInfo(aodtrack,2,1,0,159,kFALSE),11);
Float_t crossedRowsTPCNClsF = 0.;
if(aodtrack->GetTPCNclsF()>0.) crossedRowsTPCNClsF = fVariables->At(11)/aodtrack->GetTPCNclsF();
fVariables->SetAt(crossedRowsTPCNClsF,12);
Double_t xyz[3] = {0,};
aodtrack->GetXYZ(xyz);
Short_t sign = aodtrack->Charge();
- exParam->Set(xyz,pxpypz,cov,sign);
+ exParam.Set(xyz,pxpypz,cov,sign);
- fVariables->SetAt(exParam->GetSigmaY2(),13);
- fVariables->SetAt(exParam->GetSigmaZ2(),14);
- fVariables->SetAt(exParam->GetSigmaSnp2(),15);
- fVariables->SetAt(exParam->GetSigmaTgl2(),16);
- fVariables->SetAt(exParam->GetSigma1Pt2(),17);
+ fVariables->SetAt(exParam.GetSigmaY2(),13);
+ fVariables->SetAt(exParam.GetSigmaZ2(),14);
+ fVariables->SetAt(exParam.GetSigmaSnp2(),15);
+ fVariables->SetAt(exParam.GetSigmaTgl2(),16);
+ fVariables->SetAt(exParam.GetSigma1Pt2(),17);
- fVariables->SetAt(0.,18);
- fVariables->SetAt(0.,19);
+ fVariables->SetAt(0.,18); //NClustersTPCIter1
+ fVariables->SetAt(0.,19); //Chi2TPCIter1
TBits sharedClusterMap = aodtrack->GetTPCSharedMap();
fVariables->SetAt(sharedClusterMap.CountBits(),20);
- fVariables->SetAt(0.,21); //not available in AOD
- fVariables->SetAt(0.,22); //not available in AOD
+ fVariables->SetAt(0.,21); //not available in AOD golden chi2
+ fVariables->SetAt(0.,22); //not available in AOD Chi2 between global and global constrained
- fVariables->SetAt(0.,23); //not available in AOD
- fVariables->SetAt(0.,24); //not available in AOD
+ fVariables->SetAt(GetTPCClusterInfo(aodtrack,2,1,0,159,kTRUE),23); //not available in AOD #crossed rows from fit map
+ Float_t crossedRowsTPCNClsFFit = 0.;
+ if(aodtrack->GetTPCNclsF()>0.) crossedRowsTPCNClsFFit = fVariables->At(23)/aodtrack->GetTPCNclsF();
+ fVariables->SetAt(crossedRowsTPCNClsFFit,24); //(#crossed rows)/(#findable clusters) from fit map
fPtAll->Fill(fVariables->At(0));
//________________________________________________________________________
void AliPWG4HighPtTrackQA::FillHistograms() {
+ //
+ // Fill all QA histograms
+ //
fPtSel->Fill(fVariables->At(0));
fPtPhi->Fill(fVariables->At(0),fVariables->At(1));
}
//________________________________________________________________________
-AliGenPythiaEventHeader* AliPWG4HighPtTrackQA::GetPythiaEventHeader(AliMCEvent *mcEvent){
+AliGenPythiaEventHeader* AliPWG4HighPtTrackQA::GetPythiaEventHeader(const AliMCEvent *mcEvent){
if(!mcEvent)return 0;
AliGenEventHeader* genHeader = mcEvent->GenEventHeader();
}
//_______________________________________________________________________
-Float_t AliPWG4HighPtTrackQA::GetTPCClusterInfo(AliAODTrack *tr,Int_t nNeighbours/*=3*/, Int_t type/*=0*/, Int_t row0, Int_t row1) const
+Float_t AliPWG4HighPtTrackQA::GetTPCClusterInfo(const AliAODTrack *tr,Int_t nNeighbours/*=3*/, Int_t type/*=0*/, Int_t row0, Int_t row1, Bool_t useFitMap) const
{
//MV: copied from AliESDtrack since method is not available in AliAODTrack
// effects with a very simple algorithm.
//
- TBits fTPCClusterMap = tr->GetTPCClusterMap();
+ TBits fTPCClusterMap = 0;
+ if(useFitMap)
+ fTPCClusterMap = tr->GetTPCFitMap();
+ else
+ fTPCClusterMap = tr->GetTPCClusterMap();
+
if (type==2) return fTPCClusterMap.CountBits();
Int_t found=0;
}
//_______________________________________________________________________
-Float_t AliPWG4HighPtTrackQA::GetTPCClusterInfoFitMap(AliESDtrack *tr,Int_t nNeighbours/*=3*/, Int_t type/*=0*/, Int_t row0, Int_t row1) const
+Float_t AliPWG4HighPtTrackQA::GetTPCClusterInfoFitMap(const AliESDtrack *tr,Int_t nNeighbours/*=3*/, Int_t type/*=0*/, Int_t row0, Int_t row1) const
{
//
// TPC cluster information from fit map
}
//_______________________________________________________________________
-Int_t AliPWG4HighPtTrackQA::GetTrackLengthTPC(AliESDtrack *track) {
+Int_t AliPWG4HighPtTrackQA::GetTrackLengthTPC(const AliESDtrack *track) const {
//
// returns distance between 1st and last hit in TPC
// distance given in number of padrows
}
//_______________________________________________________________________
-Int_t AliPWG4HighPtTrackQA::GetTrackLengthTPC(AliAODTrack *track) {
+Int_t AliPWG4HighPtTrackQA::GetTrackLengthTPC(const AliAODTrack *track) const {
//
// returns distance between 1st and last hit in TPC
// distance given in number of padrows