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