macro survey * first do survey#load to get the ntuple * and set the graphics quality exe survey#load mess ' ' mess ' This macro has loaded the ntuple. ' mess ' ' mess ' Hit return and you will see a plot of every' mess ' question asked in the survey, in the following order:' mess ' ' mess ' demographics,' mess ' balance,' mess ' globalization,' mess ' outreach,' mess ' building,' mess ' physics, ' mess ' or pick' mess ' ' mess ' To examine the questions of a specific section only, do' mess ' exe survey#plot outreach [or whatever section]' mess ' ' mess ' To impose a selection cut, use a second argument' mess ' exe survey#plot balance fieldPhy.ne.2' mess ' ' mess ' To see the list of varible names, type ' mess ' n/print 1' mess ' ' mess ' For more ideas, see README.txt' mess ' ' mess ' ' mess ' Hit return to proceed with the plots of all questions' wait exe survey#plot demographics exe survey#plot balance exe survey#plot globalization exe survey#plot outreach exe survey#plot building exe survey#plot physics exe survey#plot pick exe survey#finale return ************************************************ macro plot h/del * cut $0 - * * kumac to look at YPP survey results * if ([1].eq.' ') then message ' ' message 'you must first select a subset (demographics,balance,globalization,outreach,building,physics, or pick)' message ' ' message ' ' stopm endif * *title 'YPP Survey Results - '//[1] * *..cuts set here (default=all career stages) cut $1 career=5 cut $2 career<5 if ([2].ne.' ') then nt/cuts $1 career=5.and.[2] nt/cuts $2 career<5.and.[2] endif *..plot Americans and non-Americans separately: sep=T * *..specify number of questions per each subsection: if ([1].eq.'demographics') then index=1 nquest=7 elseif ([1].eq.'balance') then index=2 nquest=4 elseif ([1].eq.'globalization') then index=3 nquest=6 elseif ([1].eq.'outreach') then index=4 nquest=3 elseif ([1].eq.'building') then index=5 nquest=4 elseif ([1].eq.'physics') then index=6 nquest=4 elseif ([1].eq.'pick') then index=7 nquest=8 endif * *..loop over questions in each subsection, establish key: do j=1,[nquest] if ([1].eq.'demographics') then if ([j].eq.1) then title=Career Stage nreply=5 var=career labels 1 [nreply] 'Undergrad' 'Graduate' 'Postdoc' 'Untenured' 'Tenured' elseif ([j].eq.2) then title=Continent Grew Up In nreply=6 var=contrais labels 1 [nreply] 'Africa' 'Asia' 'Australia' 'Europe' 'N. America' 'S. America' elseif ([j].eq.3) then title=Where Currently Work nreply=7 var=contwork labels 1 [nreply] 'Africa' 'Antarctica' 'Asia' 'Australia' 'Europe' 'N. America' 'S. America' elseif ([j].eq.4) then title=Type of Physics Currently Working On nreply=6 var=worktype set ymgl 7. set ywin 7. labels 1 [nreply] 'Theory' 'Fixed Target' 'Collider' 'Accelerator' 'Astrophysics' 'Other' elseif ([j].eq.5) then title=Where Currently Work nreply=10 var=labwork labels 1 [nreply] 'Argonne' 'BNL' 'CERN' 'DESY' 'FNAL' 'KEK' 'LBL' 'SLAC' 'University' 'Other' elseif ([j].eq.6) then title=Size of Current Collaboration nreply=7 var=collsize labels 1 [nreply] '1-5' '5-20' '20-50' '50-200' '200-500' '500-1k' '1k+' elseif ([j].eq.7) then title=Attending Snowmass nreply=2 var=atsmass labels 1 [nreply] 'yes' 'no' endif elseif ([1].eq.'balance') then if ([j].eq.1) then title=Important to Host Diverse Range of Exps nreply=4 var=divnext labels 1 [nreply] 'very' 'somewhat' 'not' 'dont know' elseif ([j].eq.2) then title=Important to Host Astrophysics nreply=4 var=astrnext labels 1 [nreply] 'very' 'somewhat' 'not' 'dont know' elseif ([j].eq.3) then title=Important to Have Redundant Detectors nreply=4 var=multnext labels 1 [nreply] 'very' 'somewhat' 'not' 'dont know' elseif ([j].eq.4) then title=Important to Balance Theorist/Experimental nreply=4 var=prombal labels 1 [nreply] 'very' 'somewhat' 'not' 'dont know' endif elseif ([1].eq.'globalization') then if ([j].eq.1) then title=How Frequently See Detector nreply=5 var=seedet labels 1 [nreply] 'day/wkly' 'monthly' 'yearly' 'few yrs' 'N/A' elseif ([j].eq.2) then title=How Important to Have Hardware Experience nreply=4 var=handsdet labels 1 [nreply] 'very' 'somewhat' 'not' 'dont know' elseif ([j].eq.3) then title=Important Being Near Supervisor or Detector nreply=4 var=advisdet labels 1 [nreply] 'detector' 'supervisor' 'equal imp' 'N/A' elseif ([j].eq.4) then title=Better to Have Regional Centers nreply=4 var=rceasy labels 1 [nreply] 'yes' 'no' 'maybe' 'dont know' elseif ([j].eq.5) then title=Reg. Center Frequency (Comp to Natl Labs) nreply=4 var=rclocate labels 1 [nreply] 'less' 'as' 'more' 'dont need' elseif ([j].eq.6) then title=Role of National Labs nreply=3 var=uslabs labels 1 [nreply] 'reduced' 'same' 'stronger' endif elseif ([1].eq.'outreach') then if ([j].eq.1) then title=Are We Doing Enough Outreach to Congress nreply=4 var=congoutr sep=F set ymgl 9.5 labels 1 [nreply] 'more than enough' 'adequate' 'not nearly enough' 'far too little' elseif ([j].eq.2) then title=Are We Doing Enough Outreach to the Public nreply=4 var=puboutr sep=F set ymgl 9.5 labels 1 [nreply] 'more than enough' 'adequate' 'not nearly enough' 'far too little' elseif ([j].eq.3) then title=Willing to Spend More Time on Outreach nreply=2 var=persoutr labels 1 [nreply] 'yes' 'no/maybe' endif elseif ([1].eq.'building') then if ([j].eq.1) then title=What Most Attracted You nreply=14 var=attrhep sep=F set ymgl 14.5 labels 1 [nreply] 'interest in physics' 'strong mentor' 'allure of work in HEP lab' 'intellectual atmosphere' 'whim/it was cool' 'nothing else interesting' 'salary/benefits' 'possibility of fame' 'enjoy hardware work' 'enjoy software work' 'academic freedom' 'lifestyle/travel/hours' 'valuable experience for any job' 'spritual/religious reasons' elseif ([j].eq.2) then title=Reason You Have Stayed nreply=14 var=stayhep sep=F set ymgl 14.5 labels 1 [nreply] 'interest in physics' 'strong mentor' 'allure of work in HEP lab' 'intellectual atmosphere' 'whim/it was cool' 'nothing else interesting' 'salary/benefits' 'possibility of fame' 'enjoy hardware work' 'enjoy software work' 'academic freedom' 'lifestyle/travel/hours' 'valuable experience for any job' 'spritual/religious reasons' elseif ([j].eq.3) then title=Are We Retaining Enough Talent nreply=4 var=talenhep sep=F labels 1 [nreply] 'yes' 'somewhat' 'no' 'dont know' elseif ([j].eq.4) then title=What Might Most Influence People to Leave nreply=9 var=neghep sep=F set ymgl 14. labels 1 [nreply] 'lack of competitive salary' 'large collaborations' 'length of time in grad school' 'amount of travel' 'lack of permanent jobs' 'lackof professional environ' 'weak/unstruct management' 'other' 'not an issue' endif elseif ([1].eq.'physics') then if ([j].eq.1) then title=Physics You Would Find Most Compelling nreply=10 var=persphys sep=F set ymgl 10. labels 1 [nreply] 'QCD/Strong Int' 'Higgs/EWSB' 'CP Violation' 'Neutrinos' 'Exotic Searches' 'Accelerator' 'Cosmo/Dark Matter' 'Cosmic Ray' 'QGP/Hadronic' 'Other' elseif ([j].eq.2) then title=Physics Most Compelling for the Field nreply=10 var=fieldphy sep=F set ymgl 10. labels 1 [nreply] 'QCD/Strong Int' 'Higgs/EWSB' 'CP Violation' 'Neutrinos' 'Exotic Searches' 'Accelerator' 'Cosmo/Dark Matter' 'Cosmic Ray' 'QGP/Hadronic' 'Other' elseif ([j].eq.3) then title=Does this Science Require a New Facility nreply=4 var=facphy sep=F labels 1 [nreply] 'yes' 'no' 'maybe' 'dont know' elseif ([j].eq.4) then title=Should New Facility be in the U.S. nreply=4 var=facusphy sep=T labels 1 [nreply] 'yes' 'no' 'maybe' 'dont know' endif elseif ([1].eq.'pick') then if ([j].eq.1) then title=What Most Affected Your Current Opinion nreply=9 var=affopin sep=F set ymgl 14. labels 1 [nreply] 'advisor' 'current work' 'reading' 'talking to colleaques' 'workshops/conferences' 'attending talks' 'working grps/perform studies' 'sitting and thinking' 'other' elseif ([j].eq.2) then title=How Much Know About TESLA nreply=3 var=knowtes sep=T labels 1 [nreply] 'enough/a lot' 'fair amount' 'little/nothing' set vsiz .5 elseif ([j].eq.3) then title=How Much Know About NLC,CLIC nreply=3 var=knowolc labels 1 [nreply] 'enough/a lot' 'fair amount' 'little/nothing' set vsiz .5 elseif ([j].eq.4) then title=How Much Know About VLHC nreply=3 var=knowvlhc labels 1 [nreply] 'enough/a lot' 'fair amount' 'little/nothing' set vsiz .5 elseif ([j].eq.5) then title=How Much Know About Neutrino Factory nreply=3 var=knownfac labels 1 [nreply] 'enough/a lot' 'fair amount' 'little/nothing' set vsiz .5 elseif ([j].eq.6) then title=How Much Know About Muon Collider nreply=3 var=knowmumu labels 1 [nreply] 'enough/a lot' 'fair amount' 'little/nothing' set vsiz .5 elseif ([j].eq.7) then title=Know Enough to Decide nreply=5 var=knowenou set ymgl 7. set ywin 7. labels 1 [nreply] 'definitely yes' 'probably yes' 'unsure' 'probably no' 'definitely no' elseif ([j].eq.8) then title=Pick an Option nreply=5 var=choose1 labels 1 [nreply] 'LC in U.S.' 'TESLA+VLHC' 'TESLA+MuMu' 'Wait to Decide' 'Other' set ymgl 7.2 set ywin 7.2 endif endif * *..now fill and plot histograms for that subsection: zone 1 2; v/cr t(100);v/cr u(100) * the Americans hid=[index]*10+[j] hi/create/1d [hid] ''//[title] [nreply] 0.5 [nreply]+0.5 hid2=100+[index]*10+[j] hi/create/1d [hid2] ''//[title] [nreply] 0.5 [nreply]+0.5 nt/proj [hid] 1.[var] $1.and.contrais.eq.5 nt/proj [hid2] 1.[var] $2.and.contrais.eq.5 set ndvx -[nreply].15 get/c [hid2] t; get/c [hid] u temp1=$HINFO([hid],'SUM') temp2=$HINFO([hid2],'SUM') sig t=t/[temp2]; sig u=u/[temp1] put/c [hid2] t; put/c [hid] u sig tm=vmax(t); sig um=vmax(u) if (([1].eq.'balance').and.(([j].eq.3.).or.([j].eq.4))) then max [hid] 0.6; max [hid2] 0.6 elseif (([1].eq.'globalization').and.(([j].eq.1).or.([j].eq.3))) then max [hid] 0.45; max [hid2] 0.45 elseif (([1].eq.'globalization').and.([j].eq.2)) then max [hid] 0.75; max [hid2] 0.75 elseif (([1].eq.'globalization').and.([j].eq.5)) then max [hid] 0.55; max [hid2] 0.55 elseif (([1].eq.'physics').and.(([j].eq.1).or.([j].eq.2))) then max [hid] 0.6; max [hid2] 0.6 elseif (([1].eq.'physics').and.([j].eq.4)) then max [hid] 0.7; max [hid2] 0.7 elseif (([1].eq.'pick').and.([j].eq.1)) then max [hid] 0.35; max [hid2] 0.35 elseif (([1].eq.'pick').and.(([j].ge.2).and.([j].le.6))) then max [hid] 0.6; max [hid2] 0.6 elseif (([1].eq.'pick').and.(([j].eq.7).or.([j].eq.8))) then max [hid] 0.55; max [hid2] 0.55 endif if ([sep].eq.'T') then if (tm>um) then set dmod 1; set hcol 4; h/pl [hid2] ; set hcol 1 set dmod 2; set hcol 2; h/pl [hid] s; set hcol 1 null 0 1 0 1 sa if ( do_titl=1 ) then itx .5 1.06 [title] endif endif if (tm<=um) then set dmod 2; set hcol 2; h/pl [hid] ;set hcol 1 set dmod 1; set hcol 4; h/pl [hid2] s; set hcol 1 set dmod 2; set hcol 2; h/pl [hid] s;set hcol 1 null 0 1 0 1 sa if ( do_titl=1 ) then itx .5 1.06 [title] endif endif *atitle ' ' 'Number of Entries' set tang 90; null 0 1 0 1 sa; itx 1.07 .5 'Americans' set tang endif * the non-Americans hidn=50+[index]*10+[j] hi/create/1d [hidn] ''//[title] [nreply] 0.5 [nreply]+0.5 hidn2=150+[index]*10+[j] hi/create/1d [hidn2] ''//[title] [nreply] 0.5 [nreply]+0.5 nt/proj [hidn] 1.[var] $1.and.contrais.ne.5 nt/proj [hidn2] 1.[var] $2.and.contrais.ne.5 set ndvx -[nreply].15 get/c [hidn2] t; get/c [hidn] u temp1=$HINFO([hidn],'SUM') temp2=$HINFO([hidn2],'SUM') sig t=t/[temp2]; sig u=u/[temp1] put/c [hidn2] t; put/c [hidn] u sig tm=vmax(t); sig um=vmax(u) if (([1].eq.'balance').and.(([j].eq.3.).or.([j].eq.4))) then max [hidn] 0.6; max [hidn2] 0.6 elseif (([1].eq.'globalization').and.(([j].eq.1).or.([j].eq.3))) then max [hidn] 0.45; max [hidn2] 0.45 elseif (([1].eq.'globalization').and.([j].eq.2)) then max [hidn] 0.75; max [hidn2] 0.75 elseif (([1].eq.'globalization').and.([j].eq.5)) then max [hid] 0.55; max [hid2] 0.55 elseif (([1].eq.'physics').and.(([j].eq.1).or.([j].eq.2))) then max [hidn] 0.6; max [hidn2] 0.6 elseif (([1].eq.'physics').and.([j].eq.4)) then max [hidn] 0.7; max [hidn2] 0.7 elseif (([1].eq.'pick').and.(([j].ge.2).and.([j].le.6))) then max [hidn] 0.6; max [hidn2] 0.6 elseif (([1].eq.'pick').and.([j].eq.7)) then max [hidn] 0.55; max [hidn2] 0.55 elseif (([1].eq.'pick').and.(([j].eq.7).or.([j].eq.8))) then max [hidn] 0.55; max [hidn2] 0.55 endif if ([sep].eq.'T') then if (tm>um) then set dmod 1; set hcol 4; h/pl [hidn2] ; set hcol 1 set dmod 2; set hcol 2; h/pl [hidn] s ; set hcol 1 endif if (tm<=um) then set dmod 2; set hcol 2; h/pl [hidn] ; set hcol 1 set dmod 1; set hcol 4; h/pl [hidn2] s; set hcol 1 set dmod 2; set hcol 2; h/pl [hidn] s; set hcol 1 endif *atitle ' ' 'Number of Entries' set tang 90; null 0 1 0 1 sa; itx 1.07 .5 'non-Americans' set tang endif * if ([sep].eq.'F') then zone if ($HEXIST(200)) then h/del 200; h/del 2000 endif hidy=200 hido=2000 add [hid] [hidn] [hidy] 0.5 0.5 add [hid2] [hidn2] [hido] 0.5 0.5 set dmod 2; set hcol 2; h/pl [hidy] ; set hcol 1 set dmod 1; set hcol 4; h/pl [hido] s; set hcol 1 null 0 1 0 1 sa; itx .5 1.06 [title] endif * if ( do_eps=1 ) then mess creating file [1][j].eps p/pr [1][j].eps endif * *..reset stuff: v/del t; v/del u set ymgl 6 | space below histo set ywin 6 | space between histos set vsiz .6 message ' ' wait 'blue line = young physicists, red line = tenured physicists' message ' ' enddo return **************************************************************************** *..a special-purpose plot that combines the TESLA options in the last plot: macro finale for/file 45 finale.eps meta 45 -113 set ymgl 6. set ywin 6. cut $0 - h/del * v/cr t(100);v/cr u(100) *..cuts set here (default=all career stages) cut $1 career=5 cut $2 career<5 if ([1].ne.' ') then nt/cuts $1 career=5.and.[1] nt/cuts $2 career<5.and.[1] endif index=7 j=8 nreply=5 n1reply=4 labels 1 [nreply] 'LC in U.S.' 'TESLA+VLHC' 'TESLA+MuMu' 'Wait to Decide' 'Other' var=choose1 ****** the Americans hid=[index]*10+[j] hi/create/1d [hid] ''//[title] [nreply] 0.5 [nreply]+0.5 hid2=100+[index]*10+[j] hi/create/1d [hid2] ''//[title] [nreply] 0.5 [nreply]+0.5 nt/proj [hid] 1.[var] $1.and.contrais.eq.5 nt/proj [hid2] 1.[var] $2.and.contrais.eq.5 * sum Tesla options v/cr tvec(5);v/cr tvec2(4);get/c [hid] tvec sig new=tvec(2)+tvec(3) v/copy tvec(1) tvec2(1) v/copy tvec(4) tvec2(3) v/copy tvec(5) tvec2(4) v/copy new(1) tvec2(2) labels 1 [n1reply] 'LC in U.S.' 'TESLA (De.)' 'Wait' 'Other' 1d 3001 ''//[title] [n1reply] 0.5 [n1reply]+0.5 put/c 3001 tvec2 get/c [hid2] tvec sig new=tvec(2)+tvec(3) v/copy tvec(1) tvec2(1) v/copy tvec(4) tvec2(3) v/copy tvec(5) tvec2(4) v/copy new(1) tvec2(2) 1d 3002 ''//[title] [n1reply] 0.5 [n1reply]+0.5 put/c 3002 tvec2 hidorig=hid hidorig2=hid2 hid=3001 hid2=3002 set ndvx -[n1reply].15 get/c [hid2] t; get/c [hid] u * normalization chunk temp1=$HINFO([hid],'SUM') temp2=$HINFO([hid2],'SUM') sig t=t/[temp2]; sig u=u/[temp1] put/c [hid2] t; put/c [hid] u * * hardwire scale max max [hid] .65 max [hid2] .65 * sig tm=vmax(t); sig um=vmax(u) if (tm>um) then set dmod 1; set hcol 4; h/pl [hid2]; set hcol 1 set dmod 2; set hcol 2; h/pl [hid] s ; set hcol 1 endif if (tm<=um) then set dmod 2; set hcol 2 ; h/pl [hid]; set hcol 1 set dmod 1; set hcol 4; h/pl [hid2] s; set hcol 1 endif *atitle ' ' 'Number of Entries' set tang 90; null 0 1 0 1 sa; itx 1.07 .4 'Americans' set tang ****** the non-Americans h/del * hid=[index]*10+[j] hi/create/1d [hid] ''//[title] [nreply] 0.5 [nreply]+0.5 hid2=100+[index]*10+[j] hi/create/1d [hid2] ''//[title] [nreply] 0.5 [nreply]+0.5 nt/proj [hid] 1.[var] $1.and.contrais.ne.5 nt/proj [hid2] 1.[var] $2.and.contrais.ne.5 * sum Tesla options *v/cr tvec(5);v/cr tvec2(4) get/c [hid] tvec sig new=tvec(2)+tvec(3) v/copy tvec(1) tvec2(1) v/copy tvec(4) tvec2(3) v/copy tvec(5) tvec2(4) v/copy new(1) tvec2(2) labels 1 [n1reply] 'LC in U.S.' 'TESLA (De.)' 'Wait' 'Other' 1d 3003 ''//[title] [n1reply] 0.5 [n1reply]+0.5 put/c 3003 tvec2 get/c [hid2] tvec sig new=tvec(2)+tvec(3) v/copy tvec(1) tvec2(1) v/copy tvec(4) tvec2(3) v/copy tvec(5) tvec2(4) v/copy new(1) tvec2(2) 1d 3004 ''//[title] [n1reply] 0.5 [n1reply]+0.5 put/c 3004 tvec2 hidorig=hid hidorig2=hid2 hid=3003 hid2=3004 set ndvx -[n1reply].15 get/c [hid2] t; get/c [hid] u * normalization chunk temp1=$HINFO([hid],'SUM') temp2=$HINFO([hid2],'SUM') sig t=t/[temp2]; sig u=u/[temp1] put/c [hid2] t; put/c [hid] u * * hardwire scale max max [hid] .65 max [hid2] .65 * sig tm=vmax(t); sig um=vmax(u) if (tm>um) then set dmod 1; set hcol 4; h/pl [hid2]; set hcol 1 set dmod 2; set hcol 2; h/pl [hid] s; set hcol 1 endif if (tm<=um) then set dmod 2; set hcol 2; h/pl [hid]; set hcol 1 set dmod 1; set hcol 4; h/pl [hid2] s; set hcol 1 endif *atitle ' ' 'Number of Entries' set tang 90; null 0 1 0 1 sa; itx 1.07 .4 'non-Americans' set tang close 45 return ***************************************************************************** macro load close 0 hi/fil 1 survey-all.ntp set pass 3 | heavy lines and text set hwid 9 | heavy histo lines set ysiz 30. | set ymgl 6 | space below histo set ywin 6 | space between histos set yhti .2 | title position set yval .8 | distance from x-axis to values set asiz .5 | axis label size set xlab 2.1 | distance y-axis to labels set vsiz .6 | axis values size set xmgl 2.5 | space on left set chhe .6 | character size set txal 20 | alignment of text opt utit | user titles opt nstat | no statistics opt zfl1 | turn on picture-saving sig do_titl=1 | switch to enable auto-title on plots sig do_eps=0 | switch to turn on/off auto .eps file creation return