+ // MC Checks
+ Bool_t atLeast1Track = kFALSE;
+ Bool_t isSD = kFALSE;
+ Bool_t isND = kFALSE;
+
+ if(fIsMC) {
+ if (!fMCEvent) {
+ AliError("No MC info found");
+ } else {
+ Int_t nMCTracks = fMCEvent->GetNumberOfTracks();
+ Int_t nPhysicalPrimaries = 0;
+ for (Int_t ipart=0; ipart<nMCTracks; ipart++) {
+ AliMCParticle *mcPart = (AliMCParticle*)fMCEvent->GetTrack(ipart);
+ // We don't care about neutrals and non-physical primaries
+ if(mcPart->Charge() == 0) continue;
+
+ //check if current particle is a physical primary
+ if(!fMCEvent->IsPhysicalPrimary(ipart)) continue;
+ if(mcPart->Pt()<0.5) continue;
+ if(TMath::Abs(mcPart->Eta())>0.8) continue;
+ atLeast1Track = kTRUE;
+ break;
+ }
+
+ AliGenPythiaEventHeader * headPy = 0;
+ AliGenDPMjetEventHeader * headPho = 0;
+ AliGenEventHeader * htmp = fMCEvent->GenEventHeader();
+ if(!htmp) {
+ AliFatal("Cannot Get MC Header!!");
+ return;
+ }
+ if( TString(htmp->IsA()->GetName()) == "AliGenPythiaEventHeader") {
+ headPy = (AliGenPythiaEventHeader*) htmp;
+ } else if (TString(htmp->IsA()->GetName()) == "AliGenDPMjetEventHeader") {
+ headPho = (AliGenDPMjetEventHeader*) htmp;
+ } else {
+ AliFatal("Unknown header");
+ }
+ if(headPy) {
+ // cout << "Process: " << headPy->ProcessType() << endl;
+ if(headPy->ProcessType() == 92 || headPy->ProcessType() == 93) {
+ isSD = kTRUE; // is single difractive
+ }
+ if(headPy->ProcessType() != 92 && headPy->ProcessType() != 93 && headPy->ProcessType() != 94) {
+ isND = kTRUE; // is non-diffractive
+ }
+
+ } else if (headPho) {
+ if(headPho->ProcessType() == 5 || headPho->ProcessType() == 6 ) {
+ isSD = kTRUE;
+ }
+ if(headPho->ProcessType() != 5 && headPho->ProcessType() != 6 && headPho->ProcessType() != 7 ) {
+ isND = kTRUE;
+ }
+ }
+
+ }
+ }
+