Esempio n. 1
0
	def setLinacTracker(self, switch = True):
		"""
		This method will switch RF gap model to slower one where transformations 
		coefficients are calculated for each particle in the bunch.
		"""
		AbstractRF_Gap.setLinacTracker(self,switch)
		if(switch):
			self.cppGapModel = RfGapThreePointTTF_slow()			
		else:
			self.cppGapModel = RfGapThreePointTTF()
Esempio n. 2
0
	def setLinacTracker(self, switch = True):
		"""
		This method will switch RF gap model to slower one where transformations 
		coefficients are calculated for each particle in the bunch.
		"""
		AbstractRF_Gap.setLinacTracker(self,switch)
		if(switch):
			if(isinstance(self.cppGapModel,BaseRfGap) or isinstance(self.cppGapModel,BaseRfGap_slow)):
				self.cppGapModel = BaseRfGap_slow()
			if(isinstance(self.cppGapModel,RfGapTTF) or isinstance(self.cppGapModel,RfGapTTF_slow)):
				self.cppGapModel = RfGapTTF_slow()				
		else:
			if(isinstance(self.cppGapModel,BaseRfGap) or isinstance(self.cppGapModel,BaseRfGap_slow)):
				self.cppGapModel = BaseRfGap()
			if(isinstance(self.cppGapModel,RfGapTTF) or isinstance(self.cppGapModel,RfGapTTF_slow)):
				self.cppGapModel = RfGapTTF()