<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def tracktype(self, tracktype):
 """ When setting the track type, the valid parameters for this track type need to be set as well. """

        self._tracktype = tracktype
        if tracktype is not None:
            if 'bed' in tracktype.lower():
                tracktype = 'bigBed'
            elif 'wig' in tracktype.lower():
                tracktype = 'bigWig'
        self.params.update(constants.track_typespecific_fields[tracktype])