45 char *
kXML =
"collection.xml";
105 printf(
"*********************************************\n");
107 printf(
"*********************************************\n");
110 TChain * chainxs =
new TChain(
"Xsection") ;
114 printf(
"===== kMC %d, chainxs %p\n",
kMC,chainxs);
119 Double_t xsection = 0;
125 printf(
"n xs files %d",nfiles);
129 Int_t nEventsPerFile = chain->GetEntries() / nfiles;
131 Double_t trials = ntrials / nEventsPerFile ;
133 scale = xsection / trials;
135 printf(
"Get Cross section : nfiles %d, nevents %d, nevents per file %d \n",nfiles, chain->GetEntries(),nEventsPerFile);
136 printf(
" ntrials %d, trials %2.2f, xs %2.2e, scale factor %2.2e\n", ntrials,trials,xsection,scale);
138 if(chainxs->GetEntries()!=chain->GetEntries()) printf(
"CAREFUL: Number of files in data chain %d, in cross section chain %d \n",
139 chainxs->GetEntries(),chain->GetEntries());
143 if( scale <= 0 || !ok)
144 { printf(
"STOP, cross section not available! nfiles %d \n", chainxs->GetEntries() ) ; return ; }
148 printf(
"*********************************************\n");
149 printf(
"number of entries # %lld, skipped %d\n", chain->GetEntries()) ;
150 printf(
"*********************************************\n");
154 printf(
"STOP, no chain available\n");
158 AliLog::SetGlobalLogLevel(AliLog::kError);
163 AliAnalysisGrid *alienHandler=0x0;
167 gROOT->LoadMacro(
"CreateAlienHandler.C");
169 if (!alienHandler)
return;
175 AliAnalysisManager *mgr =
new AliAnalysisManager(
"Manager",
"Manager");
183 mgr->SetGridHandler(alienHandler);
189 AliMCEventHandler* mcHandler =
new AliMCEventHandler();
190 mcHandler->SetReadTR(kFALSE);
191 mgr->SetMCtruthEventHandler(mcHandler);
194 cout<<
"MC INPUT EVENT HANDLER"<<endl;
195 mgr->SetInputEventHandler(NULL);
203 cout<<
"Init output handler"<<endl;
204 AliAODHandler* aodoutHandler =
new AliAODHandler();
205 aodoutHandler->SetOutputFileName(
"aod.root");
207 mgr->SetOutputEventHandler(aodoutHandler);
215 AliESDInputHandler *esdHandler =
new AliESDInputHandler();
216 esdHandler->SetReadFriends(kFALSE);
217 mgr->SetInputEventHandler(esdHandler);
218 cout<<
"ESD handler "<<mgr->GetInputEventHandler()<<endl;
223 AliAODInputHandler *aodHandler =
new AliAODInputHandler();
224 mgr->SetInputEventHandler(aodHandler);
225 if(
kInputData ==
"deltaAOD") aodHandler->AddFriend(
"deltaAODCaloTrackCorr.root");
226 cout<<
"AOD handler "<<mgr->GetInputEventHandler()<<endl;
232 TString outputFile = AliAnalysisManager::GetCommonFileName();
241 gROOT->LoadMacro(
"$ALICE_PHYSICS/OADB/macros/AddTaskPhysicsSelection.C");
242 AliPhysicsSelectionTask* physSelTask = AddTaskPhysicsSelection(
kMC);
248 gROOT->LoadMacro(
"$ALICE_PHYSICS/OADB/macros/AddTaskCentrality.C");
249 AliCentralitySelectionTask *taskCentrality = AddTaskCentrality();
254 gROOT->LoadMacro(
"$ALICE_ROOT/ANALYSIS/macros/AddTaskVZEROEPSelection.C");
255 AliVZEROEPSelectionTask * EPV0 = AddTaskVZEROEPSelection();
257 gROOT->LoadMacro(
"$ALICE_ROOT/ANALYSIS/macros/AddTaskEventplane.C");
258 AliEPSelectionTask * EP = AddTaskEventplane();
263 gROOT->LoadMacro(
"$ALICE_PHYSICS/PWGGA/CaloTrackCorrelations/macros/AddTaskCounter.C");
310 Bool_t deltaAOD = kFALSE;
311 gROOT->LoadMacro(
"AddTaskCaloTrackCorr.C");
312 gROOT->LoadMacro(
"$ALICE_PHYSICS/PWGGA/EMCALTasks/macros/AddTaskEMCALClusterize.C");
322 Bool_t calibEE = kTRUE;
323 Bool_t calibTT = kTRUE;
324 if(
kRun < 122195 || (
kRun > 126437 &&
kRun < 136851) ||
kMC) calibTT=kFALSE ;
325 Bool_t badMap = kTRUE;
329 printf(
"==================================== \n");
330 printf(
"CONFIGURE ANALYSIS FOR PP COLLISIONS \n");
331 printf(
"==================================== \n");
333 Bool_t mixing = kTRUE;
335 Bool_t reTM = kFALSE;
338 Bool_t clnonlin = kTRUE;
339 Bool_t annonlin = kFALSE;
341 Int_t minEseed = 100;
348 TString clTrigger =
"";
349 TString anTrigger =
"EMC7";
359 Bool_t selectEvents = kFALSE;
361 Bool_t hadron = kTRUE;
365 TString arrayNameV1 =
"";
367 AliAnalysisTaskEMCALClusterize * clv1 = AddTaskEMCALClusterize(arrayNameV1,
outAOD,
kMC,exo,
"V1",clTrigger, clTM,
368 minEcell,minEseed,dTime,wTime,unfMinE,unfFrac,
369 calibEE,badMap,calibTT,clnonlin);
371 printf(
"Name of clusterizer1 array: %s\n",arrayNameV1.Data());
378 -1,-1, qa, hadron,calibEE,badMap,calibTT,deltaAOD,
kPrint,scale,
kRun);
383 -1,-1, qa, hadron,calibEE,badMap,calibTT,deltaAOD,
kPrint,scale,
kRun);
388 TString arrayNameV2 =
"";
389 AliAnalysisTaskEMCALClusterize * clv2 = AddTaskEMCALClusterize(arrayNameV2,
outAOD,
kMC,exo,
"V2",clTrigger, clTM,
390 minEcell,minEseed,dTime,wTime,
391 calibEE,badMap,calibTT,clnonlin);
393 printf(
"Name of clusterizer2 array: %s\n",arrayNameV2.Data());
402 -1,-1,qa,hadron,calibEE,badMap,calibTT,deltaAOD,
kPrint,scale,
kRun);
408 -1,-1, qa, hadron,calibEE,badMap,calibTT,deltaAOD,
kPrint,scale,
kRun);
413 printf(
"====================================== \n");
414 printf(
"CONFIGURE ANALYSIS FOR PbPb COLLISIONS \n");
415 printf(
"====================================== \n");
416 Bool_t mixing = kTRUE;
418 Bool_t reTM = kFALSE;
421 Bool_t clnonlin = kTRUE;
422 Bool_t annonlin = kFALSE;
423 Int_t minEcell = 150;
424 Int_t minEseed = 300;
431 TString clTrigger =
"";
432 TString anTrigger =
"EMCGA";
441 Bool_t selectEvents = kFALSE;
443 Bool_t hadron = kTRUE;
447 TString arrayNameV1 =
"";
448 AliAnalysisTaskEMCALClusterize * clv1 = AddTaskEMCALClusterize(arrayNameV1,
outAOD,
kMC,exo,
"V1",clTrigger, clTM,
449 minEcell,minEseed,dTime,wTime,unfMinE,unfFrac,
450 calibEE,badMap,calibTT,clnonlin);
452 printf(
"Name of clusterizer1 array: %s\n",arrayNameV1.Data());
458 0,20,qa,hadron,calibEE,badMap,calibTT,deltaAOD,
kPrint,scale,
kRun);
461 20,40,qa,hadron,calibEE,badMap,calibTT,deltaAOD,
kPrint,scale,
kRun);
464 60,80,qa,hadron,calibEE,badMap,calibTT,deltaAOD,
kPrint,scale,
kRun);
469 TString arrayNameV2 =
"";
470 AliAnalysisTaskEMCALClusterize * clv2 = AddTaskEMCALClusterize(arrayNameV2,
outAOD,
kMC,exo,
"V2",clTrigger, clTM,
471 minEcell,minEseed,dTime,wTime,unfMinE,unfFrac,
472 calibEE,badMap,calibTT,clnonlin);
474 printf(
"Name of clusterizer2 array: %s\n",arrayNameV2.Data());
483 0,20,qa,hadron,calibEE,badMap,calibTT,deltaAOD,
kPrint,scale,
kRun);
486 20,40,qa,hadron,calibEE,badMap,calibTT,deltaAOD,
kPrint,scale,
kRun);
489 60,80,qa,hadron,calibEE,badMap,calibTT,deltaAOD,
kPrint,scale,
kRun);
494 0,20,qa,hadron,calibEE,badMap,calibTT,deltaAOD,
kPrint,scale,
kRun);
497 20,40,qa,hadron,calibEE,badMap,calibTT,deltaAOD,
kPrint,scale,
kRun);
500 60,80,qa,hadron,calibEE,badMap,calibTT,deltaAOD,
kPrint,scale,
kRun);
512 else if (
mode ==
mPROOF ) mgr->StartAnalysis(
"proof",chain);
513 else mgr->StartAnalysis(
"local",chain);
515 cout <<
" Analysis ended sucessfully "<< endl ;
526 gROOT->LoadMacro(
"/afs/in2p3.fr/group/alice/laf/EnableAliRootForLAF.C");
527 TProof* proof = EnableAliRootForLAF(
"ccaplmaster",nPROOFWorkers.Data(),
ccin2p3UserName.Data(),
alienUserName.Data(),
"",kFALSE,kTRUE,kTRUE,
"OADB:ANALYSIS:ANALYSISalice:AOD:ESD:CORRFW:STEERBase:EMCALUtils:PHOSUtils:PWGCaloTrackCorrBase:PWGGACaloTrackCorrelations:PWGEMCAL:PWGGAEMCALTasks");
567 gSystem->Load(
"libTree");
568 gSystem->Load(
"libGeom");
569 gSystem->Load(
"libVMC");
570 gSystem->Load(
"libXMLIO");
571 gSystem->Load(
"libMatrix");
572 gSystem->Load(
"libPhysics");
573 gSystem->Load(
"libMinuit");
575 gSystem->Load(
"libSTEERBase");
576 gSystem->Load(
"libGui");
577 gSystem->Load(
"libCDB");
578 gSystem->Load(
"libESD");
579 gSystem->Load(
"libAOD");
580 gSystem->Load(
"libRAWDatabase");
581 gSystem->Load(
"libProof");
582 gSystem->Load(
"libOADB");
583 gSystem->Load(
"libANALYSIS");
584 gSystem->Load(
"libSTEER");
586 gSystem->Load(
"libRAWDatarec");
587 gSystem->Load(
"libRAWDatasim");
588 gSystem->Load(
"libVZERObase");
589 gSystem->Load(
"libVZEROrec");
591 gSystem->Load(
"libPHOSUtils");
593 gSystem->Load(
"libEMCALUtils");
595 gSystem->Load(
"libEMCALraw");
596 gSystem->Load(
"libEMCALbase");
597 gSystem->Load(
"libEMCALsim");
598 gSystem->Load(
"libEMCALrec");
604 gSystem->Load(
"libANALYSISalice");
605 gSystem->Load(
"libESDfilter");
607 gSystem->Load(
"libTender");
608 gSystem->Load(
"libTenderSupplies");
610 gSystem->Load(
"libCORRFW");
611 gSystem->Load(
"libPWGTools");
613 gSystem->Load(
"libPWGEMCAL");
614 gSystem->Load(
"libPWGGAEMCALTasks");
618 gSystem->Load(
"libPWGCaloTrackCorrBase");
619 gSystem->Load(
"libPWGGACaloTrackCorrelations");
632 gSystem->AddIncludePath(
"-I$ALICE_ROOT");
633 gSystem->AddIncludePath(
"-I$ALICE_PHYSICS");
634 gSystem->AddIncludePath(
"-I./");
644 TString cdir(Form(
"%s", gSystem->WorkingDirectory() )) ;
646 TString parpar(Form(
"%s.par", pararchivename)) ;
648 if ( gSystem->AccessPathName(pararchivename) )
650 TString processline = Form(
".! tar xvzf %s",parpar.Data()) ;
651 gROOT->ProcessLine(processline.Data());
654 TString ocwd = gSystem->WorkingDirectory();
655 gSystem->ChangeDirectory(pararchivename);
658 if (!gSystem->AccessPathName(
"PROOF-INF/BUILD.sh"))
660 printf(
"*******************************\n");
661 printf(
"*** Building PAR archive ***\n");
662 cout<<pararchivename<<endl;
663 printf(
"*******************************\n");
665 if (gSystem->Exec(
"PROOF-INF/BUILD.sh"))
667 Error(
"runProcess",
"Cannot Build the PAR Archive! - Abort!");
672 if (!gSystem->AccessPathName(
"PROOF-INF/SETUP.C"))
674 printf(
"*******************************\n");
675 printf(
"*** Setup PAR archive ***\n");
676 cout<<pararchivename<<endl;
677 printf(
"*******************************\n");
678 gROOT->Macro(
"PROOF-INF/SETUP.C");
681 gSystem->ChangeDirectory(ocwd.Data());
682 printf(
"Current dir: %s\n", ocwd.Data());
690 TString ocwd = gSystem->WorkingDirectory();
700 if(gSystem->Getenv(
"INDIR"))
701 kInDir = gSystem->Getenv(
"INDIR") ;
702 else cout<<
"INDIR not set, use default: "<<
kInDir<<endl;
705 if (sindir.Contains(
"pass1"))
kPass =
"pass1";
706 else if(sindir.Contains(
"pass2"))
kPass =
"pass2";
707 else if(sindir.Contains(
"pass3"))
kPass =
"pass3";
709 if(gSystem->Getenv(
"PATTERN"))
710 kPattern = gSystem->Getenv(
"PATTERN") ;
711 else cout<<
"PATTERN not set, use default: "<<
kPattern<<endl;
713 cout<<
"INDIR : "<<
kInDir<<endl;
714 cout<<
"NFILES : "<<
kFile<<endl;
720 for (Int_t event = 0 ;
event <
kFile ;
event++) {
724 sprintf(fileEm,
"%s/%s%d/embededAOD.root",
kInDir,
kPattern,event) ;
726 TFile * fESD = TFile::Open(fileE) ;
727 TFile * fAOD = TFile::Open(fileA) ;
734 TFile * fG = TFile::Open(fileG);
735 if(fG) {
kMC = kTRUE; fG->Close();}
739 TTree* esdTree = (TTree*)fESD->Get(
"esdTree");
740 AliESDEvent* esd =
new AliESDEvent();
741 esd->ReadFromTree(esdTree);
742 esdTree->GetEvent(0);
743 kRun = esd->GetRunNumber();
751 if(((TTree*) fAOD->Get(
"aodTree"))->GetBranch(
"mcparticles"))
kMC=kTRUE;
755 TTree* aodTree = (TTree*)fAOD->Get(
"aodTree");
756 AliAODEvent* aod =
new AliAODEvent();
757 aod->ReadFromTree(aodTree);
758 aodTree->GetEvent(0);
759 kRun = aod->GetRunNumber();
762 else if(TFile::Open(fileEm))
770 else if(TFile::Open(fileG))
779 if(fESD) fESD->Close();
780 if(fAOD) fAOD->Close();
787 else if(mode ==
mGRID){
791 if(gSystem->Getenv(
"XML") )
792 kXML = gSystem->Getenv(
"XML");
794 sprintf(
kXML,
"collection.xml") ;
796 if (!TFile::Open(
kXML)) {
797 printf(
"No collection file with name -- %s -- was found\n",
kXML);
800 else cout<<
"XML file "<<
kXML<<endl;
803 gSystem->Load(
"libNetx") ;
804 gSystem->Load(
"libRAliEn");
805 TGrid::Connect(
"alien://") ;
808 TGridCollection * collection = (TGridCollection*) TAlienCollection::Open(
kXML);
810 AliError(Form(
"%s not found",
kXML)) ;
813 TGridResult* result = collection->GetGridResult(
"",0 ,0);
815 for (Int_t index = 0; index < result->GetEntries(); index++) {
816 TString alienURL = result->GetKey(index,
"turl") ;
817 cout <<
"================== " << alienURL << endl ;
819 if (alienURL.Contains(
"pass1"))
kPass =
"pass1";
820 else if(alienURL.Contains(
"pass2"))
kPass =
"pass2";
821 else if(alienURL.Contains(
"pass3"))
kPass =
"pass3";
823 kRun = AliAnalysisManager::GetRunFromAlienPath(alienURL.Data());
824 printf(
"Run number from alien path = %d\n",
kRun);
828 if (alienURL.Contains(
"AliESDs.root"))
832 alienURL.ReplaceAll(
"AliESDs.root",
"galice.root");
833 if(TFile::Open(alienURL))
kMC=kTRUE;
837 else if(alienURL.Contains(
"AliAOD.root"))
841 fAOD = TFile::Open(alienURL);
842 if(((TTree*) fAOD->Get(
"aodTree"))->GetBranch(
"mcparticles"))
kMC=kTRUE;
846 else if(alienURL.Contains(
"embededAOD.root"))
853 else if(alienURL.Contains(
"galice.root"))
867 TFileCollection* coll = gProof->GetDataSet(
kDatasetPROOF)->GetStagedSubset();
869 TIter iter(coll->GetList());
871 TFileInfo* fileInfo = 0;
872 while ((fileInfo = dynamic_cast<TFileInfo*> (iter())))
874 if (fileInfo->GetFirstUrl()) {
875 TString ProofURL = fileInfo->GetFirstUrl()->GetUrl();
876 cout <<
"================== " << ProofURL << endl ;
878 if (ProofURL.Contains(
"pass1"))
kPass =
"pass1";
879 else if(ProofURL.Contains(
"pass2"))
kPass =
"pass2";
880 else if(ProofURL.Contains(
"pass3"))
kPass =
"pass3";
882 kRun = AliAnalysisManager::GetRunFromAlienPath(ProofURL.Data());
883 printf(
"Run number from alien path = %d\n",
kRun);
887 if (ProofURL.Contains(
"AliESDs.root"))
891 alienURL.ReplaceAll(
"AliESDs.root",
"galice.root");
892 if(TFile::Open(ProofURL))
kMC=kTRUE;
897 else if(ProofURL.Contains(
"AliAOD.root"))
901 fAOD = TFile::Open(ProofURL);
902 if(((TTree*) fAOD->Get(
"aodTree"))->GetBranch(
"mcparticles"))
kMC=kTRUE;
906 else if(ProofURL.Contains(
"embededAOD.root"))
913 else if(ProofURL.Contains(
"galice.root"))
924 gSystem->ChangeDirectory(ocwd.Data());
932 TString ocwd = gSystem->WorkingDirectory();
949 if(gSystem->Getenv(
"INDIR"))
950 kInDir = gSystem->Getenv(
"INDIR") ;
951 else cout<<
"INDIR not set, use default: "<<
kInDir<<endl;
953 if(gSystem->Getenv(
"PATTERN"))
954 kPattern = gSystem->Getenv(
"PATTERN") ;
955 else cout<<
"PATTERN not set, use default: "<<
kPattern<<endl;
957 if(gSystem->Getenv(
"NFILES"))
958 kFile = atoi(gSystem->Getenv(
"NFILES")) ;
959 else cout<<
"NFILES not set, use default: "<<
kFile<<endl;
964 printf(
"Get %d files from directory %s\n",
kFile,
kInDir);
965 if ( ! gSystem->cd(
kInDir) )
967 printf(
"%s does not exist\n",
kInDir) ;
974 char * kGener = gSystem->Getenv(
"GENER");
977 cout<<
"GENER "<<kGener<<endl;
978 if (!strcmp(kGener,
"PYTHIA"))
kXSFileName =
"pyxsec.root";
979 else if(!strcmp(kGener,
"HERWIG"))
kXSFileName =
"hexsec.root";
980 else cout<<
" UNKNOWN GENER, use default: "<<
kXSFileName<<endl;
982 else cout<<
" GENER not set, use default xs file name: "<<
kXSFileName<<endl;
991 cout<<
"INDIR : "<<
kInDir <<endl;
992 cout<<
"NFILES : "<<
kFile <<endl;
993 cout<<
"PATTERN : "<<
kPattern <<endl;
997 if (
kInputData ==
"ESD") datafile =
"AliESDs.root" ;
998 else if(
kInputData.Contains(
"AOD")) datafile =
"AliAOD.root" ;
999 else if(
kInputData ==
"MC") datafile =
"galice.root" ;
1007 for (event = 0 ;
event <
kFile ;
event++) {
1008 sprintf(file,
"%s/%s%d/%s",
kInDir,
kPattern,event,datafile.Data()) ;
1012 if ( fData = TFile::Open(file))
1016 printf(
"++++ Adding %s\n", file) ;
1017 chain->AddFile(file);
1021 chainxs->Add(filexs) ;
1025 TFile* fxsec = TFile::Open(filexs);
1028 TKey* key = (TKey*)fxsec->GetListOfKeys()->At(0);
1036 TList *
list =
dynamic_cast<TList*
>(key->ReadObj());
1044 Float_t xsection = ((TProfile*)list->FindObject(
"h1Xsec")) ->GetBinContent(1);
1045 Int_t ntrials = ((TH1F*) list->FindObject(
"h1Trials"))->GetBinContent(1);
1048 xsArr->SetAt(xsection,event);
1049 trArr->SetAt(ntrials,event);
1051 printf(
"recovered xs %f, ntrials %d, event %d\n",xsection,ntrials, event);
1061 printf(
"---- Skipping %s\n", file) ;
1067 TString input =
"AliESDs.root" ;
1068 cout<<
">>>>>> No list added, take a single file <<<<<<<<< "<<input<<endl;
1069 chain->AddFile(input);
1077 else if(mode ==
mGRID)
1083 TGridCollection * collection = (TGridCollection*) TAlienCollection::Open(
kXML);
1085 AliError(Form(
"%s not found",
kXML)) ;
1089 TGridResult* result = collection->GetGridResult(
"",0 ,0);
1092 printf(
"*** Getting the Chain ***\n");
1093 for (Int_t index = 0; index < result->GetEntries(); index++) {
1094 TString alienURL = result->GetKey(index,
"turl") ;
1095 cout <<
"================== " << alienURL << endl ;
1096 chain->Add(alienURL) ;
1102 chainxs->Add(alienURL) ;
1106 alienURL.ReplaceAll(
"AliESDs.root",
"pyxsec_hists.root");
1107 alienURL.ReplaceAll(
"AliAOD.root",
"pyxsec_hists.root");
1108 TFile* fxsec = TFile::Open(alienURL);
1111 TKey* key = (TKey*)fxsec->GetListOfKeys()->At(0);
1119 TList *
list =
dynamic_cast<TList*
>(key->ReadObj());
1127 Float_t xsection = ((TProfile*)list->FindObject(
"h1Xsec")) ->GetBinContent(1);
1128 Int_t ntrials = ((TH1F*) list->FindObject(
"h1Trials"))->GetBinContent(1);
1131 xsArr->SetAt(xsection,event);
1132 trArr->SetAt(ntrials,event);
1134 printf(
"recovered xs %f, ntrials %d, event %d\n",xsection,ntrials, event);
1146 TFileCollection* ds= gProof->GetDataSet(
kDatasetPROOF)->GetStagedSubset();
1148 gROOT->LoadMacro(
"/afs/in2p3.fr/group/alice/laf/dataset_management/CreateChainFromDataSet.C");
1150 printf(
"chain has %d entries\n",chain->GetEntries());
1153 gSystem->ChangeDirectory(ocwd.Data());
1165 Bool_t bRecalibrate = kFALSE;
1166 Bool_t bBadChannel = kFALSE;
1168 for (
int i=0; i< gApplication->Argc();i++){
1172 printf(
"Arg %d: %s\n",i,gApplication->Argv(i));
1178 if (!(strcmp(gApplication->Argv(i),
"--trigger")))
1179 sprintf(trigger,gApplication->Argv(i+1));
1181 if (!(strcmp(gApplication->Argv(i),
"--recalibrate")))
1182 bRecalibrate = atoi(gApplication->Argv(i+1));
1184 if (!(strcmp(gApplication->Argv(i),
"--badchannel")))
1185 bBadChannel = atoi(gApplication->Argv(i+1));
1187 if (!(strcmp(gApplication->Argv(i),
"--run")))
1189 sRun = gApplication->Argv(i+1);
1190 if(sRun.Contains(
"LHC10")) {
1195 kRun = atoi(gApplication->Argv(i+1));
1197 else printf(
"** Run number already set to %d, do not set to %d\n",
kRun,atoi(gApplication->Argv(i+1)));
1203 if(!sRun.Contains(
"LHC10"))
1210 else if(
kRun < 170600)
1224 printf(
"*********************************************\n");
1228 printf(
"*********************************************\n");
1249 Double_t xsection = 0 ;
1250 UInt_t ntrials = 0 ;
1258 nfiles = tree->GetEntries() ;
1260 tree->SetBranchAddress(
"xsection",&xsection);
1261 tree->SetBranchAddress(
"ntrials" ,&ntrials );
1262 for(Int_t i = 0; i < nfiles; i++)
1271 cout <<
"xsection " <<xsection<<
" ntrials "<<ntrials<<endl;
1276 nfiles =
xsArr->GetSize();
1278 for(Int_t i = 0; i < nfiles; i++)
1280 if(
xsArr->GetAt(i) > 0)
1282 xs +=
xsArr->GetAt(i) ;
1283 ntr +=
trArr->GetAt(i) ;
1286 cout <<
"xsection " <<
xsArr->GetAt(i)<<
" ntrials "<<
trArr->GetAt(i)<<endl;
1293 cout <<
"-----------------------------------------------------------------"<<endl;
1294 cout <<
"Average of "<< n <<
" files: xsection " <<xs<<
" ntrials "<<ntr<<endl;
1295 cout <<
"-----------------------------------------------------------------"<<endl;
Analyze locally files in your computer.
void ana(Int_t mode=mGRID)
anaModes
Different analysis modes.
Bool_t GetAverageXsection(TTree *tree, Double_t &xs, Float_t &ntr, Int_t &n)
void LoadLibraries(Int_t mode)
Load analysis libraries.
Count events with different selection criteria.
void CreateChain(const anaModes mode, TChain *chain, TChain *chainxs)
Fills chain with data files paths.
Bool_t kPrint
Global variables to be accessed by the different methods.
char * kPattern
Global, path to data files.
TArrayF * xsArr
Name of file with pT-hard cross sections.
AliAnalysisAlien * CreateAlienHandler()
Int_t kYear
ESD, AOD, MC, deltaAOD.
void CheckEnvironmentVariables()
TString kTreeName
Some tasks doesnt need it.
void CheckInputData(const anaModes mode)
Sets input data and tree strings.
AliAnalysisTaskCounter * AddTaskCounter(const TString trigger="", Bool_t xsOn=kFALSE)
Analyze files on GRID with Plugin.
Analyze files on GRID with Plugin.
void SetupPar(char *pararchivename)
Main class conecting the CaloTrackCorrelations package and Analysis Frame.
const char * kXSFileName
Global name for the xml collection file with data on grid.
AliAnalysisTaskCaloTrackCorrelation * AddTaskCaloTrackCorr(const TString data="", const TString calorimeter="EMCAL", const Bool_t simulation=kFALSE, const Bool_t eventsel=kFALSE, const Bool_t exotic=kTRUE, const Bool_t nonlin=kFALSE, TString outputfile="", const Int_t year=2010, const TString col="pp", const TString trigger="MB", const TString clustersArray="V1", const Bool_t mix=kTRUE, const Bool_t recaltm=kTRUE, const Bool_t tm=kTRUE, const Int_t minCen=-1, const Int_t maxCen=-1, const Bool_t qaan=kFALSE, const Bool_t hadronan=kFALSE, const Bool_t calibE=kTRUE, const Bool_t badmap=kTRUE, const Bool_t calibT=kTRUE, const Bool_t tender=kFALSE, const Bool_t outputAOD=kFALSE, const Bool_t printSettings=kFALSE, const Double_t scaleFactor=-1, const Int_t runNumber=-1)
Int_t kFile
Data are in files kInDir/kPattern+i.
TString kInputData
With real data kMC = kFALSE.
char * kDatasetPROOF
Number of files to analyze in local mode.