Attn Jack. Activity Loop interaction with templates

Activity Loop is called in several place. As an example its called under groups/single/activity.php.

However, how does the activity loop know that its being called by the Groups Activity thread? The code gives me zero hints:

<div class="activity single-group" role="main">
	<?php locate_template( array( 'activity/activity-loop.php' ), true ); ?>
</div><!-- .activity.single-group -->

Aside from the fancy html, its no different from activity/index.php (main activity stream).

<div class="activity" role="main">

				<?php locate_template( array( 'activity/activity-loop.php' ), true ); ?>

			</div><!-- .activity -->