1 /*************************************************************************
2 * Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
16 //#####################################################
18 //# Class AliDielectronMC #
19 //# Cut Class for Jpsi->e+e- analysis #
21 //# by WooJin J. Park, GSI / W.J.Park@gsi.de #
23 //#####################################################
25 #include <AliAnalysisManager.h>
26 #include <AliAODHandler.h>
27 #include <AliESDInputHandler.h>
28 #include <AliAODInputHandler.h>
29 #include <AliMCEventHandler.h>
30 #include <AliMCEvent.h>
31 #include <AliMCParticle.h>
32 #include <AliAODMCParticle.h>
34 #include <AliESDEvent.h>
35 #include <AliAODEvent.h>
36 #include <AliESDtrack.h>
37 #include <AliAODTrack.h>
40 #include <TClonesArray.h>
41 #include "AliDielectronMC.h"
43 AliDielectronMC* AliDielectronMC::fgInstance=0x0;
45 //____________________________________________________________
46 AliDielectronMC* AliDielectronMC::Instance()
49 // return pointer to singleton implementation
51 if (fgInstance) return fgInstance;
53 AnalysisType type=kUNSET;
55 if (AliAnalysisManager::GetAnalysisManager()){
56 if (AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()->IsA()==AliESDInputHandler::Class()) type=kESD;
57 else if (AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()->IsA()==AliAODInputHandler::Class()) type=kAOD;
59 AliMCEventHandler* mcHandler = dynamic_cast<AliMCEventHandler*> (AliAnalysisManager::GetAnalysisManager()->GetMCtruthEventHandler());
60 if(type == kESD) hasMC=mcHandler!=0x0;
63 fgInstance=new AliDielectronMC(type);
65 fgInstance->SetHasMC(hasMC);
70 //____________________________________________________________
71 AliDielectronMC::AliDielectronMC(AnalysisType type):
79 // default constructor
84 //____________________________________________________________
85 AliDielectronMC::~AliDielectronMC()
93 //____________________________________________________________
94 void AliDielectronMC::Initialize()
97 // initialize MC class
99 if (!ConnectMCEvent()) AliError("Initialization of MC object failed!");
102 //____________________________________________________________
103 Int_t AliDielectronMC::GetNMCTracks()
106 // return the number of generated tracks from MC event
108 if(fAnaType == kESD){
109 if (!fMCEvent){ AliError("No fMCEvent"); return 0; }
110 return fMCEvent->GetNumberOfTracks();}
111 else if(fAnaType == kAOD){
112 if(!fMcArray) { AliError("No fMcArray"); return 0; }
113 return fMcArray->GetEntriesFast();
118 //____________________________________________________________
119 Int_t AliDielectronMC::GetNMCTracksFromStack()
122 // return the number of generated tracks from stack
124 if (!fStack){ AliError("No fStack"); return -999; }
125 return fStack->GetNtrack();
128 //____________________________________________________________
129 Int_t AliDielectronMC::GetNPrimary()
132 // return the number of primary track from MC event
134 if (!fMCEvent){ AliError("No fMCEvent"); return 0; }
135 return fMCEvent->GetNumberOfPrimaries();
138 //____________________________________________________________
139 Int_t AliDielectronMC::GetNPrimaryFromStack()
142 // return the number of primary track from stack
144 if (!fStack){ AliError("No fStack"); return -999; }
145 return fStack->GetNprimary();
148 //____________________________________________________________
149 AliVParticle* AliDielectronMC::GetMCTrackFromMCEvent(Int_t itrk)
152 // return MC track directly from MC event
154 if (itrk<0) return NULL;
155 AliVParticle * track=0x0;
156 if(fAnaType == kESD){
157 if (!fMCEvent){ AliError("No fMCEvent"); return NULL;}
158 track = fMCEvent->GetTrack(itrk); // tracks from MC event (ESD)
159 } else if(fAnaType == kAOD) {
160 if (!fMcArray){ AliError("No fMCEvent"); return NULL;}
161 track = (AliVParticle*)fMcArray->At(itrk); // tracks from MC event (AOD)
166 //____________________________________________________________
167 Bool_t AliDielectronMC::ConnectMCEvent()
170 // connect stack object from the mc handler
172 if(fAnaType == kESD){
174 AliMCEventHandler* mcHandler = dynamic_cast<AliMCEventHandler*> (AliAnalysisManager::GetAnalysisManager()->GetMCtruthEventHandler());
175 if (!mcHandler){ AliError("Could not retrive MC event handler!"); return kFALSE; }
176 if (!mcHandler->InitOk() ) return kFALSE;
177 if (!mcHandler->TreeK() ) return kFALSE;
178 if (!mcHandler->TreeTR() ) return kFALSE;
180 AliMCEvent* mcEvent = mcHandler->MCEvent();
181 if (!mcEvent){ AliError("Could not retrieve MC event!"); return kFALSE; }
184 if (!UpdateStack()) return kFALSE;
186 else if(fAnaType == kAOD)
189 AliAODEvent *aod=((AliAODInputHandler*)((AliAnalysisManager::GetAnalysisManager())->GetInputEventHandler()))->GetEvent();
190 fMcArray = dynamic_cast<TClonesArray*>(aod->FindListObject(AliAODMCParticle::StdBranchName()));
191 if(!fMcArray) return kFALSE;
196 //____________________________________________________________
197 Bool_t AliDielectronMC::UpdateStack()
200 // update stack with new event
202 if (!fMCEvent){ AliError("No fMCEvent"); return kFALSE;}
203 AliStack* stack = fMCEvent->Stack();
204 if (!stack){ AliError("Could not retrive stack!"); return kFALSE; }
209 //____________________________________________________________
210 AliMCParticle* AliDielectronMC::GetMCTrack( const AliESDtrack* _track)
215 if (!fMCEvent){ AliError("No fMCEvent"); return NULL;}
217 Int_t nStack = fMCEvent->GetNumberOfTracks();
218 Int_t label = TMath::Abs(_track->GetLabel());
219 if(label>nStack)return NULL;
221 AliMCParticle *mctrack = dynamic_cast<AliMCParticle *>(fMCEvent->GetTrack(label));
226 //____________________________________________________________
227 AliAODMCParticle* AliDielectronMC::GetMCTrack( const AliAODTrack* _track)
232 if(!fMcArray) { AliError("No fMCArray"); return NULL;}
233 Int_t label = _track->GetLabel();
234 if(label < 0) return NULL;
235 AliAODMCParticle *mctrack = (AliAODMCParticle*)fMcArray->At(label);
239 //____________________________________________________________
240 TParticle* AliDielectronMC::GetMCTrackFromStack(const AliESDtrack* _track)
243 // return MC track from stack
245 Int_t label = TMath::Abs(_track->GetLabel());
246 if (!fStack) AliWarning("fStack is not available. Update stack first.");
247 TParticle* mcpart = fStack->Particle(label);
248 if (!mcpart) return NULL;
252 //____________________________________________________________
253 AliMCParticle* AliDielectronMC::GetMCTrackMother(const AliESDtrack* _track)
256 // return MC track mother
258 AliMCParticle* mcpart = GetMCTrack(_track);
259 if (!mcpart) return NULL;
260 AliMCParticle* mcmother = dynamic_cast<AliMCParticle *>(fMCEvent->GetTrack(mcpart->GetMother()));
261 if (!mcmother) return NULL;
265 //______________________________________________________________
266 AliAODMCParticle* AliDielectronMC::GetMCTrackMother(const AliAODTrack* _track)
269 // return MC track mother
271 AliAODMCParticle* mcpart = GetMCTrack(_track);
272 if (!mcpart) return NULL;
273 if(mcpart->GetMother() < 0) return NULL;
274 AliAODMCParticle* mcmother = dynamic_cast<AliAODMCParticle *>(fMcArray->At(mcpart->GetMother()));
275 if (!mcmother) return NULL;
278 //____________________________________________________________
279 AliMCParticle* AliDielectronMC::GetMCTrackMother(const AliMCParticle* _particle){
281 // return MC track mother
283 AliMCParticle* mcmother = dynamic_cast<AliMCParticle *>(fMCEvent->GetTrack(_particle->GetMother()));
287 //____________________________________________________________
288 AliAODMCParticle* AliDielectronMC::GetMCTrackMother(const AliAODMCParticle* _particle){
290 // return MC track mother
292 if( _particle->GetMother() < 0) return NULL;
293 AliAODMCParticle* mcmother = dynamic_cast<AliAODMCParticle *>(fMcArray->At(_particle->GetMother()));
297 //____________________________________________________________
298 TParticle* AliDielectronMC::GetMCTrackMotherFromStack(const AliESDtrack* _track)
301 // return MC track mother from stack
303 TParticle* mcpart = GetMCTrackFromStack(_track);
304 if ( !mcpart || mcpart->GetFirstMother()<=0 ) return NULL;
305 TParticle* mcmother = fStack->Particle(mcpart->GetFirstMother());
306 if (!mcmother) return NULL;
310 //____________________________________________________________
311 Int_t AliDielectronMC::GetMCPID(const AliESDtrack* _track)
314 // return PDG code of the track from the MC truth info
316 AliMCParticle* mcpart = GetMCTrack(_track);
317 if (!mcpart) return -999;
318 return mcpart->PdgCode();
321 //__________________________________________________________
322 Int_t AliDielectronMC::GetMCPID(const AliAODTrack* _track)
325 // return PDG code of the track from the MC truth info
327 AliAODMCParticle* mcpart = GetMCTrack(_track);
328 if (!mcpart) return -999;
329 return mcpart->PdgCode();
332 //____________________________________________________________
333 Int_t AliDielectronMC::GetMCPIDFromStack(const AliESDtrack* _track)
336 // return MC PDG code from stack
338 TParticle* mcpart = GetMCTrackFromStack(_track);
339 if (!mcpart) return -999;
340 return mcpart->GetPdgCode();
343 //____________________________________________________________
344 Int_t AliDielectronMC::GetMotherPDG( const AliESDtrack* _track)
347 // return PDG code of the mother track from the MC truth info
349 AliMCParticle* mcmother = GetMCTrackMother(_track);
350 if (!mcmother) return -999;
351 return mcmother->PdgCode();
354 //________________________________________________________
355 Int_t AliDielectronMC::GetMotherPDG( const AliAODTrack* _track)
358 // return PDG code of the mother track from the MC truth info
360 AliAODMCParticle* mcmother = GetMCTrackMother(_track);
361 if (!mcmother) return -999;
362 return mcmother->PdgCode();
365 //____________________________________________________________
366 Int_t AliDielectronMC::GetMotherPDGFromStack(const AliESDtrack* _track)
369 // return PDG code of the mother track from stack
371 TParticle* mcmother = GetMCTrackMotherFromStack(_track);
372 if (!mcmother) return -999;
373 return mcmother->GetPdgCode();
376 //____________________________________________________________
377 Int_t AliDielectronMC::GetMCProcess(const AliESDtrack* _track)
380 // return process number of the track
382 AliMCParticle* mcpart = GetMCTrack(_track);
383 if (!mcpart) return -999;
387 //____________________________________________________________
388 Int_t AliDielectronMC::GetMCProcessFromStack(const AliESDtrack* _track)
391 // return process number of the track
393 TParticle* mcpart = GetMCTrackFromStack(_track);
394 if (!mcpart) return -999;
395 return mcpart->GetUniqueID();
398 //____________________________________________________________
399 Int_t AliDielectronMC::NumberOfDaughters(const AliESDtrack* track)
402 // returns the number of daughters
404 AliMCParticle *mcmother=GetMCTrackMother(track);
405 if(!mcmother||!mcmother->Particle()) return -999;
406 // return mcmother->GetFirstDaughter()>0?mcmother->GetLastDaughter()-mcmother->GetFirstDaughter()+1:0;
407 return mcmother->Particle()->GetNDaughters();
410 //_________________________________________________________
411 Int_t AliDielectronMC::NumberOfDaughters(const AliAODTrack* track)
414 // returns the number of daughters
416 AliAODMCParticle *mcmother=GetMCTrackMother(track);
417 if(!mcmother) return -999;
418 return NumberOfDaughters(mcmother);
422 //____________________________________________________________
423 Int_t AliDielectronMC::NumberOfDaughters(const AliMCParticle* particle)
426 // returns the number of daughters
428 AliMCParticle *mcmother=GetMCTrackMother(particle);
429 if(!mcmother||!mcmother->Particle()) return -999;
430 //return mcmother->GetFirstDaughter()>0?mcmother->GetLastDaughter()-mcmother->GetFirstDaughter()+1:0;
431 return mcmother->Particle()->GetNDaughters();
434 //____________________________________________________________
435 Int_t AliDielectronMC::NumberOfDaughters(const AliAODMCParticle* particle)
438 // returns the number of daughters
440 AliAODMCParticle *mcmother=GetMCTrackMother(particle);
441 if(!mcmother) return -999;
442 return mcmother->GetNDaughters();
445 //____________________________________________________________
446 Int_t AliDielectronMC::GetMCProcessMother(const AliESDtrack* _track)
449 // return process number of the mother of the track
451 AliMCParticle* mcmother = GetMCTrackMother(_track);
452 if (!mcmother) return -999;
456 //____________________________________________________________
457 Int_t AliDielectronMC::GetMCProcessMotherFromStack(const AliESDtrack* _track)
460 // return process number of the mother of the track
462 TParticle* mcmother = GetMCTrackMotherFromStack(_track);
463 if (!mcmother) return -999;
464 return mcmother->GetUniqueID();
467 //____________________________________________________________
468 Bool_t AliDielectronMC::IsMCMotherToEE(const AliVParticle *particle, Int_t pdgMother)
471 // Check if the Mother 'particle' is of type pdgMother and decays to e+e-
473 if (fAnaType==kESD && !fMCEvent) return kFALSE;
474 if (fAnaType==kAOD && !fMcArray) return kFALSE;
475 if (!particle) return kFALSE;
477 if (particle->IsA()==AliMCParticle::Class()){
478 return IsMCMotherToEEesd(static_cast<const AliMCParticle*>(particle),pdgMother);
479 } else if (particle->IsA()==AliAODMCParticle::Class()){
480 return IsMCMotherToEEaod(static_cast<const AliAODMCParticle*>(particle),pdgMother);
482 AliError("Unknown particle type");
487 //____________________________________________________________
488 Bool_t AliDielectronMC::IsMCMotherToEEesd(const AliMCParticle *particle, Int_t pdgMother)
491 // Check if the Mother 'particle' is of type pdgMother and decays to e+e-
496 if (particle->PdgCode()!=pdgMother) return kFALSE;
497 Int_t ifirst = particle->GetFirstDaughter();
498 Int_t ilast = particle->GetLastDaughter();
500 //check number of daughters
501 if ((ilast-ifirst)!=1) return kFALSE;
502 AliMCParticle *firstD=static_cast<AliMCParticle*>(GetMCTrackFromMCEvent(ifirst));
503 AliMCParticle *secondD=static_cast<AliMCParticle*>(GetMCTrackFromMCEvent(ilast));
505 //TODO: check how you can get rid of the hardcoded numbers. One should make use of the PdgCodes set in AliDielectron!!!
506 if (firstD->Charge()>0){
507 if (firstD->PdgCode()!=-11) return kFALSE;
508 if (secondD->PdgCode()!=11) return kFALSE;
510 if (firstD->PdgCode()!=11) return kFALSE;
511 if (secondD->PdgCode()!=-11) return kFALSE;
517 //____________________________________________________________
518 Bool_t AliDielectronMC::IsMCMotherToEEaod(const AliAODMCParticle *particle, Int_t pdgMother)
521 // Check if the Mother 'particle' is of type pdgMother and decays to e+e-
525 if (particle->GetPdgCode()!=pdgMother) return kFALSE;
526 if (particle->GetNDaughters()!=2) return kFALSE;
528 Int_t ifirst = particle->GetDaughter(0);
529 Int_t ilast = particle->GetDaughter(1);
531 //check number of daughters
532 if ((ilast-ifirst)!=1) return kFALSE;
534 AliAODMCParticle *firstD=static_cast<AliAODMCParticle*>(GetMCTrackFromMCEvent(ifirst));
535 AliAODMCParticle *secondD=static_cast<AliAODMCParticle*>(GetMCTrackFromMCEvent(ilast));
537 //TODO: check how you can get rid of the hardcoded numbers. One should make use of the PdgCodes set in AliDielectron!!!
539 if (firstD->Charge()>0){
540 if (firstD->GetPdgCode()!=-11) return kFALSE;
541 if (secondD->GetPdgCode()!=11) return kFALSE;
543 if (firstD->GetPdgCode()!=11) return kFALSE;
544 if (secondD->GetPdgCode()!=-11) return kFALSE;
549 //____________________________________________________________
550 Int_t AliDielectronMC::GetLabelMotherWithPdg(const AliVParticle *particle1, const AliVParticle *particle2, Int_t pdgMother)
553 // test if mother of particle 1 and 2 has pdgCode pdgMother and is the same;
556 if (!fMCEvent) return -1;
557 return GetLabelMotherWithPdgESD(particle1, particle2, pdgMother);
559 else if (fAnaType==kAOD)
561 if (!fMcArray) return -1;
562 return GetLabelMotherWithPdgAOD(particle1, particle2, pdgMother);
568 //____________________________________________________________
569 Int_t AliDielectronMC::GetLabelMotherWithPdgESD(const AliVParticle *particle1, const AliVParticle *particle2, Int_t pdgMother)
572 // test if mother of particle 1 and 2 has pdgCode +-11 (electron),
573 // have the same mother and the mother had pdg code pdgMother
575 //TODO: check how you can get rid of the hardcoded numbers. One should make use of the PdgCodes set in AliDielectron!!!
578 AliMCParticle *mcPart1=static_cast<AliMCParticle*>(GetMCTrackFromMCEvent(particle1->GetLabel()));
579 AliMCParticle *mcPart2=static_cast<AliMCParticle*>(GetMCTrackFromMCEvent(particle2->GetLabel()));
581 if (!mcPart1||!mcPart2) return -1;
583 Int_t lblMother1=mcPart1->GetMother();
584 Int_t lblMother2=mcPart2->GetMother();
586 AliMCParticle *mcMother1=static_cast<AliMCParticle*>(GetMCTrackFromMCEvent(lblMother1));
587 if (!mcMother1) return -1;
588 if (lblMother1!=lblMother2) return -1;
589 if (TMath::Abs(mcPart1->PdgCode())!=11) return -1;
590 if (mcPart1->PdgCode()!=-mcPart2->PdgCode()) return -1;
591 if (mcMother1->PdgCode()!=pdgMother) return -1;
596 //____________________________________________________________
597 Int_t AliDielectronMC::GetLabelMotherWithPdgAOD(const AliVParticle *particle1, const AliVParticle *particle2, Int_t pdgMother)
600 // test if mother of particle 1 and 2 has pdgCode +-11 (electron),
601 // have the same mother and the mother had pdg code pdgMother
603 //TODO: check how you can get rid of the hardcoded numbers. One should make use of the PdgCodes set in AliDielectron!!!
605 AliAODMCParticle *mcPart1=static_cast<AliAODMCParticle*>(GetMCTrackFromMCEvent(particle1->GetLabel()));
606 AliAODMCParticle *mcPart2=static_cast<AliAODMCParticle*>(GetMCTrackFromMCEvent(particle2->GetLabel()));
608 if (!mcPart1||!mcPart2) return -1;
610 Int_t lblMother1=mcPart1->GetMother();
611 Int_t lblMother2=mcPart2->GetMother();
613 AliAODMCParticle *mcMother1=static_cast<AliAODMCParticle*>(GetMCTrackFromMCEvent(lblMother1));
615 if (!mcMother1) return -1;
616 if (lblMother1!=lblMother2) return -1;
617 if (TMath::Abs(mcPart1->GetPdgCode())!=11) return -1;
618 if (mcPart1->GetPdgCode()!=-mcPart2->GetPdgCode()) return -1;
619 if (mcMother1->GetPdgCode()!=pdgMother) return -1;
624 //____________________________________________________________
625 void AliDielectronMC::GetDaughters(const TObject *mother, AliVParticle* &d1, AliVParticle* &d2)
628 // Get First two daughters of the mother
635 if(!fMcArray) return;
636 const AliAODMCParticle *aodMother=static_cast<const AliAODMCParticle*>(mother);
637 lblD1=aodMother->GetDaughter(0);
638 lblD2=aodMother->GetDaughter(1);
639 d1 = (AliVParticle*)fMcArray->At(lblD1);
640 d2 = (AliVParticle*)fMcArray->At(lblD2);
641 } else if (fAnaType==kESD){
642 if (!fMCEvent) return;
643 const AliMCParticle *aodMother=static_cast<const AliMCParticle*>(mother);
644 lblD1=aodMother->GetFirstDaughter();
645 lblD2=aodMother->GetLastDaughter();
646 d1=fMCEvent->GetTrack(lblD1);
647 d2=fMCEvent->GetTrack(lblD2);
651 //____________________________________________________________
652 Bool_t AliDielectronMC::HaveSameMother(const AliDielectronPair * pair)
655 // Check whether two particles have the same mother
658 const AliVParticle * daughter1 = pair->GetFirstDaughter();
659 const AliVParticle * daughter2 = pair->GetSecondDaughter();
661 AliVParticle *mcDaughter1=GetMCTrackFromMCEvent(daughter1->GetLabel());
662 AliVParticle *mcDaughter2=GetMCTrackFromMCEvent(daughter2->GetLabel());
663 if (!mcDaughter1 || !mcDaughter2) return 0;
665 Int_t labelMother1=-1;
666 Int_t labelMother2=-1;
668 if (mcDaughter1->IsA()==AliMCParticle::Class()){
669 labelMother1=(static_cast<AliMCParticle*>(mcDaughter1))->GetMother();
670 labelMother2=(static_cast<AliMCParticle*>(mcDaughter2))->GetMother();
671 } else if (mcDaughter1->IsA()==AliAODMCParticle::Class()) {
672 labelMother1=(static_cast<AliAODMCParticle*>(mcDaughter1))->GetMother();
673 labelMother2=(static_cast<AliAODMCParticle*>(mcDaughter2))->GetMother();
676 Bool_t sameMother=(labelMother1>-1)&&(labelMother2>-1)&&(labelMother1==labelMother2);
681 //________________________________________________________________
682 Int_t AliDielectronMC::IsJpsiPrimary(const AliDielectronPair * pair)
684 // return: "0" for primary jpsi
685 // "1" for secondary jpsi (from beauty)
686 // "2" for background
687 if(!HaveSameMother(pair)) return 2;
688 AliVParticle *mcDaughter1=GetMCTrackFromMCEvent((pair->GetFirstDaughter())->GetLabel());
689 Int_t labelMother=-1;
691 if (mcDaughter1->IsA()==AliMCParticle::Class()){
692 labelMother=(static_cast<AliMCParticle*>(mcDaughter1))->GetMother();
693 } else if (mcDaughter1->IsA()==AliAODMCParticle::Class()) {
694 labelMother=(static_cast<AliAODMCParticle*>(mcDaughter1))->GetMother();
697 AliVParticle* mcMother=GetMCTrackFromMCEvent(labelMother);
698 if(!IsMCMotherToEE(mcMother,443)) return 2;
699 return IsJpsiPrimary(mcMother);
702 //______________________________________________________________
703 Int_t AliDielectronMC::IsJpsiPrimary(const AliVParticle * particle)
705 // return: "0" for primary jpsi
706 // "1" for secondary jpsi (come from B decay)
710 if (particle->IsA()==AliMCParticle::Class()){
711 labelMoth = (static_cast<const AliMCParticle*>(particle))->GetMother();
713 particle = GetMCTrackFromMCEvent(labelMoth);
714 pdgCode = TMath::Abs((static_cast<const AliMCParticle*>(particle))->PdgCode());
715 if((pdgCode>500 && pdgCode<600) || (pdgCode>5000 && pdgCode<6000)) return 1;
716 labelMoth = (static_cast<const AliMCParticle*>(particle))->GetMother();
719 else if (particle->IsA()==AliAODMCParticle::Class()){
720 labelMoth = (static_cast<const AliAODMCParticle*>(particle))->GetMother();
722 particle = GetMCTrackFromMCEvent(labelMoth);
723 pdgCode = TMath::Abs((static_cast<const AliAODMCParticle*>(particle))->PdgCode());
724 if((pdgCode>500 && pdgCode<600) || (pdgCode>5000 && pdgCode<6000)) return 1;
725 labelMoth = (static_cast<const AliAODMCParticle*>(particle))->GetMother();