1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
18 ////////////////////////////////////
20 // MUON Raw Data generaton in ALICE-MUON
21 // This class version 3 (further details could be found in Alice-note)
23 // Implemented non-constant buspatch numbers for tracking
24 // with correct DDL id (first guess)
25 // (Ch. Finck, dec 2005)
28 // Generates raw data for MUON tracker and finally for trigger
29 // Using real mapping (inverse) for tracker
30 // For trigger there is no mapping (mapping could be found in AliMUONTriggerCircuit)
32 // Use memcpy instead of assignment elt by elt
33 // Introducing variable DSP numbers, real manu numbers per buspatch for st12
34 // Implemented scaler event for Trigger
35 // Ch. Finck , Jan. 06
37 ////////////////////////////////////
39 #include "AliMUONRawWriter.h"
41 #include "AliBitPacking.h"
42 #include "AliLoader.h"
45 #include "AliMUONConstants.h"
46 #include "AliMUONDDLTracker.h"
47 #include "AliMUONDDLTrigger.h"
48 #include "AliMUONData.h"
49 #include "AliMUONDigit.h"
50 #include "AliMUONGeometryModule.h"
51 #include "AliMUONGeometrySegmentation.h"
52 #include "AliMUONGeometryStore.h"
53 #include "AliMUONGlobalTrigger.h"
54 #include "AliMUONLocalTrigger.h"
55 #include "AliMUONScalerEventTrigger.h"
56 #include "AliMUONSubEventTrigger.h"
57 #include "AliMpBusPatch.h"
58 #include "AliMpDEManager.h"
60 #include "AliMpPlaneType.h"
61 #include "AliMpSegFactory.h"
62 #include "AliMpStationType.h"
63 #include "AliMpVSegmentation.h"
65 #include "TClonesArray.h"
66 ClassImp(AliMUONRawWriter) // Class implementation in ROOT context
68 Int_t AliMUONRawWriter::fgManuPerBusSwp1B[12] = {1, 27, 53, 79, 105, 131, 157, 183, 201, 214, 224, 232};
69 Int_t AliMUONRawWriter::fgManuPerBusSwp1NB[12] = {1, 27, 53, 79, 105, 131, 157, 183, 201, 214, 225, 233};
71 Int_t AliMUONRawWriter::fgManuPerBusSwp2B[12] = {1, 27, 53, 79, 105, 131, 157, 183, 201, 214, 226, 246};
72 Int_t AliMUONRawWriter::fgManuPerBusSwp2NB[12] = {1, 27, 53, 79, 105, 131, 157, 183, 201, 214, 227, 245};
75 //__________________________________________________________________________
76 AliMUONRawWriter::AliMUONRawWriter(AliMUONData* data)
80 // Standard Constructor
82 AliDebug(1,"Standard ctor");
84 // initialize container
88 fSubEventArray = new TClonesArray("AliMUONSubEventTracker",1000);
89 fSubEventArray->SetOwner(kTRUE);
92 fDDLTracker = new AliMUONDDLTracker();
93 fDDLTrigger = new AliMUONDDLTrigger();
95 fBusPatchManager = new AliMpBusPatch();
96 fBusPatchManager->ReadBusPatchFile();
98 fSegFactory = new AliMpSegFactory();
100 fTrackerTimer.Start(kTRUE); fTrackerTimer.Stop();
101 fTriggerTimer.Start(kTRUE); fTriggerTimer.Stop();
102 fMappingTimer.Start(kTRUE); fMappingTimer.Stop();
106 //__________________________________________________________________________
107 AliMUONRawWriter::AliMUONRawWriter()
113 fScalerEvent(kFALSE),
116 // Default Constructor
117 AliDebug(1,"Default ctor");
118 fFile[0] = fFile[1] = 0x0;
119 fTrackerTimer.Start(kTRUE); fTrackerTimer.Stop();
120 fTriggerTimer.Start(kTRUE); fTriggerTimer.Stop();
121 fMappingTimer.Start(kTRUE); fMappingTimer.Stop();
124 //_______________________________________________________________________
125 AliMUONRawWriter::AliMUONRawWriter (const AliMUONRawWriter& rhs)
128 // Protected copy constructor
130 AliFatal("Not implemented.");
133 //_______________________________________________________________________
135 AliMUONRawWriter::operator=(const AliMUONRawWriter& rhs)
137 // Protected assignement operator
139 if (this == &rhs) return *this;
141 AliFatal("Not implemented.");
146 //__________________________________________________________________________
147 AliMUONRawWriter::~AliMUONRawWriter(void)
153 delete fSubEventArray;
158 delete fBusPatchManager;
162 AliInfo(Form("Execution time for MUON tracker : R:%.2fs C:%.2fs",
163 fTrackerTimer.RealTime(),fTrackerTimer.CpuTime()));
164 AliInfo(Form(" Execution time for MUON tracker (mapping calls part) "
166 fMappingTimer.RealTime(),fMappingTimer.CpuTime()));
167 AliInfo(Form("Execution time for MUON trigger : R:%.2fs C:%.2fs",
168 fTriggerTimer.RealTime(),fTriggerTimer.CpuTime()));
171 //____________________________________________________________________
172 Int_t AliMUONRawWriter::Digits2Raw()
174 // convert digits of the current event to raw data
179 fMUONData->GetLoader()->LoadDigits("READ");
181 fMUONData->SetTreeAddress("D,GLT");
183 fMUONData->ResetDigits();
184 fMUONData->ResetTrigger();
186 // This will get both tracker and trigger digits.
187 fMUONData->GetDigits();
191 for (Int_t ich = 0; ich < AliMUONConstants::NTrackingCh(); ich++)
194 idDDL = ich * 2 + 0x900; // official number for MUON
195 sprintf(name, "MUON_%d.ddl",idDDL);
196 fFile[0] = fopen(name,"w");
198 idDDL = (ich * 2) + 1 + 0x900;
199 sprintf(name, "MUON_%d.ddl",idDDL);
200 fFile[1] = fopen(name,"w");
202 WriteTrackerDDL(ich);
212 idDDL = 0xA00;// official number for MUTR
213 sprintf(name, "MUTR_%d.ddl",idDDL);
214 fFile[0] = fopen(name,"w");
217 sprintf(name, "MUTR_%d.ddl",idDDL);
218 fFile[1] = fopen(name,"w");
226 fMUONData->ResetDigits();
227 fMUONData->ResetTrigger();
228 fMUONData->GetLoader()->UnloadDigits();
233 //____________________________________________________________________
234 Int_t AliMUONRawWriter::WriteTrackerDDL(Int_t iCh)
236 // writing DDL for tracker
237 // used inverse mapping
239 fTrackerTimer.Start(kFALSE);
241 static const Int_t kMAXADC = (1<<12)-1; // We code the charge on a 12 bits ADC.
243 TClonesArray* muonDigits = 0;
244 fSubEventArray->Delete();
247 TArrayI nbInBus(5000);
251 AliRawDataHeader header = fDDLTracker->GetHeader();
252 Int_t headerSize = fDDLTracker->GetHeaderSize();
257 UChar_t channelId = 0;
259 Int_t busPatchId = 0;
273 const AliMUONDigit* digit;
275 AliDebug(3, Form("WriteDDL chamber %d\n", iCh+1));
277 muonDigits = fMUONData->Digits(iCh);
279 nDigits = muonDigits->GetEntriesFast();
280 AliDebug(3,Form("ndigits = %d\n",nDigits));
283 for (Int_t idig = 0; idig < nDigits; idig++) {
285 digit = (AliMUONDigit*) muonDigits->UncheckedAt(idig);
287 padX = digit->PadX();
288 padY = digit->PadY();
289 charge = digit->ADC();
290 if ( charge > kMAXADC )
292 // This is most probably an error in the digitizer (which should insure
293 // the adc is below kMAXADC), so make it a (non-fatal) error indeed.
294 AliError(Form("adc value %d above %x. Setting to %x",
295 charge,kMAXADC,kMAXADC));
298 cathode = digit->Cathode();
299 detElemId = digit->DetElemId();
302 busPatchId = GetBusPatch(*digit);
303 if (busPatchId<0) continue;
305 if ( digit->ManuId() > 0x7FF || digit->ManuId() < 0 ||
306 digit->ManuChannel() > 0x3F || digit->ManuChannel() < 0 )
308 StdoutToAliError(digit->Print(););
309 AliFatal("ManuId,ManuChannel are invalid for the digit above.");
312 manuId = ( digit->ManuId() & 0x7FF ); // 11 bits
313 channelId = ( digit->ManuChannel() & 0x3F ); // 6 bits
315 AliDebug(3,Form("input detElemId %d busPatchId %d PadX %d PadY %d iCath %d \n",
316 detElemId, busPatchId, padX, padY, cathode));
318 AliDebug(3,Form("busPatchId %d, manuId %d channelId %d\n", busPatchId, manuId, channelId ));
321 AliBitPacking::PackWord((UInt_t)parity,word,29,31);
322 AliBitPacking::PackWord((UInt_t)manuId,word,18,28);
323 AliBitPacking::PackWord((UInt_t)channelId,word,12,17);
324 AliBitPacking::PackWord((UInt_t)charge,word,0,11);
326 // DDL event one per half chamber
327 AliMUONSubEventTracker subEvent;
329 subEvent.AddData(word);
330 subEvent.SetBusPatchId(busPatchId);
332 // storing the number of identical buspatches
333 nbInBus[busPatchId]++;
337 // sorting by buspatch
338 fSubEventArray->Sort();
340 // gather datas from same bus patch
341 nEntries = fSubEventArray->GetEntriesFast();
343 for (Int_t i = 0; i < nEntries; i++)
345 AliMUONSubEventTracker* temp = (AliMUONSubEventTracker*)fSubEventArray->At(i);
346 busPatchId = temp->GetBusPatchId();
348 // add bus patch header, length and total length managed by subevent class
349 temp->SetTriggerWord(0xdeadbeef);
350 for (Int_t j = 0; j < nbInBus[busPatchId]-1; j++)
352 AliMUONSubEventTracker* temp1 = (AliMUONSubEventTracker*)fSubEventArray->At(++i);
353 temp->AddData(temp1->GetData(0));
354 fSubEventArray->RemoveAt(i) ;
357 fSubEventArray->Compress();
359 if (AliLog::GetGlobalDebugLevel() == 3)
361 nEntries = fSubEventArray->GetEntriesFast();
362 for (Int_t i = 0; i < nEntries; i++)
364 AliMUONSubEventTracker* temp = (AliMUONSubEventTracker*)fSubEventArray->At(i);
365 printf("busPatchid back %d\n",temp->GetBusPatchId());
366 for (Int_t j = 0; j < temp->GetLength(); j++)
368 printf("manuId back %d, ",temp->GetManuId(j));
369 printf("channelId back %d, ",temp->GetChannelId(j));
370 printf("charge back %d\n",temp->GetCharge(j));
376 // getting info for the number of buspatches
379 Int_t iBusPerDSP[5];//number of bus patches per DSP
380 Int_t iDspMax; //number max of DSP per block
383 fBusPatchManager->GetDspInfo(iCh, iDspMax, iBusPerDSP);
385 TArrayI* vec = fBusPatchManager->GetBusfromDE((iCh+1)*100);
387 Int_t iBus0AtCh = vec->At(0); //get first bus patch id for a given ich
389 AliDebug(3,Form("iBus0AtCh %d", iBus0AtCh));
391 iBusPatch = iBus0AtCh - 1; // starting point for each chamber
393 // open DDL file, on per 1/2 chamber
394 for (Int_t iDDL = 0; iDDL < 2; iDDL++)
397 buffer = new Int_t [(2048+24)*50]; // 24 words in average for one buspatch and 2048 manu info at most
403 // two blocks A and B per DDL
404 for (Int_t iBlock = 0; iBlock < 2; iBlock++)
407 length = fDDLTracker->GetBlkHeaderLength();
408 memcpy(&buffer[index],fDDLTracker->GetBlkHeader(),length*4);
412 // 5 DSP's max per block
413 for (Int_t iDsp = 0; iDsp < iDspMax; iDsp++)
417 length = fDDLTracker->GetDspHeaderLength();
418 memcpy(&buffer[index],fDDLTracker->GetDspHeader(),length*4);
422 //Â 5 buspatches max per DSP
423 for (Int_t i = 0; i < iBusPerDSP[iDsp]; i++)
426 if ((fBusPatchManager->GetDDLfromBus(iBusPatch) % 2) == 1) // comparing to DDL file
431 AliDebug(3,Form("iCh %d iDDL %d iBlock %d iDsp %d busPatchId %d", iCh, iDDL, iBlock, iDsp, iBusPatch));
433 nEntries = fSubEventArray->GetEntriesFast();
434 AliMUONSubEventTracker* temp = 0x0;
436 for (Int_t iEntries = 0; iEntries < nEntries; iEntries++)
437 { // method "bourrique"...
438 temp = (AliMUONSubEventTracker*)fSubEventArray->At(iEntries);
439 busPatchId = temp->GetBusPatchId();
440 if (busPatchId == iBusPatch) break;
442 AliDebug(3,Form("busPatchId %d", temp->GetBusPatchId()));
445 // check if buspatchid has digit
446 if (busPatchId != -1)
448 // add bus patch structure
449 length = temp->GetHeaderLength();
450 memcpy(&buffer[index],temp->GetBusPatchHeader(),length*4);
452 for (Int_t j = 0; j < temp->GetLength(); j++)
454 buffer[index++] = temp->GetData(j);
455 AliDebug(3,Form("busPatchId %d, manuId %d channelId %d\n", temp->GetBusPatchId(),
456 temp->GetManuId(j), temp->GetChannelId(j) ));
461 // writting anyhow buspatch structure (empty ones)
462 buffer[index++] = 4; // total length
463 buffer[index++] = 0; // raw data length
464 buffer[index++] = iBusPatch; // bus patch
465 buffer[index++] = 0xdeadbeef; // trigger word
468 buffer[indexDsp] = index - indexDsp; // dsp length
469 buffer[indexDsp+1] = index - indexDsp - fDDLTracker->GetDspHeaderLength();
470 if ((index - indexDsp) % 2 == 0)
471 buffer[indexDsp+7] = 0;
473 buffer[indexDsp+7] = 1;
475 buffer[indexBlk] = index - indexBlk; // block length
476 buffer[indexBlk+1] = index - indexBlk - fDDLTracker->GetBlkHeaderLength();
481 header.fSize = (index + headerSize) * 4;// total length in bytes
482 fwrite((char*)(&header),headerSize*4,1,fFile[iFile]);
483 fwrite(buffer,sizeof(int),index,fFile[iFile]);
488 fTrackerTimer.Stop();
492 //____________________________________________________________________
493 Int_t AliMUONRawWriter::GetBusPatch(const AliMUONDigit& digit)
495 // Determine the BusPatch this digit belongs to.
497 fMappingTimer.Start(kFALSE);
501 // information from digits
502 Int_t detElemId = digit.DetElemId();
504 AliMpVSegmentation* seg =
505 fSegFactory->CreateMpSegmentationByElectronics(detElemId, digit.ManuId());
507 AliMpPlaneType plane = seg->PlaneType();
509 AliMpStationType stationType = AliMpDEManager::GetStationType(detElemId);
511 if ( stationType == kStation1 || stationType == kStation2 )
513 if (plane == kBendingPlane)
515 ptr = &fgManuPerBusSwp1B[0];
519 ptr = &fgManuPerBusSwp1NB[0];
524 if (plane == kBendingPlane)
526 ptr = &fgManuPerBusSwp2B[0];
530 ptr = &fgManuPerBusSwp2NB[0];
534 // Getting buspatch id
535 TArrayI* vec = fBusPatchManager->GetBusfromDE(detElemId);
538 Int_t m = ( digit.ManuId() & 0x3FF ); // remove bit 10
539 //FIXME : how can we remove that condition
540 // on the 10-th bit ? All the rest need not any knowledge about it,
541 // can't we find a way to get manu<->buspatch transparent to this too ?
543 if ( stationType == kStation1 || stationType == kStation2 )
545 for (Int_t i = 0; i < 12; i++)
547 if (m >= *(ptr + pos++)) break;
552 // offset of 100 in manuId for following bus patch
556 if (pos >(Int_t) vec->GetSize())
558 AliError(Form("pos greater %d than size %d manuId %d detElemId %d \n",
559 pos, (Int_t)vec->GetSize(), digit.ManuId(), detElemId));
560 AliError(Form("Chamber %s Plane %s manuId %d m %d",
561 StationTypeName(stationType).Data(),
562 PlaneTypeName(plane).Data(),
568 Int_t busPatchId = vec->At(pos);
570 fMappingTimer.Stop();
575 //____________________________________________________________________
576 Int_t AliMUONRawWriter::WriteTriggerDDL()
580 fTriggerTimer.Start(kFALSE);
582 // DDL event one per half chamber
583 AliMUONSubEventTrigger* subEvent = 0x0;
584 AliMUONScalerEventTrigger* scalerEvent = 0x0;
586 // stored local id number
587 TArrayI isFired(256);
592 AliRawDataHeader header = fDDLTrigger->GetHeader();
593 Int_t headerSize = fDDLTrigger->GetHeaderSize();
595 TClonesArray* localTrigger;
596 TClonesArray* globalTrigger;
597 AliMUONGlobalTrigger* gloTrg;
598 AliMUONLocalTrigger* locTrg = 0x0;
600 // global trigger for trigger pattern
601 globalTrigger = fMUONData->GlobalTrigger();
602 gloTrg = (AliMUONGlobalTrigger*)globalTrigger->UncheckedAt(0);
603 Int_t gloTrigPat = GetGlobalTriggerPattern(gloTrg);
606 localTrigger = fMUONData->LocalTrigger();
612 Int_t iLocCard, locCard;
613 Char_t locDec, trigY, posY, posX,regOut;
615 Int_t version = 1; // software version
616 Int_t eventType = 1; // trigger type: 1 for physics ?
617 Int_t serialNb = 0xF; // serial nb of card: all bits on for the moment
618 Int_t globalFlag = 1; // set to 2 if global info present in DDL else set to 1
621 eventType = 2; //set to generate scaler events
623 Int_t nEntries = (Int_t) (localTrigger->GetEntries());// 234 local cards
624 // stored the local card id that's fired
625 for (Int_t i = 0; i < nEntries; i++) {
626 locTrg = (AliMUONLocalTrigger*)localTrigger->At(i);
627 isFired[locTrg->LoCircuit()] = 1; // storing local boards with informations
631 AliError("No Trigger information available");
634 // [16(local)*50 words + 14 words]*8(reg) + 6 + 10 + 6 words scaler event 6534 words
635 buffer = new Int_t [6534];
637 // [16(local)*5 words + 3 words]*8(reg) + 8 words = 672
638 buffer = new Int_t [672];
641 scalerEvent = new AliMUONScalerEventTrigger();
642 scalerEvent->SetNumbers(); // set some numbers for scalers
645 // open DDL file, on per 1/2 chamber
646 for (Int_t iDDL = 0; iDDL < 2; iDDL++) {
650 // DDL enhanced header
652 AliBitPacking::PackWord((UInt_t)iDDL+1,word,28,31); //see AliMUONDDLTrigger.h for details
653 AliBitPacking::PackWord((UInt_t)serialNb,word,24,27);
654 AliBitPacking::PackWord((UInt_t)version,word,16,23);
655 AliBitPacking::PackWord((UInt_t)eventType,word,12,15);
657 if (iDDL == 0) // suppose global info in DDL one
662 AliBitPacking::PackWord((UInt_t)globalFlag,word,8,11);
663 fDDLTrigger->SetDDLWord(word);
664 buffer[index++]= word;
667 fDDLTrigger->SetGlobalOutput(gloTrigPat);// no global input for the moment....
669 fDDLTrigger->SetGlobalOutput(0);
672 // 6 DARC scaler words
673 memcpy(&buffer[index], scalerEvent->GetDarcScalers(),scalerEvent->GetDarcScalerLength()*4);
674 index += scalerEvent->GetDarcScalerLength();
677 // 4 words of global board input + Global board output
678 memcpy(&buffer[index], fDDLTrigger->GetGlobalInput(), (fDDLTrigger->GetHeaderLength()-1)*4);
679 index += fDDLTrigger->GetHeaderLength() - 1; // kind tricky cos scaler info in-between Darc header
682 // 10 Global scaler words
683 memcpy(scalerEvent->GetGlobalScalers(), &buffer[index], scalerEvent->GetGlobalScalerLength()*4);
684 index += scalerEvent->GetGlobalScalerLength();
687 // 8 regional cards per DDL
688 for (Int_t iReg = 0; iReg < 8; iReg++) {
690 subEvent = new AliMUONSubEventTrigger();
692 // Regional card header
695 AliBitPacking::PackWord((UInt_t)serialNb,word,24,28); //see AliMUONSubEventTrigger.h for details
696 AliBitPacking::PackWord((UInt_t)version,word,16,23);
697 AliBitPacking::PackWord((UInt_t)iReg,word,12,15);
698 AliBitPacking::PackWord((UInt_t)regOut,word,0,7); // whenever regional output will be implemented
700 subEvent->SetRegWord(word);
701 memcpy(&buffer[index],subEvent->GetRegHeader(),subEvent->GetRegHeaderLength()*4);
702 index += subEvent->GetRegHeaderLength();
704 // 11 regional scaler word
706 memcpy(&buffer[index], scalerEvent->GetRegScalers(), scalerEvent->GetRegScalerLength()*4);
707 index += scalerEvent->GetRegScalerLength();
710 // 16 local card per regional board
711 for (Int_t iLoc = 0; iLoc < 16; iLoc++) {
713 iLocCard = iLoc + iReg*16 + iDDL*128;
715 if (isFired[iLocCard]) {
716 locTrg = (AliMUONLocalTrigger*)localTrigger->At(iEntries);
717 locCard = locTrg->LoCircuit();
718 locDec = locTrg->GetLoDecision();
720 posY = locTrg->LoStripY();
721 posX = locTrg->LoStripX();
722 devX = locTrg->LoDev();
723 AliDebug(4,Form("loctrg %d, posX %d, posY %d, devX %d\n",
724 locTrg->LoCircuit(),locTrg->LoStripX(),locTrg->LoStripY(),locTrg->LoDev()));
725 } else { //no trigger (see PRR chpt 3.4)
736 AliBitPacking::PackWord((UInt_t)(iLocCard % 16),word,19,22); //card id number in crate
737 AliBitPacking::PackWord((UInt_t)locDec,word,15,18);
738 AliBitPacking::PackWord((UInt_t)trigY,word,14,14);
739 AliBitPacking::PackWord((UInt_t)posY,word,10,13);
740 AliBitPacking::PackWord((UInt_t)devX,word,5,9);
741 AliBitPacking::PackWord((UInt_t)posX,word,0,4);
743 if (locCard == iLocCard) {
744 // add local cards structure
745 buffer[index++] = (locTrg->GetX1Pattern() | (locTrg->GetX2Pattern() << 16));
746 buffer[index++] = (locTrg->GetX3Pattern() | (locTrg->GetX4Pattern() << 16));
747 buffer[index++] = (locTrg->GetY1Pattern() | (locTrg->GetY2Pattern() << 16));
748 buffer[index++] = (locTrg->GetY3Pattern() | (locTrg->GetY4Pattern() << 16));
749 buffer[index++] = (Int_t)word; // data word
750 if (iEntries < nEntries-1)
753 buffer[index++] = 0; // 4 words for x1, x2, y1, y2
757 buffer[index++] = (Int_t)word; // data word
760 // 45 regional scaler word
762 memcpy(&buffer[index], scalerEvent->GetLocalScalers(), scalerEvent->GetLocalScalerLength()*4);
763 index += scalerEvent->GetLocalScalerLength();
772 buffer[index++] = fDDLTrigger->GetEoD(); // End of DDL word
773 buffer[index++] = fDDLTrigger->GetEoD(); // End of DDL word for 64 bits transfer purpose
775 // writting onto disk
777 header.fSize = (index + headerSize) * 4;// total length in bytes
778 fwrite((char*)(&header),headerSize*4,1,fFile[iDDL]);
779 fwrite(buffer,sizeof(int),index,fFile[iDDL]);
786 fTriggerTimer.Stop();
791 //____________________________________________________________________
792 Int_t AliMUONRawWriter::GetGlobalTriggerPattern(const AliMUONGlobalTrigger* gloTrg) const
794 // global trigger pattern calculation
796 Int_t gloTrigPat = 0;
798 if (gloTrg->SinglePlusLpt()) gloTrigPat|= 0x1;
799 if (gloTrg->SinglePlusHpt()) gloTrigPat|= 0x2;
800 if (gloTrg->SinglePlusApt()) gloTrigPat|= 0x4;
802 if (gloTrg->SingleMinusLpt()) gloTrigPat|= 0x8;
803 if (gloTrg->SingleMinusHpt()) gloTrigPat|= 0x10;
804 if (gloTrg->SingleMinusApt()) gloTrigPat|= 0x20;
806 if (gloTrg->SingleUndefLpt()) gloTrigPat|= 0x40;
807 if (gloTrg->SingleUndefHpt()) gloTrigPat|= 0x80;
808 if (gloTrg->SingleUndefApt()) gloTrigPat|= 0x100;
810 if (gloTrg->PairUnlikeLpt()) gloTrigPat|= 0x200;
811 if (gloTrg->PairUnlikeHpt()) gloTrigPat|= 0x400;
812 if (gloTrg->PairUnlikeApt()) gloTrigPat|= 0x800;
814 if (gloTrg->PairLikeLpt()) gloTrigPat|= 0x1000;
815 if (gloTrg->PairLikeHpt()) gloTrigPat|= 0x2000;
816 if (gloTrg->PairLikeApt()) gloTrigPat|= 0x4000;