#include "AliMCEvent.h"
#include "AliMCEventHandler.h"
#include "AliMCParticle.h"
+#include "AliStack.h"
#include "AliPIDResponse.h"
#include "AliTrackReference.h"
#include "AliVEvent.h"
// Cut event
if(fInputEvent->IsPileupFromSPD(3, 0.8, 3., 2., 5)){
- AliDebug(1, "Event flagged as pileup\n");
+ AliDebug(1, "Event flagged as pileup\n");
return;
}
if(!fTrackCuts->CheckEventCuts("fCutsEvRec", fInputEvent)){
fSignalCuts->SetMCEvent(fMCEvent);
}
+ // MC get stack
+ AliStack* stack = 0x0;
+ if(mcthere){
+ stack = fMCEvent->Stack();
+ if(!stack) AliError("No Stack");
+ }
+
// Get Primary Vertex
const AliVVertex *vertex = fInputEvent->GetPrimaryVertex();
Double_t vtx[3];
<< "Centrality=" << centrality
<< "VertexZ=" << vtx[2]
<< "NumberOfContributors=" << ncontrib
+ << "run=" << run
<< "\n";
// Common variables
// Get Production Vertex in radial direction
Double_t vx = mcpart->Particle()->Vx(),
- vy = mcpart->Particle()->Vy();
+ vy = mcpart->Particle()->Vy();
Double_t productionVertex = TMath::Sqrt(vx*vx+vy*vy);
// Get Mother PDG code of the particle
- (*fDebugTree) << "MCDebug"
+ (*fDebugTree) << "MCDebug"
<< "centrality=" << centrality
<< "MBtrigger=" << isMBTrigger
<< "CentralTrigger=" << isCentralTrigger
<< "pdg=" << pdg
<< "ProductionVertex=" << productionVertex
<< "motherPdg=" << motherPdg
- << "source=" << source
+ << "source=" << source
<< "\n";
}
}
// Cut track (Only basic track cuts)
if(!fTrackCuts->CheckParticleCuts(AliHFEcuts::kNcutStepsMCTrack + AliHFEcuts::kStepRecKineITSTPC, track)) continue;
// Debug streaming of PID-related quantities
+ copyTrack.~AliESDtrack();
new(©Track) AliESDtrack(*track);
if(fTPCpid->HasEtaCorrection()) fTPCpid->ApplyEtaCorrection(©Track, AliHFEpidObject::kESDanalysis); // Apply Eta Correction on copy track
Double_t nSigmaTOF = pid->NumberOfSigmasTOF(track, AliPID::kElectron);
Double_t nSigmaTPC = pid->NumberOfSigmasTPC(©Track, AliPID::kElectron);
//if(TMath::Abs(nSigmaTOF) > 5) continue;
// we are not interested in tracks which are more than 5 sigma away from the electron hypothesis in either TOF or TPC
- Double_t tPCdEdx = track->GetTPCsignal();
+ Double_t tPCdEdx = copyTrack.GetTPCsignal();
// Signal, source and MCPID
Bool_t signal = kTRUE;
source = 5;
mcptTPC = ref->Pt();
}
-
+
TParticle *mctrack1 = mctrack->Particle();
mesonID=GetElecSourceMC(mctrack1);
if(mesonID==AliHFEmcQA::kGammaPi0 || mesonID==AliHFEmcQA::kPi0) mArr=0; //pion
else if(mesonID==AliHFEmcQA::kGammaRho0 || mesonID==AliHFEmcQA::kRho0) mArr=5; //rho
mctrack->XvYvZv(xr);
-
+
eR= TMath::Sqrt(xr[0]*xr[0]+xr[1]*xr[1]);
eZ = xr[2];
TParticle *mctrackt = mctrack->Particle();
unique=mctrackt->GetUniqueID();
AliMCParticle *mctrackmother = NULL;
+ AliMCParticle *mctrackmother2 = NULL;
if(!(mArr<0)){
- if(mesonID>=AliHFEmcQA::kGammaPi0) { // conversion electron, be careful with the enum odering
- Int_t glabel=TMath::Abs(mctrack->GetMother()); // gamma label
- if((mctrackmother = dynamic_cast<AliMCParticle *>(fMCEvent->GetTrack(glabel)))){
- glabel=TMath::Abs(mctrackmother->GetMother()); // gamma's mother's label
- if((mctrackmother = dynamic_cast<AliMCParticle *>(fMCEvent->GetTrack(glabel)))){
- mesonPt = mctrackmother->Pt(); //meson pt
- bgcategory = 1.;
- mctrackmother->XvYvZv(xr);
- mesonR = TMath::Sqrt(xr[0]*xr[0]+xr[1]*xr[1]);
- mesonZ = xr[2];
-
- mctrackt = mctrackmother->Particle();
- if(mctrackt){
- mesonunique = mctrackt->GetUniqueID();
- }
- if(glabel>fMCEvent->GetNumberOfPrimaries()) {
- bgcategory = 2.;
- glabel=TMath::Abs(mctrackmother->GetMother()); // gamma's mother's mother
- if((mctrackmother = dynamic_cast<AliMCParticle *>(fMCEvent->GetTrack(glabel)))){
- mesonMomPdg=mctrackmother->PdgCode();
- mesonMomPt=mctrackmother->Pt();
- if(TMath::Abs(mctrackmother->PdgCode())==310){
- bgcategory = 3.;
- glabel=TMath::Abs(mctrackmother->GetMother()); // gamma's mother's mother's mother
- if((mctrackmother = dynamic_cast<AliMCParticle *>(fMCEvent->GetTrack(glabel)))){
- mesonGMomPdg=mctrackmother->PdgCode();
- glabel=TMath::Abs(mctrackmother->GetMother()); // gamma's mother's mother
- if((mctrackmother = dynamic_cast<AliMCParticle *>(fMCEvent->GetTrack(glabel)))){
- mesonGGMomPdg=mctrackmother->PdgCode();
- }
- }
- }
- }
- }
- }
- }
- }
- else{ // nonHFE except for the conversion electron
- Int_t glabel=TMath::Abs(mctrack->GetMother());
- if((mctrackmother = dynamic_cast<AliMCParticle *>(fMCEvent->GetTrack(glabel)))){
- mesonPt = mctrackmother->Pt(); //meson pt
- bgcategory = -1.;
- mctrackmother->XvYvZv(xr);
- mesonR = TMath::Sqrt(xr[0]*xr[0]+xr[1]*xr[1]);
- mesonZ = xr[2];
-
- mctrackt = mctrackmother->Particle();
- if(mctrackt){
- mesonunique = mctrackt->GetUniqueID();
- }
- if(glabel>fMCEvent->GetNumberOfPrimaries()) {
- bgcategory = -2.;
- glabel=TMath::Abs(mctrackmother->GetMother()); // gamma's mother's mother
- if((mctrackmother = dynamic_cast<AliMCParticle *>(fMCEvent->GetTrack(glabel)))){
- mesonMomPdg=mctrackmother->PdgCode();
- mesonMomPt=mctrackmother->Pt();
- if(TMath::Abs(mctrackmother->PdgCode())==310){
- bgcategory = -3.;
- glabel=TMath::Abs(mctrackmother->GetMother()); // gamma's mother's mother's mother
- if((mctrackmother = dynamic_cast<AliMCParticle *>(fMCEvent->GetTrack(glabel)))){
+ if(mesonID>=AliHFEmcQA::kGammaPi0) { // conversion electron, be careful with the enum odering
+ Int_t glabel=TMath::Abs(mctrack->GetMother()); // gamma label
+ if((mctrackmother = dynamic_cast<AliMCParticle *>(fMCEvent->GetTrack(glabel)))){
+ glabel=TMath::Abs(mctrackmother->GetMother()); // gamma's mother's label
+ if((mctrackmother = dynamic_cast<AliMCParticle *>(fMCEvent->GetTrack(glabel)))){
+ mesonPt = mctrackmother->Pt(); //meson pt
+ bgcategory = 1.;
+ mctrackmother->XvYvZv(xr);
+ mesonR = TMath::Sqrt(xr[0]*xr[0]+xr[1]*xr[1]);
+ mesonZ = xr[2];
+
+ mctrackt = mctrackmother->Particle();
+ if(mctrackt){
+ mesonunique = mctrackt->GetUniqueID();
+ }
+
+ Int_t glabel2=TMath::Abs(mctrackmother->GetMother()); // gamma's mother's mother
+ if((mctrackmother2 = dynamic_cast<AliMCParticle *>(fMCEvent->GetTrack(glabel2)))){
+ mesonMomPdg=mctrackmother2->PdgCode();
+ mesonMomPt=mctrackmother2->Pt();
+ }
+
+ if(glabel>fMCEvent->GetNumberOfPrimaries()) {
+ bgcategory = 2.;
+ glabel=TMath::Abs(mctrackmother->GetMother()); // gamma's mother's mother
+ if((mctrackmother = dynamic_cast<AliMCParticle *>(fMCEvent->GetTrack(glabel)))){
+ mesonMomPdg=mctrackmother->PdgCode();
+ mesonMomPt=mctrackmother->Pt();
+ if(TMath::Abs(mctrackmother->PdgCode())==310){
+ bgcategory = 3.;
+ glabel=TMath::Abs(mctrackmother->GetMother()); // gamma's mother's mother's mother
+ if((mctrackmother = dynamic_cast<AliMCParticle *>(fMCEvent->GetTrack(glabel)))){
+ mesonGMomPdg=mctrackmother->PdgCode();
+ glabel=TMath::Abs(mctrackmother->GetMother()); // gamma's mother's mother
+ if((mctrackmother = dynamic_cast<AliMCParticle *>(fMCEvent->GetTrack(glabel)))){
+ mesonGGMomPdg=mctrackmother->PdgCode();
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ else{ // nonHFE except for the conversion electron
+ Int_t glabel=TMath::Abs(mctrack->GetMother());
+ if((mctrackmother = dynamic_cast<AliMCParticle *>(fMCEvent->GetTrack(glabel)))){
+ mesonPt = mctrackmother->Pt(); //meson pt
+ bgcategory = -1.;
+ mctrackmother->XvYvZv(xr);
+ mesonR = TMath::Sqrt(xr[0]*xr[0]+xr[1]*xr[1]);
+ mesonZ = xr[2];
+
+ mctrackt = mctrackmother->Particle();
+ if(mctrackt){
+ mesonunique = mctrackt->GetUniqueID();
+ }
+ if(glabel>fMCEvent->GetNumberOfPrimaries()) {
+ bgcategory = -2.;
+ glabel=TMath::Abs(mctrackmother->GetMother()); // gamma's mother's mother
+ if((mctrackmother = dynamic_cast<AliMCParticle *>(fMCEvent->GetTrack(glabel)))){
+ mesonMomPdg=mctrackmother->PdgCode();
+ mesonMomPt=mctrackmother->Pt();
+ if(TMath::Abs(mctrackmother->PdgCode())==310){
+ bgcategory = -3.;
+ glabel=TMath::Abs(mctrackmother->GetMother()); // gamma's mother's mother's mother
+ if((mctrackmother = dynamic_cast<AliMCParticle *>(fMCEvent->GetTrack(glabel)))){
mesonGMomPdg=mctrackmother->PdgCode();
- glabel=TMath::Abs(mctrackmother->GetMother()); // gamma's mother's mother
- if((mctrackmother = dynamic_cast<AliMCParticle *>(fMCEvent->GetTrack(glabel)))){
- mesonGGMomPdg=mctrackmother->PdgCode();
- }
- }
- }
- }
- }
- }
- }
+ glabel=TMath::Abs(mctrackmother->GetMother()); // gamma's mother's mother
+ if((mctrackmother = dynamic_cast<AliMCParticle *>(fMCEvent->GetTrack(glabel)))){
+ mesonGGMomPdg=mctrackmother->PdgCode();
+ }
+ }
+ }
+ }
+ }
+ }
+ }
}
Double_t chi2PerClusterITS = 0.0;
if (nclustersITS != 0) chi2PerClusterITS = track->GetITSchi2() / Float_t(nclustersITS);
// TPC number of clusters (different definitions)
- UChar_t nclustersTPC = track->GetTPCncls();
+ UChar_t nclustersTPCfit = track->GetTPCNcls();
+ UChar_t nclustersTPCall = 0;
+ const TBits &clusterTPC = track->GetTPCClusterMap();
+ nclustersTPCall = clusterTPC.CountBits();
UChar_t nclustersTPCPID = track->GetTPCsignalN();
UChar_t nfindableTPC = track->GetTPCNclsF();
- Double_t clusterRatioTPC = 0.0;
- if((static_cast<Double_t>(nfindableTPC))>0.0) clusterRatioTPC = static_cast<Double_t>(nclustersTPC)/static_cast<Double_t>(nfindableTPC);
+ Double_t clusterRatioTPCfit = 0.0;
+ if((static_cast<Double_t>(nfindableTPC))>0.0) clusterRatioTPCfit = static_cast<Double_t>(nclustersTPCfit)/static_cast<Double_t>(nfindableTPC);
+ Double_t clusterRatioTPCall = 0.0;
+ if((static_cast<Double_t>(nfindableTPC))>0.0) clusterRatioTPCall = static_cast<Double_t>(nclustersTPCall)/static_cast<Double_t>(nfindableTPC);
UChar_t nclustersTPCshared = 0;
Float_t ncrossedRowsTPC = track->GetTPCCrossedRows();
const TBits &sharedTPC = track->GetTPCSharedMap();
UChar_t nclustersTRD = track->GetTRDncls();
UChar_t ntrackletsTRDPID = track->GetTRDntrackletsPID();
// ITS and TRD acceptance maps
- UChar_t hasClusterITS[6], hasTrackletTRD[6];
+ UChar_t hasClusterITS[6], statusITS[6], hasTrackletTRD[6];
UChar_t itsPixel = track->GetITSClusterMap();
- for(Int_t icl = 0; icl < 6; icl++) hasClusterITS[icl] = TESTBIT(itsPixel, icl) ? 1 : 0;
+ for(Int_t icl = 0; icl < 6; icl++){
+ hasClusterITS[icl] = TESTBIT(itsPixel, icl) ? 1 : 0;
+ if(CheckITSstatus(track, icl)) statusITS[icl] = 1;
+ else statusITS[icl] = 0;
+ }
Double_t trddEdxSum[6];
for(Int_t a=0;a<6;a++) { trddEdxSum[a]= 0.;}
for(Int_t itl = 0; itl < 6; itl++){
- Int_t nSliceNonZero = 0;
+ Int_t nSliceNonZero = 0;
trddEdxSum[itl] = track->GetTRDslice(itl, 0); // in new reconstruction slice 0 contains the total charge
for(Int_t islice = 0; islice < 8; islice++){
if(track->GetTRDslice(itl, islice) > 0.001) nSliceNonZero++;
Double_t hfebCov[3] = {-999.,-999.,-999.};
fExtraCuts->GetHFEImpactParameters(track, hfeb, hfebCov);
+ Double_t tofdx= -999.0;
+ Double_t tofdz= -999.0;
+ tofdx=track->GetTOFsignalDx();
+ tofdz=track->GetTOFsignalDz();
+
+ // TOF track status
+ UInt_t status = 0;
+ status = track->GetStatus();
+ Bool_t hasTOFout = status&AliESDtrack::kTOFout;
+ Bool_t hasTOFtime = status&AliESDtrack::kTIME;
+ Bool_t hasTOFpid = status&AliESDtrack::kTOFpid;
+ Bool_t hasgoodTOF = kFALSE;
+ if (hasTOFout && hasTOFtime && hasTOFpid) hasgoodTOF = kTRUE;
+
+ // TRD track status
+ Bool_t hasTRDin = status&AliESDtrack::kTRDin;
+
+
+ // TOF mismatch (particle spectra group)
+ Int_t mismatchlevel=0; // default value; in data always 0
+ if(mcthere){
+ Int_t tofLabel[3];
+ track->GetTOFLabel(tofLabel);
+ if(TMath::Abs(track->GetLabel()) != TMath::Abs(tofLabel[0]) || tofLabel[1] > 0) mismatchlevel=1;
+ TParticle *matchedTrack = stack->Particle(TMath::Abs(tofLabel[0]));
+ if(TMath::Abs(matchedTrack->GetFirstMother()) == TMath::Abs(track->GetLabel()))
+ {
+ if(mismatchlevel==1) mismatchlevel=3;
+ else mismatchlevel=2;
+ }
+ }
+
+
// Fill Tree
(*fDebugTree) << "PIDdebug"
<< "centrality=" << centrality
<< "eta=" << eta
<< "phi=" << phi
<< "ntracklets=" << ntrackletsTRDPID
- << "nclustersTPC=" << nclustersTPC
+ << "nclustersTPC=" << nclustersTPCfit
+ << "nclustersTPCall=" << nclustersTPCall
<< "nclustersTPCPID=" << nclustersTPCPID
<< "nclustersTPCshared=" << nclustersTPCshared
<< "ncrossedRowsTPC=" << ncrossedRowsTPC
- << "clusterRatioTPC=" << clusterRatioTPC
+ << "clusterRatioTPC=" << clusterRatioTPCfit
+ << "clusterRatioTPCall=" << clusterRatioTPCall
<< "nclustersITS=" << nclustersITS
<< "nclusters=" << nclustersTRD
<< "chi2matching=" << chi2matching
- << "chi2PerClusterITS=" << chi2PerClusterITS
+ << "chi2PerClusterITS=" << chi2PerClusterITS
<< "its0=" << hasClusterITS[0]
<< "its1=" << hasClusterITS[1]
<< "its2=" << hasClusterITS[2]
<< "its3=" << hasClusterITS[3]
<< "its4=" << hasClusterITS[4]
<< "its5=" << hasClusterITS[5]
+ << "statusITS0=" << statusITS[0]
+ << "statusITS1=" << statusITS[1]
+ << "statusITS2=" << statusITS[2]
+ << "statusITS3=" << statusITS[3]
+ << "statusITS4=" << statusITS[4]
+ << "statusITS5=" << statusITS[5]
<< "trd0=" << hasTrackletTRD[0]
<< "trd1=" << hasTrackletTRD[1]
<< "trd2=" << hasTrackletTRD[2]
<< "trd3=" << hasTrackletTRD[3]
<< "trd4=" << hasTrackletTRD[4]
<< "trd5=" << hasTrackletTRD[5]
- << "TRDdEdxl0=" << trddEdxSum[0]
- << "TRDdEdxl1=" << trddEdxSum[1]
- << "TRDdEdxl2=" << trddEdxSum[2]
- << "TRDdEdxl3=" << trddEdxSum[3]
- << "TRDdEdxl4=" << trddEdxSum[4]
- << "TRDdEdxl5=" << trddEdxSum[5]
+ << "TRDdEdxl0=" << trddEdxSum[0]
+ << "TRDdEdxl1=" << trddEdxSum[1]
+ << "TRDdEdxl2=" << trddEdxSum[2]
+ << "TRDdEdxl3=" << trddEdxSum[3]
+ << "TRDdEdxl4=" << trddEdxSum[4]
+ << "TRDdEdxl5=" << trddEdxSum[5]
<< "TOFsigmaEl=" << nSigmaTOF
<< "TPCsigmaEl=" << nSigmaTPC
<< "TPCdEdx=" << tPCdEdx
<< "TRDlikeEl=" << likeEleTRD
<< "TRDlikeEln=" << likeEleTRDn
- << "trdtruncmean1=" << trdtruncmean1
+ << "trdtruncmean1=" << trdtruncmean1
<< "trdtruncmean2=" << trdtruncmean2
<< "dcaR=" << b[0]
<< "dcaZ=" << b[1]
<< "hfedcacovZ=" << hfebCov[2]
<< "vx=" << vtx[0]
<< "vy=" << vtx[1]
- << "vz=" << vtx[2]
- << "ncontrib=" << ncontrib
- << "mesonID=" << mesonID
- << "eR=" << eR
- << "mesonR=" << mesonR
- << "eZ=" << eZ
- << "mesonZ=" << mesonZ
- << "unique=" << unique
- << "mesonunique=" << mesonunique
- << "bgcategory=" << bgcategory
- << "mesonpt=" << mesonPt
+ << "vz=" << vtx[2]
+ << "tofdx=" << tofdx
+ << "tofdz=" << tofdz
+ << "statusTOFtracking=" << hasgoodTOF
+ << "TOFmismatchlevel=" << mismatchlevel
+ << "statusTRDtracking=" << hasTRDin
+ << "ncontrib=" << ncontrib
+ << "mesonID=" << mesonID
+ << "eR=" << eR
+ << "mesonR=" << mesonR
+ << "eZ=" << eZ
+ << "mesonZ=" << mesonZ
+ << "unique=" << unique
+ << "mesonunique=" << mesonunique
+ << "bgcategory=" << bgcategory
+ << "mesonpt=" << mesonPt
<< "mesonMomPdg=" << mesonMomPdg
<< "mesonGMomPdg=" << mesonGMomPdg
<< "mesonGGMomPdg=" << mesonGGMomPdg
TParticle *partMotherCopy = mctrack->Particle();
Int_t maPdgcode = partMother->GetPdgCode();
- // if the mother is charmed hadron
- if ( (int(abs(maPdgcode)/100.)%10) == AliHFEmcQA::kCharm || (int(abs(maPdgcode)/1000.)%10) == AliHFEmcQA::kCharm ) {
+ // if the mother is charmed hadron
+ if ( (int(abs(maPdgcode)/100.)%10) == AliHFEmcQA::kCharm || (int(abs(maPdgcode)/1000.)%10) == AliHFEmcQA::kCharm ) {
- for (Int_t i=0; i<fNparents; i++){
+ for (Int_t i=0; i<fNparents; i++){
if (abs(maPdgcode)==fParentSelect[0][i]){
isFinalOpenCharm = kTRUE;
}
- }
- if (!isFinalOpenCharm) return -1;
+ }
+ if (!isFinalOpenCharm) return -1;
- // iterate until you find B hadron as a mother or become top ancester
- for (Int_t i=1; i<fgkMaxIter; i++){
+ // iterate until you find B hadron as a mother or become top ancester
+ for (Int_t i=1; i<fgkMaxIter; i++){
Int_t jLabel = partMother->GetFirstMother();
if (jLabel == -1){
Int_t grandMaPDG = grandMa->GetPdgCode();
for (Int_t j=0; j<fNparents; j++){
- if (abs(grandMaPDG)==fParentSelect[1][j]){
- origin = AliHFEmcQA::kBeautyCharm;
- return origin;
- }
+ if (abs(grandMaPDG)==fParentSelect[1][j]){
+ origin = AliHFEmcQA::kBeautyCharm;
+ return origin;
+ }
}
partMother = grandMa;
- } // end of iteration
- } // end of if
- else if ( (int(abs(maPdgcode)/100.)%10) == AliHFEmcQA::kBeauty || (int(abs(maPdgcode)/1000.)%10) == AliHFEmcQA::kBeauty ) {
- for (Int_t i=0; i<fNparents; i++){
+ } // end of iteration
+ } // end of if
+ else if ( (int(abs(maPdgcode)/100.)%10) == AliHFEmcQA::kBeauty || (int(abs(maPdgcode)/1000.)%10) == AliHFEmcQA::kBeauty ) {
+ for (Int_t i=0; i<fNparents; i++){
if (abs(maPdgcode)==fParentSelect[1][i]){
origin = AliHFEmcQA::kDirectBeauty;
return origin;
}
- }
- } // end of if
- else if ( abs(maPdgcode) == 22 ) { //conversion
-
- tmpMomLabel = partMotherCopy->GetFirstMother();
- if(!(mctrack = dynamic_cast<AliMCParticle *>(fMCEvent->GetTrack(TMath::Abs(tmpMomLabel))))) return -1;
- partMother = mctrack->Particle();
- maPdgcode = partMother->GetPdgCode();
- if ( abs(maPdgcode) == 111 ) {
- origin = AliHFEmcQA::kGammaPi0;
- return origin;
- }
- else if ( abs(maPdgcode) == 221 ) {
- origin = AliHFEmcQA::kGammaEta;
- return origin;
- }
- else if ( abs(maPdgcode) == 223 ) {
- origin = AliHFEmcQA::kGammaOmega;
- return origin;
- }
- else if ( abs(maPdgcode) == 333 ) {
- origin = AliHFEmcQA::kGammaPhi;
- return origin;
- }
- else if ( abs(maPdgcode) == 331 ) {
- origin = AliHFEmcQA::kGammaEtaPrime;
- return origin;
- }
- else if ( abs(maPdgcode) == 113 ) {
- origin = AliHFEmcQA::kGammaRho0;
- return origin;
- }
- else origin = AliHFEmcQA::kElse;
- //origin = kGamma; // finer category above
- return origin;
-
- } // end of if
- else if ( abs(maPdgcode) == 111 ) {
- origin = AliHFEmcQA::kPi0;
- return origin;
- } // end of if
- else if ( abs(maPdgcode) == 221 ) {
- origin = AliHFEmcQA::kEta;
- return origin;
- } // end of if
- else if ( abs(maPdgcode) == 223 ) {
- origin = AliHFEmcQA::kOmega;
- return origin;
- } // end of if
- else if ( abs(maPdgcode) == 333 ) {
- origin = AliHFEmcQA::kPhi;
- return origin;
- } // end of if
- else if ( abs(maPdgcode) == 331 ) {
- origin = AliHFEmcQA::kEtaPrime;
- return origin;
- } // end of if
- else if ( abs(maPdgcode) == 113 ) {
- origin = AliHFEmcQA::kRho0;
- return origin;
- } // end of if
- else{
+ }
+ } // end of if
+ else if ( abs(maPdgcode) == 22 ) { //conversion
+
+ tmpMomLabel = partMotherCopy->GetFirstMother();
+ if(!(mctrack = dynamic_cast<AliMCParticle *>(fMCEvent->GetTrack(TMath::Abs(tmpMomLabel))))) return -1;
+ partMother = mctrack->Particle();
+ maPdgcode = partMother->GetPdgCode();
+ if ( abs(maPdgcode) == 111 ) {
+ origin = AliHFEmcQA::kGammaPi0;
+ return origin;
+ }
+ else if ( abs(maPdgcode) == 221 ) {
+ origin = AliHFEmcQA::kGammaEta;
+ return origin;
+ }
+ else if ( abs(maPdgcode) == 223 ) {
+ origin = AliHFEmcQA::kGammaOmega;
+ return origin;
+ }
+ else if ( abs(maPdgcode) == 333 ) {
+ origin = AliHFEmcQA::kGammaPhi;
+ return origin;
+ }
+ else if ( abs(maPdgcode) == 331 ) {
+ origin = AliHFEmcQA::kGammaEtaPrime;
+ return origin;
+ }
+ else if ( abs(maPdgcode) == 113 ) {
+ origin = AliHFEmcQA::kGammaRho0;
+ return origin;
+ }
+ else origin = AliHFEmcQA::kElse;
+ //origin = kGamma; // finer category above
+ return origin;
+
+ } // end of if
+ else if ( abs(maPdgcode) == 111 ) {
+ origin = AliHFEmcQA::kPi0;
+ return origin;
+ } // end of if
+ else if ( abs(maPdgcode) == 221 ) {
+ origin = AliHFEmcQA::kEta;
+ return origin;
+ } // end of if
+ else if ( abs(maPdgcode) == 223 ) {
+ origin = AliHFEmcQA::kOmega;
+ return origin;
+ } // end of if
+ else if ( abs(maPdgcode) == 333 ) {
+ origin = AliHFEmcQA::kPhi;
+ return origin;
+ } // end of if
+ else if ( abs(maPdgcode) == 331 ) {
+ origin = AliHFEmcQA::kEtaPrime;
+ return origin;
+ } // end of if
+ else if ( abs(maPdgcode) == 113 ) {
+ origin = AliHFEmcQA::kRho0;
+ return origin;
+ } // end of if
+ else{
origin = AliHFEmcQA::kElse;
- }
- return origin;
+ }
+ return origin;
+}
+
+//______________________________________________________
+Bool_t AliHFEdebugTreeTask::CheckITSstatus( const AliESDtrack * const esdtrack, Int_t layer) const {
+ //
+ // Check whether ITS area is dead
+ //
+ Int_t itsStatus = 0;
+ Int_t det;
+ Float_t xloc, zloc;
+ esdtrack->GetITSModuleIndexInfo(layer, det, itsStatus, xloc, zloc);
+ Bool_t status;
+ switch(itsStatus){
+ case 2: status = kFALSE; break;
+ case 3: status = kFALSE; break;
+ case 7: status = kFALSE; break;
+ default: status = kTRUE;
+ }
+ return status;
}
+