]>
Commit | Line | Data |
---|---|---|
3c78f321 | 1 | // |
2 | void runAAFbgpp(TString dataset="/alice/sim/LHC11d3_000146806", //"/alice/sim/LHC10f8c_130844", | |
3 | TString outFName = "LHC11d3_000146806_v1.root", | |
4 | Int_t nEvents = -1,//3000, | |
5 | TString noMergeDir = "root://alicers01.cern.ch//tmp/myoutput/", // "" // if non-zero string, no merging is done | |
6 | Bool_t scaleDTheta = kTRUE, // scale dTheta by 1/sin^2(theta) in trackleting | |
7 | float nStdDev = 25., // number of st.dev. for tracklet cut to keep | |
8 | float dphi = 0.08, // dphi window (sigma of tracklet cut) | |
9 | float dtht = 0.025, // dtheta .... (if negative, abs will be used with additional cut on |dthetaX|, apart from w.distance | |
10 | float phishift = 0.0045, // bending shift | |
11 | Bool_t remOvl = kTRUE, | |
12 | float injScale = 1.,//0.7, // inject injScale*Ncl(Lr1/Lr2) hits | |
13 | // | |
14 | Bool_t useMC = kTRUE, // fill MC info (doRec=kTRUE) | |
15 | Float_t etaMin = -2., // min eta range to fill in histos | |
16 | Float_t etaMax = 2., // max eta range to fill in histos | |
17 | Float_t zMin = -17, // process events with Z vertex min | |
18 | Float_t zMax = 17, // max positions | |
19 | Float_t scaleMCV0 = 0.8, // rescale MC V0 to match data | |
20 | Float_t ntMin = 1, // process events with ESDmult | |
21 | Float_t ntMax = 20000, // within this range | |
22 | // | |
23 | Bool_t checkReconstructables = kFALSE,//kTRUE, // fill histos for reconstructable (needs useMC and doRec) | |
24 | // | |
25 | //--------------------------------------------------------------------------------- | |
26 | float phiRot = 3.14159e+00, // angle for bg. generation with rotation | |
27 | float ovlPhiCut = 0.005, | |
28 | float ovlZetaCut = 0.05, | |
29 | TString alirootVer = "VO_ALICE@AliRoot::v4-21-33-AN", | |
30 | TString rootVer = "default",//"VO_ALICE@ROOT::v5-27-06b", | |
31 | // | |
32 | TString proofCluster="shahoian@alice-caf.cern.ch" | |
33 | ) | |
34 | { | |
35 | // | |
36 | Bool_t runLocal = kTRUE; // true only for local test mode | |
37 | if (runLocal) { | |
38 | dataset = "/default/shahoian/tstsim_LHC11d3_146806"; | |
39 | //dataset = "/default/shahoian/test"; | |
40 | proofCluster = ""; | |
41 | alirootVer = "AliRootProofLite"; | |
42 | nEvents = 500; | |
43 | } | |
44 | // | |
45 | if (!dataset.Contains("sim") && useMC) { | |
46 | printf("Running with read data dataset, switching OFF useMC\n"); | |
47 | useMC = kFALSE; | |
48 | } | |
49 | // | |
50 | printf("Requested: %s %s\n",alirootVer.Data(), rootVer.Data()); | |
51 | printf("Output expected in %s\n",outFName.Data()); | |
52 | // | |
53 | gEnv->SetValue("XSec.GSI.DelegProxy","2"); | |
54 | // | |
55 | TString alirootMode="REC"; | |
56 | TString extraLibs = "ITSrec:CDB:Geom:"; // not needed in default aliroot mode | |
57 | //extraLibs+= "ANALYSIS:ANALYSISalice"; | |
58 | extraLibs+= "ANALYSIS:OADB:ANALYSISalice:EventMixing"; | |
59 | TList *list = new TList(); | |
60 | // sets $ALIROOT_MODE on each worker to let proof to know to run in special mode | |
61 | list->Add(new TNamed("ALIROOT_MODE" , alirootMode.Data())); | |
62 | list->Add(new TNamed("ALIROOT_EXTRA_LIBS", extraLibs.Data())); | |
63 | list->Add(new TNamed("ALIROOT_EXTRA_INCLUDES", "ITS:include")); | |
64 | // list->Add(new TNamed("ALIROOT_ENABLE_ALIEN","1")); | |
65 | // | |
66 | //REM: same version of AliRoot on client!!!!! Otherwise error!! | |
67 | TProof::Mgr(proofCluster.Data())->SetROOTVersion(rootVer.Data()); | |
68 | TProof::Open(proofCluster.Data());//,"workers=10x"); | |
69 | // TProof::Open(proofCluster.Data(),"workers=1x"); | |
70 | if (!gProof) { | |
71 | Error("runAAFbgpp.C","Connection to AF failed."); | |
72 | return; | |
73 | } | |
74 | gProof->Exec("TObject *o = gEnv->GetTable()->FindObject(\"Proof.UseMergers\");" | |
75 | "gEnv->GetTable()->Remove(o);", kTRUE); | |
76 | // gProof->SetParameter("PROOF_UseMergers", 0); | |
77 | // Lets enable aliroot + extra libs on proof cluster | |
78 | if (runLocal) gProof->UploadPackage(alirootVer.Data()); | |
79 | gProof->EnablePackage(alirootVer.Data(), list); | |
80 | // | |
81 | gROOT->LoadMacro("MyAnalysisMacroUni.C"); | |
82 | ||
83 | if (runLocal) { | |
84 | Int_t numWorkers = gProof->GetParallel(); | |
85 | if (numWorkers<1) {printf("No workers\n"); return;} | |
86 | gProof->SetParameter("PROOF_PacketizerStrategy", (Int_t)0); | |
87 | int frac = (Int_t) 5 / numWorkers; | |
88 | if (frac<1) frac = 1; | |
89 | gProof->SetParameter("PROOF_PacketAsAFraction", frac); | |
90 | } | |
91 | MyAnalysisMacroUni(dataset,outFName,noMergeDir,nEvents,useMC, | |
92 | etaMin,etaMax,zMin,zMax,ntMin,ntMax, | |
93 | injScale,scaleDTheta,nStdDev,dphi,dtht, | |
94 | phishift,remOvl,ovlPhiCut,ovlZetaCut,scaleMCV0,checkReconstructables); | |
95 | // | |
96 | } |