This Page

BadflagsΒΆ

Dumping a case of badflags:

 tlaser-t --dbgflags

2016-10-27 20:19:10.581 INFO  [224289] [CSteppingAction::report@371] CG4::postpropagate
 event_total 10
 track_total 104774
 step_total 517446
2016-10-27 20:19:10.581 INFO  [224289] [CRecorder::report@937] CG4::postpropagate
2016-10-27 20:19:10.581 INFO  [224289] [CRecorder::report@944]  seqhis_mismatch 0
2016-10-27 20:19:10.581 INFO  [224289] [CRecorder::report@969]  seqmat_mismatch 0
2016-10-27 20:19:10.581 INFO  [224289] [CRecorder::report@993]  debug_photon 712 (photon_id)
2016-10-27 20:19:10.581 INFO  [224289] [CRecorder::report@998] TO DEBUG THESE USE:  --dindex=9626,9598,9580,9536,9316,9206,9043,8940,8827,8758,8716,8692,8663,8657,8494,8458,8250,8248,8056,7941,7912,7887,7878,7612,7505,7432,7413,7318,7299,7285,7204,6872,6755,6747,6313,6202,6145,5901,5581,5343,5312,5272,5202,5127,5111,5070,5050,4608,4576,4556,4512,4339,4327,4183,3928,3785,3589,3566,3538,3210,2640,2515,2455,2372,2324,2177,2153,2009,1968,1891,1736,1694,1682,1618,1588,1536,1492,1392,678,626,479,381,178,156,94,25,19809,19796,19721,19690,19653,19582,19467,19429,19194,18984,18900,18776,18774,18706,18556,18516,18338,17305,17249,17237,17120,17036,16875,16865,16484,16093,16085,16050,15981,15973,15946,15752,15518,15501,15499,15430,14948,14390,14373,14237,14074,14002,13955,13675,13249,13119,13055,12903,12857,12597,12544,12501,12381,12362,12260,12007,11962,11937,11779,11525,11118,11108,11104,10781,10368,10308,29559,29513,29475,29357,29130,29092,28956,28939,28748,28522,28497,28234,28189,28090,27998,27929,27272,27228,27196,27008,26942,26584,26435,26372,26278,26236,26169,25764,25586,25492,25419,25415,25312,25243,24938,24899,24868,24770,24573,24349,24340,24212,24197,24103,23918,23894,23811,23633,23631,23616,23425,23257,23218,23199,23033,22950,22693,22639,22575,22541,22529,22473,22424,22279,22108,22104,21851,21565,21486,21466,20929,20903,20426,20125,20086,39966,39895,39811,39583,39516,39016,38895,38768,38354,38101,38005,37869,37530,37333,37199,37109,36502,36411,36377,36287,36259,36117,36101,35933,35911,35444,35364,35352,35058,34998,34734,34681,34603,34429,34342,34326,34132,33961,33890,33809,33676,33550,33405,33299,33251,33066,33058,33050,32704,32671,32503,32366,32362,32346,32064,31981,31739,31280,31225,31215,31137,30954,30486,30338,30337,30309,49849,49610,49480,49361,49340,49327,48871,48802,48635,48631,48534,48345,47366,47267,47164,47153,47118,47093,46609,46451,45947,45791,45678,45597,45364,45336,45270,44973,44857,44634,44392,44039,44016,43941,43872,43644,43602,43532,43488,43477,43138,43068,43062,43027,42828,42788,42738,42522,42224,41881,41784,41656,41176,41102,40873,40389,40249,40111,40026,59967,59809,59198,58941,58606,58412,58328,58055,57581,57409,57383,57288,57150,57078,56829,56828,56749,56510,56466,56464,56133,55965,55880,55851,55801,55721,55701,55594,55312,55269,55152,55113,54952,54712,54710,54669,54648,54509,54280,53308,53269,53206,52999,52918,52874,52804,52707,52682,52613,52605,52483,52458,52449,52374,52351,52327,52003,51993,51982,51962,51921,51848,51511,51476,51237,51151,51109,51096,50830,50701,50568,50495,50313,50010,69947,69938,69601,69453,69451,69318,69215,69011,68917,68912,68873,68700,68619,68553,68512,68482,68243,68172,68167,68037,67969,67956,67508,67455,67321,67310,67264,67202,67195,66917,66851,66830,66682,66661,66442,65964,65734,65721,65648,65623,65562,65292,65279,64900,64873,64679,64596,64462,64308,64229,64226,64131,64130,63855,63550,63514,63495,62894,62693,62676,62616,62365,62276,62227,61925,61841,61815,61763,61244,61149,60942,60591,60550,60485,60398,60155,79938,79921,79763,79679,79250,79216,78698,78686,78666,78493,78290,78120,77946,77908,77875,77849,77783,77653,77575,77126,76577,76359,76215,76144,75850,75799,75683,75564,75555,75512,75412,75402,75349,75116,75004,74750,74737,74624,74542,74493,74473,74257,74122,74015,73827,73784,73461,73379,73031,72960,72763,72414,72240,71951,71926,71759,71653,71274,71202,71152,71146,71096,71012,70928,70540,70397,89648,89608,89275,89240,89025,88936,88681,88500,88086,87995,87808,87797,87757,87735,87728,87591,87484,87421,87286,87278,87191,86740,86637,86636,86479,86428,86368,86254,86194,86033,85973,85933,85771,85614,85245,85008,85004,84995,84908,84790,84754,84741,84658,84431,84368,84260,84103,83949,83620,83597,83548,83298,83040,83025,82793,82680,82665,82581,82461,82346,82196,81956,81929,81531,81489,81425,81409,81341,81231,81150,81107,80958,80931,80830,80622,80573,80153,80119,80011,99994,99860,99829,99452,99056,98752,98692,98526,98417,98378,98364,98362,98131,97932,97823,97554,97297,97255,96791,96777,96577,96570,96332,96240,96216,96112,95978,95892,95661,95509,95388,95293,95041,94966,94768,94764,94472,94181,93950,93858,93851,93584,93571,93253,93200,93029,92862,92734,92687,92504,92468,92074,92073,91579,91513,91337,91000,90978,90614,90541,90408,90391,90269,90262,90021


