--— 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.
1236{
1237 Log(3,
"EdbShowerP::BuildParametrisation_FJ()",
"EdbShowerP::BuildParametrisation_FJ()");
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1260
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;
1273
1274 Float_t test_shower_deltathetab;
1275 Float_t test_shower_deltar;
1276 Float_t test_shower_deltax;
1277 Float_t test_shower_deltay;
1278
1279 for (
int ii=0; ii<
N(); ii++) {
1288 }
1289
1290
1291 for (
int ii=0; ii<
N(); ii++) {
1294 cout << "====== --- DOING " << ii << endl;
1296 }
1297
1298
1299 if (ii==0) {
1302 }
1303
1304 if (ii>0) {
1305
1306
1307
1308
1309
1310
1311 min_shower_deltathetab=99999;
1312 min_shower_deltar=99999;
1313
1314 for (
int jj=0; jj<
N(); jj++) {
1315 if (ii==jj) continue;
1316
1317
1318
1320
1322 if (TMath::Abs(extrapo_diffz)>4*1300+1.0) continue;
1323
1324
1325
1326 if (TMath::Abs(extrapo_diffz)<1.0) continue;
1327
1330
1331
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);
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1348
1349
1350
1351 if (test_shower_deltar<1000 && test_shower_deltathetab<2.0 ) {
1352
1353
1360 if (test_shower_deltar<min_shower_deltar) {
1361 min_shower_deltathetab=test_shower_deltathetab;
1362 min_shower_deltar=test_shower_deltar;
1365 }
1366 }
1367 }
1368 }
1369
1370
1371 }
1372
1373
1374
1375
1377
1378
1379
1380
1381
1382 }
1383
1384
1386 cout <<
"Shower: nentries= " <<
N() << endl;
1387 for (
int ii=0; ii<
N(); ii++) {
1389 }
1390 }
1391
1392
1393
1394
1395 TString histname;
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;
1403 TH1D* histo_nbtk;
1404 TH1D* histo_longprofile;
1405 TH1D* histo_transprofile;
1406 TH1D* histo_deltaR;
1407 TH1D* histo_deltaT;
1408
1409
1410 Int_t longprofile[57];
1411
1412
1414
1415
1416 Float_t Dr[57];
1418 Float_t Y0[57];
1419 Float_t TX0,TY0;
1420 Float_t theta[57];
1421 Float_t dist;
1422 Float_t xb[5000];
1423 Float_t yb[5000];
1424 Float_t zb[5000];
1425 Float_t txb[5000];
1426 Float_t tyb[5000];
1427 Int_t nfilmb[5000];
1428
1429
1431
1432
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);
1447
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);
1458
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();
1469
1470 for (int id=0; id<57; id++) {
1475
1476
1477 }
1478
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;
1482
1485 for (Int_t j = 0; j<57; ++j) {
1486 Dr[j] = 0.03*j*1300. +20.0;
1487
1488 }
1489
1490
1491
1492 for (Int_t ibtke = 0; ibtke <
N(); ibtke++) {
1498
1499
1500
1502
1504 cout << "ibtke= " <<ibtke << " xb[ibtke]= " << xb[ibtke] << " nfilmb[ibtke]= " << nfilmb[ibtke] << endl;
1505 }
1506 }
1507
1508
1509
1510 for (Int_t ibtke = 0; ibtke <
N(); ibtke++) {
1511
1512
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]));
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
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;
1530 }
1531 }
1532
1533
1534 Int_t binOfhisto_transprofile=-1;
1535
1536
1537 if (nfilmb[ibtke]<=nbfilm) {
1538
1539
1540
1541 histo_longprofile ->Fill(nfilmb[ibtke]);
1542 histo_longprofile_av ->Fill(nfilmb[ibtke]);
1543
1544 Double_t DR=0;
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);
1548
1549 histo_transprofile_av->Fill(DR);
1550 binOfhisto_transprofile= histo_transprofile->Fill(DR);
1551
1552
1553
1554 theta[nfilmb[ibtke]]+= (TX0-txb[ibtke])*(TX0-txb[ibtke])+(TY0-tyb[ibtke])*(TY0-tyb[ibtke]);
1555 if (ibtke>0&&nfilmb[ibtke]<=nbfilm) {
1556
1557
1558
1559
1560
1561
1564 }
1565 }
1566 }
1567
1568
1569
1570 histo_nbtk ->Fill(
sizeb);
1571 histo_nbtk_av ->Fill(
sizeb);
1572
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());
1577
1578
1579
1580 for (Int_t i=1; i<=nbfilm; ++i) {
1581
1582 longprofile[i-1] = histo_longprofile->GetBinContent(i+1);
1583
1585 cout << "i= " << i << " longprofile[i-1] "<< longprofile[i-1] << " histo_longprofile->GetBinContent(i) " << histo_longprofile->GetBinContent(i)<< endl;
1586 }
1587
1588 }
1589
1590
1591
1592
1593 Log(3,
"EdbShowerP::BuildParametrisation_AS()",
"EdbShowerP::BuildParametrisation_AS()");
1594
1595
1597 Float_t zorig=seg0->
Z();
1598
1599
1601 helperVertex->
SetXYZ(seg0->
X(),seg0->
Y(),seg0->
Z());
1602
1603
1604 Float_t TransDist,LongDist,TotalDist=0;
1605 Float_t Point[3];
1606 Float_t LineStart[3];
1607 Float_t LineEnd[3];
1609
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();
1619
1620 Double_t edIP[50];
1621 Double_t edMin[50];
1622 Double_t edRLong[50];
1623 Double_t edRTrans[50];
1624 Double_t edeltarb[50];
1625 Double_t edeltathetab[50];
1626
1627 Int_t Nmax=TMath::Min(
N(),50);
1628 for (int i=0; i<50; ++i) {
1635 }
1637
1638
1639 for (Int_t j=1; j<Nmax; ++j) {
1640
1642
1643
1644
1645
1646 LongDist=0;
1647 TransDist=0;
1648 TotalDist=0;
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);
1659
1660
1661
1662 edIP[j]=
CalcIP(seg,helperVertex);
1664 edRLong[j]=LongDist;
1665 edRTrans[j]=TransDist;
1668
1669
1676
1678 }
1679
1680
1681
1682
1683 delete helperVertex;
1685 Log(3,
"EdbShowerP::BuildParametrisation_AS()",
"EdbShowerP::BuildParametrisation_AS() ...done.");
1686
1687
1688
1689
1690
1691
1692
1693
1694
1702
1703
1704
1705
1712
1713 for (int ii=0; ii<8; ii++) {
1714
1716 }
1718
1719
1720
1721
1722
1730
1731
1732
1733
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;
1741 delete histo_nbtk;
1742 delete histo_longprofile;
1743 delete histo_transprofile;
1744 delete histo_deltaR;
1745 delete histo_deltaT;
1746
1750
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.");
1754 return;
1755}
brick X0
Definition: RecDispMC.C:112
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
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:293
void PrintNice() const
Definition: EdbSegP.cxx:392
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:69
void SetXYZ(float x, float y, float z)
Definition: EdbVertex.h:157
int sizeb
Definition: check_shower.C:38
UInt_t id
Definition: tlg2couples.C:117
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