29 chain ->AddFile(
"galice.root");
30 chainxs->AddFile(
"pyxsec.root");
34 if(chainxs && chainxs->GetEntries() > 0)
36 Int_t nfiles = chainxs->GetEntries();
44 Int_t nEventsPerFile = chain->GetEntries() / nfiles;
46 Double_t trials = ntrials / nEventsPerFile ;
48 scale = xsection/trials;
50 printf(
"Get Cross section : nfiles %d, nevents %d, nevents per file %d \n",nfiles, chain->GetEntries(),nEventsPerFile);
51 printf(
" ntrials %d, trials %2.2f, xs %2.2e, scale factor %2.2e\n", ntrials,trials,xsection,scale);
55 printf(
"*********************************************\n");
56 printf(
"number of entries # %lld, skipped %d\n", chain->GetEntries()) ;
57 printf(
"*********************************************\n");
61 printf(
"STOP, no chain available\n");
65 AliLog::SetGlobalLogLevel(AliLog::kError);
73 AliMCEventHandler* mcHandler =
new AliMCEventHandler();
74 mcHandler->SetReadTR(kFALSE);
75 mgr->SetMCtruthEventHandler(mcHandler);
76 mgr->SetInputEventHandler(NULL);
80 TString outputFile = AliAnalysisManager::GetCommonFileName();
82 gROOT->LoadMacro(
"AddTaskGenKine.C");
92 mgr->StartAnalysis(
"local",chain);
94 cout <<
" Analysis ended sucessfully "<< endl ;
116 gSystem->Load(
"libRAWDatabase");
122 gSystem->Load(
"libRAWDatarec");
123 gSystem->Load(
"libRAWDatasim");
127 gSystem->Load(
"libANALYSISalice");
130 gSystem->Load(
"libEMCALUtils");
131 gSystem->Load(
"libPWGCaloTrackCorrBase");
132 gSystem->Load(
"libPWGGACaloTrackCorrelations");
137 gSystem->AddIncludePath(
"-I$ALICE_ROOT");
138 gSystem->AddIncludePath(
"-I$ALICE_PHYSICS");
139 gSystem->AddIncludePath(
"-I./");
150 TString parpar(Form(
"%s.par", pararchivename)) ;
152 if (
gSystem->AccessPathName(pararchivename) )
154 TString processline = Form(
".! tar xvzf %s",parpar.Data()) ;
155 gROOT->ProcessLine(processline.Data());
159 gSystem->ChangeDirectory(pararchivename);
162 if (!
gSystem->AccessPathName(
"PROOF-INF/BUILD.sh")) {
163 printf(
"*******************************\n");
164 printf(
"*** Building PAR archive ***\n");
165 cout<<pararchivename<<endl;
166 printf(
"*******************************\n");
168 if (
gSystem->Exec(
"PROOF-INF/BUILD.sh")) {
169 Error(
"runProcess",
"Cannot Build the PAR Archive! - Abort!");
174 if (!
gSystem->AccessPathName(
"PROOF-INF/SETUP.C")) {
175 printf(
"*******************************\n");
176 printf(
"*** Setup PAR archive ***\n");
177 cout<<pararchivename<<endl;
178 printf(
"*******************************\n");
179 gROOT->Macro(
"PROOF-INF/SETUP.C");
182 gSystem->ChangeDirectory(ocwd.Data());
183 printf(
"Current dir: %s\n", ocwd.Data());
208 Int_t nfiles = tree->GetEntries() ;
209 if (tree && nfiles > 0)
211 tree->SetBranchAddress(
"xsection",&xsection);
212 tree->SetBranchAddress(
"ntrials" ,&ntrials );
213 for(
Int_t i = 0; i < nfiles; i++)
218 cout <<
"xsection " <<xsection<<
" ntrials "<<ntrials<<endl;
223 cout <<
"-----------------------------------------------------------------"<<endl;
224 cout <<
"Average of "<< nfiles<<
" files: xsection " <<xs<<
" ntrials "<<ntr<<endl;
225 cout <<
"-----------------------------------------------------------------"<<endl;
227 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)