19 |
//=================================== |
//=================================== |
20 |
// global variables |
// global variables |
21 |
//=================================== |
//=================================== |
22 |
|
Bool_t CRIG; |
23 |
|
Bool_t SRIG; |
24 |
|
Bool_t SIMU; |
25 |
Bool_t DEBUG; |
Bool_t DEBUG; |
26 |
|
Bool_t MATRIX; |
27 |
|
Bool_t FULL; |
28 |
TString DIR; |
TString DIR; |
29 |
TString LIST; |
TString LIST; |
30 |
TString I_OPTIONS; |
TString I_OPTIONS; |
69 |
|
|
70 |
if( !Select(event) )return false; |
if( !Select(event) )return false; |
71 |
|
|
72 |
FindAverage(event,iev); |
if ( MATRIX ){ |
73 |
|
FindMatrix(event,iev); |
74 |
|
} else { |
75 |
|
FindAverage(event,iev); |
76 |
|
}; |
77 |
return true; |
return true; |
78 |
|
|
79 |
} |
} |
80 |
|
|
|
bool Process2(int iev){ |
|
|
|
|
|
if( !Select(event) )return false; |
|
|
|
|
|
FindMatrix(event,iev); |
|
|
|
|
|
return true; |
|
|
|
|
|
} |
|
81 |
//========================================== |
//========================================== |
82 |
//000000000000000000000000000000000000000000 |
//000000000000000000000000000000000000000000 |
83 |
//========================================== |
//========================================== |
104 |
// read input file/list |
// read input file/list |
105 |
// -------------------- |
// -------------------- |
106 |
event = new PamLevel2(ddir,list,ioptions); |
event = new PamLevel2(ddir,list,ioptions); |
107 |
|
event->SetSortingMethod("CALS1S2"); |
108 |
|
if ( SIMU ) event->SetSortingMethod("+GP"); |
109 |
// tree->SetCacheSize(0); |
// tree->SetCacheSize(0); |
110 |
|
|
111 |
// --------------- |
// --------------- |
136 |
|
|
137 |
}; |
}; |
138 |
|
|
139 |
CalculateAverage(); |
if ( !MATRIX ) CalculateAverage(); |
|
|
|
|
for(ULong64_t iev=nmin; iev<nmin+nmax; iev++){ |
|
|
// |
|
|
event->Clear(); |
|
|
if( event->GetEntry(iev) ){ |
|
|
Process2(iev); |
|
|
}else{ |
|
|
cout << "Chain entry "<<iev<<" -- ERROR --"<<endl; |
|
|
}; |
|
|
|
|
|
}; |
|
140 |
|
|
141 |
event->Clear(); |
event->Clear(); |
142 |
// -------------- |
// -------------- |
188 |
// ----------------------- |
// ----------------------- |
189 |
// Read input parameters |
// Read input parameters |
190 |
// ----------------------- |
// ----------------------- |
191 |
|
SIMU = false; |
192 |
|
CRIG = false; |
193 |
|
SRIG = false; |
194 |
DEBUG = false; |
DEBUG = false; |
195 |
|
MATRIX = false; |
196 |
|
FULL = false; |
197 |
DIR = gSystem->WorkingDirectory(); |
DIR = gSystem->WorkingDirectory(); |
198 |
LIST = ""; |
LIST = ""; |
199 |
OUTFILE = ""; |
OUTFILE = ""; |
266 |
DEBUG = true; |
DEBUG = true; |
267 |
continue; |
continue; |
268 |
} |
} |
269 |
|
// |
270 |
|
else if (!strcmp(argv[i], "-matrix")){ |
271 |
|
MATRIX = true; |
272 |
|
continue; |
273 |
|
} |
274 |
|
// -----------------------------------------------------// |
275 |
|
// |
276 |
|
else if (!strcmp(argv[i], "-simu")){ |
277 |
|
SIMU = true; |
278 |
|
continue; |
279 |
|
} |
280 |
|
// -----------------------------------------------------// |
281 |
|
// |
282 |
|
else if (!strcmp(argv[i], "-calorig")){ |
283 |
|
CRIG = true; |
284 |
|
continue; |
285 |
|
} |
286 |
|
// -----------------------------------------------------// |
287 |
|
// |
288 |
|
else if (!strcmp(argv[i], "-simurig")){ |
289 |
|
SRIG = true; |
290 |
|
continue; |
291 |
|
} |
292 |
|
// -----------------------------------------------------// |
293 |
|
else if (!strcmp(argv[i], "-full")){ |
294 |
|
FULL = true; |
295 |
|
continue; |
296 |
|
} |
297 |
// -----------------------------------------------------// |
// -----------------------------------------------------// |
298 |
else{ |
else{ |
299 |
cout << "Unidentified input parameter. Ignored."<< endl; |
cout << "Unidentified input parameter. Ignored."<< endl; |