1 /**************************************************************************
2 * Copyright(c) 1998-1999, 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 **************************************************************************/
15 /* $Id: AliMCAnalysisUtils.cxx 21839 2007-10-29 13:49:42Z gustavo $ */
17 //_________________________________________________________________________
18 // Class for analysis utils for MC data
19 // stored in stack or event header.
21 // - method to check the origin of a given track/cluster
22 // - method to obtain the generated jets
24 //*-- Author: Gustavo Conesa (LNF-INFN)
25 //////////////////////////////////////////////////////////////////////////////
28 // --- ROOT system ---
31 #include "TParticle.h"
32 #include "TDatabasePDG.h"
35 //---- ANALYSIS system ----
36 #include "AliMCAnalysisUtils.h"
37 #include "AliCaloTrackReader.h"
39 #include "AliGenPythiaEventHeader.h"
40 #include "AliAODMCParticle.h"
42 ClassImp(AliMCAnalysisUtils)
44 //________________________________________
45 AliMCAnalysisUtils::AliMCAnalysisUtils() :
50 fMCGenerator("PYTHIA")
55 //_______________________________________
56 AliMCAnalysisUtils::~AliMCAnalysisUtils()
58 // Remove all pointers.
66 //_____________________________________________________________________________________________
67 Int_t AliMCAnalysisUtils::CheckCommonAncestor(const Int_t index1, const Int_t index2,
68 const AliCaloTrackReader* reader,
69 Int_t & ancPDG, Int_t & ancStatus,
70 TLorentzVector & momentum, TVector3 & prodVertex)
72 //Check the first common ancestor of 2 clusters, given the most likely labels of the primaries generating such clusters.
80 if(label1[0]==label2[0]) {
81 //printf("AliMCAnalysisUtils::CheckCommonAncestor() - Already the same label: %d\n",label1[0]);
86 if(reader->ReadAODMCParticles()){
87 TClonesArray * mcparticles = reader->GetAODMCParticles(0);
89 Int_t label=label1[0];
90 while(label > -1 && counter1 < 99){
92 AliAODMCParticle * mom = (AliAODMCParticle *) mcparticles->At(label);
94 label = mom->GetMother() ;
95 label1[counter1]=label;
97 //printf("\t counter %d, label %d\n", counter1,label);
99 //printf("Org label2=%d,\n",label2[0]);
101 while(label > -1 && counter2 < 99){
103 AliAODMCParticle * mom = (AliAODMCParticle *) mcparticles->At(label);
105 label = mom->GetMother() ;
106 label2[counter2]=label;
108 //printf("\t counter %d, label %d\n", counter2,label);
111 else { //Kine stack from ESDs
112 AliStack * stack = reader->GetStack();
113 Int_t label=label1[0];
114 while(label > -1 && counter1 < 99){
116 TParticle * mom = stack->Particle(label);
118 label = mom->GetFirstMother() ;
119 label1[counter1]=label;
121 //printf("\t counter %d, label %d\n", counter1,label);
123 //printf("Org label2=%d,\n",label2[0]);
125 while(label > -1 && counter2 < 99){
127 TParticle * mom = stack->Particle(label);
129 label = mom->GetFirstMother() ;
130 label2[counter2]=label;
132 //printf("\t counter %d, label %d\n", counter2,label);
134 }// Kine stack from ESDs
135 }//First labels not the same
137 if((counter1==99 || counter2==99) && fDebug >=0) printf("AliMCAnalysisUtils::CheckCommonAncestor() - Genealogy too large c1: %d, c2= %d\n", counter1, counter2);
138 //printf("CheckAncestor:\n");
139 Int_t commonparents = 0;
141 //printf("counters %d %d \n",counter1, counter2);
142 for (Int_t c1 = 0; c1 < counter1; c1++) {
143 for (Int_t c2 = 0; c2 < counter2; c2++) {
144 if(label1[c1]==label2[c2] && label1[c1]>-1) {
145 ancLabel = label1[c1];
147 if(reader->ReadAODMCParticles()){
148 AliAODMCParticle * mom = (AliAODMCParticle *) reader->GetAODMCParticles(0)->At(label1[c1]);
150 ancPDG = mom->GetPdgCode();
151 ancStatus = mom->GetStatus();
152 momentum.SetPxPyPzE(mom->Px(),mom->Py(),mom->Pz(),mom->E());
153 prodVertex.SetXYZ(mom->Xv(),mom->Yv(),mom->Zv());
157 TParticle * mom = (reader->GetStack())->Particle(label1[c1]);
159 ancPDG = mom->GetPdgCode();
160 ancStatus = mom->GetStatusCode();
161 mom->Momentum(momentum);
162 prodVertex.SetXYZ(mom->Vx(),mom->Vy(),mom->Vz());
165 //First ancestor found, end the loops
169 }//second cluster loop
170 }//first cluster loop
175 //_____________________________________________________________________
176 Int_t AliMCAnalysisUtils::CheckOrigin(const Int_t * label,
178 const AliCaloTrackReader* reader,
179 const Int_t input = 0)
181 //Play with the montecarlo particles if available
185 printf("AliMCAnalysisUtils::CheckOrigin(nlabel<=0) - No MC labels available, please check!!!\n");
189 //Select where the information is, ESD-galice stack or AOD mcparticles branch
190 if(reader->ReadStack()){
191 tag = CheckOriginInStack(label, nlabels, reader->GetStack());
193 else if(reader->ReadAODMCParticles()){
194 tag = CheckOriginInAOD(label, nlabels, reader->GetAODMCParticles(input));
200 //_____________________________________________________________________
201 Int_t AliMCAnalysisUtils::CheckOrigin(const Int_t label,
202 const AliCaloTrackReader* reader,
203 const Int_t input = 0)
205 //Play with the montecarlo particles if available
209 printf("AliMCAnalysisUtils::CheckOrigin(label<0) - No MC labels available, please check!!!\n");
213 Int_t labels[]={label};
215 //Select where the information is, ESD-galice stack or AOD mcparticles branch
216 if(reader->ReadStack()){
217 tag = CheckOriginInStack(labels, 1,reader->GetStack());
219 else if(reader->ReadAODMCParticles()){
220 tag = CheckOriginInAOD(labels, 1,reader->GetAODMCParticles(input));
226 //_________________________________________________________________
227 Int_t AliMCAnalysisUtils::CheckOriginInStack(const Int_t *labels,
231 // Play with the MC stack if available. Tag particles depending on their origin.
232 // Do same things as in CheckOriginInAOD but different input.
234 //generally speaking, label is the MC label of a reconstructed
235 //entity (track, cluster, etc) for which we want to know something
236 //about its heritage, but one can also use it directly with stack
237 //particles not connected to reconstructed entities
241 printf("AliMCAnalysisUtils::CheckOriginInStack() - Stack is not available, check analysis settings in configuration file, STOP!!\n");
246 Int_t label=labels[0];//Most significant particle contributing to the cluster
248 if(label >= 0 && label < stack->GetNtrack()){
249 //MC particle of interest is the "mom" of the entity
250 TParticle * mom = stack->Particle(label);
252 Int_t mPdgSign = mom->GetPdgCode();
253 Int_t mPdg = TMath::Abs(mPdgSign);
254 Int_t mStatus = mom->GetStatusCode() ;
255 Int_t iParent = mom->GetFirstMother() ;
256 if(fDebug > 0 && label < 8 && fMCGenerator!="") printf("AliMCAnalysisUtils::CheckOriginInStack() - Mother is parton %d\n",iParent);
258 //GrandParent of the entity
259 TParticle * parent = NULL;
263 parent = stack->Particle(iParent);
265 pPdg = TMath::Abs(parent->GetPdgCode());
266 pStatus = parent->GetStatusCode();
269 else if(fDebug > 0 ) printf("AliMCAnalysisUtils::CheckOriginInStack() - Parent with label %d\n",iParent);
272 printf("AliMCAnalysisUtils::CheckOriginInStack() - Cluster most contributing mother and its parent: \n");
273 printf("\t Mother label %d, pdg %d, status %d\n",iMom, mPdg, mStatus);
274 printf("\t Parent label %d, pdg %d, status %d\n",iParent, pPdg, pStatus);
277 //Check if "mother" of entity is converted, if not, get the first non converted mother
278 if((mPdg == 22 || mPdg == 11) && (pPdg == 22 || pPdg == 11) && mStatus == 0){
279 SetTagBit(tag,kMCConversion);
280 //Check if the mother is photon or electron with status not stable
281 while ((pPdg == 22 || pPdg == 11) && mStatus != 1) {
283 iMom = mom->GetFirstMother();
284 mom = stack->Particle(iMom);
285 mPdgSign = mom->GetPdgCode();
286 mPdg = TMath::Abs(mPdgSign);
287 mStatus = mom->GetStatusCode() ;
288 iParent = mom->GetFirstMother() ;
289 if(fDebug > 0 && label < 8 ) printf("AliMCAnalysisUtils::CheckOriginInStack() - Mother is parton %d\n",iParent);
293 parent = stack->Particle(iParent);
295 pPdg = TMath::Abs(parent->GetPdgCode());
296 pStatus = parent->GetStatusCode();
299 else {// in case of gun/box simulations
306 printf("AliMCAnalysisUtils::CheckOriginInStack() - Converted photon/electron: \n");
307 printf("\t Mother label %d, pdg %d, status %d\n",iMom, mPdg, mStatus);
308 printf("\t Parent label %d, pdg %d, status %d\n",iParent, pPdg, pStatus);
311 }//mother and parent are electron or photon and have status 0
312 else if((mPdg == 22 || mPdg == 11) && mStatus == 0){
313 //Still a conversion but only one electron/photon generated. Just from hadrons but not decays.
314 if(pPdg == 2112 || pPdg == 211 || pPdg == 321 ||
315 pPdg == 2212 || pPdg == 130 || pPdg == 13 ) {
316 SetTagBit(tag,kMCConversion);
317 iMom = mom->GetFirstMother();
318 mom = stack->Particle(iMom);
319 mPdgSign = mom->GetPdgCode();
320 mPdg = TMath::Abs(mPdgSign);
323 printf("AliMCAnalysisUtils::CheckOriginInStack() - Converted hadron: \n");
324 printf("\t Mother label %d, pdg %d, status %d\n",iMom, mPdg, mStatus);
328 //Comment for the next lines, we do not check the parent of the hadron for the moment.
329 //iParent = mom->GetFirstMother() ;
330 //if(fDebug > 0 && label < 8 ) printf("AliMCAnalysisUtils::CheckOriginInStack() - Mother is parton %d\n",iParent);
334 // parent = stack->Particle(iParent);
335 // pPdg = TMath::Abs(parent->GetPdgCode());
338 // conversion into electrons/photons checked
340 //first check for typical charged particles
341 if (mPdg == 13) SetTagBit(tag,kMCMuon);
342 else if(mPdg == 211) SetTagBit(tag,kMCPion);
343 else if(mPdg == 321) SetTagBit(tag,kMCKaon);
344 else if(mPdgSign == 2212) SetTagBit(tag,kMCProton);
345 else if(mPdgSign == -2212) SetTagBit(tag,kMCAntiProton);
346 else if(mPdgSign == 2112) SetTagBit(tag,kMCNeutron);
347 else if(mPdgSign == -2112) SetTagBit(tag,kMCAntiNeutron);
349 //check for pi0 and eta (shouldn't happen unless their decays were turned off)
350 else if(mPdg == 111) {
351 SetTagBit(tag,kMCPi0Decay);
352 if(fDebug > 2 ) printf("AliMCAnalysisUtils::CheckOriginInStack() - First mother is directly pi0, not decayed by generator \n");
353 CheckOverlapped2GammaDecay(labels,nlabels, iMom, stack, tag); //set to kMCPi0 if 2 gammas in same cluster
355 else if(mPdg == 221) {
356 SetTagBit(tag,kMCEtaDecay);
357 if(fDebug > 2 ) printf("AliMCAnalysisUtils::CheckOriginInStack() - First mother is directly eta, not decayed by generator \n");
358 CheckOverlapped2GammaDecay(labels,nlabels, iMom, stack, tag); //set to kMCEta if 2 gammas in same cluster
362 SetTagBit(tag,kMCPhoton);
363 if(mStatus == 1){ //undecayed particle
364 if(fMCGenerator == "PYTHIA"){
365 if(iParent < 8 && iParent > 5) {//outgoing partons
366 if(pPdg == 22) SetTagBit(tag,kMCPrompt);
367 else SetTagBit(tag,kMCFragmentation);
369 else if(iParent <= 5) {
370 SetTagBit(tag, kMCISR); //Initial state radiation
372 else if(pStatus == 11){//Decay
374 SetTagBit(tag,kMCPi0Decay);
375 if(fDebug > 2 ) printf("AliMCAnalysisUtils::CheckOriginInStack() - PYTHIA pi0 decay photon, parent pi0 with status 11 \n");
376 CheckOverlapped2GammaDecay(labels,nlabels, iParent, stack, tag); //set to kMCPi0 if 2 gammas in same cluster
378 else if (pPdg == 221) {
379 SetTagBit(tag, kMCEtaDecay);
380 if(fDebug > 2 ) printf("AliMCAnalysisUtils::CheckOriginInStack() - PYTHIA eta decay photon, parent pi0 with status 11 \n");
381 CheckOverlapped2GammaDecay(labels,nlabels, iParent, stack, tag);//set to kMCEta if 2 gammas in same cluster
383 else SetTagBit(tag,kMCOtherDecay);
386 if(fDebug > 1 && parent) printf("AliMCAnalysisUtils::CheckOrigingInStack() - what is it in PYTHIA? Wrong generator setting? Mother mPdg %d, status %d \n Parent iParent %d, pPdg %d %s, status %d\n",
387 mPdg, mStatus,iParent, pPdg, parent->GetName(),pStatus);
389 SetTagBit(tag,kMCPi0Decay);
390 if(fDebug > 2 ) printf("AliMCAnalysisUtils::CheckOriginInStack() - PYTHIA pi0 decay photon, parent pi0 with status 11 \n");
391 CheckOverlapped2GammaDecay(labels,nlabels, iParent, stack, tag); //set to kMCPi0 if 2 gammas in same cluster
393 else if (pPdg == 221) {
394 SetTagBit(tag, kMCEtaDecay);
395 if(fDebug > 2 ) printf("AliMCAnalysisUtils::CheckOriginInStack() - PYTHIA eta decay photon, parent pi0 with status 11 \n");
396 CheckOverlapped2GammaDecay(labels,nlabels, iParent, stack, tag);//set to kMCEta if 2 gammas in same cluster
398 else SetTagBit(tag,kMCOtherDecay);
402 else if(fMCGenerator == "HERWIG"){
403 if(pStatus < 197){//Not decay
406 if(parent->GetFirstMother()<=5) break;
407 iParent = parent->GetFirstMother();
408 parent=stack->Particle(iParent);
409 pStatus= parent->GetStatusCode();
410 pPdg = TMath::Abs(parent->GetPdgCode());
412 }//Look for the parton
414 if(iParent < 8 && iParent > 5) {
415 if(pPdg == 22) SetTagBit(tag,kMCPrompt);
416 else SetTagBit(tag,kMCFragmentation);
418 else SetTagBit(tag,kMCISR);//Initial state radiation
422 SetTagBit(tag,kMCPi0Decay);
423 if(fDebug > 2 ) printf("AliMCAnalysisUtils::CheckOriginInStack() - HERWIG pi0 decay photon \n");
424 CheckOverlapped2GammaDecay(labels,nlabels, iParent, stack, tag); //set to kMCPi0 if 2 gammas in same cluster
426 else if (pPdg == 221) {
427 SetTagBit(tag,kMCEtaDecay);
428 if(fDebug > 2 ) printf("AliMCAnalysisUtils::CheckOriginInStack() - HERWIG eta decay photon \n");
429 CheckOverlapped2GammaDecay(labels,nlabels, iParent, stack, tag); //set to kMCEta if 2 gammas in same cluster
431 else SetTagBit(tag,kMCOtherDecay);
435 else SetTagBit(tag,kMCUnknown);
437 }//Status 1 : created by event generator
439 else if(mStatus == 0){ // geant
441 SetTagBit(tag,kMCPi0Decay);
442 if(fDebug > 2 ) printf("AliMCAnalysisUtils::CheckOriginInStack() - Transport MC pi0 decay photon \n");
443 CheckOverlapped2GammaDecay(labels,nlabels, iParent, stack, tag); //set to kMCPi0 if 2 gammas in same cluster
445 else if (pPdg == 221) {
446 SetTagBit(tag,kMCEtaDecay);
447 if(fDebug > 2 ) printf("AliMCAnalysisUtils::CheckOriginInStack() - Transport MC eta decay photon \n");
448 CheckOverlapped2GammaDecay(labels,nlabels, iParent, stack, tag); //set to kMCEta if 2 gammas in same cluster
450 else SetTagBit(tag,kMCOtherDecay);
451 }//status 0 : geant generated
455 //Electron check. Where did that electron come from?
456 else if(mPdg == 11){ //electron
457 if(pPdg == 11 && parent){
458 Int_t iGrandma = parent->GetFirstMother();
460 TParticle* gma = (TParticle*)stack->Particle(iGrandma); //get mother
461 Int_t gPdg = TMath::Abs(gma->GetPdgCode());
463 if (gPdg == 23) { SetTagBit(tag,kMCZDecay); } //parent is Z-boson
464 else if (gPdg == 24) { SetTagBit(tag,kMCWDecay); } //parent is W-boson
467 SetTagBit(tag,kMCElectron);
468 if(fDebug > 0) printf("AliMCAnalysisUtils::CheckOriginInStack() - Checking ancestors of electrons\n");
469 if (pPdg == 111) { SetTagBit(tag,kMCPi0Decay); } //Pi0 Dalitz decay
470 else if (pPdg == 221) { SetTagBit(tag,kMCEtaDecay); } //Eta Dalitz decay
471 else if((499 < pPdg && pPdg < 600)||(4999 < pPdg && pPdg < 6000)) { SetTagBit(tag,kMCEFromB); } //b-->e decay
472 else if((399 < pPdg && pPdg < 500)||(3999 < pPdg && pPdg < 5000)) { //check charm decay
474 Int_t iGrandma = parent->GetFirstMother();
476 TParticle* gma = (TParticle*)stack->Particle(iGrandma); //get mother of charm
477 Int_t gPdg = TMath::Abs(gma->GetPdgCode());
478 if((499 < gPdg && gPdg < 600)||(4999 < gPdg && gPdg < 6000)) SetTagBit(tag,kMCEFromCFromB); //b-->c-->e
479 else SetTagBit(tag,kMCEFromC); //c-->e
480 } else SetTagBit(tag,kMCEFromC); //c-->e
483 //if it is not from any of the above, where is it from?
484 if(pPdg > 10000) SetTagBit(tag,kMCUnknown);
485 else SetTagBit(tag,kMCOtherDecay);
486 if(fDebug > 0 && parent) printf("AliMCAnalysisUtils::CheckOriginInStack() - Status %d Electron from other origin: %s (pPdg = %d) %s (mpdg = %d)\n",mStatus,parent->GetName(),pPdg,mom->GetName(),mPdg);
489 //Cluster was made by something else
491 if(fDebug > 0) printf("AliMCAnalysisUtils::CheckOriginInStack() - \tSetting kMCUnknown for cluster from %s (pdg = %d, Parent pdg = %d)\n",mom->GetName(),mPdg,pPdg);
492 SetTagBit(tag,kMCUnknown);
497 if(label < 0 && (fDebug >= 0))
498 printf("AliMCAnalysisUtils::CheckOriginInStack() *** bad label or no stack ***: label %d \n", label);
499 if(label >= stack->GetNtrack() && (fDebug >= 0))
500 printf("AliMCAnalysisUtils::CheckOriginInStack() *** large label ***: label %d, n tracks %d \n", label, stack->GetNtrack());
501 SetTagBit(tag,kMCUnknown);
509 //_________________________________________________________________________
510 Int_t AliMCAnalysisUtils::CheckOriginInAOD(const Int_t *labels,
512 const TClonesArray *mcparticles)
514 // Play with the MCParticles in AOD if available. Tag particles depending on their origin.
515 // Do same things as in CheckOriginInStack but different input.
518 printf("AliMCAnalysisUtils::CheckOriginInAOD() - AODMCParticles is not available, check analysis settings in configuration file!!\n");
523 Int_t label=labels[0];//Most significant particle contributing to the cluster
525 Int_t nprimaries = mcparticles->GetEntriesFast();
526 if(label >= 0 && label < nprimaries){
528 AliAODMCParticle * mom = (AliAODMCParticle *) mcparticles->At(label);
530 Int_t mPdgSign = mom->GetPdgCode();
531 Int_t mPdg = TMath::Abs(mPdgSign);
532 Int_t iParent = mom->GetMother() ;
533 if(fDebug > 0 && label < 8 && fMCGenerator!="") printf("AliMCAnalysisUtils::CheckOriginInAOD() - Mother is parton %d\n",iParent);
536 AliAODMCParticle * parent = NULL ;
539 parent = (AliAODMCParticle *) mcparticles->At(iParent);
540 pPdg = TMath::Abs(parent->GetPdgCode());
542 else if(fDebug > 0 ) printf("AliMCAnalysisUtils::CheckOriginInAOD() - Parent with label %d\n",iParent);
545 printf("AliMCAnalysisUtils::CheckOriginInAOD() - Cluster most contributing mother and its parent: \n");
546 printf("\t Mother label %d, pdg %d, Primary? %d, Physical Primary? %d\n",iMom, mPdg, mom->IsPrimary(), mom->IsPhysicalPrimary());
548 printf("\t Parent label %d, pdg %d, Primary? %d, Physical Primary? %d\n",iParent, pPdg, parent->IsPrimary(), parent->IsPhysicalPrimary());
551 //Check if mother is converted, if not, get the first non converted mother
552 if((mPdg == 22 || mPdg == 11) && (pPdg == 22 || pPdg == 11) && !mom->IsPrimary()){
553 SetTagBit(tag,kMCConversion);
554 //Check if the mother is photon or electron with status not stable
555 while ((pPdg == 22 || pPdg == 11) && !mom->IsPhysicalPrimary()) {
557 iMom = mom->GetMother();
558 mom = (AliAODMCParticle *) mcparticles->At(iMom);
559 mPdgSign = mom->GetPdgCode();
560 mPdg = TMath::Abs(mPdgSign);
561 iParent = mom->GetMother() ;
562 if(fDebug > 0 && label < 8 ) printf("AliMCAnalysisUtils::CheckOriginInAOD() - Mother is parton %d\n",iParent);
565 if(iParent >= 0 && parent){
566 parent = (AliAODMCParticle *) mcparticles->At(iParent);
567 pPdg = TMath::Abs(parent->GetPdgCode());
569 // printf("\t While Mother label %d, pdg %d, Primary? %d, Physical Primary? %d\n",iMom, mPdg, mom->IsPrimary(), mom->IsPhysicalPrimary());
570 // printf("\t While Parent label %d, pdg %d, Primary? %d, Physical Primary? %d\n",iParent, pPdg, parent->IsPrimary(), parent->IsPhysicalPrimary());
575 printf("AliMCAnalysisUtils::CheckOriginInAOD() - Converted photon/electron : \n");
576 printf("\t Mother label %d, pdg %d, Primary? %d, Physical Primary? %d\n",iMom, mPdg, mom->IsPrimary(), mom->IsPhysicalPrimary());
578 printf("\t Parent label %d, pdg %d, Primary? %d, Physical Primary? %d\n",iParent, pPdg, parent->IsPrimary(), parent->IsPhysicalPrimary());
581 }//mother and parent are electron or photon and have status 0 and parent is photon or electron
582 else if((mPdg == 22 || mPdg == 11) && !mom->IsPrimary()){
583 //Still a conversion but only one electron/photon generated. Just from hadrons
584 if(pPdg == 2112 || pPdg == 211 || pPdg == 321 ||
585 pPdg == 2212 || pPdg == 130 || pPdg == 13 ) {
586 SetTagBit(tag,kMCConversion);
587 iMom = mom->GetMother();
588 mom = (AliAODMCParticle *) mcparticles->At(iMom);
589 mPdgSign = mom->GetPdgCode();
590 mPdg = TMath::Abs(mPdgSign);
593 printf("AliMCAnalysisUtils::CheckOriginInAOD() - Converted hadron : \n");
594 printf("\t Mother label %d, pdg %d, Primary? %d, Physical Primary? %d\n",iMom, mPdg, mom->IsPrimary(), mom->IsPhysicalPrimary());
598 //Comment for next lines, we do not check the parent of the hadron for the moment.
599 //iParent = mom->GetMother() ;
600 //if(fDebug > 0 && label < 8 ) printf("AliMCAnalysisUtils::CheckOriginInAOD() - Mother is parton %d\n",iParent);
604 // parent = (AliAODMCParticle *) mcparticles->At(iParent);
605 // pPdg = TMath::Abs(parent->GetPdgCode());
609 //printf("Final mother mPDG %d\n",mPdg);
611 // conversion into electrons/photons checked
613 //first check for typical charged particles
614 if (mPdg == 13) SetTagBit(tag,kMCMuon);
615 else if(mPdg == 211) SetTagBit(tag,kMCPion);
616 else if(mPdg == 321) SetTagBit(tag,kMCKaon);
617 else if(mPdgSign == 2212) SetTagBit(tag,kMCProton);
618 else if(mPdgSign == 2112) SetTagBit(tag,kMCNeutron);
619 else if(mPdgSign == -2212) SetTagBit(tag,kMCAntiProton);
620 else if(mPdgSign == -2112) SetTagBit(tag,kMCAntiNeutron);
622 //check for pi0 and eta (shouldn't happen unless their decays were turned off)
623 else if(mPdg == 111) {
624 SetTagBit(tag,kMCPi0Decay);
625 if(fDebug > 2 ) printf("AliMCAnalysisUtils::CheckOriginInAOD() - First mother is directly pi0, not decayed by generator \n");
626 CheckOverlapped2GammaDecay(labels,nlabels, iMom, mcparticles, tag); //set to kMCPi0 if 2 gammas in same cluster
628 else if(mPdg == 221) {
629 SetTagBit(tag,kMCEtaDecay);
630 if(fDebug > 2 ) printf("AliMCAnalysisUtils::CheckOriginInAOD() - First mother is directly eta, not decayed by generator \n");
631 CheckOverlapped2GammaDecay(labels,nlabels, iMom, mcparticles, tag); //set to kMCEta if 2 gammas in same cluster
635 SetTagBit(tag,kMCPhoton);
636 if(mom->IsPhysicalPrimary() && (fMCGenerator=="PYTHIA" || fMCGenerator=="HERWIG")) //undecayed particle
638 if(iParent < 8 && iParent > 5 ) {//outgoing partons
639 if(pPdg == 22) SetTagBit(tag,kMCPrompt);
640 else SetTagBit(tag,kMCFragmentation);
642 else if(iParent <= 5 && (fMCGenerator=="PYTHIA" || fMCGenerator=="HERWIG")) {
643 SetTagBit(tag, kMCISR); //Initial state radiation
645 else if(parent && parent->IsPrimary() && !parent->IsPhysicalPrimary()){//Decay
647 SetTagBit(tag,kMCPi0Decay);
648 if(fDebug > 2 ) printf("AliMCAnalysisUtils::CheckOriginInAOD() - Generator pi0 decay photon \n");
649 CheckOverlapped2GammaDecay(labels,nlabels, iParent, mcparticles, tag); //set to kMCPi0 if 2 gammas in same cluster
651 else if (pPdg == 221) {
652 SetTagBit(tag, kMCEtaDecay);
653 if(fDebug > 2 ) printf("AliMCAnalysisUtils::CheckOriginInAOD() - Generator eta decay photon \n");
654 CheckOverlapped2GammaDecay(labels,nlabels, iParent, mcparticles, tag); //set to kMCEta if 2 gammas in same cluster
656 else SetTagBit(tag,kMCOtherDecay);
659 if(parent)printf("AliMCAnalysisUtils::CheckOriginInAOD() - what is it? Mother mPdg %d, is primary? %d, is physical %d \n Parent iParent %d, pPdg %d, is primary? %d, is physical? %d\n",
660 mPdg, mom->IsPrimary(), mom->IsPhysicalPrimary(),iParent, pPdg,parent->IsPrimary(), parent->IsPhysicalPrimary());
661 SetTagBit(tag,kMCOtherDecay);//Check
664 else if(!mom->IsPrimary()){ //Decays
666 SetTagBit(tag,kMCPi0Decay);
668 printf("AliMCAnalysisUtils::CheckOriginInAOD() - Transport MC pi0 decay photon \n");
669 CheckOverlapped2GammaDecay(labels,nlabels, iParent, mcparticles, tag); //set to kMCPi0 if 2 gammas in same cluster
671 else if (pPdg == 221) {
672 SetTagBit(tag,kMCEtaDecay);
673 if(fDebug > 2 ) printf("AliMCAnalysisUtils::CheckOriginInAOD() - Transport MC eta decay photon \n");
674 CheckOverlapped2GammaDecay(labels,nlabels, iParent, mcparticles, tag); //set to kMCEta if 2 gammas in same cluster
676 else SetTagBit(tag,kMCOtherDecay);
677 }//not primary : geant generated, decays
679 //printf("UNKNOWN 1, mom pdg %d, primary %d, physical primary %d; parent %d, pdg %d, primary %d, physical primary %d \n",
680 //mPdg, mom->IsPrimary(), mom->IsPhysicalPrimary(), iParent, pPdg, parent->IsPrimary(), parent->IsPhysicalPrimary());
681 SetTagBit(tag,kMCUnknown);
685 //Electron check. Where did that electron come from?
686 else if(mPdg == 11){ //electron
687 if(pPdg == 11 && parent){
688 Int_t iGrandma = parent->GetMother();
690 AliAODMCParticle* gma = (AliAODMCParticle*)mcparticles->At(iGrandma);
691 Int_t gPdg = TMath::Abs(gma->GetPdgCode());
693 if (gPdg == 23) { SetTagBit(tag,kMCZDecay); } //parent is Z-boson
694 else if (gPdg == 24) { SetTagBit(tag,kMCWDecay); } //parent is W-boson
697 SetTagBit(tag,kMCElectron);
698 if(fDebug > 0) printf("AliMCAnalysisUtils::CheckOriginInAOD() - Checking ancestors of electrons");
699 if (pPdg == 111) { SetTagBit(tag,kMCPi0Decay); } //Pi0 Dalitz decay
700 else if (pPdg == 221) { SetTagBit(tag,kMCEtaDecay); } //Eta Dalitz decay
701 else if((499 < pPdg && pPdg < 600)||(4999 < pPdg && pPdg < 6000)) { SetTagBit(tag,kMCEFromB);} //b-hadron decay
702 else if((399 < pPdg && pPdg < 500)||(3999 < pPdg && pPdg < 5000)) { //c-hadron decay check
704 Int_t iGrandma = parent->GetMother();
706 AliAODMCParticle* gma = (AliAODMCParticle*)mcparticles->At(iGrandma); //charm's mother
707 Int_t gPdg = TMath::Abs(gma->GetPdgCode());
708 if((499 < gPdg && gPdg < 600)||(4999 < gPdg && gPdg < 6000)) SetTagBit(tag,kMCEFromCFromB); //b-->c-->e decay
709 else SetTagBit(tag,kMCEFromC); //c-hadron decay
710 } else SetTagBit(tag,kMCEFromC); //c-hadron decay
712 } else { //prompt or other decay
713 TParticlePDG* foo = TDatabasePDG::Instance()->GetParticle(pPdg);
714 TParticlePDG* foo1 = TDatabasePDG::Instance()->GetParticle(mPdg);
715 if(fDebug > 0) printf("AliMCAnalysisUtils::CheckOriginInAOD() - Electron from other origin: %s (pPdg = %d) %s (mPdg = %d)\n",foo->GetName(), pPdg,foo1->GetName(),mPdg);
716 if(pPdg > 10000) SetTagBit(tag,kMCUnknown);
717 else SetTagBit(tag,kMCOtherDecay);
720 //cluster was made by something else
722 if(fDebug > 0) printf("AliMCAnalysisUtils::CheckOriginInAOD() - \tSetting kMCUnknown for cluster with pdg = %d, Parent pdg = %d\n",mPdg,pPdg);
723 SetTagBit(tag,kMCUnknown);
728 if(label < 0 && (fDebug >= 0) )
729 printf("AliMCAnalysisUtils::CheckOriginInAOD() *** bad label or no mcparticles ***: label %d \n", label);
730 if(label >= mcparticles->GetEntriesFast() && (fDebug >= 0) )
731 printf("AliMCAnalysisUtils::CheckOriginInAOD() *** large label ***: label %d, n tracks %d \n", label, mcparticles->GetEntriesFast());
732 SetTagBit(tag,kMCUnknown);
740 //_________________________________________________________________________
741 void AliMCAnalysisUtils::CheckOverlapped2GammaDecay(const Int_t *labels,
743 const Int_t mesonIndex,
747 //Check if cluster is formed from the contribution of 2 decay photons from pi0 or eta. Input in stack
749 if(labels[0] < 0 || labels[0] > stack->GetNtrack() || nlabels <= 1) {
750 if(fDebug > 2) printf("AliMCAnalysisUtils::CheckOverlapped2GammaDecay(stack) - Exit : label[0] %d, n primaries %d, nlabels %d \n",
751 labels[0],stack->GetNtrack(), nlabels);
755 TParticle * meson = stack->Particle(mesonIndex);
756 Int_t mesonPdg = meson->GetPdgCode();
757 if(mesonPdg!=111 && mesonPdg!=221){
758 printf("AliMCAnalysisUtils::CheckOverlapped2GammaDecay(stack) - Wrong pi0/eta PDG : %d \n",mesonPdg);
762 if(fDebug > 2) printf("AliMCAnalysisUtils::CheckOverlapped2GammaDecay(stack) - %s, label %d\n",meson->GetName(), mesonIndex);
764 //Check if meson decayed into 2 daughters or if both were kept.
765 if(meson->GetNDaughters() != 2){
767 printf("AliMCAnalysisUtils::CheckOverlapped2GammaDecay(stack) - Not overalapped. Number of daughters is %d, not 2 \n",meson->GetNDaughters());
772 Int_t iPhoton0 = meson->GetDaughter(0);
773 Int_t iPhoton1 = meson->GetDaughter(1);
774 TParticle *photon0 = stack->Particle(iPhoton0);
775 TParticle *photon1 = stack->Particle(iPhoton1);
777 //Check if both daughters are photons
778 if(photon0->GetPdgCode() != 22 || photon1->GetPdgCode()!=22){
780 printf("AliMCAnalysisUtils::CheckOverlapped2GammaDecay(stack) - Not overalapped. PDG: daughter 1 = %d, of daughter 2 = %d \n",photon0->GetPdgCode(),photon1->GetPdgCode());
785 printf("AliMCAnalysisUtils::CheckOverlapped2GammaDecay(stack) - Daughter labels : photon0 = %d, photon1 = %d \n",iPhoton0,iPhoton1);
787 //Check if both photons contribute to the cluster
788 Bool_t okPhoton0 = kFALSE;
789 Bool_t okPhoton1 = kFALSE;
791 if(fDebug > 3) printf("AliMCAnalysisUtils::CheckOverlapped2GammaDecay(stack) - Labels loop:\n");
793 for(Int_t i = 0; i < nlabels; i++){
794 if(fDebug > 3) printf("\t at begin:label %d/%d: %d, ok? photon1 %d, photon2 %d\n", i+1, nlabels, labels[i], okPhoton0, okPhoton1);
796 //If we already found both, break the loop
797 if(okPhoton0 && okPhoton1) break;
799 Int_t index = labels[i];
800 if (iPhoton0 == index) {
804 else if (iPhoton1 == index) {
809 //Trace back the mother in case it was a conversion
811 if(index >= stack->GetNtrack()){
812 printf("AliMCAnalysisUtils::CheckOverlapped2GammaDecay(ESD) Particle index %d larger than size of list %d !!\n",index,stack->GetNtrack());
816 TParticle * daught = stack->Particle(index);
817 Int_t tmpindex = daught->GetFirstMother();
818 if(fDebug > 3) printf("\t Conversion? : mother %d\n",tmpindex);
820 //MC particle of interest is the mother
821 if(fDebug > 3) printf("\t \t parent index %d\n",tmpindex);
822 daught = stack->Particle(tmpindex);
823 if (iPhoton0 == tmpindex) {
827 else if (iPhoton1 == tmpindex) {
831 tmpindex = daught->GetFirstMother();
832 }//While to check if pi0/eta daughter was one of these contributors to the cluster
834 if(i == 0 && (!okPhoton0 && !okPhoton1) && fDebug>=0)
835 printf("AliMCAnalysisUtils::CheckOverlapped2GammaDecay(stack) - Something happens, first label should be from a photon decay!\n");
837 }//loop on list of labels
839 //If both photons contribute tag as the corresponding meson.
840 if(okPhoton0 && okPhoton1){
842 printf("AliMCAnalysisUtils::CheckOverlapped2GammaDecay(stack) - %s OVERLAPPED DECAY \n", meson->GetName());
844 if(mesonPdg == 111) SetTagBit(tag,kMCPi0);
845 else SetTagBit(tag,kMCEta);
850 //__________________________________________________________________________________
851 void AliMCAnalysisUtils::CheckOverlapped2GammaDecay(const Int_t *labels,
853 const Int_t mesonIndex,
854 const TClonesArray *mcparticles,
857 //Check if cluster is formed from the contribution of 2 decay photons from pi0 or eta. Input in AODMCParticles
859 if(labels[0] < 0 || labels[0] > mcparticles->GetEntriesFast() || nlabels <= 1) {
861 printf("AliMCAnalysisUtils::CheckOverlapped2GammaDecay(AOD) - Exit : label[0] %d, n primaries %d, nlabels %d \n",
862 labels[0],mcparticles->GetEntriesFast(), nlabels);
866 AliAODMCParticle * meson = (AliAODMCParticle *) mcparticles->At(mesonIndex);
867 Int_t mesonPdg = meson->GetPdgCode();
868 if(mesonPdg != 111 && mesonPdg != 221) {
869 printf("AliMCAnalysisUtils::CheckOverlapped2GammaDecay(AOD) - Wrong pi0/eta PDG : %d \n",mesonPdg);
873 if(fDebug > 2) printf("AliMCAnalysisUtils::CheckOverlapped2GammaDecay(AOD) - pdg %d, label %d, ndaughters %d\n", mesonPdg, mesonIndex, meson->GetNDaughters());
877 if(meson->GetNDaughters() != 2){
879 printf("AliMCAnalysisUtils::CheckOverlapped2GammaDecay(stack) - Not overalapped. Number of daughters is %d, not 2 \n",meson->GetNDaughters());
882 Int_t iPhoton0 = meson->GetDaughter(0);
883 Int_t iPhoton1 = meson->GetDaughter(1);
884 //if((iPhoton0 == -1) || (iPhoton1 == -1)){
886 // printf("AliMCAnalysisUtils::CheckOverlapped2GammaDecay(AOD) - Exit : Not overlapped. At least a daughter do not exists : d1 %d, d2 %d \n", iPhoton0, iPhoton1);
889 AliAODMCParticle *photon0 = (AliAODMCParticle *) mcparticles->At(iPhoton0);
890 AliAODMCParticle *photon1 = (AliAODMCParticle *) mcparticles->At(iPhoton1);
892 //Check if both daughters are photons
893 if(photon0->GetPdgCode() != 22 && photon1->GetPdgCode()!=22){
894 printf("AliMCAnalysisUtils::CheckOverlapped2GammaDecay(AOD) - Not overlapped. PDG: daughter 1 = %d, of daughter 2 = %d \n",photon0->GetPdgCode(),photon1->GetPdgCode());
899 printf("AliMCAnalysisUtils::CheckOverlapped2GammaDecay(AOD) - Daughter labels : photon0 = %d, photon1 = %d \n",iPhoton0,iPhoton1);
901 //Check if both photons contribute to the cluster
902 Bool_t okPhoton0 = kFALSE;
903 Bool_t okPhoton1 = kFALSE;
906 printf("AliMCAnalysisUtils::CheckOverlapped2GammaDecay(AOD) - Labels loop:\n");
908 for(Int_t i = 0; i < nlabels; i++){
910 printf("\t label %d/%d: %d, ok? %d, %d\n", i, nlabels, labels[i], okPhoton0, okPhoton1);
912 //If we already found both, break the loop
913 if(okPhoton0 && okPhoton1) break;
915 Int_t index = labels[i];
916 if (iPhoton0 == index) {
920 else if (iPhoton1 == index) {
925 //Trace back the mother in case it was a conversion
927 if(index >= mcparticles->GetEntriesFast()){
928 printf("AliMCAnalysisUtils::CheckOverlapped2GammaDecay(AOD) Particle index %d larger than size of list %d !!\n",index,mcparticles->GetEntriesFast());
932 AliAODMCParticle * daught = (AliAODMCParticle*) mcparticles->At(index);
933 Int_t tmpindex = daught->GetMother();
935 printf("AliMCAnalysisUtils::CheckOverlapped2GammaDecay(AOD) - Conversion? : mother %d\n",tmpindex);
939 //MC particle of interest is the mother
941 printf("\t parent index %d\n",tmpindex);
942 daught = (AliAODMCParticle*) mcparticles->At(tmpindex);
943 //printf("tmpindex %d\n",tmpindex);
944 if (iPhoton0 == tmpindex) {
948 else if (iPhoton1 == tmpindex) {
952 tmpindex = daught->GetMother();
953 }//While to check if pi0/eta daughter was one of these contributors to the cluster
955 if(i == 0 && (!okPhoton0 && !okPhoton1) && fDebug>=-1 )
956 printf("AliMCAnalysisUtils::CheckOverlapped2GammaDecay(AOD) - Something happens, first label should be from a photon decay!\n");
958 }//loop on list of labels
960 //If both photons contribute tag as the corresponding meson.
961 if(okPhoton0 && okPhoton1){
963 printf("AliMCAnalysisUtils::CheckOverlapped2GammaDecay(AOD) - %s OVERLAPPED DECAY \n",(TDatabasePDG::Instance()->GetParticle(mesonPdg))->GetName());
965 if(mesonPdg == 111) SetTagBit(tag,kMCPi0);
966 else SetTagBit(tag,kMCEta);
971 //_________________________________________________________________________
972 TList * AliMCAnalysisUtils::GetJets(const AliCaloTrackReader * reader)
974 //Return list of jets (TParticles) and index of most likely parton that originated it.
975 AliStack * stack = reader->GetStack();
976 Int_t iEvent = reader->GetEventNumber();
977 AliGenEventHeader * geh = reader->GetGenEventHeader();
978 if(fCurrentEvent!=iEvent){
979 fCurrentEvent = iEvent;
980 fJetsList = new TList;
981 Int_t nTriggerJets = 0;
982 Float_t tmpjet[]={0,0,0,0};
984 //printf("Event %d %d\n",fCurrentEvent,iEvent);
985 //Get outgoing partons
986 if(stack->GetNtrack() < 8) return fJetsList;
987 TParticle * parton1 = stack->Particle(6);
988 TParticle * parton2 = stack->Particle(7);
990 printf("AliMCAnalysisUtils::GetJets() - parton 6 : %s, pt %2.2f,E %2.2f, phi %2.2f, eta %2.2f \n",
991 parton1->GetName(),parton1->Pt(),parton1->Energy(),parton1->Phi()*TMath::RadToDeg(),parton1->Eta());
992 printf("AliMCAnalysisUtils::GetJets() - parton 7 : %s, pt %2.2f,E %2.2f, phi %2.2f, eta %2.2f \n",
993 parton2->GetName(),parton2->Pt(),parton2->Energy(),parton2->Phi()*TMath::RadToDeg(),parton2->Eta());
995 // //Trace the jet from the mother parton
1002 // TParticle * tmptmp = new TParticle;
1003 // for(Int_t i = 0; i< stack->GetNprimary(); i++){
1004 // tmptmp = stack->Particle(i);
1006 // if(tmptmp->GetStatusCode() == 1){
1007 // pt = tmptmp->Pt();
1008 // e = tmptmp->Energy();
1009 // Int_t imom = tmptmp->GetFirstMother();
1011 // //printf("1st imom %d\n",imom);
1014 // tmptmp = stack->Particle(imom);
1015 // imom = tmptmp->GetFirstMother();
1016 // //printf("imom %d \n",imom);
1018 // //printf("Last imom %d %d\n",imom1, imom);
1023 // else if (imom1 == 7){
1030 // printf("JET 1, pt %2.2f, e %2.2f; JET 2, pt %2.2f, e %2.2f \n",pt1,e1,pt2,e2);
1032 //Get the jet, different way for different generator
1034 if(fMCGenerator == "PYTHIA"){
1035 TParticle * jet = 0x0;
1036 AliGenPythiaEventHeader* pygeh= (AliGenPythiaEventHeader*) geh;
1037 nTriggerJets = pygeh->NTriggerJets();
1039 printf("AliMCAnalysisUtils::GetJets() - PythiaEventHeader: Njets: %d\n",nTriggerJets);
1042 for(Int_t i = 0; i< nTriggerJets; i++){
1044 pygeh->TriggerJet(i, tmpjet);
1045 jet = new TParticle(94, 21, -1, -1, -1, -1, tmpjet[0],tmpjet[1],tmpjet[2],tmpjet[3], 0,0,0,0);
1046 //Assign an outgoing parton as mother
1047 Float_t phidiff1 = TMath::Abs(jet->Phi()-parton1->Phi());
1048 Float_t phidiff2 = TMath::Abs(jet->Phi()-parton2->Phi());
1049 if(phidiff1 > phidiff2) jet->SetFirstMother(7);
1050 else jet->SetFirstMother(6);
1053 printf("AliMCAnalysisUtils::GetJets() - PYTHIA Jet %d: mother %d, pt %2.2f,E %2.2f, phi %2.2f, eta %2.2f \n",
1054 i, jet->GetFirstMother(),jet->Pt(),jet->Energy(),jet->Phi()*TMath::RadToDeg(),jet->Eta());
1055 fJetsList->Add(jet);
1057 }//Pythia triggered jets
1059 else if (fMCGenerator=="HERWIG"){
1062 TParticle * tmp = parton1;
1063 if(parton1->GetPdgCode()!=22){
1065 if(tmp->GetFirstDaughter()==-1) return fJetsList;
1066 tmp = stack->Particle(tmp->GetFirstDaughter());
1067 pdg = tmp->GetPdgCode();
1070 //Add found jet to list
1071 TParticle *jet1 = new TParticle(*tmp);
1072 jet1->SetFirstMother(6);
1073 fJetsList->Add(jet1);
1074 //printf("jet 1: first daughter %d, last daughter %d\n", tmp->GetFirstDaughter(), tmp->GetLastDaughter());
1075 //tmp = stack->Particle(tmp->GetFirstDaughter());
1079 printf("AliMCAnalysisUtils::GetJets() - HERWIG Jet 1: mother %d, status %d, pt %2.2f,E %2.2f, phi %2.2f, eta %2.2f \n",
1080 jet1->GetFirstMother(),jet1->GetStatusCode(),jet1->Pt(),jet1->Energy(),jet1->Phi()*TMath::RadToDeg(),jet1->Eta());
1087 if(parton2->GetPdgCode()!=22){
1089 if(tmp->GetFirstDaughter()==-1) return fJetsList;
1090 i = tmp->GetFirstDaughter();
1091 tmp = stack->Particle(tmp->GetFirstDaughter());
1092 pdg = tmp->GetPdgCode();
1094 //Add found jet to list
1095 TParticle *jet2 = new TParticle(*tmp);
1096 jet2->SetFirstMother(7);
1097 fJetsList->Add(jet2);
1100 printf("AliMCAnalysisUtils::GetJets() - HERWIG Jet 2: mother %d, status %d, pt %2.2f,E %2.2f, phi %2.2f, eta %2.2f \n",
1101 jet2->GetFirstMother(),jet2->GetStatusCode(),jet2->Pt(),jet2->Energy(),jet2->Phi()*TMath::RadToDeg(),jet2->Eta());
1102 //Int_t first = tmp->GetFirstDaughter();
1103 //Int_t last = tmp->GetLastDaughter();
1104 //printf("jet 2: first daughter %d, last daughter %d, pdg %d\n",first, last, tmp->GetPdgCode());
1105 // for(Int_t d = first ; d < last+1; d++){
1106 // tmp = stack->Particle(d);
1107 // if(i == tmp->GetFirstMother())
1108 // printf("Daughter n %d, Mother %d, name %s, status %d, pT %2.2f,E %2.2f, phi %2.2f, eta %2.2f \n",
1109 // d,tmp->GetFirstMother(), tmp->GetName(), tmp->GetStatusCode(),tmp->Pt(),tmp->Energy(),tmp->Phi()*TMath::RadToDeg(),tmp->Eta());
1113 }//Herwig generated jets
1120 //________________________________________________________
1121 void AliMCAnalysisUtils::Print(const Option_t * opt) const
1123 //Print some relevant parameters set for the analysis
1128 printf("***** Print: %s %s ******\n", GetName(), GetTitle() ) ;
1130 printf("Debug level = %d\n",fDebug);
1131 printf("MC Generator = %s\n",fMCGenerator.Data());