GLAST template by moneu

VIEWS: 0 PAGES: 16

									            GLAST LAT Project




                                GLAST
                                Large Area Telescope
       Gamma-ray Large
       Area Space
       Telescope
                                GASU Based Trigger
                                Systems




                                Jim Panetta
                                Stanford Linear Accelerator Center

ACD G3 Talks - 1 March, 2004                                         1
            GLAST LAT Project


                        GASU Based Test Stands
      •    LAT based trigger systems
      •    Hardware Abstractions
      •    User Implementation

            • (Examples! Code!! Animatronic Dinosaurs!!!)




ACD G3 Talks - 1 March, 2004                                2
            GLAST LAT Project


                                LAT Based Triggers
      • All triggers define:
            –   Startup conditions         ( TrgSequence )
            –   A set of data inputs       ( TrgInputEnables )
            –   A set of conditions        ( TrgConditionsValue )
            –   A set of actions to take   ( TrgEngines )
            –   Ending sequence            ( TrgInjectMarker )




ACD G3 Talks - 1 March, 2004                                        3
            GLAST LAT Project


                                Defining the GEM
      • Define setup parameters
      • Implement register shapes and accessors
        from the setup parameters
      • Create the hardware abstraction




ACD G3 Talks - 1 March, 2004                       4
            GLAST LAT Project


                 Implementing the ACD Trigger
      • On orbit: ACD is used to veto triggers
      • Test stand: ACD is used to cause triggers




      • Implement a coincidence based system
            – Create list of tiles in coincidence
            – Define engines
            – Dictate trigger conditions


ACD G3 Talks - 1 March, 2004                        5
            GLAST LAT Project


                   Coincidence Trigger System
      • TrgUsingTiles
            –   Master class for a coincidence based system
            –   Provided by LATTE
            –   Defines a default sequence
            –   Defines an ROI implementation ( coincidences )
            –   Sets the ACD into triggering mode




ACD G3 Talks - 1 March, 2004                                     6
            GLAST LAT Project


                                User Code
      • AcdUserExample
            – Implements coincidences between tiles
            – Specifies the input maskings
            – Defines the set of engines used by the trigger




ACD G3 Talks - 1 March, 2004                                   7
            GLAST LAT Project


                                User code, ctd.
      class AcdTriggerExample(TrgUsingTiles):
        """\brief ACD example interface to GEM
        """
        def __init__(self):
          TrgUsingTiles.__init__(self)
          # it just so happens that the roi is exactly
          # the same as the coincidences object
          self.__inputEnables = MyTrgInputEnables()
          self.__engines      = MyTrgEngines()
          self.__conditions   = CnoCondition()
          self.__coincidences = self.roi()

             # Load the coincidences
             self.coincidences().addCoincidence(0,MyCoinc())


      + member functions to return the above

ACD G3 Talks - 1 March, 2004                                   8
            GLAST LAT Project


                   Input, CNO, and Tile Enables
      class MyTrgInputEnables(TrgInputEnables):
        def __init__(self):
          TrgInputEnables.__init__(self)
          self.__towers = NoTowersEnabled()
          self.__cno    = MyCnoEnables()
          self.__tiles = MyTileEnables()
      class MyCnoEnables(TrgCnoEnables):
        """Turn on LA1 and leave the rest off"""
        def LA1(self):
          return True
      class MyTileEnables(TrgTileEnables):
        """Enable all tiles"""
        def tile(self,tileNumber):
          return 0x3




ACD G3 Talks - 1 March, 2004                       9
            GLAST LAT Project


                                Trigger Conditions
      class CnoCondition(TrgConditionsValue):
        """ Define a condition where only the CNO trigger is
         asserted"""
        def __init__(self):
          TrgConditionsValue.__init__(self)
        def cno(self): return True
        def roi(self): return False
        def calLow(self): return False
        def calHigh(self): return False
        def tkr(self): return False
        def periodic(self): return False
        def solicited(self): return False




ACD G3 Talks - 1 March, 2004                                   10
            GLAST LAT Project


                                Coincidences
      class MyCoinc0(TrgCoincidence):
        """This is an example of a user coincidence function.
         Note: The keys in the pairList dictionary *must* be
         unique, but the values do not have to be.
        """
        def __init__(self):
          TrgCoincidence.__init__(self)
          self.__pairList = { 0x0 : 0x49,
                               0x7 : 0x41,
                               0x14 : 0x1F,
                               0x25 : 0x41,
                               0x37 : 0x57,
                            }
          #self.__pairList2 = { AcdTileNumbering["000"] :
         AcdTileNumbering["001"]}


ACD G3 Talks - 1 March, 2004                                    11
            GLAST LAT Project


                                Trigger Engines
      class MyTrgEngines(rcTrgEngines):
        def __init__(self):
          eng = MyEngine()
          self.replaceEngine(1,eng)
      class MyEngine(TrgEngine):
        """This class defines an engine which reads out the detector
        whenever there is a CNO trigger. This engine is not prescaled.
        """
        def __init__(self):
          self.__request = TrgReadout()
          self.__cond = CnoCondition()
        def participate(self,conditionsValue):
          condValue = self.__cond.value()
          if conditionsValue & condValue:
            return True
          return False



ACD G3 Talks - 1 March, 2004                                             12
            GLAST LAT Project


                                Test Code
      from AcdTriggerExample import *
      # set trigger code
      self.trigger( AcdTriggerExample() )

      ...

      # enable triggers
      self.trigger().enable()

      # solicit a trigger
      self.trigger().solicit()

      # disable triggers
      self.trigger().disable()



ACD G3 Talks - 1 March, 2004                13
            GLAST LAT Project


                                Summary
      •    Trigger is pieced into components
      •    Each component has a function
      •    Few components depend on others
      •    Actual hardware is unimportant
      •    Register shapes are unimportant




ACD G3 Talks - 1 March, 2004                   14
            GLAST LAT Project




ACD G3 Talks - 1 March, 2004    15
            GLAST LAT Project




ACD G3 Talks - 1 March, 2004    16

								
To top