]>
Commit | Line | Data |
---|---|---|
a9a39f46 | 1 | // |
2 | void runAAFMulti(TString dataset="/alice/sim/LHC10h6_000137161", | |
3 | TString outFName = "trbg.root", | |
4 | Int_t nEvents = -1,//3000, | |
5 | Float_t etaCut = 0.5, // max |eta| range to fill in histos | |
6 | Float_t zMin = -7, // process events with Z vertex min | |
7 | Float_t zMax = 7, // max positions | |
8 | Int_t useCentVar = 0, // centrality variable to use: enum {kCentSPD2, kCentV0, kCentV0CR, kCentTrTPC} | |
9 | Float_t scaleMCV0 = 0.7520, // rescale MC V0 to match data | |
10 | // | |
11 | // | |
12 | Float_t cutSigNStd = 1.5, // cut on weighed distance used to extract signal | |
13 | Float_t cutSigDPhiS = -1, // cut on dPhi-phiBent used to extract signal (if negative -> dphi*sqrt(cutSigNStd) | |
14 | Bool_t useMC = kTRUE, // fill MC info (doRec=kTRUE) | |
15 | // | |
16 | Bool_t doRec = kTRUE,//kTRUE, // fill data histos from new reco | |
17 | Bool_t doInj = kTRUE,//kTRUE, // create Inj. bg | |
18 | Bool_t doRot = kFALSE, // create Rot. bg | |
19 | Bool_t doMix = kFALSE,//kTRUE, // create Mix. bg | |
20 | // | |
21 | // specific parameters for reconstruction | |
22 | float phiRot = 3.14159e+00, // angle for bg. generation with rotation | |
23 | float injScale = 1.,//0.7, // inject injScale*Ncl(Lr1/Lr2) hits | |
24 | Bool_t scaleDTheta = kTRUE, // scale dTheta by 1/sin^2(theta) in trackleting | |
25 | float nStdDev = 25., // number of st.dev. for tracklet cut to keep | |
26 | float dphi = 0.06, // dphi window (sigma of tracklet cut) | |
27 | float dtht = 0.025, // dtheta .... (if negative, abs will be used with additional cut on |dthetaX|, apart from w.distance | |
28 | float phishift = 0.0045, // bending shift | |
29 | Bool_t remOvl = kTRUE, | |
30 | float ovlPhiCut = 0.005, | |
31 | float ovlZetaCut = 0.05, | |
32 | Int_t nEventsSkip = 0, | |
33 | //----------------------- Ntracklets selection parameters important for mixing, to be tuned | |
34 | Float_t ntMin = 1, // process events with ESDmult | |
35 | Float_t ntMax = 20000, // within this range | |
36 | Float_t ntMixBinSz = 20000, // ESDMult bin size for mixing | |
37 | //----------------------- Zv selection parameters important for mixing, to be tuned | |
38 | Float_t zMixBinSz = 14, //0.1, // Zv. bin for mixing | |
39 | //--------------------------------------------------------------------------------- | |
40 | // | |
41 | Bool_t checkReconstructables = kFALSE,//kTRUE, // fill histos for reconstructable (needs useMC and doRec) | |
42 | // | |
43 | TString alirootVer = "VO_ALICE@AliRoot::v4-21-05-AN", | |
44 | TString rootVer = "VO_ALICE@ROOT::v5-27-06b", | |
45 | // | |
46 | //TString proofCluster="shahoian@skaf.saske.sk" | |
47 | TString proofCluster="shahoian@alice-caf.cern.ch" | |
48 | ) | |
49 | { | |
50 | // | |
51 | Bool_t runLocal = kFALSE; // true only for local test mode | |
52 | if (runLocal) { | |
53 | dataset = "/default/shahoian/test_pp"; | |
54 | //dataset = "/default/shahoian/test"; | |
55 | proofCluster = ""; | |
56 | alirootVer = "AliRootProofLite"; | |
57 | nEvents = 500; | |
58 | } | |
59 | // | |
60 | if ((!dataset.Contains("alice/sim")) && useMC) { | |
61 | printf("Running with read data dataset, switching OFF useMC\n"); | |
62 | useMC = kFALSE; | |
63 | } | |
64 | // | |
65 | printf("Requested: %s %s\n",alirootVer.Data(), rootVer.Data()); | |
66 | printf("Output expected in %s\n",outFName.Data()); | |
67 | // | |
68 | gEnv->SetValue("XSec.GSI.DelegProxy","2"); | |
69 | // | |
70 | TString alirootMode="REC"; | |
71 | TString extraLibs = "ITSrec:CDB:Geom:"; // not needed in default aliroot mode | |
72 | //extraLibs+= "ANALYSIS:ANALYSISalice"; | |
73 | extraLibs+= "ANALYSIS:ANALYSISalice:EventMixing"; | |
74 | TList *list = new TList(); | |
75 | // sets $ALIROOT_MODE on each worker to let proof to know to run in special mode | |
76 | list->Add(new TNamed("ALIROOT_MODE" , alirootMode.Data())); | |
77 | list->Add(new TNamed("ALIROOT_EXTRA_LIBS", extraLibs.Data())); | |
78 | list->Add(new TNamed("ALIROOT_ENABLE_ALIEN","1")); | |
79 | // | |
80 | //REM: same version of AliRoot on client!!!!! Otherwise error!! | |
81 | TProof::Mgr(proofCluster.Data())->SetROOTVersion(rootVer.Data()); | |
82 | TProof::Open(proofCluster.Data());//,"workers=10x"); | |
83 | // TProof::Open(proofCluster.Data(),"workers=1x"); | |
84 | if (!gProof) { | |
85 | Error("runAAFMulti.C","Connection to AF failed."); | |
86 | return; | |
87 | } | |
88 | gProof->Exec("TObject *o = gEnv->GetTable()->FindObject(\"Proof.UseMergers\");" | |
89 | "gEnv->GetTable()->Remove(o);", kTRUE); | |
90 | // gProof->SetParameter("PROOF_UseMergers", 0); | |
91 | // Lets enable aliroot + extra libs on proof cluster | |
92 | if (runLocal) gProof->UploadPackage(alirootVer.Data()); | |
93 | gProof->EnablePackage(alirootVer.Data(), list); | |
94 | // | |
95 | if (runLocal) { | |
96 | Int_t numWorkers = gProof->GetParallel(); | |
97 | if (numWorkers<1) {printf("No workers\n"); return;} | |
98 | gProof->SetParameter("PROOF_PacketizerStrategy", (Int_t)0); | |
99 | int frac = (Int_t) 5 / numWorkers; | |
100 | if (frac<1) frac = 1; | |
101 | gProof->SetParameter("PROOF_PacketAsAFraction", frac); | |
102 | } | |
103 | // | |
104 | gROOT->LoadMacro("MyAnalysisMacroTrackletMulti.C"); | |
105 | TStopwatch sw; | |
106 | sw.Start(); | |
107 | MyAnalysisMacroTrackletMulti(dataset,outFName,nEvents,etaCut,zMin,zMax,useCentVar, | |
108 | cutSigNStd,cutSigDPhiS,useMC,scaleMCV0, | |
109 | doRec,doInj,doRot,doMix, | |
110 | phiRot,injScale,scaleDTheta,nStdDev,dphi,dtht, | |
111 | phishift,remOvl,ovlPhiCut,ovlZetaCut,nEventsSkip, | |
112 | ntMin,ntMax,ntMixBinSz,zMixBinSz, | |
113 | checkReconstructables); | |
114 | // | |
115 | sw.Stop(); | |
116 | sw.Print(); | |
117 | } |