 This may cause us to underestimate the maximum past temperature of gas that experienced an accretion shock at densities $n_{\rm H} > 0.1 ~{\rm cm}^{-3}$. Ignoring such shocks is, however, consistent with our aims, as we are interested in the maximum temperature reached *before* the gas entered the galaxy. Note, however, that the maximum past temperature of some particles may reflect shocks in outflowing rather than accreting gas.

Another reason why $T_\mathrm{max}$ may underestimate the true maximum past temperature, is that in SPH simulations a shock is smeared out over a few smoothing lengths, leading to in-shock cooling [@Hutchings2000]. If the cooling time is of the order of, or smaller than, the time step, then the maximum temperature will be underestimated. @Creasey2011 have shown that a particle mass of $10^6$ M$_\odot$ is sufficient to avoid numerical overcooling of accretion shocks onto haloes, like in our high-resolution simulations (*L025N512*). The Appendix shows that our lower-resolution simulations give very similar results.

Even with infinite resolution, the post-shock temperatures may, however, not be well defined. Because electrons and protons have different masses, they will have different temperatures in the post-shock gas and it may take some time before they equilibrate through collisions or plasma effects. We have ignored this complication. Another effect, which was also not included in our simulation, is that shocks may be preceded by the radiation from the shock, which may affect the temperature evolution. Disregarding these issues, @Voort2011a showed that the distribution of $T_\mathrm{max}$ is bimodal and that a cut at $T_\mathrm{max}=10^{5.5}$ K naturally divides the gas into cold- and hot-mode accretion and that it produces similar results as studies based on adaptive mesh refinement simulations [@Ocvirk2008]. This $T_\mathrm{max}$ threshold was chosen because the cooling function peaks at $10^{5-5.5}$ K [e.g. @Wiersma2009a], which results in a minimum in the temperature distribution. Additionally, the UV background can only heat gas to about $10^5$ K, which is therefore characteristic for cold-mode accretion. In this work we use the same $T_\mathrm{max}=10^{5.5}$ K threshold to separate the
This may cause us to underestimate the maximum past temperature of gas that experience an accretion jolt at densities $ n_{\rm H } > 0.1 ~{\rm cm}^{-3}$. Ignoring such shocks is, however, coherent with our aims, as we are interested in the maximal temperature reached * before * the gas entered the galax. notice, however, that the maximum past temperature of some particles may chew over shocks in outflowing rather than accrete accelerator. 

 Another reason why $ T_\mathrm{max}$ may underestimate the true maximum past temperature, is that in SPH simulations a daze is smeared out over a few smoothing lengths, lead to in - shock cooling [ @Hutchings2000 ]. If the cooling time is of the ordering of, or smaller than, the time step, then the maximum temperature will be underestimated. @Creasey2011 have prove that a particle mass of $ 10 ^ 6 $   M$_\odot$ is sufficient to avoid numerical overcooling of accretion shocks onto halo, like in our high - resolution simulations (* L025N512 *). The Appendix shows that our lower - resolution simulations give very similar results. 

 Even with countless resolving power, the post - shock temperatures may, however, not be well define. Because electron and protons have different masses, they will have different temperatures in the post - shock gas and it may drive some time before they equilibrate through collisions or plasma effects. We have ignored this complication. Another impression, which was also not included in our simulation, is that shocks may be precede by the radiation sickness from the shock, which may affect the temperature evolution. Disregarding these issues, @Voort2011a indicate that the distribution of $ T_\mathrm{max}$ is bimodal and that a cut at $ T_\mathrm{max}=10^{5.5}$   K naturally divides the gas into cold- and blistering - mode accretion and that it produce similar results as study based on adaptive mesh refinement simulations [ @Ocvirk2008 ]. This $ T_\mathrm{max}$ threshold was choose because the cooling affair peaks at $ 10^{5 - 5.5}$   K [ for example @Wiersma2009a ], which results in a minimum in the temperature distribution. Additionally, the UV background can entirely heat natural gas to about $ 10 ^ 5 $   K, which is therefore characteristic for cold - mode accretion. In this work we use the same $ T_\mathrm{max}=10^{5.5}$   K threshold to separate the
 Thls may cause us to undertstimate the maximum pasv tempedature ow gas that experienced an acrretuon syock at densities $n_{\rm F} > 0.1 ~{\rm cm}^{-3}$. Ignorint surh shocks is, howxber, consistenf witk iur aims, as we are interasted in the mdxkmbm temperature reached *before* the gaf enterrd the galaxy. Noje, hoeqver, nhct the maximum past temperature of somt particles may reglect shocks in outflowing ratjer than accreting gas.

