48 #include "hmatrixcategory.h"
49 #include "hlinearcategory.h"
72 Float_t
HMdcDeDx2::MaxMdcMinDist[4] = {4.,4.,8.,9.};
77 const Char_t* context)
91 for(Int_t i = 0; i < 4; i ++){
98 memset(&
pargaincorr[0][0][0][0],0,
sizeof(Double_t) * 6 * 4 * 6 * 220);
115 cout<<
"HMdcDeDx2:"<<endl;
116 if(opt.CompareTo(
"par") == 0 || opt.CompareTo(
"all") == 0)
120 for(Int_t s = 0; s < 6; s ++){
121 for(Int_t m = 0; m < 4; m ++){
122 for(Int_t a = 0; a <
N_ANGLE; a ++){
123 for(Int_t d = 0; d <
N_DIST; d ++){
124 printf(
"s %i m %i angle %2i dist %2i %1.15e %1.15e %1.15e %1.15e\n",
126 par[s][m][a][d][0],
par[s][m][a][d][1],
par[s][m][a][d][2],
par[s][m][a][d][3]);
132 if(opt.CompareTo(
"parMax") == 0 || opt.CompareTo(
"all") == 0)
134 cout<<
"parMax:"<<endl;
136 for(Int_t s = 0; s < 6; s ++){
137 for(Int_t m = 0; m < 4; m ++){
138 for(Int_t a = 0; a <
N_ANGLE; a ++){
139 for(Int_t d = 0; d <
N_DIST; d ++){
140 printf(
"s %i m %i angle %2i dist %2i %7.3f\n",
148 if(opt.CompareTo(
"shiftpar") == 0 || opt.CompareTo(
"all") == 0)
150 cout<<
"shift par:"<<endl;
151 for(Int_t s = 0; s < 6; s ++){
152 for(Int_t m = 0; m < 4; m ++){
153 for(Int_t a = 0; a <
N_ANGLE; a ++){
154 for(Int_t d = 0; d <
N_DIST; d ++){
155 printf(
"s %i m %i angle %2i dist %2i %1.15e %1.15e\n",
164 if(opt.CompareTo(
"pargaincorr") == 0 || opt.CompareTo(
"all") == 0)
166 cout<<
"pargaincorr:"<<endl;
168 for(Int_t s = 0; s < 6; s ++){
169 for(Int_t m = 0; m < 4; m ++){
170 for(Int_t l = 0; l < 6; l ++){
171 for(Int_t c = 0; c < 220; c ++){
172 printf(
"s %i m %i l %i c %i %7.3f\n",
181 if(opt.CompareTo(
"parmindistcut") == 0 || opt.CompareTo(
"all") == 0)
183 cout<<
"parmindistcut:"<<endl;
185 for(Int_t m = 0; m < 4; m ++){
186 printf(
"m %i %7.3f\n",
192 cout<<
"window:"<<endl;
193 printf(
"window %7.3f \n",
window);
195 printf(
"hefr %7.3f \n",
hefr);
208 for(Int_t s = 0; s < 6; s ++){
209 for(Int_t m = 0; m < 4; m ++){
210 for(Int_t a = 0; a <
N_ANGLE; a ++){
211 for(Int_t d = 0; d <
N_DIST; d ++){
212 Double_t* p = &
par[s][m][a][d][0];
215 dEdX = TMath::Power(10.,(TMath::Power((ToT - p[0]) / p[1],(1. / p[2])))) - p[3];
216 while(TMath::Finite(dEdX))
219 dEdX = TMath::Power(10.,(TMath::Power((ToT - p[0]) / p[1],(1. / p[2])))) - p[3];
220 if(!TMath::Finite(dEdX)) {
221 parMax[s][m][a][d] = ToT - 1;
231 <<
" ToTmax " <<
parMax[s][m][a][d]
247 if(!
catcal) { Error(
"initContainer()",
"HMdcCal1 Category not found in current Event!");}
250 if(!
cathit) { Error(
"initContainer()",
"HMdcHit Category not found in current Event!");}
253 if(!
catclusinf) { Error(
"initContainer()",
"HMdcClusInf Category not found in current Event!");}
256 if(!
catclus) { Error(
"initContainer()",
"HMdcClus Category not found in current Event!");}
261 Error(
"init()",
"NO HMDCSIZESCELLS CONTAINER IN INPUT!");
288 if (!l)
return kFALSE;
293 if (!( l->
fill(
"pargaincorr" ,&
pargaincorr[0][0][0][0],6 * 4 * 6 * 220 )))
return kFALSE;
296 if (!( l->
fill(
"window" ,&
window )))
return kFALSE;
297 if (!( l->
fill(
"hefr" ,&
hefr )))
return kFALSE;
309 register Int_t a,b,c;
313 for(a = 0; a < nhit - 1; ++ a)
319 for(b = a + 1; b < nhit; ++ b)
336 Float_t* meanold,Float_t* sigmaold,UChar_t* nwire,
337 Float_t* sigmanew,UChar_t* nwiretrunc,
338 Int_t vers,Int_t mod,
340 Float_t truncMeanWindow,
372 Float_t sigma = -99.;
374 UChar_t nWireTrunc = 0;
379 Error(
"HMdcDeDx2::calcDeDx()",
"Container HMdcDeDx2 has not been initialized!");
383 if(vers >= 0 && vers <= 2)
method = vers;
387 Error(
"HMdcDeDx2::calcDeDx()",
"ZERO POINTER FOR inner HMdcSeg RECEIVED!");
390 if(seg[1] == 0 && (
method == 1))
395 if(mod >= 0 && mod < 3)
401 Warning(
"calcDeDx()",
"Unknown module type! Will use both modules of Segment!");
411 cout<<
"calcDeDx() from fillingInput(): "
412 <<
"nw " <<((Int_t)nWire)
417 if(nWire == 0)
return mean;
421 if(nWire > 0) mean = TMath::Mean(nWire,
measurements.GetArray(), NULL);
431 nWireTrunc =
select(mean,sigma,nWire,truncMeanWindow);
436 *nwiretrunc = nWireTrunc;
438 dedx = TMath::Mean(nWireTrunc,
measurements.GetArray(), NULL);
444 Warning(
"calcDeDx()",
"nWire <=1 : skipped %i and %i with t2<=-998 !",
456 if(
debug){cout<<
"calcDeDx() : dEdX>1000 -->"<<dedx<<endl;}
475 Double_t alpha,mindist;
476 Double_t x1,y1,z1,x2,y2,z2;
480 if(!
catcal )
return nWire;
482 if(inputselect == 1 &&
491 if (
method == 0) {low = 0;up = 1;}
492 else if(
method == 1) {low = 1;up = 2;}
493 else if(
method == 2) {low = 0;up = 2;}
495 for(Int_t io = low; io < up; io ++)
497 if(seg[io] == 0)
continue;
504 for(Int_t ihit = 0; ihit < 2; ihit ++)
514 Error(
"fillingInput()",
"Zero pointer for HMdcClus object retrieved!");
518 else Error(
"fillingInput()",
"Zero pointer for HMdcClusInd object retrieved!");
528 for(Int_t l = 0; l < 12; l ++)
530 if(
module == 0 && l > 5)
continue;
531 if(
module == 1 && l < 6)
continue;
535 if(inputselect == 1){nCell = clus[io]->
getNCells(l);}
541 for(Int_t i = 0; i < nCell; i ++)
545 }
else if(ioseg == 1){
563 if(t2 != -998 && t2 != -999 &&
564 t1 != -998 && t1 != -999 &&
579 if(
debug) Warning(
"fillingInput()",
"Number of wires in Segment=%i > MAX_WIRES = %i! Skipped!",nWire,
MAX_WIRES);
582 if(loccal[1] == 0 || loccal[1] == 2)
ctskipmod0 ++;
583 if(loccal[1] == 1 || loccal[1] == 3)
ctskipmod1 ++;}
585 Warning(
"calcDeDx()",
"ZERO pointer recieved for cal1 object!");
600 UChar_t nWTrunc = nWire;
606 if(
debug){cout<<
"select : skipp because nWT<minW "<<endl;}
613 if(wind > 0) tempWindow = wind;
619 cout<<
"---------------------------------------------------"<<endl;
620 cout<<
"measurements before truncation :"<<endl;
621 for(Int_t i = 0; i < nWire; i ++){
626 Bool_t fail_high = kFALSE;
627 Bool_t fail_low = kFALSE;
629 while(nWTrunc > minW &&
634 if(!fail_high && fabs(
measurements[count] - mean) > (tempWindow * sigma))
638 }
else fail_high = kTRUE;
645 if(!fail_low && fabs(
measurements[nWire - 1 - count] - mean) > (tempWindow * sigma))
650 else fail_low = kTRUE;
651 }
else fail_low = kTRUE;
654 if(fail_low && fail_high)
break;
659 cout<<
"---------------------------------------------------"<<endl;
660 cout<<
"measurements after truncation :"<<endl;
661 for(Int_t i = 0; i < nWTrunc; i ++){
665 <<
" window " <<tempWindow
667 <<
" meanN " <<TMath::Mean(nWTrunc,
measurements.GetArray())
669 <<
" sigN " <<TMath::RMS(nWTrunc,
measurements.GetArray())
670 <<
" w " <<((Int_t)nWire)
671 <<
" trunc w "<<((Int_t)nWTrunc)
684 dbin >= 0 && dbin <
N_DIST &&
687 for(Int_t i = 0; i < size; i ++)
par[s][m][abin][dbin][i] = p[i];
688 }
else Error(
"SetFuncPar(...)",
"array indices out of range!");
694 for(Int_t s = 0; s < 6;s ++) {
695 for(Int_t m = 0; m < 4; m ++) {
696 for(Int_t a = 0; a <
N_ANGLE; a ++) {
697 for(Int_t d = 0; d <
N_DIST; d ++) {
698 for(Int_t i = 0; i <
N_PARAM; i ++) {
700 Int_t maxS = 4 * N_ANGLE * N_DIST *
N_PARAM;
701 Int_t maxM = N_ANGLE * N_DIST *
N_PARAM;
704 par[s][m][a][d][i] = p[s * maxS + m * maxM + a * maxA + d * N_PARAM + i];
715 for(Int_t s = 0;s < 6; s ++) {
716 for(Int_t m = 0; m < 4; m ++) {
717 for(Int_t a = 0; a <
N_ANGLE; a ++) {
718 for(Int_t d = 0; d <
N_DIST; d ++) {
719 for(Int_t i = 0; i <
N_PARAM; i ++) {
721 Int_t maxS = 4 * N_ANGLE * N_DIST *
N_PARAM;
722 Int_t maxM = N_ANGLE * N_DIST *
N_PARAM;
725 p[s * maxS + m * maxM + a * maxA + d * N_PARAM + i] =
par[s][m][a][d][i];
735 if(abin >= 0 && abin <
N_ANGLE &&
736 dbin >= 0 && dbin <
N_DIST &&
739 parMax[s][m][abin][dbin] = p;
740 }
else Error(
"SetFuncPar(...)",
"array indices out of range!");
746 for(Int_t s = 0; s < 6; s ++) {
747 for(Int_t m = 0; m < 4; m ++) {
748 for(Int_t a = 0; a <
N_ANGLE; a ++) {
749 for(Int_t d = 0; d <
N_DIST;d ++) {
750 Int_t maxS = 4 * N_ANGLE *
N_DIST;
751 Int_t maxM = N_ANGLE *
N_DIST;
754 parMax[s][m][a][d] = p[s * maxS + m * maxM + a * maxA + d];
764 for(Int_t s = 0; s < 6; s ++) {
765 for(Int_t m = 0; m < 4; m ++) {
766 for(Int_t a = 0; a <
N_ANGLE; a ++) {
767 for(Int_t d = 0; d <
N_DIST; d ++) {
768 Int_t maxS = 4 * N_ANGLE *
N_DIST;
769 Int_t maxM = N_ANGLE *
N_DIST;
772 p[s * maxS + m * maxM + a * maxA + d] =
parMax[s][m][a][d];
786 dbin >= 0 && dbin <
N_DIST &&
789 for(Int_t i = 0; i < size; i ++)
shiftpar[s][m][abin][dbin][i] = p[i];
790 }
else Error(
"SetFuncPar(...)",
"array indices out of range!");
796 for(Int_t s = 0;s < 6; s ++) {
797 for(Int_t m = 0; m < 4; m ++) {
798 for(Int_t a = 0; a <
N_ANGLE; a ++) {
799 for(Int_t d = 0; d <
N_DIST; d ++) {
806 shiftpar[s][m][a][d][i] = p[s * maxS + m * maxM + a * maxA + d * N_SHIFT_PARAM + i];
817 for(Int_t s = 0; s < 6; s ++) {
818 for(Int_t m = 0; m < 4; m ++) {
819 for(Int_t a = 0; a <
N_ANGLE; a ++) {
820 for(Int_t d = 0; d <
N_DIST; d ++) {
827 p[s * maxS + m * maxM + a * maxA + d * N_SHIFT_PARAM + i] =
shiftpar[s][m][a][d][i];
838 if(c >= 0 && c < 220 &&
843 }
else Error(
"SetGainPar(...)",
"array indices out of range!");
849 for(Int_t s = 0; s < 6; s ++) {
850 for(Int_t m = 0; m < 4; m ++) {
851 for(Int_t l = 0; l < 6; l ++) {
852 for(Int_t c = 0; c < 220;c ++) {
853 Int_t maxS = 4 * 6 * 220;
854 Int_t maxM = 6 * 220;
857 pargaincorr[s][m][l][c] = p[s * maxS + m * maxM + l * maxL + c];
867 for(Int_t s = 0; s < 6; s ++) {
868 for(Int_t m = 0; m < 4; m ++) {
869 for(Int_t l = 0; l < 6; l ++) {
870 for(Int_t c = 0; c < 220;c ++) {
871 Int_t maxS = 4 * 6 * 220;
872 Int_t maxM = 6 * 220;
875 p[s * maxS + m * maxM + l * maxL + c] =
pargaincorr[s][m][l][c];
887 }
else Error(
"SetMinDistCutPar(...)",
"array indices out of range!");
893 for(Int_t m = 0; m < 4; m ++) {
902 for(Int_t m = 0; m < 4; m ++) {
915 Double_t yU,xU,yL,xL;
916 Double_t alphaRad,tanAlpha,b;
920 Double_t cX[4] = {2.5,3.0,6.0,7.0};
921 Double_t cY[4] = {2.5,2.5,4.0,5.0};
922 for(Int_t i=0;i<4;i++){
927 alphaRad = angle * TMath::DegToRad();
928 b = dist / cos(alphaRad);
929 tanAlpha = tan(alphaRad);
931 xU = (cellY[m] - b) / tanAlpha;
935 yU = tanAlpha * cellX[m] + b;
939 xL = (-cellY[m] - b) / tanAlpha;
940 if(xL >= -cellX[m]) {
943 yL = tanAlpha * -cellX[m] + b;
947 maxLength = sqrt( (xU - xL) * (xU - xL) + (yU - yL) * (yU - yL) );
953 maxLength = 2 * cellX[m];
966 Double_t z = seg->
getZ();
967 Double_t r = seg->
getR();
968 Double_t pi2 = acos(-1.)/2.;
970 Double_t X = r * cos(phi + pi2);
971 Double_t Y = r * sin(phi + pi2);
977 x2 = X + cos(phi) * sin(teta);
978 y2 = Y + sin(phi) * sin(teta);
986 Double_t d =* mindist;
992 (*abin) = (Int_t)((90. - a) /
AngleStep);
995 if((*abin) == 18) (*abin) = 17;
1010 findBin(m,&angle,&mindist,&abin,&dbin);
1015 if (shift < 0)
return (
shiftpar[s][m][abin][dbin][0] / 1.1775);
1016 else if (shift > 0)
return (
shiftpar[s][m][abin][dbin][1] / 1.1775);
1027 findBin(m,&angle,&mindist,&abin,&dbin);
1029 Double_t* p= &
par[s][m][abin][dbin][0];
1032 Double_t ToTgaincorr = ToT;
1033 Double_t ToTcorr = ToT;
1035 if(l > -1 && c > -1){
1038 ToTcorr = ToTgaincorr/
calcLength(m,angle,mindist);
1041 if(ToTcorr >
parMax[s][m][abin][dbin]) ToTcorr =
parMax[s][m][abin][dbin];
1043 Double_t dEdX = TMath::Power(10.,(TMath::Power((ToTcorr - p[0]) / p[1],(1. / p[2])))) - p[3];
1044 if(!TMath::Finite(dEdX)){
1045 Warning(
"totTodEdX()",
"dEdX out of range: s %i m %i abin %i dbin %i ToT %1.15e dEdX %1.15e !",s,m,abin,dbin,ToTcorr,dEdX);
1057 findBin(m,&angle,&mindist,&abin,&dbin);
1059 Double_t* p = &
par[s][m][abin][dbin][0];
1061 Double_t ToT = p[0] + p[1] * TMath::Power((TMath::Log10(dEdX + p[3])),p[2]);
1062 Double_t ToTcorr = ToT;
1064 if(l > -1 && c > -1){
1069 if(!TMath::Finite(ToTcorr)){
1070 Warning(
"dEdXToToT()",
"ToT out of range: s %i m %i abin %i dbin %i ToT %1.15e dEdX %1.15e !",s,m,abin,dbin,ToTcorr,dEdX);
1080 if(ToT < 0)
return ToT;
1081 Double_t dEdX =
toTTodEdX(s,m,l,c,angle,mindist,ToT);
1093 if(mass == 0)
return -1;
1094 return sqrt(1. / (((mass*mass)/(p*p)) + 1.));
1105 if(opt<-2||opt>2||opt==0){
1106 ::Error(
"betaGraph()",
"Unknown Option opt=%i!. Use default opt=1",opt);
1111 Double_t pmax = 100000.;
1115 Double_t xarray[np];
1116 Double_t yarray[np];
1119 for(Int_t i = 1; i <= np; i ++)
1121 ptot = pmin * pow((pmax / pmin),(i - 1) / (Double_t)(np - 1.));
1122 xarray[i - 1] = (opt == -1 || opt == -2)? -ptot : ptot;
1128 if(opt==1||opt==-1)g =
new TGraph(np,xarray,yarray);
1129 else g =
new TGraph(np,yarray,xarray);
1131 g->SetMarkerStyle(markerstyle);
1132 g->SetMarkerSize (markersize);
1133 g->SetMarkerColor(markercolor);
1141 if(mass == 0)
return -1;
1142 Double_t beta2 = 1. / (((mass*mass)/(p*p)) + 1.);
1143 return sqrt(1./ (1 - beta2));
1154 if(p == 0)
return -1;
1155 if(hefr < 0. || hefr > 1.)
return -1;
1157 if(mass == 0)
return -1;
1160 if (mass < 150 && p < 5 ) p = 5 ;
1161 else if (mass >= 150 && mass < 1000 && p < 20) p = 20;
1162 else if (mass >= 1000 && mass < 2000 && p < 35) p = 35;
1163 else if (mass >= 2000 && p < 55) p = 55;
1166 Double_t Z_gas = 2. * hefr + (1. -
hefr) * 34.;
1167 Double_t A_gas = 4. * hefr + (1. -
hefr) * 58.;
1169 Double_t I_0_gas = 24.6 * hefr + (1. -
hefr) * 10.8;
1170 Double_t I2 = pow(I_0_gas * Z_gas * (1.e-6),2);
1174 Double_t K = 0.307075;
1175 Double_t mass2 = pow(mass,2);
1178 Double_t
p2 = pow(p,2);
1179 Double_t beta2 = 1. / ((mass2/
p2) + 1.);
1180 Double_t gamma2 = 1./ (1 - beta2);
1181 Double_t
gamma = sqrt(gamma2);
1183 Double_t Tmax = (2. * m_ec2 * beta2 * gamma2) / (1. + 2.* gamma * (m_ec2 / mass) + pow((m_ec2 / mass),2));
1184 Double_t term1 = K * z2 * (Z_gas / A_gas) * (1. / beta2);
1185 Double_t term2 = ((2. * m_ec2 * beta2 * gamma2 * Tmax) / I2);
1186 Double_t dedx = term1 * (0.5 * log(term2) - beta2);
1200 Double_t pmax = 100000.;
1204 Double_t xarray[np];
1205 Double_t yarray[np];
1211 if(opt.CompareTo(
"p" ) == 0) vers = 0;
1212 else if(opt.CompareTo(
"beta" ) == 0) vers = 1;
1213 else if(opt.CompareTo(
"1/beta2" ) == 0) vers = 2;
1214 else if(opt.CompareTo(
"betagamma") == 0) vers = 3;
1215 else {cout<<
"HMdcDedx::calcDeDxGraph():unknow option!"<<endl;}
1217 for(Int_t i = 1; i <= np; i ++)
1219 ptot = pmin * pow((pmax / pmin),(i - 1) / (Double_t)(np - 1.));
1220 if(vers == 0){xarray[i - 1] =
ptot;}
1221 if(vers == 1){xarray[i - 1] = sqrt(1. / ((pow(mass,2) / pow(ptot,2)) + 1.));}
1222 if(vers == 2){xarray[i-1] = ((pow(mass,2) / pow(ptot,2)) + 1.);}
1223 if(vers == 3){xarray[i-1] = (ptot / mass);}
1229 if(!exchange)g =
new TGraph(np,xarray,yarray);
1230 else g =
new TGraph(np,yarray,xarray);
1232 g->SetMarkerStyle(markerstyle);
1233 g->SetMarkerSize (markersize);
1234 g->SetMarkerColor(markercolor);
1240 Float_t t1, Float_t t2, Float_t* t2err,
1241 Int_t s,Int_t m,Int_t l,Int_t c,
1242 Double_t alpha,Double_t mindist)
1258 Error(
"caledTimeAboveThreshold()",
"retrieved ZERO pointer for kine object!");
1262 Error(
"caledTimeAboveThreshold()",
"momentum = %5.3f is wrong!",p);
1266 Error(
"caledTimeAboveThreshold()",
"t1 = %5.3f is wrong!",t1);
1270 Error(
"caledTimeAboveThreshold()",
"t2 = %5.3f is wrong!",t1);
1277 Int_t pTr = -1,pID = 0;
1289 if(charge == 0 || mass == 0)
1291 Warning(
"HMdcDeDx2::scaledEnergyLoss()",
"id %i %s mass %7.5f charge %i p %7.5f skipped!"
1302 if(!TMath::Finite(dedx)){
1303 Error(
"scaledTimeAboveThreshold()",
"dedx either NaN or Inf!");
1311 Double_t ToTmean =
dEdXToToT(s,m,l,c,alpha,mindist,dedx);
1313 if(!TMath::Finite(ToTmean) || dedx < 0){
1314 Error(
"caledTimeAboveThreshold()",
"ToT either NaN or Inf!");
1318 <<
" dist " <<mindist
1322 <<
" charge "<<charge
1339 Double_t length =
calcLength(m,alpha,mindist);
1340 Double_t sigL =
toTSigma (s,m,alpha,mindist,-1)*length;
1341 Double_t sigR =
toTSigma (s,m,alpha,mindist, 1)*length;
1344 if(gRandom->Rndm() > 0.5){
1345 smear = TMath::Abs(gRandom->Gaus(0., sigR));
1347 smear = -TMath::Abs(gRandom->Gaus(0., sigL));
1349 if(t2err) * t2err = smear;
1359 t2 = t1 + gRandom->Rndm() * 20.;
1362 cout<<
"scaledEnergyLoss() "
1369 <<
" charge "<<charge
void sort(Int_t)
kTRUE print infos of trun mean
Int_t getNCells(Int_t lay, Int_t layEnd=-1) const
Int_t method
flag after init
static Int_t charge(const Int_t id)
Double_t calcLength(Int_t m, Double_t angle, Double_t dist)
Int_t getIOSeg(void) const
Double_t getFuncMaxPar(Int_t s, Int_t m, Int_t abin, Int_t dbin)
Double_t par[6][4][N_ANGLE][N_DIST][N_PARAM]
Bool_t isInitialized
location object of cal1
static TGraph * energyLossGraph(Int_t id, Double_t hefr=0.6, TString opt="p", Bool_t exchange=kFALSE, Int_t markerstyle=8, Int_t markercolor=2, Float_t markersize=0.7)
HCategory * catclusinf
pointer to mdc hit
static Double_t energyLoss(Int_t id, Double_t p, Double_t hefr=0.6)
Double_t parmindistcut[4]
void setMinDistCutPar(Int_t m, Double_t p)
Double_t getMinDistCutPar(Int_t m, Double_t p)
Float_t getTime2(void) const
void calcSegPoints(HMdcSeg *, Double_t &, Double_t &, Double_t &, Double_t &, Double_t &, Double_t &)
HEvent *& getCurrentEvent(void)
static Double_t gamma(Int_t id, Double_t p)
TGraph p2(xdim, pgrid, respme)
HMdcDeDx2(const Char_t *name="MdcDeDx2", const Char_t *title="Mdc lookup for MDC dEdX calculation", const Char_t *context="MdcDeDx2Production")
Double_t parMax[6][4][N_ANGLE][N_DIST]
Float_t getTheta(void) const
Double_t pargaincorr[6][4][6][220]
static HMdcSizesCells * getExObject(void)
void putParams(HParamList *)
Int_t getHitInd(Int_t i) const
void getParticle(Int_t &aTrack, Int_t &aID)
void setFuncPar(Int_t s, Int_t m, Int_t abin, Int_t dbin, Double_t *p, Int_t size)
void resetInputVersions()
ClassImp(HMdcDeDx2) Float_t HMdcDeDx2
const Cat_t catMdcClusInf
Bool_t getParams(HParamList *)
UChar_t select(Float_t, Float_t, UChar_t, Float_t wind=-99.)
TArrayD measurements
method switch for filling input for module 1/2 of segment
Float_t getPhi(void) const
static TGraph * betaGraph(Int_t id, Int_t opt=1, Int_t markerstyle=8, Int_t markercolor=2, Float_t markersize=0.7)
Int_t ctskipmod1
counter for wires skipped with t2<=-998 in mod0 of seg
Bool_t useCalibration
array of measurements
Bool_t changed
static flag
Double_t getFuncGainPar(Int_t s, Int_t m, Int_t l, Int_t c)
static Float_t mass(const Int_t id)
Double_t toTSigma(Int_t s, Int_t m, Double_t angle, Double_t mindist, Int_t shift=0)
Int_t getCell(Int_t layer, Int_t idx)
Double_t * getFuncWidthPar(Int_t s, Int_t m, Int_t abin, Int_t dbin)
void setFuncMaxPar(Int_t s, Int_t m, Int_t abin, Int_t dbin, Double_t val)
Double_t normalize(Int_t s, Int_t m, Int_t l, Int_t c, Double_t angle, Double_t mindist, Double_t ToT)
UChar_t fillingInput(HMdcSeg *seg[2], Int_t inputselect=0)
Int_t getCell(Int_t lay, Int_t idx) const
static Double_t beta(Int_t id, Double_t p)
HLocation loccal
pointer to mdc clusinf
HCategory * cathit
pointer to mdc cal1
Bool_t status
versions of container in the 2 possible inputs
HMdcSizesCells * sizescells
Bool_t createMaxPar(Bool_t print=kFALSE)
Double_t scaledTimeAboveThreshold(HGeantKine *kine=0, Double_t p=-1, Float_t t1=-999, Float_t t2=-999, Float_t *t2err=0, Int_t s=0, Int_t m=0, Int_t l=0, Int_t c=0, Double_t alpha=0, Double_t mindist=0)
Double_t shiftpar[6][4][N_ANGLE][N_DIST][N_SHIFT_PARAM]
void setFuncWidthPar(Int_t s, Int_t m, Int_t abin, Int_t dbin, Double_t *p, Int_t size)
Double_t dEdXToToT(Int_t s, Int_t m, Int_t l, Int_t c, Double_t angle, Double_t mindist, Double_t dEdX)
static Bool_t debug
counter for wires skipped with t2<=-998 in mod1 of seg
void printParam(TString opt="all")
Double_t * getFuncPar(Int_t s, Int_t m, Int_t abin, Int_t dbin)
Short_t getClusIndex(void)
Int_t getNCells(Int_t layer)
void setWindow(Float_t win)
Float_t calcDeDx(HMdcSeg *seg[2], Float_t *, Float_t *, UChar_t *, Float_t *, UChar_t *, Int_t vers=2, Int_t mod=2, Bool_t useTruncMean=kTRUE, Float_t truncMeanWindow=-99., Int_t inputselect=0)
Int_t module
method switch for filling input
static Int_t pid(const Char_t *pidName)
Bool_t fill(const Text_t *, Text_t *, const Int_t)
void setFuncGainPar(Int_t s, Int_t m, Int_t l, Int_t c, Double_t p)
Double_t toTTodEdX(Int_t s, Int_t m, Int_t l, Int_t c, Double_t angle, Double_t mindist, Double_t ToT)
static Float_t MaxMdcMinDist[4]
Int_t ctskipmod0
use/don't use normalization table
void findBin(Int_t m, Double_t *angle, Double_t *mindist, Int_t *abin, Int_t *dbin)
HCategory * catcal
pointer to HMdcSizesCells container
HCategory * catclus
pointer to mdc clusinf
Float_t getTime1(void) const