8 int parseNumber(
int a,
int b);
13 NchCentrality
Cut::mZdcCtbCent[2] = {kTotal,kFive};
14 Int_t Cut::mFlowCent[2] = {-1,-1};
15 Int_t Cut::mHMinusCent[2] = {-1,-1};
16 Int_t Cut::mNchCent[2] = {-1,1};
19 bool Cut::mDoFlowCent=
false;
20 bool Cut::mDoZdcCtbCent=
false;
21 bool Cut::mDoHMinusCent=
false;
22 bool Cut::mDoNchCent=
false;
23 bool Cut::mDoNchCentKludge=
false;
25 bool Cut::mDoSpectraCent=
false;
27 Float_t Cut::mVertexZ[2] = {-200,200};
28 Float_t Cut::mVertexZSkip = 0;
30 Float_t Cut::mEta[2] = {-.5,.5};
31 Int_t Cut::mFitPts[2] = {0,45};
32 Float_t Cut::mSDcaGl[2] = {-3,3};
33 Float_t Cut::mDcaPr[2] = {0,3};
34 Float_t Cut::mDcaXYGl[2] = {-3,3};
35 Int_t Cut::mMcPts[2] = {10,99};
36 Float_t Cut::mEtaTight[2] = { -.2, .2 };
37 Float_t Cut::mHitAvoid=0;
41 char Cut::mHitHalf = 0;
42 char Cut::mGeomHalf = 0;
48 Cut::SetHalf(
char half)
51 case 'e' : mHalf =
'e'; mVertexZ[1] = 0;
break;
52 case 'w' : mHalf =
'w'; mVertexZ[0] = 0;
break;
53 case 's' : mHalf =
's';
break;
54 default : cerr <<
"Wrong half " << half << endl; exit(1);
59 Cut::SetHitHalf(
char half)
62 case 'e' : mHitHalf =
'e';
break;
63 case 'w' : mHitHalf =
'w';
break;
64 case 's' : mHitHalf =
's';
break;
65 default : cerr <<
"Wrong hit half " << half << endl; exit(1);
70 Cut::SetGeomHalf(
char half)
73 case 'e' : mGeomHalf =
'e';
break;
74 case 'w' : mGeomHalf =
'w';
break;
75 case 's' : mGeomHalf =
's';
break;
76 default : cerr <<
"Wrong geom half " << half << endl; exit(1);
134 int parseNumber(
int a,
int b)
136 int div1=(int)pow(10,b);
137 int div2=(int)pow(10,b-1);
140 return (val==a) ? int(a/div2) : int(val/div2);
144 Cut::SetCut(Int_t type)
147 cout <<
"type " << type <<
" is too short" << endl;exit(1);
152 int centType=parseNumber(type,8);
153 int centDefSpectra=parseNumber(type,7);
154 int centDefOther=parseNumber(type,6);
155 int vertex=parseNumber(type,5);
156 int half=parseNumber(type,4);
157 int fitPts=parseNumber(type,3);
158 int dca=parseNumber(type,2);
159 int eta=parseNumber(type,1);
161 cout <<
"Set cut?" << endl
162 <<
"\tcentType=" << centType << endl
163 <<
"\tcentDefSpectra=" << centDefSpectra << endl
164 <<
"\tcentDefOther=" << centDefOther << endl
165 <<
"\tvertex=" << vertex << endl
166 <<
"\thalf=" << half << endl
167 <<
"\tfitPts=" << fitPts << endl
168 <<
"\tdca=" << dca << endl
169 <<
"\teta=" << eta << endl;
173 NchCentrality peripheralMin = kEighty,
174 peripheralMax = kSeventy;
175 NchCentrality kludgeMin = kEighty,
184 if(centDefSpectra==9){
185 mFlowCent[0]=0; mFlowCent[1]=9; mDoFlowCent=
true;
187 else if(centDefSpectra==8){
188 mZdcCtbCent[0]=kTotal; mZdcCtbCent[1]=kFive; mDoZdcCtbCent=
true;
190 else if(centDefSpectra==7){
191 mHMinusCent[0]=kTotal; mHMinusCent[1]=kFive; mDoHMinusCent=
true;
193 else if(centDefSpectra==6){
194 mNchCent[0]=kTotal; mNchCent[1]=kFive; mDoNchCent=
true;
196 else if(centDefSpectra==5){
197 mNchCent[0]=kTotal; mNchCent[1]=kFive; mDoNchCentKludge=
true;
200 cerr <<
"unknown centrality definition for spectra " << centDefSpectra<<endl; exit(1);
205 mFlowCent[0]=0; mFlowCent[1]=9; mDoFlowCent=
true;
207 else if(centDefOther==8){
208 mZdcCtbCent[0]=kTotal; mZdcCtbCent[1]=kFive; mDoZdcCtbCent=
true;
210 else if(centDefOther==7){
211 mHMinusCent[0]=kTotal; mHMinusCent[1]=kFive; mDoHMinusCent=
true;
213 else if(centDefOther==6){
214 mNchCent[0]=kTotal; mNchCent[1]=kFive; mDoNchCent=
true;
216 else if(centDefOther==5){
217 mNchCent[0]=kTotal; mNchCent[1]=kFive; mDoNchCentKludge=
true;
220 cerr <<
"unknown centrality definition for spectra " << centDefSpectra<<endl; exit(1);
226 if(centDefSpectra==9){
227 mFlowCent[0]=8; mFlowCent[1]=9; mDoFlowCent=
true;
229 else if(centDefSpectra==8){
230 mZdcCtbCent[0]=kFive; mZdcCtbCent[1]=kFive; mDoZdcCtbCent=
true;
232 else if(centDefSpectra==7){
233 mHMinusCent[0]=kFive; mHMinusCent[1]=kFive; mDoHMinusCent=
true;
235 else if(centDefSpectra==6){
236 mNchCent[0]=kFive; mNchCent[1]=kFive; mDoNchCent=
true;
240 cerr <<
"unknown centrality definition for spectra " << centDefSpectra<<endl; exit(1);
245 mFlowCent[0]=8; mFlowCent[1]=9; mDoFlowCent=
true;
247 else if(centDefOther==8){
248 mZdcCtbCent[0]=kTen; mZdcCtbCent[1]=kFive; mDoZdcCtbCent=
true;
250 else if(centDefOther==7){
251 mHMinusCent[0]=kTen; mHMinusCent[1]=kFive; mDoHMinusCent=
true;
253 else if(centDefOther==6){
254 mNchCent[0]=kTen; mNchCent[1]=kFive; mDoNchCent=
true;
257 cerr <<
"unknown centrality definition for spectra " << centDefSpectra<<endl; exit(1);
263 if(centDefSpectra==9){
264 mFlowCent[0]=1; mFlowCent[1]=3; mDoFlowCent=
true;
266 else if(centDefSpectra==8){
267 mZdcCtbCent[0]=peripheralMin;
268 mZdcCtbCent[1]=peripheralMax; mDoZdcCtbCent=
true;
270 else if(centDefSpectra==7){
271 mHMinusCent[0]=peripheralMin;
272 mHMinusCent[1]=peripheralMax; mDoHMinusCent=
true;
274 else if(centDefSpectra==6){
275 mNchCent[0]=peripheralMin;
276 mNchCent[1]=peripheralMax; mDoNchCent=
true;
278 else if(centDefSpectra==5){
279 mNchCent[0]=peripheralMin;
280 mNchCent[1]=peripheralMax; mDoNchCentKludge=
true;
283 cerr <<
"unknown centrality definition for spectra " << centDefSpectra<<endl; exit(1);
288 mFlowCent[0]=1; mFlowCent[1]=3; mDoFlowCent=
true;
290 else if(centDefOther==8){
291 mZdcCtbCent[0]=peripheralMin;
292 mZdcCtbCent[1]=peripheralMax; mDoZdcCtbCent=
true;
294 else if(centDefOther==7){
295 mHMinusCent[0]=peripheralMin;
296 mHMinusCent[1]=peripheralMax; mDoHMinusCent=
true;
298 else if(centDefOther==6){
299 mNchCent[0]=peripheralMin;
300 mNchCent[1]=peripheralMax; mDoNchCent=
true;
302 else if(centDefOther==5){
303 mNchCent[0]=peripheralMin;
304 mNchCent[1]=peripheralMax; mDoNchCentKludge=
true;
307 cerr <<
"Unknown centrality definition for spectra: " << centDefSpectra<<endl; exit(1);
313 if(centDefSpectra==9){
314 mFlowCent[0]=8; mFlowCent[1]=9; mDoFlowCent=
true;
316 else if(centDefSpectra==8){
317 mZdcCtbCent[0]=kFive; mZdcCtbCent[1]=kFive; mDoZdcCtbCent=
true;
319 else if(centDefSpectra==7){
320 mHMinusCent[0]=kFive; mHMinusCent[1]=kFive; mDoHMinusCent=
true;
322 else if(centDefSpectra==6){
323 mNchCent[0]=kFive; mNchCent[1]=kFive; mDoNchCent=
true;
325 else if(centDefSpectra==5){
326 mNchCent[0]=kFive; mNchCent[1]=kFive; mDoNchCentKludge=
true;
329 cerr <<
"unknown centrality definition for spectra " << centDefSpectra<<endl; exit(1);
334 mFlowCent[0]=8; mFlowCent[1]=9; mDoFlowCent=
true;
336 else if(centDefOther==8){
337 mZdcCtbCent[0]=kFive; mZdcCtbCent[1]=kFive; mDoZdcCtbCent=
true;
339 else if(centDefOther==7){
340 mHMinusCent[0]=kFive; mHMinusCent[1]=kFive; mDoHMinusCent=
true;
342 else if(centDefOther==6){
343 mNchCent[0]=kFive; mNchCent[1]=kFive; mDoNchCent=
true;
345 else if(centDefOther==5){
346 mNchCent[0]=kFive; mNchCent[1]=kFive; mDoNchCentKludge=
true;
349 cerr <<
"unknown centrality definition for spectra " << centDefSpectra<<endl; exit(1);
356 if(centDefSpectra==9){
357 mFlowCent[0]=1; mFlowCent[1]=3; mDoFlowCent=
true;
359 else if(centDefSpectra==8){
360 mZdcCtbCent[0]=peripheralMin;
361 mZdcCtbCent[1]=peripheralMax; mDoZdcCtbCent=
true;
363 else if(centDefSpectra==7){
364 mHMinusCent[0]=peripheralMin;
365 mHMinusCent[1]=peripheralMax; mDoHMinusCent=
true;
367 else if(centDefSpectra==6){
368 mNchCent[0]=peripheralMin;
369 mNchCent[1]=peripheralMax; mDoNchCent=
true;
371 else if(centDefSpectra==5){
372 mNchCent[0]=peripheralMin;
373 mNchCent[1]=peripheralMax; mDoNchCentKludge=
true;
376 cerr <<
"unknown centrality definition for spectra " << centDefSpectra<<endl; exit(1);
381 mFlowCent[0]=1; mFlowCent[1]=3; mDoFlowCent=
true;
383 else if(centDefOther==8){
384 mZdcCtbCent[0]=kludgeMin;
385 mZdcCtbCent[1]=kludgeMax; mDoZdcCtbCent=
true;
387 else if(centDefOther==7){
388 mHMinusCent[0]=kludgeMin;
389 mHMinusCent[1]=kludgeMax; mDoHMinusCent=
true;
391 else if(centDefOther==6){
392 mNchCent[0]=kludgeMin;
393 mNchCent[1]=kludgeMax; mDoNchCent=
true;
395 else if(centDefOther==5){
396 mNchCent[0]=kludgeMin;
397 mNchCent[1]=kludgeMax; mDoNchCentKludge=
true;
400 cerr <<
"Unknown centrality definition for spectra: " << centDefSpectra<<endl; exit(1);
407 if(centDefSpectra==9){
408 mFlowCent[0]=6; mFlowCent[1]=7; mDoFlowCent=
true;
410 else if(centDefSpectra==8){
411 mZdcCtbCent[0]=kTwenty;
412 mZdcCtbCent[1]=kTwenty; mDoZdcCtbCent=
true;
414 else if(centDefSpectra==7){
415 mHMinusCent[0]=kTwenty;
416 mHMinusCent[1]=kTwenty; mDoHMinusCent=
true;
418 else if(centDefSpectra==6){
420 mNchCent[1]=kTwenty; mDoNchCent=
true;
422 else if(centDefSpectra==5){
424 mNchCent[1]=kTwenty; mDoNchCentKludge=
true;
427 cerr <<
"unknown centrality definition for spectra " << centDefSpectra<<endl; exit(1);
432 mFlowCent[0]=6; mFlowCent[1]=7; mDoFlowCent=
true;
434 else if(centDefOther==8){
435 mZdcCtbCent[0]=kTwenty;
436 mZdcCtbCent[1]=kTwenty; mDoZdcCtbCent=
true;
438 else if(centDefOther==7){
439 mHMinusCent[0]=kTwenty;
440 mHMinusCent[1]=kTwenty; mDoHMinusCent=
true;
442 else if(centDefOther==6){
444 mNchCent[1]=kTwenty; mDoNchCent=
true;
446 else if(centDefOther==5){
448 mNchCent[1]=kTwenty; mDoNchCentKludge=
true;
451 cerr <<
"Unknown centrality definition for spectra: " << centDefSpectra<<endl; exit(1);
457 if(centDefSpectra==9){
458 mFlowCent[0]=4; mFlowCent[1]=5; mDoFlowCent=
true;
460 else if(centDefSpectra==8){
461 mZdcCtbCent[0]=kThirty;
462 mZdcCtbCent[1]=kThirty; mDoZdcCtbCent=
true;
464 else if(centDefSpectra==7){
465 mHMinusCent[0]=kThirty;
466 mHMinusCent[1]=kThirty; mDoHMinusCent=
true;
468 else if(centDefSpectra==6){
470 mNchCent[1]=kThirty; mDoNchCent=
true;
472 else if(centDefSpectra==5){
474 mNchCent[1]=kThirty; mDoNchCentKludge=
true;
477 cerr <<
"unknown centrality definition for spectra " << centDefSpectra<<endl; exit(1);
482 mFlowCent[0]=1; mFlowCent[1]=3; mDoFlowCent=
true;
484 else if(centDefOther==8){
485 mZdcCtbCent[0]=kThirty;
486 mZdcCtbCent[1]=kThirty; mDoZdcCtbCent=
true;
488 else if(centDefOther==7){
489 mHMinusCent[0]=kThirty;
490 mHMinusCent[1]=kThirty; mDoHMinusCent=
true;
492 else if(centDefOther==6){
494 mNchCent[1]=kThirty; mDoNchCent=
true;
496 else if(centDefOther==5){
498 mNchCent[1]=kThirty; mDoNchCentKludge=
true;
501 cerr <<
"Unknown centrality definition for spectra: " << centDefSpectra<<endl; exit(1);
508 if(centDefSpectra==9){
509 mFlowCent[0]=3; mFlowCent[1]=3; mDoFlowCent=
true;
511 else if(centDefSpectra==8){
512 mZdcCtbCent[0]=kForty;
513 mZdcCtbCent[1]=kForty; mDoZdcCtbCent=
true;
515 else if(centDefSpectra==7){
516 mHMinusCent[0]=kForty;
517 mHMinusCent[1]=kForty; mDoHMinusCent=
true;
519 else if(centDefSpectra==6){
521 mNchCent[1]=kForty; mDoNchCent=
true;
523 else if(centDefSpectra==5){
525 mNchCent[1]=kForty; mDoNchCentKludge=
true;
528 cerr <<
"unknown centrality definition for spectra " << centDefSpectra<<endl; exit(1);
533 mFlowCent[0]=1; mFlowCent[1]=3; mDoFlowCent=
true;
535 else if(centDefOther==8){
536 mZdcCtbCent[0]=kForty;
537 mZdcCtbCent[1]=kForty; mDoZdcCtbCent=
true;
539 else if(centDefOther==7){
540 mHMinusCent[0]=kForty;
541 mHMinusCent[1]=kForty; mDoHMinusCent=
true;
543 else if(centDefOther==6){
545 mNchCent[1]=kForty; mDoNchCent=
true;
547 else if(centDefOther==5){
549 mNchCent[1]=kForty; mDoNchCentKludge=
true;
552 cerr <<
"Unknown centrality definition for spectra: " << centDefSpectra<<endl; exit(1);
559 if(centDefSpectra==9){
560 mFlowCent[0]=2; mFlowCent[1]=2; mDoFlowCent=
true;
562 else if(centDefSpectra==8){
563 mZdcCtbCent[0]=kSixty;
564 mZdcCtbCent[1]=kFifty; mDoZdcCtbCent=
true;
566 else if(centDefSpectra==7){
567 mHMinusCent[0]=kSixty;
568 mHMinusCent[1]=kFifty; mDoHMinusCent=
true;
570 else if(centDefSpectra==6){
572 mNchCent[1]=kFifty; mDoNchCent=
true;
574 else if(centDefSpectra==5){
576 mNchCent[1]=kFifty; mDoNchCentKludge=
true;
579 cerr <<
"unknown centrality definition for spectra " << centDefSpectra<<endl; exit(1);
584 mFlowCent[0]=1; mFlowCent[1]=3; mDoFlowCent=
true;
586 else if(centDefOther==8){
587 mZdcCtbCent[0]=kSixty;
588 mZdcCtbCent[1]=kFifty; mDoZdcCtbCent=
true;
590 else if(centDefOther==7){
591 mHMinusCent[0]=kSixty;
592 mHMinusCent[1]=kFifty; mDoHMinusCent=
true;
594 else if(centDefOther==6){
596 mNchCent[1]=kFifty; mDoNchCent=
true;
598 else if(centDefOther==5){
600 mNchCent[1]=kFifty; mDoNchCentKludge=
true;
603 cerr <<
"Unknown centrality definition for spectra: " << centDefSpectra<<endl; exit(1);
609 cerr <<
"Unknown centrality type: " << centType << endl; exit(1);
614 mVertexZ[0]=-200; mVertexZ[1]=200;
break;
616 mVertexZ[0]=-75; mVertexZ[1]=75;
break;
618 mVertexZ[0]=-95; mVertexZ[1]=95;
break;
620 mVertexZ[0]=-30; mVertexZ[1]=30;
break;
622 mVertexZ[0]=0; mVertexZ[1]=30;
break;
624 cerr <<
"Unknown vertex type: " << vertex << endl; exit(1);
631 SetHitHalf(
's');
break;
633 SetHitAvoid(10);
break;
635 cerr <<
"Unknown half type : " << half << endl; exit(1);
640 mFitPts[0]=20; mFitPts[1]=99;
break;
642 mFitPts[0]=25; mFitPts[1]=99;
break;
644 mFitPts[0]=10; mFitPts[1]=99;
break;
646 mFitPts[0]=35; mFitPts[1]=99;
break;
648 mFitPts[0]=24; mFitPts[1]=99;
break;
650 mFitPts[0]=23; mFitPts[1]=99;
break;
652 mFitPts[0]=30; mFitPts[1]=99;
break;
654 cerr <<
"Unknown fit pts type : " << fitPts << endl; exit(1);
659 mSDcaGl[0]=-1; mSDcaGl[1]=1;
break;
661 mSDcaGl[0]=-1.2; mSDcaGl[1]=1.2;
break;
663 mSDcaGl[0]=-3; mSDcaGl[1]=3;
break;
666 cerr <<
"Unknown dca type : " << half << endl; exit(1);
671 mEta[0]=-.5; mEta[1]=.5;
break;
673 mEta[0]=-.7; mEta[1]=.7;
break;
675 mEta[0]=0; mEta[1]=0.5;
break;
677 cerr <<
"Unknown dca type : " << half << endl; exit(1);
688 cout <<
"******************************************************" << endl;
689 cout <<
"Cut::ShowCuts()" << endl;
690 cout <<
"Cut=" << mCut << endl;
691 cout <<
"event cuts:" << endl;
694 cout <<
"\tWill use spectra centrality definition" << endl;
696 cout <<
"\tWill use 'other' centrality definition" << endl;
699 cout <<
"\tflow cent : " << mFlowCent[0] <<
" -- " << mFlowCent[1] << endl;
700 else if(mDoZdcCtbCent)
701 cout <<
"\tzdc-ctb cent : " << (int) mZdcCtbCent[0] <<
" -- "
702 << (
int) mZdcCtbCent[1] << endl;
703 else if(mDoHMinusCent)
704 cout << "\th minus cent : " << (
int) mHMinusCent[0] << " -- "
705 << (
int) mHMinusCent[1] << endl;
707 cout << "\th nCh cent : " << (
int) mNchCent[0] << " -- "
708 << (
int) mNchCent[1] << endl;
709 else if(mDoNchCentKludge){
710 cout <<
"\tDoing nCh KLUDGE" << endl;
711 cout <<
"\th nCh cent : " << (int) mNchCent[0] <<
" -- "
712 << (
int) mNchCent[1] << endl;
715 cout <<
"\tUnknown centrality definition. Goodbye" << endl; exit(1);
718 cout <<
"\tDoing nCh KLUDGE" << endl;
720 cout <<
"\tvertex z : " << mVertexZ[0] <<
" -- " << mVertexZ[1] << endl;
722 cout <<
"\tvtx z skip: "<< mVertexZSkip << endl;
725 cout <<
"\twill process half " <<
"'" <<mHalf <<
"'" << endl;
728 cout <<
"\twill process geom half " <<
"'" << mGeomHalf <<
"'" << endl;
731 cout <<
"track cuts:" << endl
732 <<
"\teta : " << mEta[0] <<
" -- " << mEta[1] << endl
733 <<
"\tfit pts : " << mFitPts[0] <<
" -- " << mFitPts[1] << endl
734 <<
"\tsdca : " << mSDcaGl[0] <<
" -- " << mSDcaGl[1] << endl
735 <<
"\tmc pts : " << mMcPts[0] <<
" -- " << mMcPts[1] << endl
736 <<
"\teta tight : " << mEtaTight[0] <<
"-- " << mEtaTight[1] << endl
739 cout <<
"\ttracks with hits outside of " << mHitAvoid <<
" cm" <<endl;
742 cout <<
"\twill process tracks with hits on half " << mHitHalf << endl;
744 cout <<
"******************************************************" << endl;