23 #include "TDirectory.h" 29 #include "THnSparse.h" 30 #include "TSeqCollection.h" 31 #include "TMethodCall.h" 38 #include "AliMCEvent.h" 40 #include "AliESDEvent.h" 41 #include "AliAODJet.h" 42 #include "AliAODEvent.h" 44 #include "AliGenEventHeader.h" 45 #include "AliGenCocktailEventHeader.h" 46 #include <AliGenDPMjetEventHeader.h> 47 #include "AliGenPythiaEventHeader.h" 51 #include "TMatrixDSym.h" 52 #include "TMatrixDSymEigen.h" 66 AliGenEventHeader* genHeader = mcEvent->GenEventHeader();
67 AliGenPythiaEventHeader* pythiaGenHeader =
dynamic_cast<AliGenPythiaEventHeader*
>(genHeader);
70 AliGenCocktailEventHeader* genCocktailHeader =
dynamic_cast<AliGenCocktailEventHeader*
>(genHeader);
72 if (!genCocktailHeader) {
73 AliWarningGeneral(Form(
" %s:%d",(
char*)__FILE__,__LINE__),
"Unknown header type (not Pythia or Cocktail)");
77 TList* headerList = genCocktailHeader->GetHeaders();
78 for (
Int_t i=0; i<headerList->GetEntries(); i++) {
79 pythiaGenHeader =
dynamic_cast<AliGenPythiaEventHeader*
>(headerList->At(i));
84 AliWarningGeneral(Form(
" %s:%d",(
char*)__FILE__,__LINE__),
"Pythia event header not found");
88 return pythiaGenHeader;
98 AliStack *
stack = mcEvent->Stack();
100 Printf(
"%s%d No Stack available",(
char*)__FILE__,__LINE__);
104 static Int_t iCount = 0;
105 if(iCount>iMaxPrint)
return;
106 Int_t nStack = stack->GetNtrack();
107 if(iLast == 0)iLast = nStack;
108 else if(iLast > nStack)iLast = nStack;
111 Printf(
"####################################################################");
112 for(
Int_t np = iFirst;np<iLast;++np){
113 TParticle *p = stack->Particle(np);
114 Printf(
"Nr.%d --- Status %d ---- Mother1 %d Mother2 %d Daughter1 %d Daughter2 %d ",
115 np,p->GetStatusCode(),p->GetMother(0),p->GetMother(1),p->GetDaughter(0),p->GetDaughter(1));
116 Printf(
"Eta %3.3f Phi %3.3f ",p->Eta(),p->Phi());
118 Printf(
"---------------------------------------");
127 const AliAODJet *recJets,
const Int_t &kRecJets,
166 for(
int i = 0;i < kRecJets;++i)iGenIndex[i] = -1;
167 for(
int j = 0;j < kGenJets;++j)iRecIndex[j] = -1;
176 if(nRecJets==0||nGenJets==0)
return;
180 for(
int i = 0;i < nGenJets;++i){
181 for(
int j = 0;j < nRecJets;++j){
182 iFlag[i*nGenJets+j] = 0;
189 for(
int ig = 0;ig<nGenJets;++ig){
191 if(iDebug>1)Printf(
"Gen (%d) p_T %3.3f eta %3.3f ph %3.3f ",ig,genJets[ig].Pt(),genJets[ig].Eta(),genJets[ig].Phi());
192 for(
int ir = 0;ir<nRecJets;++ir){
194 printf(
"Rec (%d) ",ir);
195 Printf(
"p_T %3.3f eta %3.3f ph %3.3f ",recJets[ir].Pt(),recJets[ir].Eta(),recJets[ir].Phi());
197 Double_t dR = genJets[ig].DeltaR(&recJets[ir]);
198 if(iDebug>1)Printf(
"Distance (%d)--(%d) %3.3f ",ig,ir,dR);
204 if(iRecIndex[ig]>=0)iFlag[ig*nRecJets+iRecIndex[ig]]+=1;
209 for(
int ir = 0;ir<nRecJets;++ir){
211 for(
int ig = 0;ig<nGenJets;++ig){
212 Double_t dR = genJets[ig].DeltaR(&recJets[ir]);
218 if(iGenIndex[ir]>=0)iFlag[iGenIndex[ir]*nRecJets+ir]+=2;
225 if(iDebug>1)Printf(
">>>>>> Matrix");
227 for(
int ig = 0;ig<nGenJets;++ig){
228 for(
int ir = 0;ir<nRecJets;++ir){
230 if(iDebug>1)printf(
"Flag[%d][%d] %d ",ig,ir,iFlag[ig*nRecJets+ir]);
234 if(iFlag[ig*nRecJets+ir]==3){
241 if((iFlag[ig*nRecJets+ir]&2)==2){
244 if((iFlag[ig*nRecJets+ir]&1)==1){
249 if(iDebug>1)printf(
"\n");
256 const TList *recJetsList,
const Int_t &kRecJets,
297 const Int_t nGenJets = TMath::Min(genJetsList->GetEntries(),kGenJets);
298 const Int_t nRecJets = TMath::Min(recJetsList->GetEntries(),kRecJets);
299 if(nRecJets==0||nGenJets==0)
return;
301 static TArrayS iFlag(nGenJets*nRecJets);
302 if(iFlag.GetSize()<(nGenJets*nRecJets)){
303 iFlag.Set(nGenJets*nRecJets);
308 for(
int ig = 0;ig<nGenJets;++ig){
309 AliAODJet *genJet = (AliAODJet*)genJetsList->At(ig);
313 if(iDebug>1)Printf(
"Gen (%d) p_T %3.3f eta %3.3f ph %3.3f ",ig,genJet->Pt(),genJet->Eta(),genJet->Phi());
314 for(
int ir = 0;ir<nRecJets;++ir){
315 AliAODJet *recJet = (AliAODJet*)recJetsList->At(ir);
318 printf(
"Rec (%d) ",ir);
319 Printf(
"p_T %3.3f eta %3.3f ph %3.3f ",recJet->Pt(),recJet->Eta(),recJet->Phi());
321 Double_t dR = genJet->DeltaR(recJet);
322 if(iDebug>1)Printf(
"Distance (%d)--(%d) %3.3f ",ig,ir,dR);
328 if(iRecIndex[ig]>=0)iFlag[ig*nRecJets+iRecIndex[ig]]+=1;
334 for(
int ir = 0;ir<nRecJets;++ir){
335 AliAODJet *recJet = (AliAODJet*)recJetsList->At(ir);
338 for(
int ig = 0;ig<nGenJets;++ig){
339 AliAODJet *genJet = (AliAODJet*)genJetsList->At(ig);
341 Double_t dR = genJet->DeltaR(recJet);
347 if(iGenIndex[ir]>=0)iFlag[iGenIndex[ir]*nRecJets+ir]+=2;
354 if(iDebug>1)Printf(
">>>>>> Matrix Size %d",iFlag.GetSize());
356 for(
int ig = 0;ig<nGenJets;++ig){
357 for(
int ir = 0;ir<nRecJets;++ir){
359 if(iDebug>1)printf(
"Flag2[%d][%d] %d ",ig,ir,iFlag[ig*nRecJets+ir]);
363 if(iFlag[ig*nRecJets+ir]==3){
370 if((iFlag[ig*nRecJets+ir]&2)==2){
373 if((iFlag[ig*nRecJets+ir]&1)==1){
378 if(iDebug>1)printf(
"\n");
383 const TList *recJetsList,
const Int_t &kRecJets,
384 TArrayI &iMatchIndex, TArrayF &fPtFraction,
397 iMatchIndex.Reset(-1);
398 fPtFraction.Reset(-1.);
401 const Int_t kClosestJetsN = 4;
402 Double_t closestJets[kClosestJetsN][2];
404 const Int_t nGenJets = TMath::Min(genJetsList->GetEntries(),kGenJets);
405 const Int_t nRecJets = TMath::Min(recJetsList->GetEntries(),kRecJets);
406 if(nRecJets==0||nGenJets==0) {
407 if(iDebug>10) Printf(
"No jets nRecJets %d nGenJets %d\n",nRecJets,nGenJets);
410 AliAODJet *genJet = 0x0;
411 AliAODJet *recJet = 0x0;
414 for(
Int_t ig=0; ig<nGenJets; ++ig){
416 for(
Int_t i=0; i<kClosestJetsN; ++i){
417 closestJets[i][0] = -1;
418 closestJets[i][1] = 1e6;
421 genJet = (AliAODJet*)genJetsList->At(ig);
424 if(iDebug>10) Printf(
"genJet %d doesnot exist",ig);
430 for(
Int_t ir=0; ir<nRecJets; ++ir){
431 recJet = (AliAODJet*)recJetsList->At(ir);
434 if(iDebug>10) Printf(
"recJet %d doesnot exist",ir);
437 deltaR = genJet->DeltaR(recJet);
439 Int_t i=kClosestJetsN-1;
440 if(deltaR<closestJets[i][1] && deltaR<maxDist){
442 closestJets[i][1] = deltaR;
445 while(i>=1 && closestJets[i][1]<closestJets[i-1][1]){
447 for(
Int_t j=0; j<2; j++){
448 tmpArr[j] = closestJets[i-1][j];
449 closestJets[i-1][j] = closestJets[i][j];
450 closestJets[i][j] = tmpArr[j];
463 for(
Int_t irc=0; irc<kClosestJetsN; irc++){
464 ir = (
Int_t)(closestJets[irc][0]);
465 if(ir<0 || ir>nRecJets-1)
continue;
466 recJet = (AliAODJet*)recJetsList->At(ir);
467 if(!(recJet))
continue;
471 cumFraction += fraction;
474 if(fraction>maxFraction){
476 for(
Int_t ij=0; ij<ig; ++ij){
477 if(iMatchIndex[ij]==ir)
continue;
480 maxFraction = fraction;
481 fPtFraction[ig] = fraction;
482 iMatchIndex[ig] = ir;
486 if(1-cumFraction<maxFraction)
break;
489 if(iMatchIndex[ig]<0){
490 if(iDebug) Printf(
"Matching failed for (gen) jet #%d", ig);
500 if(ptGen==0.)
return 999.;
505 TRefArray *genTrackList = genJet->GetRefTracks();
506 TRefArray *recTrackList = recJet->GetRefTracks();
507 Int_t nTracksGenJet = genTrackList->GetEntriesFast();
508 Int_t nTracksRecJet = recTrackList->GetEntriesFast();
512 AliVParticle* recTrack;
513 AliVParticle* genTrack;
514 for(
Int_t ir=0; ir<nTracksRecJet; ++ir){
516 recTrack =
dynamic_cast<AliVParticle*
>(recTrackList->At(ir));
517 if(!recTrack)
continue;
519 for(
Int_t ig=0; ig<nTracksGenJet; ++ig){
521 genTrack =
dynamic_cast<AliVParticle*
>(genTrackList->At(ig));
522 if(!genTrack)
continue;
525 if( (mode&1)!=0 && genTrack==recTrack){
526 ptAssocTracks += genTrack->Pt();
531 && genTrack->GetLabel()>-1
532 && recTrack->GetLabel()>-1
533 && genTrack->GetLabel()==recTrack->GetLabel()){
535 ptAssocTracks += genTrack->Pt();
542 Double_t fraction = ptAssocTracks/ptGen;
552 if(outFile.Length()==0)outFile = Form(
"%s.root",cPattern);
559 Printf(
"Adding %s",cFile);
560 TFile *f1 = TFile::Open(cFile);
565 if(fileList.GetEntries()){
566 TFile* fIn =
dynamic_cast<TFile*
>(fileList.At(0));
568 Printf(
"Input File not Found");
572 TList *ldKeys = fIn->GetListOfKeys();
573 for(
int id = 0;
id < ldKeys->GetEntries();
id++){
575 TKey *dKey = (TKey*)ldKeys->At(
id);
576 TDirectory *
dir =
dynamic_cast<TDirectory*
>(dKey->ReadObj());
579 if(dName.Contains(cPattern)){
582 if(bUpdate)fOut =
new TFile(outFile.Data(),
"UPDATE");
583 else fOut =
new TFile(outFile.Data(),
"RECREATE");
586 TList *llKeys = dir->GetListOfKeys();
591 TDirectory *dOut = fOut->mkdir(dir->GetName());
593 for(
int il = 0;il < llKeys->GetEntries();il++){
594 TKey *lKey = (TKey*)llKeys->At(il);
599 if (!object->IsA()) {
602 callEnv.InitWithPrototype(object->IsA(),
"Merge",
"TCollection*");
603 if (!callEnv.IsValid()) {
607 tmplist =
new TList();
608 for(
int i = 1; i < fileList.GetEntries();i++){
609 TDirectory *fInTmp =
dynamic_cast<TDirectory*
>(fileList.At(i));
611 Printf(
"File %d not found",i);
614 TDirectory *dTmp = (TDirectory*)fInTmp->Get(dName.Data());
616 Printf(
"Directory %s not found",dName.Data());
621 Printf(
"Object %s not found",object->GetName());
626 callEnv.SetParam((Long_t) tmplist);
627 callEnv.Execute(
object);
628 delete tmplist;tmplist = 0;
630 object->Write(object->GetName(),TObject::kSingleKey);
649 const Int_t nMaxBins = 12;
658 TList *lIn[nMaxBins];
659 TDirectory *dIn[nMaxBins];
660 TFile *fIn[nMaxBins];
668 fIn[ibTotal] = TFile::Open(cFile);
670 dIn[ibTotal] = gDirectory;
673 dIn[ibTotal] = (TDirectory*)fIn[ibTotal]->Get(cDir);
676 Printf(
"%s:%d No directory %s found, exiting...",__FILE__,__LINE__,cDir);
681 lIn[ibTotal] = (
TList*)dIn[ibTotal]->Get(cList);
682 Printf(
"Merging file %s %s",cFile, cDir);
684 Printf(
"%s:%d No list %s found, exiting...",__FILE__,__LINE__,cList);
690 Printf(
"%s:%d fh1PtHard_Trials not found in list, exiting...",__FILE__,__LINE__);
693 TProfile* hXsec = (TProfile*)lIn[ibTotal]->
FindObject(
"fh1Xsec");
695 Printf(
"%s:%d fh1Xsec not found in list, exiting...",__FILE__,__LINE__);
698 xsection[ibTotal] = hXsec->GetBinContent(1);
699 nTrials[ibTotal] = hTrials->Integral();
700 sf[ibTotal] = xsection[ibTotal]/ nTrials[ibTotal];
705 Printf(
"%s:%d No files found for mergin, exiting",__FILE__,__LINE__);
710 if(bUpdate)fOut =
new TFile(cOutFile,
"UPDATE");
711 else fOut =
new TFile(cOutFile,
"RECREATE");
712 TDirectory *dOut = fOut->mkdir(dIn[0]->GetName());
715 lOut->SetName(lIn[0]->GetName());
718 for(
int ie = 0; ie < lIn[0]->GetEntries();++ie){
720 THnSparse *hnAdd = 0;
721 for(
int ib = 0;ib < ibTotal;++ib){
724 if(h->InheritsFrom(
"TH1")){
727 h1Add = (
TH1*)h1->Clone(h1->GetName());
728 h1Add->Scale(sf[ib]);
731 h1Add->Add(h1,sf[ib]);
734 else if(h->InheritsFrom(
"THnSparse")){
735 THnSparse *hn = (THnSparse*)h;
737 hnAdd = (THnSparse*)hn->Clone(hn->GetName());
738 hnAdd->Scale(sf[ib]);
741 hnAdd->Add(hn,sf[ib]);
747 if(h1Add)lOut->Add(h1Add);
748 else if(hnAdd)lOut->Add(hnAdd);
751 lOut->Write(lOut->GetName(),TObject::kSingleKey);
764 if(file.Contains(
"root_archive.zip#")){
765 Ssiz_t pos1 = file.Index(
"root_archive",12,0,TString::kExact);
766 Ssiz_t pos = file.Index(
"#",1,pos1,TString::kExact);
767 Ssiz_t pos2 = file.Index(
".root",5,TString::kExact);
768 file.Replace(pos+1,pos2-pos1,
"");
772 file.ReplaceAll(
gSystem->BaseName(file.Data()),
"");
774 Printf(
"%s",file.Data());
779 TFile *fxsec = TFile::Open(Form(
"%s%s",file.Data(),
"pyxsec.root"));
782 fxsec = TFile::Open(Form(
"%s%s",file.Data(),
"pyxsec_hists.root"));
789 TKey* key = (TKey*)fxsec->GetListOfKeys()->At(0);
794 TList *list =
dynamic_cast<TList*
>(key->ReadObj());
799 fXsec = ((TProfile*)list->FindObject(
"h1Xsec"))->GetBinContent(1);
800 fTrials = ((TH1F*)list->FindObject(
"h1Trials"))->GetBinContent(1);
805 TTree *xtree = (
TTree*)fxsec->Get(
"Xsection");
812 xtree->SetBranchAddress(
"xsection",&xsection);
813 xtree->SetBranchAddress(
"ntrials",&ntrials);
829 if(iDetail>=0)fDummy = TFile::Open(
"/tmp/dummy.root",
"RECREATE");
831 TFile *fIn = TFile::Open(currFile);
837 TList* keyList = fIn->GetListOfKeys();
841 for(
int i = 0;i < keyList->GetEntries();i++){
842 TKey* ikey = (TKey*)keyList->At(i);
846 TDirectory *
dir =
dynamic_cast<TDirectory*
>(ikey->ReadObj());
852 Printf(
"%03d : %60s %8d %8d ",i,dir->GetName(),ikey->GetObjlen(),ikey->GetNbytes());
853 TList * dirKeyList = dir->GetListOfKeys();
854 for(
int j = 0;j<dirKeyList->GetEntries();j++){
855 TKey* jkey = (TKey*)dirKeyList->At(j);
856 TList *list =
dynamic_cast<TList*
>(jkey->ReadObj());
858 memorySize += (
Float_t)jkey->GetObjlen()/1024./1024.;
859 diskSize += (
Float_t)jkey->GetNbytes()/1024./1024.;
861 Printf(
"%03d/%03d: %60s %5.2f MB %5.2f MB",i,j,list->GetName(),(
Float_t)jkey->GetObjlen()/1024./1024.,(
Float_t)jkey->GetNbytes()/1024./1024.);
863 for(
int il = 0;il<list->GetEntries();il++){
867 Int_t nBytesWrite = ob->Write();
868 Printf(
"%03d/%03d/%03d: %60s %5.2f kB",i,j,il,ob->GetName(),(
Float_t)nBytesWrite/1024.);
874 Printf(
"%03d/%03d: %60s %5.2f MB %5.2f MB",i,j,jkey->GetName(),(
Float_t)jkey->GetObjlen()/1024./1024.,(
Float_t)jkey->GetNbytes()/1024./1024.);
879 Printf(
"Total %5.2f MB %5.2f MB",memorySize,diskSize);
890 static Bool_t bSelected = kTRUE;
912 if(iMask==0)
return kTRUE;
922 static UInt_t iSelectInfo = 0;
935 static Int_t iEventClass = 0;
953 const Int_t kTracks = 1000;
954 if(nTracks>kTracks)
return kFALSE;
957 TVector3 pTrackPerp[kTracks];
997 for(
Int_t i = 0; i < nTracks; i++)
999 pTrackPerp[i].SetXYZ(pTrack[i].X(), pTrack[i].Y(), 0);
1000 psum2 += pTrackPerp[i].Mag();
1005 n02 = pTrack[1].Unit();
1008 n03 = pTrack[2].Unit();
1024 for(
Int_t k = 0; k < nTracks; k++)
1028 psum.SetXYZ(0., 0., 0.);
1030 for(
Int_t i = 0; i < nTracks; i++)
1032 psum1 += (TMath::Abs(n01.Dot(pTrackPerp[i])));
1033 if (n01.Dot(pTrackPerp[i]) > 0) psum += pTrackPerp[i];
1034 if (n01.Dot(pTrackPerp[i]) < 0) psum -= pTrackPerp[i];
1036 thrust[l1] = psum1/psum2;
1040 psum02.SetXYZ(0., 0., 0.);
1042 for(
Int_t i = 0; i < nTracks; i++)
1044 psum102 += (TMath::Abs(n02.Dot(pTrackPerp[i])));
1045 if (n02.Dot(pTrackPerp[i]) > 0) psum02 += pTrackPerp[i];
1046 if (n02.Dot(pTrackPerp[i]) < 0) psum02 -= pTrackPerp[i];
1048 thrust02[l2] = psum102/psum2;
1052 psum03.SetXYZ(0., 0., 0.);
1054 for(
Int_t i = 0; i < nTracks; i++)
1056 psum103 += (TMath::Abs(n03.Dot(pTrackPerp[i])));
1057 if (n03.Dot(pTrackPerp[i]) > 0) psum03 += pTrackPerp[i];
1058 if (n03.Dot(pTrackPerp[i]) < 0) psum03 -= pTrackPerp[i];
1060 thrust03[l3] = psum103/psum2;
1064 if(TMath::Abs(th-thrust[l1]) < 10e-7){
1068 if(TMath::Abs(th02-thrust02[l2]) < 10e-7){
1072 if(TMath::Abs(th03-thrust03[l3]) < 10e-7){
1084 th02 = thrust02[l2];
1085 n02 = psum02.Unit();
1090 th03 = thrust03[l3];
1091 n03 = psum03.Unit();
1096 if(switch2 == 0 && switch1 == 0 && switch3 == 0){
1097 if(TMath::Abs(th-th02) < 10e-7 && TMath::Abs(th-th03) < 10e-7 && TMath::Abs(th02-th03) < 10e-7){
1098 eventShapes[0] = th;
1099 AliInfoGeneral(Form(
" %s:%d",(
char*)__FILE__,__LINE__),Form(
"===== THRUST VALUE FOUND AT %d :: %f\n", k, th));
1120 if(switch1 == 1 && switch2 == 1 && switch3 == 1){
1121 eventShapes[0] = TMath::Max(thrust[l1-1], thrust02[l2-1]);
1122 eventShapes[0] = TMath::Max(eventShapes[0], thrust03[l3-1]);
1123 if(TMath::Abs(eventShapes[0]-thrust[l1-1]) < 10e-7)
1125 if(TMath::Abs(eventShapes[0]-thrust02[l2-1]) < 10e-7)
1127 if(TMath::Abs(eventShapes[0]-thrust03[l3-1]) < 10e-7)
1129 Printf(
"NO LIMITING VALUE FOUND :: MAXIMUM = %f\n", eventShapes[0]);
1135 for(
Int_t j = 0; j < nTracks; j++)
1137 s00 = s00 + (pTrack[j].Px()*pTrack[j].Px())/pTrack[j].
Mag();
1138 s01 = s01 + (pTrack[j].Px()*pTrack[j].Py())/pTrack[j].
Mag();
1139 s02 = s02 + (pTrack[j].Px()*pTrack[j].Pz())/pTrack[j].
Mag();
1141 s10 = s10 + (pTrack[j].Py()*pTrack[j].Px())/pTrack[j].
Mag();
1142 s11 = s11 + (pTrack[j].Py()*pTrack[j].Py())/pTrack[j].
Mag();
1143 s12 = s12 + (pTrack[j].Py()*pTrack[j].Pz())/pTrack[j].
Mag();
1145 s20 = s20 + (pTrack[j].Pz()*pTrack[j].Px())/pTrack[j].
Mag();
1146 s21 = s21 + (pTrack[j].Pz()*pTrack[j].Py())/pTrack[j].
Mag();
1147 s22 = s22 + (pTrack[j].Pz()*pTrack[j].Pz())/pTrack[j].
Mag();
1149 ptot += pTrack[j].Mag();
1166 TMatrixDSymEigen eigen(m);
1167 TVectorD eigenVal = eigen.GetEigenValues();
1169 Double_t sphericity = (3/2)*(eigenVal(2)+eigenVal(1));
1170 eventShapes[1] = sphericity;
1172 Double_t aplanarity = (3/2)*(eigenVal(2));
1173 eventShapes[2] = aplanarity;
1175 c = 3*(eigenVal(0)*eigenVal(1)+eigenVal(0)*eigenVal(2)+eigenVal(1)*eigenVal(2));
1196 if(aEv->InheritsFrom(
"AliESDEvent")){
1207 if(esd->GetFiredTriggerClasses().Contains(
"CINT1B-"))
return kTRUE;
1209 if(esd->GetFiredTriggerClasses().Contains(
"CSMBB"))
return kTRUE;
1210 if(esd->GetFiredTriggerClasses().Contains(
"CINT6B-"))
return kTRUE;
1212 if(esd->GetFiredTriggerClasses().Contains(
"MB1"))
return kTRUE;
1217 if(esd->GetFiredTriggerClasses().Contains(
"MB2"))
return kTRUE;
1222 if(esd->GetFiredTriggerClasses().Contains(
"MB3"))
return kTRUE;
1227 if(esd->GetFiredTriggerClasses().Contains(
"CSMBB"))
return kTRUE;
1228 if(esd->GetFiredTriggerClasses().Contains(
"CINT6B-"))
return kTRUE;
1229 if(esd->GetFiredTriggerClasses().Contains(
"GFO"))
return kTRUE;
1234 Printf(
"IsEventTriggered: ERROR: Trigger type %d not implemented in this method", (
Int_t) trigger);
1239 else if(aEv->InheritsFrom(
"AliAODEvent")){
1250 if(aod->GetFiredTriggerClasses().Contains(
"CINT1B"))
return kTRUE;
1252 if(aod->GetFiredTriggerClasses().Contains(
"CSMBB"))
return kTRUE;
1254 if(aod->GetFiredTriggerClasses().Contains(
"MB1"))
return kTRUE;
1259 if(aod->GetFiredTriggerClasses().Contains(
"MB2"))
return kTRUE;
1264 if(aod->GetFiredTriggerClasses().Contains(
"MB3"))
return kTRUE;
1269 if(aod->GetFiredTriggerClasses().Contains(
"CSMBB"))
return kTRUE;
1270 if(aod->GetFiredTriggerClasses().Contains(
"GFO"))
return kTRUE;
1275 Printf(
"IsEventTriggered: ERROR: Trigger type %d not implemented in this method", (
Int_t) trigger);
1290 AliGenPythiaEventHeader* pythiaGenHeader =
dynamic_cast<AliGenPythiaEventHeader*
>(aHeader);
1292 if (!pythiaGenHeader) {
1298 Int_t pythiaType = pythiaGenHeader->ProcessType();
1304 printf(
" AliAnalysisHelperJetTasks::GetProcessType : Pythia process type found: %d \n",pythiaType);
1308 if(pythiaType==92||pythiaType==93){
1311 else if(pythiaType==94){
1328 AliGenDPMjetEventHeader* dpmJetGenHeader =
dynamic_cast<AliGenDPMjetEventHeader*
>(aHeader);
1330 if (!dpmJetGenHeader) {
1331 printf(
" AliAnalysisHelperJetTasks::GetDPMjetProcessType : Unknown header type (not DPMjet or). \n");
1335 Int_t dpmJetType = dpmJetGenHeader->ProcessType();
1341 printf(
" AliAnalysisHelperJetTasks::GetDPMJetProcessType : DPMJet process type found: %d \n",dpmJetType);
1345 if (dpmJetType == 1 || dpmJetType == 4) {
1348 else if (dpmJetType==5 || dpmJetType==6) {
1351 else if (dpmJetType==7) {
1364 if(!(TMath::Abs(phi)<=2*TMath::Pi()))
return -1;
1365 Double_t phiwrtrp=TMath::ACos(TMath::Abs(TMath::Cos(phi)));
1366 phibin=
Int_t(fNRPBins*phiwrtrp/(0.5*TMath::Pi()));
static void GetJetMatching(const TList *genJetsList, const Int_t &kGenJets, const TList *recJetsList, const Int_t &kRecJets, TArrayI &iMatchIndex, TArrayF &fPtFraction, Int_t iDebug=0, Float_t maxDist=0.3, Int_t mode=1)
static UInt_t SelectInfo(Bool_t bSet=kFALSE, UInt_t iNew=0)
static Int_t fgLastProcessType
static Int_t GetPhiBin(Double_t phi, Int_t fNRPbins)
static Bool_t Selected(Bool_t bSet=kFALSE, Bool_t bNew=kTRUE)
static Bool_t IsTriggerFired(const AliVEvent *aEsd, Trigger trigger)
static Double_t ReactionPlane(Bool_t bSet=kFALSE, Double_t fNew=0)
static Double_t GetFractionOfJet(const AliAODJet *recJet, const AliAODJet *genJet, Int_t mode=1)
static Int_t EventClass(Bool_t bSet=kFALSE, Int_t iNew=0)
static Bool_t TestSelectInfo(UInt_t iMask)
static MCProcessType GetDPMjetEventProcessType(AliGenEventHeader *aHeader, Bool_t adebug=kFALSE)
static void PrintStack(AliMCEvent *mcEvent, Int_t iFirst=0, Int_t iLast=0, Int_t iMaxPrint=10)
Double_t Mag(const AliVParticle &trk)
TObject * FindObject(int bin, const char *nameH, const TList *lst, Bool_t normPerEvent=kTRUE)
static void MergeOutputDirs(const char *cFiles, const char *cPattern, const char *cOutFile, Bool_t bUpdate=false)
static void MergeOutput(const char *cFiles, const char *cDir="", const char *cList="", const char *cOutFile="allpt.root", Bool_t bUpdate=false)
TFile * file
TList with histograms for a given trigger.
static Bool_t PrintDirectorySize(const char *currFile, Int_t iDetail=-1)
static Bool_t PythiaInfoFromFile(const char *currFile, Float_t &fXsec, Float_t &fTrials)
static Bool_t GetEventShapes(TVector3 &n01, const TVector3 *pTrack, Int_t nTracks, Double_t *eventShapes)
static void GetClosestJets(const AliAODJet *genJets, const Int_t &kGenJets, const AliAODJet *recJets, const Int_t &kRecJets, Int_t *iGenIndex, Int_t *iRecIndex, Int_t iDebug=0, Float_t maxDist=0.3)
static MCProcessType GetPythiaEventProcessType(AliGenEventHeader *aHeader, Bool_t adebug=kFALSE)
static Bool_t TestEventClass(Int_t iClass)