--— IMPORTANT:: these areopen cut values for best combifinding of pair BT deltaR/Theta values --— IMPORTANT:: then you do NOT necessarily get back your values which you put in durign --— IMPORTANT:: your shower reconstruction cone ( deltaR/Theta cutvalues could be NO cutvalues --— IMPORTANT:: for some reconstruction algorithms for example, but we wanna have these values anyway. In Any Case: Frederics Cut looks only for best min_shower_deltar so we do also.
1237 Log(3,
"EdbShowerP::BuildParametrisation_FJ()",
"EdbShowerP::BuildParametrisation_FJ()");
1268 Float_t min_shower_deltathetab=99999;
1269 Float_t min_shower_deltar=99999;
1270 Float_t extrapo_diffz=0;
1271 Float_t extrapol_x=0;
1272 Float_t extrapol_y=0;
1274 Float_t test_shower_deltathetab;
1275 Float_t test_shower_deltar;
1276 Float_t test_shower_deltax;
1277 Float_t test_shower_deltay;
1279 for (
int ii=0; ii<
N(); ii++) {
1291 for (
int ii=0; ii<
N(); ii++) {
1294 cout <<
"====== --- DOING " << ii << endl;
1311 min_shower_deltathetab=99999;
1312 min_shower_deltar=99999;
1314 for (
int jj=0; jj<
N(); jj++) {
1315 if (ii==jj)
continue;
1322 if (TMath::Abs(extrapo_diffz)>4*1300+1.0)
continue;
1326 if (TMath::Abs(extrapo_diffz)<1.0)
continue;
1332 test_shower_deltax=extrapol_x;
1333 test_shower_deltay=extrapol_y;
1334 test_shower_deltax=test_shower_deltax-
shower_xb[jj];
1335 test_shower_deltay=test_shower_deltay-
shower_yb[jj];
1336 test_shower_deltar=TMath::Sqrt(test_shower_deltax*test_shower_deltax+test_shower_deltay*test_shower_deltay);
1351 if (test_shower_deltar<1000 && test_shower_deltathetab<2.0 ) {
1360 if (test_shower_deltar<min_shower_deltar) {
1361 min_shower_deltathetab=test_shower_deltathetab;
1362 min_shower_deltar=test_shower_deltar;
1386 cout <<
"Shower: nentries= " <<
N() << endl;
1387 for (
int ii=0; ii<
N(); ii++) {
1396 TH1D* histo_nbtk_av;
1397 TH1D* histo_longprofile_av;
1398 TH1D* histo_transprofile_av;
1399 TH1D* histo_deltaR_mean;
1400 TH1D* histo_deltaT_mean;
1401 TH1D* histo_deltaR_rms;
1402 TH1D* histo_deltaT_rms;
1404 TH1D* histo_longprofile;
1405 TH1D* histo_transprofile;
1410 Int_t longprofile[57];
1433 histname=
"histo_nbtk_av"+TString(Form(
"_%d", 0));
1434 histo_nbtk_av =
new TH1D(histname,
"Average basetrack numbers",21,0.0,10.0);
1435 histname=
"histo_longprofile_av"+TString(Form(
"_%d", 0));
1436 histo_longprofile_av =
new TH1D(histname,
"Basetracks per emulsion number",57,0.0,57.0);
1437 histname=
"histo_transprofile_av"+TString(Form(
"_%d", 0));
1438 histo_transprofile_av =
new TH1D(histname,
"Basetracks in trans distance",8,0.0,800.0);
1439 histname=
"histo_deltaR_mean"+TString(Form(
"_%d", 0));
1440 histo_deltaR_mean =
new TH1D(histname,
"Mean #deltar of all BTs in one shower",100,0.0,100.0);
1441 histname=
"histo_deltaT_mean"+TString(Form(
"_%d", 0));
1442 histo_deltaT_mean =
new TH1D(histname,
"Mean #delta#theta of all BTs in one shower",100,0.0,0.1);
1443 histname=
"histo_deltaR_rms"+TString(Form(
"_%d", 0));
1444 histo_deltaR_rms =
new TH1D(histname,
"RMS #deltar of all BTs in one shower",100,0.0,100.0);
1445 histname=
"histo_deltaT_rms"+TString(Form(
"_%d", 0));
1446 histo_deltaT_rms =
new TH1D(histname,
"RMS #delta#theta of all BTs in one shower",100,0.0,0.1);
1448 histname=
"histo_nbtk"+TString(Form(
"_%d", 0));
1449 histo_nbtk =
new TH1D(histname,
"Basetracks in the shower",50,0.0,100.0);
1450 histname=
"histo_longprofile"+TString(Form(
"_%d", 0));
1451 histo_longprofile =
new TH1D(histname,
"Basetracks per emulsion number",57,0.0,57.0);
1452 histname=
"histo_deltaR"+TString(Form(
"_%d", 0));
1453 histo_deltaR =
new TH1D(histname,
"Single #deltar of all BTs in Shower",100,0.0,150.0);
1454 histname=
"histo_deltaT"+TString(Form(
"_%d", 0));
1455 histo_deltaT =
new TH1D(histname,
"Single #delta#theta of all BTs in Shower",150,0.0,0.15);
1456 histname=
"histo_transprofile"+TString(Form(
"_%d", 0));
1457 histo_transprofile =
new TH1D(histname,
"Basetracks in trans distance",8,0.0,800.0);
1459 histo_nbtk_av ->Reset();
1460 histo_nbtk ->Reset();
1461 histo_longprofile_av ->Reset();
1462 histo_deltaR_mean ->Reset();
1463 histo_deltaT_mean ->Reset();
1464 histo_deltaR_rms ->Reset();
1465 histo_deltaT_rms ->Reset();
1466 histo_longprofile ->Reset();
1467 histo_deltaR ->Reset();
1468 histo_deltaT ->Reset();
1470 for (
int id=0;
id<57;
id++) {
1479 if (
gEDBDEBUGLEVEL>3) cout <<
"histo_longprofile->GetBinWidth() " << histo_longprofile->GetBinWidth(1) << endl;
1480 if (
gEDBDEBUGLEVEL>3) cout <<
"histo_longprofile->GetBinCenter() " << histo_longprofile->GetBinCenter(1) << endl;
1481 if (
gEDBDEBUGLEVEL>3) cout <<
"histo_longprofile->GetNbinsX() " << histo_longprofile->GetNbinsX() << endl;
1485 for (Int_t j = 0; j<57; ++j) {
1486 Dr[j] = 0.03*j*1300. +20.0;
1492 for (Int_t ibtke = 0; ibtke <
N(); ibtke++) {
1504 cout <<
"ibtke= " <<ibtke <<
" xb[ibtke]= " << xb[ibtke] <<
" nfilmb[ibtke]= " << nfilmb[ibtke] << endl;
1510 for (Int_t ibtke = 0; ibtke <
N(); ibtke++) {
1513 dist = sqrt((xb[ibtke]-
X0[nfilmb[ibtke]-1])*(xb[ibtke]-
X0[nfilmb[ibtke]-1])+(yb[ibtke]-
Y0[nfilmb[ibtke]-1])*(yb[ibtke]-
Y0[nfilmb[ibtke]-1]));
1525 if (dist>Dr[nfilmb[ibtke]-1]) {
1527 cout <<
" WARNING , In old times this cut (dist>Dr[nfilmb[ibtke]-1]) (had also to be fulfilled!"<<endl;
1528 cout <<
" For this specific shower it seems not the case....." << endl;
1529 cout <<
" You might want to check this shower again manualy to make sure everything is correct....." << endl;
1534 Int_t binOfhisto_transprofile=-1;
1537 if (nfilmb[ibtke]<=nbfilm) {
1541 histo_longprofile ->Fill(nfilmb[ibtke]);
1542 histo_longprofile_av ->Fill(nfilmb[ibtke]);
1545 Double_t Dx=xb[ibtke]-(xb[0]+(zb[ibtke]-zb[0])*txb[0]);
1546 Double_t Dy=yb[ibtke]-(yb[0]+(zb[ibtke]-zb[0])*tyb[0]);
1547 DR=TMath::Sqrt(Dx*Dx+Dy*Dy);
1549 histo_transprofile_av->Fill(DR);
1550 binOfhisto_transprofile= histo_transprofile->Fill(DR);
1554 theta[nfilmb[ibtke]]+= (TX0-txb[ibtke])*(TX0-txb[ibtke])+(TY0-tyb[ibtke])*(TY0-tyb[ibtke]);
1555 if (ibtke>0&&nfilmb[ibtke]<=nbfilm) {
1570 histo_nbtk ->Fill(
sizeb);
1571 histo_nbtk_av ->Fill(
sizeb);
1573 histo_deltaR_mean ->Fill(histo_deltaR->GetMean());
1574 histo_deltaT_mean ->Fill(histo_deltaT->GetMean());
1575 histo_deltaR_rms ->Fill(histo_deltaR->GetRMS());
1576 histo_deltaT_rms ->Fill(histo_deltaT->GetRMS());
1580 for (Int_t i=1; i<=nbfilm; ++i) {
1582 longprofile[i-1] = histo_longprofile->GetBinContent(i+1);
1585 cout <<
"i= " << i <<
" longprofile[i-1] "<< longprofile[i-1] <<
" histo_longprofile->GetBinContent(i) " << histo_longprofile->GetBinContent(i)<< endl;
1593 Log(3,
"EdbShowerP::BuildParametrisation_AS()",
"EdbShowerP::BuildParametrisation_AS()");
1597 Float_t zorig=seg0->
Z();
1601 helperVertex->
SetXYZ(seg0->
X(),seg0->
Y(),seg0->
Z());
1604 Float_t TransDist,LongDist,TotalDist=0;
1606 Float_t LineStart[3];
1610 LineStart[0]=InBT->
X();
1611 LineStart[1]=InBT->
Y();
1612 LineStart[2]=InBT->
Z();
1615 LineEnd[0]=InBTProp->
X();
1616 LineEnd[1]=InBTProp->
Y();
1617 LineEnd[2]=InBTProp->
Z();
1622 Double_t edRLong[50];
1623 Double_t edRTrans[50];
1624 Double_t edeltarb[50];
1625 Double_t edeltathetab[50];
1627 Int_t Nmax=TMath::Min(
N(),50);
1628 for (
int i=0; i<50; ++i) {
1639 for (Int_t j=1; j<Nmax; ++j) {
1650 Point[0]=TestBT->
X();
1651 Point[1]=TestBT->
Y();
1652 Point[2]=TestBT->
Z();
1654 TotalDist+=(Point[0]-LineStart[0])*(Point[0]-LineStart[0]);
1655 TotalDist+=(Point[1]-LineStart[1])*(Point[1]-LineStart[1]);
1656 TotalDist+=(Point[2]-LineStart[2])*(Point[2]-LineStart[2]);
1657 TotalDist=sqrt(TotalDist);
1658 LongDist=sqrt(TotalDist*TotalDist-TransDist*TransDist);
1662 edIP[j]=
CalcIP(seg,helperVertex);
1664 edRLong[j]=LongDist;
1665 edRTrans[j]=TransDist;
1683 delete helperVertex;
1685 Log(3,
"EdbShowerP::BuildParametrisation_AS()",
"EdbShowerP::BuildParametrisation_AS() ...done.");
1713 for (
int ii=0; ii<8; ii++) {
1734 delete histo_nbtk_av;
1735 delete histo_longprofile_av;
1736 delete histo_transprofile_av;
1737 delete histo_deltaR_mean;
1738 delete histo_deltaT_mean;
1739 delete histo_deltaR_rms;
1740 delete histo_deltaT_rms;
1742 delete histo_longprofile;
1743 delete histo_transprofile;
1744 delete histo_deltaR;
1745 delete histo_deltaT;
1751 Log(3,
"EdbShowerP::BuildParametrisation_FJ()",
"EdbShowerP::BuildParametrisation_FJ() ...done.");
1752 Log(3,
"EdbShowerP::BuildParametrisation_LT()",
"EdbShowerP::BuildParametrisation_LT() ...done.");
1753 Log(3,
"EdbShowerP::BuildParametrisation_AS()",
"EdbShowerP::BuildParametrisation_AS() ...done.");
Float_t shower_yb[5000]
Definition: ShowRec.h:374
Float_t shower_tyb[5000]
Definition: ShowRec.h:377
Float_t shower_deltathetab[5000]
Definition: ShowRec.h:379
Float_t shower_zb[5000]
Definition: ShowRec.h:375
Float_t shower_deltarb[5000]
Definition: ShowRec.h:378
Float_t shower_xb[5000]
Definition: ShowRec.h:373
Float_t shower_txb[5000]
Definition: ShowRec.h:376
int sizeb
Definition: check_shower.C:38
static double DistancePointLine3(float Point[3], float LineStart[3], float LineEnd[3], bool inside)
Definition: EdbMath.cxx:61
void PropagateTo(float z)
Definition: EdbSegP.cxx:292
void PrintNice() const
Definition: EdbSegP.cxx:418
Float_t eShowerAxisAngle
Definition: EdbShowerP.h:93
Para_FJ ePara_FJ
Definition: EdbShowerP.h:349
Double_t GetdMin(EdbSegP *seg1, EdbSegP *seg2)
Definition: EdbShowerP.cxx:2719
Double_t CalcIP(EdbSegP *, EdbVertex *)
Definition: EdbShowerP.cxx:2761
Para_AS ePara_AS
Definition: EdbShowerP.h:356
Para_JC ePara_JC
Definition: EdbShowerP.h:352
Para_LT ePara_LT
Definition: EdbShowerP.h:350
Definition: EdbVertex.h:68
void SetXYZ(float x, float y, float z)
Definition: EdbVertex.h:157
float X0
Definition: emthickness.cpp:69
float Y0
Definition: emthickness.cpp:70
UInt_t id
Definition: tlg2pattern.C:118
Double_t edeltarb[50]
Definition: EdbShowerP.h:243
Int_t nseg
Definition: EdbShowerP.h:238
Double_t edeltathetab[50]
Definition: EdbShowerP.h:244
Double_t edIP[50]
Definition: EdbShowerP.h:239
Double_t edMin[50]
Definition: EdbShowerP.h:240
Double_t edRTrans[50]
Definition: EdbShowerP.h:242
Double_t edRLong[50]
Definition: EdbShowerP.h:241
Float_t BT_deltaT_rms
Definition: EdbShowerP.h:150
Int_t nseg
Definition: EdbShowerP.h:146
Float_t BT_deltaR_rms
Definition: EdbShowerP.h:148
Float_t BT_deltaR_mean
Definition: EdbShowerP.h:147
Int_t longprofile[57]
Definition: EdbShowerP.h:151
Float_t ShowerAxisAngle
Definition: EdbShowerP.h:145
Float_t BT_deltaT_mean
Definition: EdbShowerP.h:149
Int_t nseg
Definition: EdbShowerP.h:184
Float_t BT_deltaT_mean
Definition: EdbShowerP.h:194
Int_t longprofile[57]
Definition: EdbShowerP.h:196
Float_t BT_deltaT_rms
Definition: EdbShowerP.h:195
Float_t BT_deltaR_rms
Definition: EdbShowerP.h:193
Float_t ShowerAxisAngle
Definition: EdbShowerP.h:183
Float_t BT_deltaR_mean
Definition: EdbShowerP.h:192
Float_t BT_deltaR_rms
Definition: EdbShowerP.h:161
Int_t longprofile[57]
Definition: EdbShowerP.h:165
Float_t BT_deltaR_mean
Definition: EdbShowerP.h:160
Int_t nseg
Definition: EdbShowerP.h:159
Float_t ShowerAxisAngle
Definition: EdbShowerP.h:158
Float_t BT_deltaT_rms
Definition: EdbShowerP.h:163
Int_t transprofile[8]
Definition: EdbShowerP.h:164
Float_t BT_deltaT_mean
Definition: EdbShowerP.h:162