30 chain ->AddFile(
"galice.root");
31 chainxs->AddFile(
"pyxsec.root");
35 if(chainxs && chainxs->GetEntries() > 0)
37 Int_t nfiles = chainxs->GetEntries();
45 Int_t nEventsPerFile = chain->GetEntries() / nfiles;
47 Double_t trials = ntrials / nEventsPerFile ;
49 scale = xsection/trials;
51 printf(
"Get Cross section : nfiles %d, nevents %d, nevents per file %d \n",nfiles, chain->GetEntries(),nEventsPerFile);
52 printf(
" ntrials %d, trials %2.2f, xs %2.2e, scale factor %2.2e\n", ntrials,trials,xsection,scale);
56 printf(
"*********************************************\n");
57 printf(
"number of entries # %lld, skipped %d\n", chain->GetEntries()) ;
58 printf(
"*********************************************\n");
62 printf(
"STOP, no chain available\n");
66 AliLog::SetGlobalLogLevel(AliLog::kError);
74 AliMCEventHandler* mcHandler =
new AliMCEventHandler();
75 mcHandler->SetReadTR(kFALSE);
76 mgr->SetMCtruthEventHandler(mcHandler);
77 mgr->SetInputEventHandler(NULL);
81 TString outputFile = AliAnalysisManager::GetCommonFileName();
83 gROOT->LoadMacro(
"AddTaskGenKine.C");
93 mgr->StartAnalysis(
"local",chain);
95 cout <<
" Analysis ended sucessfully "<< endl ;
117 gSystem->Load(
"libRAWDatabase");
123 gSystem->Load(
"libRAWDatarec");
124 gSystem->Load(
"libRAWDatasim");
128 gSystem->Load(
"libANALYSISalice");
131 gSystem->Load(
"libEMCALUtils");
132 gSystem->Load(
"libPWGCaloTrackCorrBase");
133 gSystem->Load(
"libPWGGACaloTrackCorrelations");
138 gSystem->AddIncludePath(
"-I$ALICE_ROOT");
139 gSystem->AddIncludePath(
"-I$ALICE_PHYSICS");
140 gSystem->AddIncludePath(
"-I./");
151 TString parpar(Form(
"%s.par", pararchivename)) ;
153 if (
gSystem->AccessPathName(pararchivename) )
155 TString processline = Form(
".! tar xvzf %s",parpar.Data()) ;
156 gROOT->ProcessLine(processline.Data());
160 gSystem->ChangeDirectory(pararchivename);
163 if (!
gSystem->AccessPathName(
"PROOF-INF/BUILD.sh")) {
164 printf(
"*******************************\n");
165 printf(
"*** Building PAR archive ***\n");
166 cout<<pararchivename<<endl;
167 printf(
"*******************************\n");
169 if (
gSystem->Exec(
"PROOF-INF/BUILD.sh")) {
170 Error(
"runProcess",
"Cannot Build the PAR Archive! - Abort!");
175 if (!
gSystem->AccessPathName(
"PROOF-INF/SETUP.C")) {
176 printf(
"*******************************\n");
177 printf(
"*** Setup PAR archive ***\n");
178 cout<<pararchivename<<endl;
179 printf(
"*******************************\n");
180 gROOT->Macro(
"PROOF-INF/SETUP.C");
183 gSystem->ChangeDirectory(ocwd.Data());
184 printf(
"Current dir: %s\n", ocwd.Data());
209 Int_t nfiles = tree->GetEntries() ;
210 if (tree && nfiles > 0)
212 tree->SetBranchAddress(
"xsection",&xsection);
213 tree->SetBranchAddress(
"ntrials" ,&ntrials );
214 for(
Int_t i = 0; i < nfiles; i++)
219 cout <<
"xsection " <<xsection<<
" ntrials "<<ntrials<<endl;
224 cout <<
"-----------------------------------------------------------------"<<endl;
225 cout <<
"Average of "<< nfiles<<
" files: xsection " <<xs<<
" ntrials "<<ntr<<endl;
226 cout <<
"-----------------------------------------------------------------"<<endl;
228 else cout <<
" >>>> Empty tree !!!! <<<<< "<<endl;
void ana(Int_t mode=mGRID)
AliAnalysisTaskCaloTrackCorrelation * AddTaskGenKine(TString outputfile, const Double_t scaleFactor=-1)
print configuration settings.
void LoadLibraries()
Load the needed libraries most of them already loaded by aliroot.
void anaGenKine(Int_t mode)
Main execution method.
void GetAverageXsection(TTree *tree, Double_t &xs, Float_t &ntr)
Main class conecting the CaloTrackCorrelations package and Analysis Frame.
void SetupPar(char *pararchivename)