simon:cfg4 blyth$ tlaser-t --dindex=9626,9598,9580,9536,9316,9206,9043,8940,8827,8758,8716,8692,8663,8657,8494,8458,8250,8248,8056

Manual inspection suggests most flag zeros coming from SAM:SameMaterial for Acrylic to Acrylic transitions. How does Opticks handle that (probably BT ?)

----CRecorder::compare---- record_id     8716 badflag     2 --dindex
2016-10-27 20:20:28.348 INFO  [224802] [CRecorder::Dump@854] CRecorder::compare (rdr-dump)DONE record_id    8716
2016-10-27 20:20:28.348 INFO  [224802] [CRecorder::Dump@857]  seqhis cac0ccc6d TORCH BULK_SCATTER BOUNDARY_TRANSMIT BOUNDARY_TRANSMIT BOUNDARY_TRANSMIT . BOUNDARY_TRANSMIT SURFACE_SREFLECT BOUNDARY_TRANSMIT . . . . . . .
2016-10-27 20:20:28.348 INFO  [224802] [CRecorder::Dump@861]  seqmat 33ff332311 GdDopedLS GdDopedLS Acrylic LiquidScintillator Acrylic Acrylic Air Air Acrylic Acrylic - - - - - -
      0          GdDopedLS   Und d/Geometry/AD/lvIAV#pvGDS rials/GdDopedLS          noProc           Undefined pos[      0.000     0.000     0.000]  dir[    0.556  -0.831   0.000]  pol[    0.840   0.543   0.000]  ns  0.100 nm 430.000
      1          GdDopedLS   NAB d/Geometry/AD/lvIAV#pvGDS rials/GdDopedLS      OpRayleigh    PostStepDoItProc pos[    444.814  -665.620     0.000]  dir[    0.293   0.456  -0.840]  pol[   -0.799  -0.365  -0.477]  ns  4.211 nm 430.000
      2            Acrylic   FrT d/Geometry/AD/lvLSO#pvIAV terials/Acrylic  Transportation        GeomBoundary pos[   1153.092   437.109 -2030.000]  dir[    0.292   0.454  -0.842]  pol[   -0.800  -0.367  -0.475]  ns 16.617 nm 430.000
      3 LiquidScintillator   FrT d/Geometry/AD/lvOAV#pvLSO uidScintillator  Transportation        GeomBoundary pos[   1158.292   445.204 -2045.000]  dir[    0.293   0.456  -0.840]  pol[   -0.799  -0.365  -0.477]  ns 16.709 nm 430.000
      4            Acrylic   FrT d/Geometry/AD/lvOIL#pvOAV terials/Acrylic  Transportation        GeomBoundary pos[   1312.508   685.306 -2487.000]  dir[    0.292   0.454  -0.842]  pol[   -0.800  -0.367  -0.475]  ns 19.440 nm 430.000
      5            Acrylic   SAM y/AD/lvOIL#pvBotReflector terials/Acrylic  Transportation        GeomBoundary pos[   1318.747   695.020 -2505.000]  dir[    0.292   0.454  -0.842]  pol[   -0.800  -0.367  -0.475]  ns 19.550 nm 430.000
      6                Air   FrT vBotReflector#pvBotRefGap d/Materials/Air  Transportation        GeomBoundary pos[   1322.179   700.363 -2514.900]  dir[    0.438   0.683  -0.585]  pol[   -0.660  -0.197  -0.725]  ns 19.611 nm 430.000
      7                Air   SpR ails/lvBotRefGap#pvBotESR d/Materials/ESR  Transportation        GeomBoundary pos[   1322.216   700.421 -2514.950]  dir[    0.438   0.683   0.585]  pol[    0.660   0.197  -0.725]  ns 19.611 nm 430.000
      8            Acrylic   FrT y/AD/lvOIL#pvBotReflector terials/Acrylic  Transportation        GeomBoundary pos[   1322.254   700.479 -2514.900]  dir[    0.292   0.454   0.842]  pol[   -0.056  -0.870   0.489]  ns 19.611 nm 430.000
      9            Acrylic   SAM d/Geometry/AD/lvOIL#pvOAV terials/Acrylic  Transportation        GeomBoundary pos[   1325.685   705.822 -2505.000]  dir[    0.292   0.454   0.842]  pol[   -0.056  -0.870   0.489]  ns 19.651 nm 430.000
