you want 4 key ride positions (I'm thinking xc), 1 descending (better not be too far over front wheel - i.e too aero or you otb), 2, climbing (not too far back of course as want front wheel not floating, rear still has weight for bite - so seated can you climb?), 3 attack (off seat, mid bike so even distribution of weight on wheels - you're floating in centre of bike - like a giant pendulum you can flick bike where you want, so you have master control based on this positon), 4 neutral seated (position that allows you to ride comfortably for 2-3 hours - and make good power, no lower back, no numb hands) - this is roadie position.
how to set up; get it ball park at home then bike fit happens on the trail, go out with your tools and find some good sections, position is about compromise between the 4 above, stem will be shorter than longer, seat to bar drop will be conservative, seat for/aft seated power a priority here, bar width (650-750?), priority would be position 3, then 2 - 1 and 4.