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 **************************************************************************/
16 ////////////////////////////////////
18 // MUON Raw Data generaton in ALICE-MUON
19 // This class version 3 (further details could be found in Alice-note)
21 // Implemented non-constant buspatch numbers for tracking
22 // with correct DDL id (first guess)
23 // (Ch. Finck, dec 2005)
26 // Generates raw data for MUON tracker and finally for trigger
27 // Using real mapping (inverse) for tracker
28 // For trigger there is no mapping (mapping could be found in AliMUONTriggerCircuit)
30 // Use memcpy instead of assignment elt by elt
31 // Introducing variable DSP numbers, real manu numbers per buspatch for st12
32 // Implemented scaler event for Trigger
33 // Ch. Finck , Jan. 06
35 ////////////////////////////////////
37 #include "AliMUONRawWriter.h"
39 #include "AliBitPacking.h"
40 #include "AliLoader.h"
43 #include "AliMUONConstants.h"
44 #include "AliMUONDDLTracker.h"
45 #include "AliMUONDDLTrigger.h"
46 #include "AliMUONData.h"
47 #include "AliMUONDigit.h"
48 #include "AliMUONGeometryModule.h"
49 #include "AliMUONGeometrySegmentation.h"
50 #include "AliMUONGeometryStore.h"
51 #include "AliMUONGlobalTrigger.h"
52 #include "AliMUONLocalTrigger.h"
53 #include "AliMUONScalerEventTrigger.h"
54 #include "AliMUONSubEventTrigger.h"
55 #include "AliMpBusPatch.h"
56 #include "AliMpDEManager.h"
58 #include "AliMpPlaneType.h"
59 #include "AliMpSegFactory.h"
60 #include "AliMpStationType.h"
61 #include "AliMpVSegmentation.h"
63 #include "TClonesArray.h"
64 ClassImp(AliMUONRawWriter) // Class implementation in ROOT context
66 Int_t AliMUONRawWriter::fgManuPerBusSwp1B[12] = {1, 27, 53, 79, 105, 131, 157, 183, 201, 214, 224, 232};
67 Int_t AliMUONRawWriter::fgManuPerBusSwp1NB[12] = {1, 27, 53, 79, 105, 131, 157, 183, 201, 214, 225, 233};
69 Int_t AliMUONRawWriter::fgManuPerBusSwp2B[12] = {1, 27, 53, 79, 105, 131, 157, 183, 201, 214, 226, 246};
70 Int_t AliMUONRawWriter::fgManuPerBusSwp2NB[12] = {1, 27, 53, 79, 105, 131, 157, 183, 201, 214, 227, 245};
73 //__________________________________________________________________________
74 AliMUONRawWriter::AliMUONRawWriter(AliMUONData* data)
78 // Standard Constructor
80 AliDebug(1,"Standard ctor");
82 // initialize container
86 fSubEventArray = new TClonesArray("AliMUONSubEventTracker",1000);
87 fSubEventArray->SetOwner(kTRUE);
90 fDDLTracker = new AliMUONDDLTracker();
91 fDDLTrigger = new AliMUONDDLTrigger();
93 fBusPatchManager = new AliMpBusPatch();
94 fBusPatchManager->ReadBusPatchFile();
96 fSegFactory = new AliMpSegFactory();
98 fTrackerTimer.Start(kTRUE); fTrackerTimer.Stop();
99 fTriggerTimer.Start(kTRUE); fTriggerTimer.Stop();
100 fMappingTimer.Start(kTRUE); fMappingTimer.Stop();
104 //__________________________________________________________________________
105 AliMUONRawWriter::AliMUONRawWriter()
111 fScalerEvent(kFALSE),
114 // Default Constructor
115 AliDebug(1,"Default ctor");
116 fFile[0] = fFile[1] = 0x0;
117 fTrackerTimer.Start(kTRUE); fTrackerTimer.Stop();
118 fTriggerTimer.Start(kTRUE); fTriggerTimer.Stop();
119 fMappingTimer.Start(kTRUE); fMappingTimer.Stop();
122 //_______________________________________________________________________
123 AliMUONRawWriter::AliMUONRawWriter (const AliMUONRawWriter& rhs)
126 // Protected copy constructor
128 AliFatal("Not implemented.");
131 //_______________________________________________________________________
133 AliMUONRawWriter::operator=(const AliMUONRawWriter& rhs)
135 // Protected assignement operator
137 if (this == &rhs) return *this;
139 AliFatal("Not implemented.");
144 //__________________________________________________________________________
145 AliMUONRawWriter::~AliMUONRawWriter(void)
149 delete fSubEventArray;
154 delete fBusPatchManager;
158 AliInfo(Form("Execution time for MUON tracker : R:%.2fs C:%.2fs",
159 fTrackerTimer.RealTime(),fTrackerTimer.CpuTime()));
160 AliInfo(Form(" Execution time for MUON tracker (mapping calls part) "
162 fMappingTimer.RealTime(),fMappingTimer.CpuTime()));
163 AliInfo(Form("Execution time for MUON trigger : R:%.2fs C:%.2fs",
164 fTriggerTimer.RealTime(),fTriggerTimer.CpuTime()));
167 //____________________________________________________________________
168 Int_t AliMUONRawWriter::Digits2Raw()
170 // convert digits of the current event to raw data
175 fMUONData->GetLoader()->LoadDigits("READ");
177 fMUONData->SetTreeAddress("D,GLT");
179 fMUONData->ResetDigits();
180 fMUONData->ResetTrigger();
182 // This will get both tracker and trigger digits.
183 fMUONData->GetDigits();
187 for (Int_t ich = 0; ich < AliMUONConstants::NTrackingCh(); ich++)
190 idDDL = ich * 2 + 0x900; // official number for MUON
191 sprintf(name, "MUON_%d.ddl",idDDL);
192 fFile[0] = fopen(name,"w");
194 idDDL = (ich * 2) + 1 + 0x900;
195 sprintf(name, "MUON_%d.ddl",idDDL);
196 fFile[1] = fopen(name,"w");
198 WriteTrackerDDL(ich);
208 idDDL = 0xA00;// official number for MUTR
209 sprintf(name, "MUTR_%d.ddl",idDDL);
210 fFile[0] = fopen(name,"w");
213 sprintf(name, "MUTR_%d.ddl",idDDL);
214 fFile[1] = fopen(name,"w");
222 fMUONData->ResetDigits();
223 fMUONData->ResetTrigger();
224 fMUONData->GetLoader()->UnloadDigits();
229 //____________________________________________________________________
230 Int_t AliMUONRawWriter::WriteTrackerDDL(Int_t iCh)
232 // writing DDL for tracker
233 // used inverse mapping
235 fTrackerTimer.Start(kFALSE);
237 static const Int_t MAXADC = (1<<12)-1; // We code the charge on a 12 bits ADC.
239 TClonesArray* muonDigits = 0;
240 fSubEventArray->Clear();
243 TArrayI nbInBus(5000);
247 AliRawDataHeader header = fDDLTracker->GetHeader();
248 Int_t headerSize = fDDLTracker->GetHeaderSize();
253 UChar_t channelId = 0;
255 Int_t busPatchId = 0;
269 const AliMUONDigit* digit;
271 AliDebug(3, Form("WriteDDL chamber %d\n", iCh+1));
273 muonDigits = fMUONData->Digits(iCh);
275 nDigits = muonDigits->GetEntriesFast();
276 AliDebug(3,Form("ndigits = %d\n",nDigits));
279 for (Int_t idig = 0; idig < nDigits; idig++) {
281 digit = (AliMUONDigit*) muonDigits->UncheckedAt(idig);
283 padX = digit->PadX();
284 padY = digit->PadY();
285 charge = digit->Signal();
286 if ( charge > MAXADC )
288 // This is most probably an error in the digitizer (which should insure
289 // the charge is below MAXADC), so make it a (non-fatal) error indeed.
290 AliError(Form("adc value %d above %x. Setting to %x",
291 charge,MAXADC,MAXADC));
294 cathode = digit->Cathode();
295 detElemId = digit->DetElemId();
298 busPatchId = GetBusPatch(*digit);
299 if (busPatchId<0) continue;
301 if ( digit->ManuId() > 0x7FF || digit->ManuId() < 0 ||
302 digit->ManuChannel() > 0x3F || digit->ManuChannel() < 0 )
304 StdoutToAliError(digit->Print(););
305 AliFatal("ManuId,ManuChannel are invalid for the digit above.");
308 manuId = ( digit->ManuId() & 0x7FF ); // 11 bits
309 channelId = ( digit->ManuChannel() & 0x3F ); // 6 bits
311 AliDebug(3,Form("input detElemId %d busPatchId %d PadX %d PadY %d iCath %d \n",
312 detElemId, busPatchId, padX, padY, cathode));
314 AliDebug(3,Form("busPatchId %d, manuId %d channelId %d\n", busPatchId, manuId, channelId ));
317 AliBitPacking::PackWord((UInt_t)parity,word,29,31);
318 AliBitPacking::PackWord((UInt_t)manuId,word,18,28);
319 AliBitPacking::PackWord((UInt_t)channelId,word,12,17);
320 AliBitPacking::PackWord((UInt_t)charge,word,0,11);
322 // DDL event one per half chamber
323 AliMUONSubEventTracker subEvent;
325 subEvent.AddData(word);
326 subEvent.SetBusPatchId(busPatchId);
328 // storing the number of identical buspatches
329 nbInBus[busPatchId]++;
333 // sorting by buspatch
334 fSubEventArray->Sort();
336 // gather datas from same bus patch
337 nEntries = fSubEventArray->GetEntriesFast();
339 for (Int_t i = 0; i < nEntries; i++)
341 AliMUONSubEventTracker* temp = (AliMUONSubEventTracker*)fSubEventArray->At(i);
342 busPatchId = temp->GetBusPatchId();
344 // add bus patch header, length and total length managed by subevent class
345 temp->SetTriggerWord(0xdeadbeef);
346 for (Int_t j = 0; j < nbInBus[busPatchId]-1; j++)
348 AliMUONSubEventTracker* temp1 = (AliMUONSubEventTracker*)fSubEventArray->At(++i);
349 temp->AddData(temp1->GetData(0));
350 fSubEventArray->RemoveAt(i) ;
353 fSubEventArray->Compress();
355 if (AliLog::GetGlobalDebugLevel() == 3)
357 nEntries = fSubEventArray->GetEntriesFast();
358 for (Int_t i = 0; i < nEntries; i++)
360 AliMUONSubEventTracker* temp = (AliMUONSubEventTracker*)fSubEventArray->At(i);
361 printf("busPatchid back %d\n",temp->GetBusPatchId());
362 for (Int_t j = 0; j < temp->GetLength(); j++)
364 printf("manuId back %d, ",temp->GetManuId(j));
365 printf("channelId back %d, ",temp->GetChannelId(j));
366 printf("charge back %d\n",temp->GetCharge(j));
372 // getting info for the number of buspatches
375 Int_t iBusPerDSP[5];//number of bus patches per DSP
376 Int_t iDspMax; //number max of DSP per block
379 fBusPatchManager->GetDspInfo(iCh, iDspMax, iBusPerDSP);
381 TArrayI* vec = fBusPatchManager->GetBusfromDE((iCh+1)*100);
383 Int_t iBus0AtCh = vec->At(0); //get first bus patch id for a given ich
385 AliDebug(3,Form("iBus0AtCh %d", iBus0AtCh));
387 iBusPatch = iBus0AtCh - 1; // starting point for each chamber
389 // open DDL file, on per 1/2 chamber
390 for (Int_t iDDL = 0; iDDL < 2; iDDL++)
393 buffer = new Int_t [(2048+24)*50]; // 24 words in average for one buspatch and 2048 manu info at most
399 // two blocks A and B per DDL
400 for (Int_t iBlock = 0; iBlock < 2; iBlock++)
403 length = fDDLTracker->GetBlkHeaderLength();
404 memcpy(&buffer[index],fDDLTracker->GetBlkHeader(),length*4);
408 // 5 DSP's max per block
409 for (Int_t iDsp = 0; iDsp < iDspMax; iDsp++)
413 length = fDDLTracker->GetDspHeaderLength();
414 memcpy(&buffer[index],fDDLTracker->GetDspHeader(),length*4);
418 //Â 5 buspatches max per DSP
419 for (Int_t i = 0; i < iBusPerDSP[iDsp]; i++)
422 if ((fBusPatchManager->GetDDLfromBus(iBusPatch) % 2) == 1) // comparing to DDL file
427 AliDebug(3,Form("iCh %d iDDL %d iBlock %d iDsp %d busPatchId %d", iCh, iDDL, iBlock, iDsp, iBusPatch));
429 nEntries = fSubEventArray->GetEntriesFast();
430 AliMUONSubEventTracker* temp = 0x0;
432 for (Int_t iEntries = 0; iEntries < nEntries; iEntries++)
433 { // method "bourrique"...
434 temp = (AliMUONSubEventTracker*)fSubEventArray->At(iEntries);
435 busPatchId = temp->GetBusPatchId();
436 if (busPatchId == iBusPatch) break;
438 AliDebug(3,Form("busPatchId %d", temp->GetBusPatchId()));
441 // check if buspatchid has digit
442 if (busPatchId != -1)
444 // add bus patch structure
445 length = temp->GetHeaderLength();
446 memcpy(&buffer[index],temp->GetBusPatchHeader(),length*4);
448 for (Int_t j = 0; j < temp->GetLength(); j++)
450 buffer[index++] = temp->GetData(j);
451 AliDebug(3,Form("busPatchId %d, manuId %d channelId %d\n", temp->GetBusPatchId(),
452 temp->GetManuId(j), temp->GetChannelId(j) ));
457 // writting anyhow buspatch structure (empty ones)
458 buffer[index++] = 4; // total length
459 buffer[index++] = 0; // raw data length
460 buffer[index++] = iBusPatch; // bus patch
461 buffer[index++] = 0xdeadbeef; // trigger word
464 buffer[indexDsp] = index - indexDsp; // dsp length
465 buffer[indexDsp+1] = index - indexDsp - fDDLTracker->GetDspHeaderLength();
466 if ((index - indexDsp) % 2 == 0)
467 buffer[indexDsp+7] = 0;
469 buffer[indexDsp+7] = 1;
471 buffer[indexBlk] = index - indexBlk; // block length
472 buffer[indexBlk+1] = index - indexBlk - fDDLTracker->GetBlkHeaderLength();
477 header.fSize = (index + headerSize) * 4;// total length in bytes
478 fwrite((char*)(&header),headerSize*4,1,fFile[iFile]);
479 fwrite(buffer,sizeof(int),index,fFile[iFile]);
484 fTrackerTimer.Stop();
488 //____________________________________________________________________
489 Int_t AliMUONRawWriter::GetBusPatch(const AliMUONDigit& digit)
491 // Determine the BusPatch this digit belongs to.
493 fMappingTimer.Start(kFALSE);
497 // information from digits
498 Int_t detElemId = digit.DetElemId();
500 AliMpVSegmentation* seg =
501 fSegFactory->CreateMpSegmentationByElectronics(detElemId, digit.ManuId());
503 AliMpPlaneType plane = seg->PlaneType();
505 AliMpStationType stationType = AliMpDEManager::GetStationType(detElemId);
507 if ( stationType == kStation1 || stationType == kStation2 )
509 if (plane == kBendingPlane)
511 ptr = &fgManuPerBusSwp1B[0];
515 ptr = &fgManuPerBusSwp1NB[0];
520 if (plane == kBendingPlane)
522 ptr = &fgManuPerBusSwp2B[0];
526 ptr = &fgManuPerBusSwp2NB[0];
530 // Getting buspatch id
531 TArrayI* vec = fBusPatchManager->GetBusfromDE(detElemId);
534 Int_t m = ( digit.ManuId() & 0x3FF ); // remove bit 10
535 //FIXME : how can we remove that condition
536 // on the 10-th bit ? All the rest need not any knowledge about it,
537 // can't we find a way to get manu<->buspatch transparent to this too ?
539 if ( stationType == kStation1 || stationType == kStation2 )
541 for (Int_t i = 0; i < 12; i++)
543 if (m >= *(ptr + pos++)) break;
548 // offset of 100 in manuId for following bus patch
552 if (pos >(Int_t) vec->GetSize())
554 AliError(Form("pos greater %d than size %d manuId %d detElemId %d \n",
555 pos, (Int_t)vec->GetSize(), digit.ManuId(), detElemId));
556 AliError(Form("Chamber %s Plane %s manuId %d m %d",
557 StationTypeName(stationType).Data(),
558 PlaneTypeName(plane).Data(),
564 Int_t busPatchId = vec->At(pos);
566 fMappingTimer.Stop();
571 //____________________________________________________________________
572 Int_t AliMUONRawWriter::WriteTriggerDDL()
575 fTriggerTimer.Start(kFALSE);
577 // DDL event one per half chamber
578 AliMUONSubEventTrigger* subEvent = 0x0;
579 AliMUONScalerEventTrigger* scalerEvent = 0x0;
581 // stored local id number
582 TArrayI isFired(256);
587 AliRawDataHeader header = fDDLTrigger->GetHeader();
588 Int_t headerSize = fDDLTrigger->GetHeaderSize();
590 TClonesArray* localTrigger;
591 TClonesArray* globalTrigger;
592 AliMUONGlobalTrigger* gloTrg;
593 AliMUONLocalTrigger* locTrg = 0x0;
595 // global trigger for trigger pattern
596 globalTrigger = fMUONData->GlobalTrigger();
597 gloTrg = (AliMUONGlobalTrigger*)globalTrigger->UncheckedAt(0);
598 Int_t gloTrigPat = GetGlobalTriggerPattern(gloTrg);
601 localTrigger = fMUONData->LocalTrigger();
607 Int_t iLocCard, locCard;
608 Char_t locDec, trigY, posY, posX,regOut;
610 Int_t version = 1; // software version
611 Int_t eventType = 1; // trigger type: 1 for physics ?
612 Int_t serialNb = 0xF; // serial nb of card: all bits on for the moment
613 Int_t globalFlag = 1; // set to 2 if global info present in DDL else set to 1
616 eventType = 2; //set to generate scaler events
618 Int_t nEntries = (Int_t) (localTrigger->GetEntries());// 234 local cards
619 // stored the local card id that's fired
620 for (Int_t i = 0; i < nEntries; i++) {
621 locTrg = (AliMUONLocalTrigger*)localTrigger->At(i);
622 isFired[locTrg->LoCircuit()] = 1; // storing local boards with informations
626 AliError("No Trigger information available");
629 // [16(local)*50 words + 14 words]*8(reg) + 6 + 10 + 6 words scaler event 6534 words
630 buffer = new Int_t [6534];
632 // [16(local)*5 words + 3 words]*8(reg) + 8 words = 672
633 buffer = new Int_t [672];
636 scalerEvent = new AliMUONScalerEventTrigger();
637 scalerEvent->SetNumbers(); // set some numbers for scalers
640 // open DDL file, on per 1/2 chamber
641 for (Int_t iDDL = 0; iDDL < 2; iDDL++) {
645 // DDL enhanced header
647 AliBitPacking::PackWord((UInt_t)iDDL+1,word,28,31); //see AliMUONDDLTrigger.h for details
648 AliBitPacking::PackWord((UInt_t)serialNb,word,24,27);
649 AliBitPacking::PackWord((UInt_t)version,word,16,23);
650 AliBitPacking::PackWord((UInt_t)eventType,word,12,15);
652 if (iDDL == 0) // suppose global info in DDL one
657 AliBitPacking::PackWord((UInt_t)globalFlag,word,8,11);
658 fDDLTrigger->SetDDLWord(word);
659 buffer[index++]= word;
662 fDDLTrigger->SetGlobalOutput(gloTrigPat);// no global input for the moment....
664 fDDLTrigger->SetGlobalOutput(0);
667 // 6 DARC scaler words
668 memcpy(&buffer[index], scalerEvent->GetDarcScalers(),scalerEvent->GetDarcScalerLength()*4);
669 index += scalerEvent->GetDarcScalerLength();
672 // 4 words of global board input + Global board output
673 memcpy(&buffer[index], fDDLTrigger->GetGlobalInput(), (fDDLTrigger->GetHeaderLength()-1)*4);
674 index += fDDLTrigger->GetHeaderLength() - 1; // kind tricky cos scaler info in-between Darc header
677 // 10 Global scaler words
678 memcpy(scalerEvent->GetGlobalScalers(), &buffer[index], scalerEvent->GetGlobalScalerLength()*4);
679 index += scalerEvent->GetGlobalScalerLength();
682 // 8 regional cards per DDL
683 for (Int_t iReg = 0; iReg < 8; iReg++) {
685 subEvent = new AliMUONSubEventTrigger();
687 // Regional card header
690 AliBitPacking::PackWord((UInt_t)serialNb,word,24,28); //see AliMUONSubEventTrigger.h for details
691 AliBitPacking::PackWord((UInt_t)version,word,16,23);
692 AliBitPacking::PackWord((UInt_t)iReg,word,12,15);
693 AliBitPacking::PackWord((UInt_t)regOut,word,0,7); // whenever regional output will be implemented
695 subEvent->SetRegWord(word);
696 memcpy(&buffer[index],subEvent->GetRegHeader(),subEvent->GetRegHeaderLength()*4);
697 index += subEvent->GetRegHeaderLength();
699 // 11 regional scaler word
701 memcpy(&buffer[index], scalerEvent->GetRegScalers(), scalerEvent->GetRegScalerLength()*4);
702 index += scalerEvent->GetRegScalerLength();
705 // 16 local card per regional board
706 for (Int_t iLoc = 0; iLoc < 16; iLoc++) {
708 iLocCard = iLoc + iReg*16 + iDDL*128;
710 if (isFired[iLocCard]) {
711 locTrg = (AliMUONLocalTrigger*)localTrigger->At(iEntries);
712 locCard = locTrg->LoCircuit();
713 locDec = locTrg->GetLoDecision();
715 posY = locTrg->LoStripY();
716 posX = locTrg->LoStripX();
717 devX = locTrg->LoDev();
718 AliDebug(4,Form("loctrg %d, posX %d, posY %d, devX %d\n",
719 locTrg->LoCircuit(),locTrg->LoStripX(),locTrg->LoStripY(),locTrg->LoDev()));
720 } else { //no trigger (see PRR chpt 3.4)
731 AliBitPacking::PackWord((UInt_t)(iLocCard % 16),word,19,22); //card id number in crate
732 AliBitPacking::PackWord((UInt_t)locDec,word,15,18);
733 AliBitPacking::PackWord((UInt_t)trigY,word,14,14);
734 AliBitPacking::PackWord((UInt_t)posY,word,10,13);
735 AliBitPacking::PackWord((UInt_t)devX,word,5,9);
736 AliBitPacking::PackWord((UInt_t)posX,word,0,4);
738 if (locCard == iLocCard) {
739 // add local cards structure
740 buffer[index++] = (locTrg->GetX1Pattern() | (locTrg->GetX2Pattern() << 16));
741 buffer[index++] = (locTrg->GetX3Pattern() | (locTrg->GetX4Pattern() << 16));
742 buffer[index++] = (locTrg->GetY1Pattern() | (locTrg->GetY2Pattern() << 16));
743 buffer[index++] = (locTrg->GetY3Pattern() | (locTrg->GetY4Pattern() << 16));
744 buffer[index++] = (Int_t)word; // data word
745 if (iEntries < nEntries-1)
748 buffer[index++] = 0; // 4 words for x1, x2, y1, y2
752 buffer[index++] = (Int_t)word; // data word
755 // 45 regional scaler word
757 memcpy(&buffer[index], scalerEvent->GetLocalScalers(), scalerEvent->GetLocalScalerLength()*4);
758 index += scalerEvent->GetLocalScalerLength();
767 buffer[index++] = fDDLTrigger->GetEoD(); // End of DDL word
768 buffer[index++] = fDDLTrigger->GetEoD(); // End of DDL word for 64 bits transfer purpose
770 // writting onto disk
772 header.fSize = (index + headerSize) * 4;// total length in bytes
773 fwrite((char*)(&header),headerSize*4,1,fFile[iDDL]);
774 fwrite(buffer,sizeof(int),index,fFile[iDDL]);
781 fTriggerTimer.Stop();
786 //____________________________________________________________________
787 Int_t AliMUONRawWriter::GetGlobalTriggerPattern(const AliMUONGlobalTrigger* gloTrg) const
789 // global trigger pattern calculation
791 Int_t gloTrigPat = 0;
793 if (gloTrg->SinglePlusLpt()) gloTrigPat|= 0x1;
794 if (gloTrg->SinglePlusHpt()) gloTrigPat|= 0x2;
795 if (gloTrg->SinglePlusApt()) gloTrigPat|= 0x4;
797 if (gloTrg->SingleMinusLpt()) gloTrigPat|= 0x8;
798 if (gloTrg->SingleMinusHpt()) gloTrigPat|= 0x10;
799 if (gloTrg->SingleMinusApt()) gloTrigPat|= 0x20;
801 if (gloTrg->SingleUndefLpt()) gloTrigPat|= 0x40;
802 if (gloTrg->SingleUndefHpt()) gloTrigPat|= 0x80;
803 if (gloTrg->SingleUndefApt()) gloTrigPat|= 0x100;
805 if (gloTrg->PairUnlikeLpt()) gloTrigPat|= 0x200;
806 if (gloTrg->PairUnlikeHpt()) gloTrigPat|= 0x400;
807 if (gloTrg->PairUnlikeApt()) gloTrigPat|= 0x800;
809 if (gloTrg->PairLikeLpt()) gloTrigPat|= 0x1000;
810 if (gloTrg->PairLikeHpt()) gloTrigPat|= 0x2000;
811 if (gloTrg->PairLikeApt()) gloTrigPat|= 0x4000;