2016-10-27 20:20:28.349 INFO  [224802] [CRec::dump@40] crec record_id 8716 nstp 11  Ori[ -18079.453-799699.438-6605.000]

Same material boundary is handled as klop, just keep going. Probably can just BT it:

514    }    // boundary has OpticalSurface
515
516
517
518
519         if (type == dielectric_dielectric )
520         {
521             if (theFinish == polished || theFinish == ground )
522             {
523                 if (Material1 == Material2)
524                 {
525                     theStatus = SameMaterial;
526                     return G4VDiscreteProcess::PostStepDoIt(aTrack, aStep);
527                 }
528                 aMaterialPropertiesTable = Material2->GetMaterialPropertiesTable();
529                 if (aMaterialPropertiesTable) Rindex = aMaterialPropertiesTable->GetProperty("RINDEX");

Adjust to just BT instead of giving zero flag:

158 #ifdef USE_CUSTOM_BOUNDARY
159 unsigned int OpBoundaryFlag(const DsG4OpBoundaryProcessStatus status)
160 #else
161 unsigned int OpBoundaryFlag(const G4OpBoundaryProcessStatus status)
162 #endif
163 {
164     unsigned flag = 0 ;
165     switch(status)
166     {
167         case FresnelRefraction:
168         case SameMaterial:
169                                flag=BOUNDARY_TRANSMIT;
170                                break;
171         case TotalInternalReflection:
172         case       FresnelReflection:
173                                flag=BOUNDARY_REFLECT;
174                                break;
175         case StepTooSmall:
176                                flag=NAN_ABORT;
177                                break;