Cluster.cpp
// insert a phase into the cluster it belongs
insert a phase into the cluster it belongs
insert a phase into the cluster it belongs
bool insertPhase(vector<Cluster> &v, Phase p, int r){
	for (std::vector<Cluster>::iterator i = v.begin(); i != v.end(); ++i){
		if(i->root == r){
			i->phases.push_back(p);
			if ( (p.end() - 1)->event_type >= 35 ){
				cout << "shot detected" << endl;
				i->shot ++;
			}
			return true;
		}
	}
	return false;
}
bool insertPhase ( vector < Cluster > & v , Phase p , int r ) { for ( std :: vector < Cluster > :: iterator i = v . begin ( ) ; i != v . end ( ) ; ++ i ) { if ( i -> root == r ) { i -> phases . push_back ( p ) ; if ( ( p . end ( ) - 1 ) -> event_type >= 35 ) { cout << " " << endl ; i -> shot ++ ; } return true ; } } return false ; }
insert a phase into the cluster it belongs
insert a phase into the cluster it belongs
//counting shots here