]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Update from Arshad Masoodi. Adding triggering option for any DDLs received.
authoraszostak <aszostak@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 16 Nov 2009 11:22:04 +0000 (11:22 +0000)
committeraszostak <aszostak@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 16 Nov 2009 11:22:04 +0000 (11:22 +0000)
HLT/trigger/AliHLTMuonSpectroTriggerComponent.cxx
HLT/trigger/AliHLTMuonSpectroTriggerComponent.h

index 78b4aef20f3645c26e3b79aaddb2645d7c11964d..9b164bc287df3be9f346f1f23a2214ce0430b5d1 100644 (file)
@@ -57,7 +57,7 @@ AliHLTMuonSpectroTriggerComponent::~AliHLTMuonSpectroTriggerComponent()
 void AliHLTMuonSpectroTriggerComponent::GetInputDataTypes(AliHLTComponentDataTypeList& list) const
 {
        // Returns the list of input types expected.
-       
+       list.push_back(AliHLTMUONConstants::DDLRawDataType());  
        list.push_back(AliHLTMUONConstants::TriggerRecordsBlockDataType());
        list.push_back(AliHLTMUONConstants::RecHitsBlockDataType());
        list.push_back(AliHLTMUONConstants::MansoTracksBlockDataType());
@@ -97,11 +97,12 @@ Int_t AliHLTMuonSpectroTriggerComponent::DoInit(int argc, const char** argv)
        // Initialise the component.
        
        fMakeStats = false;
+       fTriggerDDLs = false;
        fTriggerHits = false;
        fTriggerTrigRecs = false;
        fTriggerTracks = false;
        fTriggerDimuons = false;
-       
        for (int i = 0; i < argc; i++)
        {
                if (strcmp(argv[i], "-makestats") == 0)
@@ -109,6 +110,11 @@ Int_t AliHLTMuonSpectroTriggerComponent::DoInit(int argc, const char** argv)
                        fMakeStats = true;
                        continue;
                }
+               if (strcmp(argv[i], "-triggerddls") == 0)
+               {
+                       fTriggerDDLs = true;
+                       continue;
+               }
                if (strcmp(argv[i], "-triggerhits") == 0)
                {
                        fTriggerHits = true;
@@ -168,12 +174,14 @@ int AliHLTMuonSpectroTriggerComponent::DoTrigger()
        // Applies the trigger for the HLT.
        
        int result = 0;
-       
+
+       bool gotddls = false;   
        bool gothits = false;
        bool gottrigrecs = false;
        bool gottracks = false;
        bool gotsingles = false;
        bool gotpairs = false;
+       UInt_t nL0 = 0;
        UInt_t nhits = 0;
        UInt_t nhitsMTR = 0;
        UInt_t nhitsMCH = 0;
@@ -200,8 +208,18 @@ int AliHLTMuonSpectroTriggerComponent::DoTrigger()
        Double_t minmass = -1;
        Double_t maxmass = -1;
        
+
+       AliHLTComponentDataType blockType = AliHLTMUONConstants::DDLRawDataType();
+       for (const AliHLTComponentBlockData* block = GetFirstInputBlock(blockType);
+            block != NULL;
+            block = GetNextInputBlock()
+           )
+       {  
+         gotddls = true;       
+         nL0 = 1;
+       }
        
-       AliHLTComponentDataType blockType = AliHLTMUONConstants::TriggerRecordsBlockDataType();
+       blockType = AliHLTMUONConstants::TriggerRecordsBlockDataType();
        for (const AliHLTComponentBlockData* block = GetFirstInputBlock(blockType);
             block != NULL;
             block = GetNextInputBlock()
@@ -377,6 +395,7 @@ int AliHLTMuonSpectroTriggerComponent::DoTrigger()
        // from singles decision blocks.
        UInt_t ntracks = ntracksSD > ntracksMT ? ntracksSD : ntracksMT;
        
+       bool triggeredOnDDLs = fTriggerDDLs and nL0 > 0;
        bool triggeredOnHits = fTriggerHits and nhitsMCH > 0;
        bool triggeredOnTrigRecs = fTriggerTrigRecs and ntrigrecs > 0;
        bool triggeredOnTracks = fTriggerTracks and ntracks > 0;
@@ -413,13 +432,19 @@ int AliHLTMuonSpectroTriggerComponent::DoTrigger()
                SetReadoutList(AliHLTReadoutList(AliHLTReadoutList::kMUONTRK));
                SetTriggerDomain(AliHLTTriggerDomain("RECHITS :MUON"));
        }
+       else if (triggeredOnDDLs)
+       {
+               SetDescription("DDL in muon tracking chambers");
+               SetReadoutList(AliHLTReadoutList(AliHLTReadoutList::kMUONTRG | AliHLTReadoutList::kMUONTRK));
+               SetTriggerDomain(AliHLTTriggerDomain("DDL_RAW :MUON"));
+       }
        else
        {
                SetDescription("Not triggered");
                SetTriggerDomain(AliHLTTriggerDomain());
        }
        
-       if (triggeredOnDimuons or triggeredOnTracks or triggeredOnTrigRecs or triggeredOnHits)
+       if (triggeredOnDimuons or triggeredOnTracks or triggeredOnTrigRecs or triggeredOnHits or triggeredOnDDLs)
        {
                result = TriggerEvent();
                if (result == -ENOSPC) goto increaseBuffer;
@@ -429,6 +454,7 @@ int AliHLTMuonSpectroTriggerComponent::DoTrigger()
        if (fMakeStats)
        {
                AliHLTMuonSpectroScalars scalars;
+               if (gotddls) scalars.Add("NL0", "Number of L0 triggered event", nL0);
                if (gothits and gottrigrecs) scalars.Add("NHits", "Total number of hits", nhits);
                if (gottrigrecs) scalars.Add("NHitsMTR", "Number of hits in trigger chambers", nhitsMTR);
                if (gothits)
index e0131ba1d480807b12efed4035f7db26d2d35202..394369df6e1642c165044ccc798dc6706b7bd7ca 100644 (file)
@@ -29,7 +29,8 @@
  *
  * Component ID: \b MuonSpectroTrigger <br>
  * Library: \b libAliHLTTrigger.so <br>
- * Input Data Types: \li AliHLTMUONConstants::TriggerRecordsBlockDataType()  = "TRIGRECS:MUON" <br>
+ * Input Data Types: \li AliHLTMUONConstants::DDLRawDataType()               = "DDL_RAW :MUON" <br>
+ *                   \li AliHLTMUONConstants::TriggerRecordsBlockDataType()  = "TRIGRECS:MUON" <br>
  *                   \li AliHLTMUONConstants::RecHitsBlockDataType()         = "RECHITS :MUON" <br>
  *                   \li AliHLTMUONConstants::MansoTracksBlockDataType()     = "MANTRACK:MUON" <br>
  *                   \li AliHLTMUONConstants::SinglesDecisionBlockDataType() = "DECIDSIN:MUON" <br>
@@ -45,6 +46,9 @@
  * \li -makestats <br>
  *      If specified then the summary statistics scalars object is generated as output.
  *      The default is not to generate the statistics object. <br>
+ * \li -triggerddls <br>
+ *      Indicates that the component should trigger if any ddls are found in the muon
+ *      spectrometer. <br>
  * \li -triggerhits <br>
  *      Indicates that the component should trigger if any hits are found in the muon
  *      spectrometer tracking chambers. This option requires that this trigger component
@@ -177,6 +181,7 @@ private:
        unsigned long fBufferSizeConst; //! Constant size estimate for GetOutputDataSize.
        double fBufferSizeMultiplier; //! Buffer size multiplier estimate for GetOutputDataSize.
        bool fMakeStats; //! Indicates if the statistics scalars object should be generated or not.
+       bool fTriggerDDLs; //! If true then the component will trigger on any dll in the tracking and trigger chambers.
        bool fTriggerHits; //! If true then the component will trigger on any hits in the tracking chambers.
        bool fTriggerTrigRecs; //! If true then the component will trigger on any trigger records.
        bool fTriggerTracks; //! If true then the component will trigger on any tracks found.