+Bool_t AliAnalysisTaskMinijet::SelectParticlePlusCharged(Int_t charge, Int_t pdg, Bool_t prim)
+{
+ //selection of mc particle
+ //fSelectParticles=0: use charged primaries and pi0 and k0
+ //fSelectParticles=1: use only charged primaries
+ //fSelectParticles=2: use only pi0 and k0
+
+ if(fSelectParticles==0 || fSelectParticles==2){ // in case of 2: need to count also charged particles
+ if(charge==0){
+ if(!(pdg==111||pdg==130||pdg==310))
+ return false;
+ }
+ else{// charge !=0
+ if(!prim)
+ return false;
+ }
+ }
+
+ else if(fSelectParticles==1){
+ if (charge==0 || !prim){
+ return false;
+ }
+ }
+
+ else{
+ Printf("Error: wrong selection of charged/pi0/k0");
+ return 0;
+ }
+
+ return true;
+
+}
+
+//________________________________________________________________________
+Bool_t AliAnalysisTaskMinijet::SelectParticle(Int_t charge, Int_t pdg, Bool_t prim)
+{
+ //selection of mc particle
+ //fSelectParticles=0: use charged primaries and pi0 and k0
+ //fSelectParticles=1: use only charged primaries
+ //fSelectParticles=2: use only pi0 and k0
+
+ if(fSelectParticles==0){
+ if(charge==0){
+ if(!(pdg==111||pdg==130||pdg==310))
+ return false;
+ }
+ else{// charge !=0
+ if(!prim)
+ return false;
+ }
+ }
+
+ else if (fSelectParticles==1){
+ if (charge==0 || !prim){
+ return false;
+ }
+ }
+ else if(fSelectParticles==2){
+ if(!(pdg==111||pdg==130||pdg==310))
+ return false;
+ }
+
+ return true;
+
+}
+
+//________________________________________________________________________
+void AliAnalysisTaskMinijet::CleanArrays(Float_t* pt, Float_t* eta, Float_t* phi,Int_t* nTracksTracklets)