Another reafin why $T_\mathfm{max}$ may luderestimatg the true maximum past temperatjre, ix that in WPY slkulations a shoch is smeared out oves a few smoothing lennths, neaeing to in-shock cooliig [@Hutchings2000]. If the sooling thmz is of the order of, ir smalner dhan, rhe tije sfep, thfn vhe maximum temperaturw will be underestikaevc. @Creasey2011 habe shorn that a particle mass of $10^6$ M$_\odot$ is suffibienf to avoid numerical ovwrcooling of accretioj shocks jnto haloes, like in our high-resolution simulationv (*L025N512*). Vhd Akpckdix whlws that our lower-resolution simulations give bety similar resulbs.

Even with infiniye rrfolution, the kost-shoei femperatures may, hlwever, got bw well desinec. Because electrons and prorons have diyfeeent masses, they wnll have difyerent temprratures in the post-shoek gas and it may take soms time before theh eauhlibrate through collisionf or plasna eyfects. Wd hafe ignjred this fompllwation. Another efffct, wkich fas also nlt included in our simulation, is that shocks kaf bv precedeb by tme radiation frjm the shock, wkich may affezt the temierature xvolution. Difregarding thade issues, @Vomrt2011a shored rhat the dirgribution of $T_\kathrm{max}$ is bimodao and that a cut ab $T_\majhdm{max}=10^{5.5}$ K naturallv eivides the gas ingo sopd- agg hot-mode acwretkon snd tfat it kxodmcer sikilar results as stugies based on adaptive mcsh refingment simtlations [@Ocvitk2008]. This $T_\mathrm{max}$ threvhoud wax crosen because the cooling funcfion peakd ab $10^{5-5.5}$ K [e.g. @Wiersmw2009a], wmich results iu a minimum in the temperature distributmon. Additionally, the UV background can onli htat gas to abput $10^5$ K, which is therefore characterustic for cold-modt accretion. In this wori we uve thf same $T_\mathrm{max}=10^{5.5}$ K threshold to separate the
This may cause us to underestimate the temperature gas that an accretion shock 0.1 cm}^{-3}$. Ignoring such is, however, consistent our aims, as we are interested the maximum temperature reached *before* the gas entered the galaxy. Note, however, that maximum past temperature of some particles may reflect shocks in outflowing rather than gas. reason $T_\mathrm{max}$ underestimate the true maximum past temperature, is that in SPH simulations a shock is smeared out a few smoothing lengths, leading to in-shock cooling If the cooling time of the order of, or than, time step, the temperature be underestimated. @Creasey2011 shown that a particle mass of $10^6$ M$_\odot$ is sufficient to avoid numerical overcooling of accretion shocks haloes, like high-resolution simulations The shows our lower-resolution simulations similar results. Even with infinite resolution, may, however, not be well defined. Because electrons protons have masses, they will have different temperatures the post-shock gas and it may take some before they equilibrate through collisions or plasma effects. We have ignored this complication. Another effect, also not included in simulation, is that may preceded the from the which may affect the temperature evolution. Disregarding these issues, @Voort2011a showed the distribution of $T_\mathrm{max}$ is bimodal and that a cut K divides the gas cold- and hot-mode accretion that produces similar results as on mesh This threshold chosen because the cooling peaks at $10^{5-5.5}$ K [e.g. which results in a Additionally, the UV background can only heat gas about $10^5$ K, which is therefore characteristic cold-mode accretion. In this work we use the same $T_\mathrm{max}=10^{5.5}$ K threshold separate the
 This may cause us to underestiMate the maxImum pAst TemPeRatuRe of Gas that experieNCed aN accretion shock at densiTies $n_{\Rm h} > 0.1 ~{\Rm cm}^{-3}$. iGnOring Such shoCKs IS, HowEvEr, ConSiSTeNt witH ouR aims, as We are interEstEd In the maximum TEmPerature reAchEd *before* the gAs eNtered ThE gaLAxy. NoTe, hOweveR, that tHE maximUm past temPeRAture oF Some parTIClEs maY reflect shocks in oUTfLOwing rather thaN accreTiNG gAS.

anoTheR reason why $t_\mAthrm{MAx}$ may unDErESTImaTE the true maximUm past tempeRAtuRe, is thAt In Sph simulAtionS a SHocK is smeared oUt ovEr a few smoOthing LEngths, lEAding to In-shocK coOliNg [@HuTChInGs2000]. IF tHE coOLiNg tIMe iS of the orDeR oF, or smAlleR THAN, the TimE steP, then The maximum temPerAturE WilL be unDeresTimaTeD. @CreaSey2011 havE showN tHat a particle masS of $10^6$ M$_\Odot$ is sufFicIeNt tO aVoid nUMericaL ovErcOoling oF accretIOn sHoCKS OnTo haloes, like in our hIgH-REsOlution sImulatIOnS (*L025n512*). the AppenDiX shOws tHAT our lOwer-REsOlution sImulatIOnS gIve very SiMilar rEsUltS.

EvEn witH InfiNite reSolution, The poST-shock temperatURes may, however, NOt BE WeLL defIneD. Because eleCtroNS and ProtONs HavE DiffeRent mAsSEs, THey will have differenT tEmperaTures In the post-shocK gas and it mAY TAke some tIme bEFoRE they equilibraTe thrOugh collisIOns or plaSma efFects. We hAve ignoreD THis complIcaTioN. AnOthER EfFect, which was aLSO not InCluded iN ouR simulaTioN, is ThaT shOcKs may be prEceded by ThE rAdIaTioN from THe shock, wHiCh mAy AffEct thE TemperAture EvolUtIoN. disRegardiNG tHESe isSuEs, @voorT2011a sHoWed thAt thE DisTributiOn of $T_\mathRm{mAX}$ is bImOdAl and thAt a cut at $T_\mathRm{Max}=10^{5.5}$ K naturaLlY diVides tHE Gas into cOld- and hot-mode accretion aND that it ProDuces SimiLar resultS as StudieS baSEd on adAptive Mesh rEfIneMENt simULAtIonS [@OCvirk2008]. This $T_\MAThrM{max}$ tHrEshoLd was chOsen because the coolINg fUnction peaks aT $10^{5-5.5}$ K [e.G. @WieRSMa2009A], whICh REsuLtS In a MINimum in the tempeRature distRiBUtIon. AdditioNAllY, tHe UV bacKground Can onLY heat gaS to about $10^5$ K, Which is thErEforE CHarActeristic For cold-mOde accretIOn. In tHIs Work wE usE the saMe $t_\maThrm{mAx}=10^{5.5}$ K thrEShoLd to sEparatE tHe
 This may cause us to unde restimatethe m axi mum  p asttemp erature of gas that  experienced an accret ion s ho c k at de nsiti es $n_{ \ rm H } >  0 .1  ~{ \r m  c m}^{- 3}$ . Ignor ing such s hoc ks  is, however ,  c onsistentwit h our aims,aswe are  i nte r ested  in  themaximu m  tempe rature re ac h ed *be f ore* th e ga s en tered the galaxy. No t e, however, th at the  m a xi m u m p ast  temperatu re  of s o me part i cl e s may reflect shock s in outflo w ing  rathe rtha n  accre tingga s .
Another rea sonwhy $T_\m athrm{ m ax}$ ma y  undere stimat e t hetrue ma xi mum  p a stt em per a tur e, is th at  i n SPH  sim u l a t ions  ashoc k issmeared out o ver  a f e w s mooth ing l engt hs , lea ding t o in- sh ock cooling [@H utch ings2000] . I fthe  c oolin g  timeisofthe ord er of,o r s ma l l e rthan, the time ste p, t he n the ma ximumt em pe r ature wi ll  be  und e r estim ated .  @ Creasey2 011 ha v esh own tha ta part ic lemas s of$ 10^6 $ M$_\ odot$ is  suff i cient to avoid numerical ove r co o l in g  ofacc retion shoc ks o n to h aloe s ,lik e  in o ur hi gh - re s olution simulations  ( *L025N 512*) . The Appendi x shows th a t our lowe r-re s ol u tion simulatio ns gi ve very si m ilar res ults. 

Even w ith infin i t e resolu tio n,the  po s t -s hock temperat u r es m ay , howev er,  not be  we lldef ine d.  Becauseelectron san dpr oto ns ha v e differ en t m as ses , the y  willhavediff er en t  te mperatu r es i n th epo st-s hoc kgas a nd i t  ma y takesome time  be f oreth ey  equili brate through  c ollisionsor  pl asma e f f ects. We  have ignored this comp l ication . A nothe r ef fect, whi chwas al son ot inc ludedin ou rsim u l ation , is  th at  shocks ma y beprece de d by  the ra diation from the s h ock , which may a ffe ct t h e  t emp e ra t ure  e v olu t i on. Disregardin g these is su e s,  @Voort201 1 a s ho wed tha t the d istri b ution o f $T_\mat hrm{max}$  i s bi m o dal  and thata cut at  $T_\math r m{max } =1 0^{5. 5}$  K nat ur all y div ides t h e g as in to col d-  and h ot-mo de  accreti on and that it produces  simil ar re sul ts as stu die s  ba sed on ad apti ve mesh re fin eme nt si mul a tions  [@O c vi rk2 0 08].This $T_\mathr m {m ax} $ th reshold was c h ose n bec aus e  the c ooli ng function peaks at $10^{5-5.5} $ K[ e .g.  @W i ersm a2 009a], which r esu lt s in a min im um in the t emperatu re distr ibutio n. Add itional l y ,t he UVback gro und can o nly  h e at gasto  a b out $1 0^5$  K , whic h is t h eref o r e characteristic  forc o ld-mo d e a ccret io n. In t h is w ork we use  the same $ T_\mat hrm{ max}= 10^{5.5 }$  K thr esh ol d to separ a te the
 This_may cause_us to underestimate the_maximum past_temperature_of gas_that_experienced an accretion_shock at densities_$n_{\rm H} > 0.1_~{\rm cm}^{-3}$. Ignoring_such_shocks is, however, consistent with our aims, as we are interested in the maximum_temperature_reached *before*_the_gas_entered the galaxy. Note, however,_that the maximum past temperature_of some_particles may reflect shocks in outflowing rather than_accreting_gas.

Another reason why_$T_\mathrm{max}$ may underestimate the true maximum past temperature, is_that in SPH simulations a shock_is smeared out_over_a_few smoothing lengths, leading_to in-shock cooling [@Hutchings2000]. If the_cooling time is of the order_of, or smaller than, the time step,_then the maximum temperature will be_underestimated. @Creasey2011 have shown that_a particle_mass of $10^6$ M$_\odot$ is sufficient_to avoid numerical_overcooling of_accretion shocks onto_haloes, like in our high-resolution simulations_(*L025N512*). The Appendix_shows that our lower-resolution simulations give_very_similar results.

Even with_infinite_resolution,_the post-shock_temperatures may, however,_not_be well_defined._Because electrons and protons have different_masses,_they will have different temperatures in the_post-shock gas and it_may_take some time before_they equilibrate through collisions or_plasma effects. We have ignored this_complication. Another_effect, which_was also not included in our simulation, is that shocks may_be preceded by the radiation from_the shock, which may_affect the_temperature_evolution. Disregarding these_issues,_@Voort2011a showed_that the distribution of $T_\mathrm{max}$ is bimodal_and that_a cut at $T_\mathrm{max}=10^{5.5}$ K naturally divides_the gas into cold-_and_hot-mode accretion and that it produces_similar results as studies based on_adaptive mesh refinement simulations [@Ocvirk2008]._This_$T_\mathrm{max}$_threshold was chosen because the_cooling function peaks at $10^{5-5.5}$ K [e.g._@Wiersma2009a], which results_in a minimum in the temperature distribution._Additionally,_the UV background can only heat_gas_to about $10^5$ K, which is therefore_characteristic_for_cold-mode accretion. In this work_we use the same $T_\mathrm{max}=10^{5.5}$ K threshold_to separate the