@@ -1774,7 +1774,8 @@ void ConvertScintillatorV1::makeTitle(std::ofstream& fout,
17741774 }
17751775 }
17761776 if (((debug / 100 ) % 10 ) > 0 )
1777- std::cout << " Layer|Phi|Ring " << layer << " :" << phi << " :" << irmin << " :" << irmax << std::endl;
1777+ std::cout << " Layer Phi Ring " << layer << " :" << phi << " :" << irmin << " :" << irmax << " nphi " << nphis
1778+ << std::endl;
17781779 if (phi == 1 ) {
17791780 tile0.layer = layer;
17801781 tile0.rmin = irmin;
@@ -1788,13 +1789,21 @@ void ConvertScintillatorV1::makeTitle(std::ofstream& fout,
17881789 do {
17891790 int phimax = tile0.phimax ;
17901791 tile0.phimax = tile0.cassette * tilePhisWord;
1792+ if (((debug / 1000 ) % 10 ) > 0 )
1793+ std::cout << " 1Layer " << tile0.layer << " R " << tile0.rmin << " :" << tile0.rmax << " Cassett "
1794+ << tile0.cassette << " Phi " << tile0.phimin << " :" << tile0.phimax << " Word "
1795+ << tilePhisWord << " :" << tile0.phimax << std::endl;
17911796 zones.push_back (tile0);
17921797 tile0.phimin = tile0.phimax + 1 ;
17931798 tile0.phimax = phimax;
17941799 ++tile0.cassette ;
1795- } while (tile0.cassette * tilePhisWord < tile0.phimax );
1800+ } while (tile0.cassette * tilePhisWord <= tile0.phimax );
17961801 }
17971802 }
1803+ if (((debug / 1000 ) % 10 ) > 0 )
1804+ std::cout << " 2Layer " << tile0.layer << " R " << tile0.rmin << " :" << tile0.rmax << " Cassett "
1805+ << tile0.cassette << " Phi " << tile0.phimin << " :" << tile0.phimax << " Word " << tilePhisWord
1806+ << " :" << tile0.phimax << std::endl;
17981807 zones.push_back (tile0);
17991808 int cassette = (cassette_ == 0 ) ? 0 : (1 + ((phi - 1 ) / tilePhisWord));
18001809 tile0.layer = layer;
@@ -1803,12 +1812,22 @@ void ConvertScintillatorV1::makeTitle(std::ofstream& fout,
18031812 tile0.phimin = phi;
18041813 tile0.phimax = phi;
18051814 tile0.cassette = cassette;
1806- if (phi == HGCalProperty::kHGCalTilePhis )
1815+ if (phi == nphis) {
1816+ if (((debug / 1000 ) % 10 ) > 0 )
1817+ std::cout << " 3Layer " << tile0.layer << " R " << tile0.rmin << " :" << tile0.rmax << " Cassett "
1818+ << tile0.cassette << " Phi " << tile0.phimin << " :" << tile0.phimax << " Word " << tilePhisWord
1819+ << " :" << tile0.phimax << std::endl;
18071820 zones.push_back (tile0);
1821+ }
18081822 } else {
18091823 tile0.phimax = phi;
1810- if (phi == HGCalProperty::kHGCalTilePhis )
1824+ if (phi == nphis) {
1825+ if (((debug / 1000 ) % 10 ) > 0 )
1826+ std::cout << " 4Layer " << tile0.layer << " R " << tile0.rmin << " :" << tile0.rmax << " Cassett "
1827+ << tile0.cassette << " Phi " << tile0.phimin << " :" << tile0.phimax << " Word " << tilePhisWord
1828+ << " :" << tile0.phimax << std::endl;
18111829 zones.push_back (tile0);
1830+ }
18121831 }
18131832 }
18141833 }
@@ -1827,31 +1846,51 @@ void ConvertScintillatorV1::makeTitle(std::ofstream& fout,
18271846 std::map<int , std::pair<double , double > >::const_iterator it1;
18281847 fout << " <Vector name=" << apost << head << " RMin" << apost << " type=" << apost << " numeric" << apost
18291848 << " nEntries=" << apost << ringR.size () << apost << " >" ;
1849+ if ((debug % 10 ) > 0 )
1850+ std::cout << " <Vector name=" << apost << head << " RMin" << apost << " type=" << apost << " numeric" << apost
1851+ << " nEntries=" << apost << ringR.size () << apost << " >" ;
18301852 for (it1 = ringR.begin (); it1 != ringR.end (); ++it1) {
18311853 std::string last = ((l1 + 1 ) == ringR.size ()) ? " " : " ," ;
1832- if (l1 % 6 == 0 )
1854+ if (l1 % 6 == 0 ) {
18331855 fout << " \n " << std::setw (8 ) << std::setprecision (6 ) << (it1->second ).first << " *mm" << last;
1834- else
1856+ if ((debug % 10 ) > 0 )
1857+ std::cout << " \n " << std::setw (8 ) << std::setprecision (6 ) << (it1->second ).first << " *mm" << last;
1858+ } else {
18351859 fout << std::setw (8 ) << std::setprecision (6 ) << (it1->second ).first << " *mm" << last;
1860+ if ((debug % 10 ) > 0 )
1861+ std::cout << std::setw (8 ) << std::setprecision (6 ) << (it1->second ).first << " *mm" << last;
1862+ }
18361863 ++l1;
18371864 }
18381865 fout << " \n </Vector>\n " ;
18391866 fout << " <Vector name=" << apost << head << " RMax" << apost << " type=" << apost << " numeric" << apost
18401867 << " nEntries=" << apost << ringR.size () << apost << " >" ;
1868+ if ((debug % 10 ) > 0 ) {
1869+ std::cout << " \n </Vector>\n " ;
1870+ std::cout << " <Vector name=" << apost << head << " RMax" << apost << " type=" << apost << " numeric" << apost
1871+ << " nEntries=" << apost << ringR.size () << apost << " >" ;
1872+ }
18411873 for (it1 = ringR.begin (); it1 != ringR.end (); ++it1) {
18421874 std::string last = ((l2 + 1 ) == ringR.size ()) ? " " : " ," ;
1843- if (l2 % 6 == 0 )
1875+ if (l2 % 6 == 0 ) {
18441876 fout << " \n " << std::setw (8 ) << std::setprecision (6 ) << (it1->second ).second << " *mm" << last;
1845- else
1877+ if ((debug % 10 ) > 0 )
1878+ std::cout << " \n " << std::setw (8 ) << std::setprecision (6 ) << (it1->second ).second << " *mm" << last;
1879+ } else {
18461880 fout << std::setw (8 ) << std::setprecision (6 ) << (it1->second ).second << " *mm" << last;
1881+ if ((debug % 10 ) > 0 )
1882+ std::cout << std::setw (8 ) << std::setprecision (6 ) << (it1->second ).second << " *mm" << last;
1883+ }
18471884 ++l2;
18481885 }
18491886 fout << " \n </Vector>\n " ;
18501887 fout << " <Vector name=" << apost << head << " LayerRings" << apost << " type=" << apost << " numeric" << apost
18511888 << " nEntries=" << apost << nmax << apost << " >" ;
1852- if ((debug % 10 ) > 0 )
1889+ if ((debug % 10 ) > 0 ) {
1890+ std::cout << " \n </Vector>\n " ;
18531891 std::cout << " <Vector name=" << apost << head << " LayerRings" << apost << " type=" << apost << " numeric"
18541892 << apost << " nEntries=" << apost << nmax << apost << " >" ;
1893+ }
18551894 for (int k = 0 ; k < nmax; ++k) {
18561895 std::string last = ((k + 1 ) == nmax) ? " " : " ," ;
18571896 int lyr1r2 = HGCalTileIndex::tilePack (zones[k].layer , zones[k].rmin , zones[k].rmax );
@@ -1916,6 +1955,8 @@ void ConvertScintillatorV1::makeTitle(std::ofstream& fout,
19161955 if ((debug & 10 ) > 0 )
19171956 std::cout << " \n </Vector>\n " ;
19181957 }
1958+ if ((debug & 10 ) > 0 )
1959+ std::cout << " \n\n " ;
19191960}
19201961
19211962ConvertNoseV0::ConvertNoseV0 (unsigned int layMax1, unsigned int layMax2) : layMax1_(layMax1), layMax2_(layMax2) {
0 commit comments