From 81f3a2e7f314cfd06223568f739aa24dc2575aa5 Mon Sep 17 00:00:00 2001 From: cblume Date: Wed, 28 Jan 2009 10:06:04 +0000 Subject: [PATCH] Clean up --- TRD/attic/AliTRDTriggerL1.cxx | 327 ++++++++++ TRD/attic/AliTRDTriggerL1.h | 26 + TRD/attic/AliTRDmodule.cxx | 682 ++++++++++++++++++++ TRD/attic/AliTRDmodule.h | 78 +++ TRD/attic/AliTRDtrigger.cxx | 923 ++++++++++++++++++++++++++ TRD/attic/AliTRDtrigger.h | 102 +++ TRD/attic/AliTRDzmaps.h | 1146 +++++++++++++++++++++++++++++++++ 7 files changed, 3284 insertions(+) create mode 100644 TRD/attic/AliTRDTriggerL1.cxx create mode 100644 TRD/attic/AliTRDTriggerL1.h create mode 100644 TRD/attic/AliTRDmodule.cxx create mode 100644 TRD/attic/AliTRDmodule.h create mode 100644 TRD/attic/AliTRDtrigger.cxx create mode 100644 TRD/attic/AliTRDtrigger.h create mode 100644 TRD/attic/AliTRDzmaps.h diff --git a/TRD/attic/AliTRDTriggerL1.cxx b/TRD/attic/AliTRDTriggerL1.cxx new file mode 100644 index 00000000000..5a67fccdf5c --- /dev/null +++ b/TRD/attic/AliTRDTriggerL1.cxx @@ -0,0 +1,327 @@ +/************************************************************************** + * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * * + * Author: The ALICE Off-line Project. * + * Contributors are mentioned in the code where appropriate. * + * * + * Permission to use, copy, modify and distribute this software and its * + * documentation strictly for non-commercial purposes is hereby granted * + * without fee, provided that the above copyright notice appears in all * + * copies and that both the copyright notice and this permission notice * + * appear in the supporting documentation. The authors make no claims * + * about the suitability of this software for any purpose. It is * + * provided "as is" without express or implied warranty. * + **************************************************************************/ + +/////////////////////////////////////////////////////// +// // +// // +// TRD main trigger class for L1 // +// // +// // +/////////////////////////////////////////////////////// + +#include + +#include "AliRunLoader.h" +#include "AliConfig.h" +#include "AliTracker.h" +#include "AliTriggerInput.h" + +#include "AliTRDTriggerL1.h" +#include "AliTRDtrigParam.h" +#include "AliTRDtrigger.h" +#include "AliTRDgtuTrack.h" +#include "AliTRDgeometry.h" + +ClassImp(AliTRDTriggerL1) + +//_____________________________________________________________________________ +AliTRDTriggerL1::AliTRDTriggerL1() + :AliTriggerDetector() +{ + // + // Default constructor + // + + SetName("TRD"); + +} + +//_____________________________________________________________________________ +void AliTRDTriggerL1::CreateInputs() +{ + // + // See TRIGGER/DAQ/HLT/DCS Techical Design Report, + // p. 58, Table 4.1 for the proposed inputs + // + + fInputs.AddLast(new AliTriggerInput("TRD_Unlike_EPair_L1" + ,"TRD" + ,1 )); + fInputs.AddLast(new AliTriggerInput("TRD_Like_EPair_L1" + ,"TRD" + ,1 )); + fInputs.AddLast(new AliTriggerInput("TRD_Jet_LPt_L1" + ,"TRD" + ,1 )); + fInputs.AddLast(new AliTriggerInput("TRD_Jet_HPt_L1" + ,"TRD" + ,1 )); + fInputs.AddLast(new AliTriggerInput("TRD_Electron_L1" + ,"TRD" + ,1 )); + fInputs.AddLast(new AliTriggerInput("TRD_HadrLPt_L1" + ,"TRD" + ,1 )); + fInputs.AddLast(new AliTriggerInput("TRD_HadrHPt_L1" + ,"TRD" + ,1 )); + +} + +//_____________________________________________________________________________ +void AliTRDTriggerL1::Trigger() +{ + // + // Run the online tracking and trigger + // + + TString evfoldname = AliConfig::GetDefaultEventFolderName(); + AliRunLoader *runLoader = AliRunLoader::GetRunLoader(evfoldname); + AliLoader *loader = runLoader->GetLoader("TRDLoader"); + AliTRDgeometry geo; + + AliTRDtrigger trdTrigger("Trigger","Trigger class"); + + Float_t field = AliTracker::GetBz() * 0.1; // Tesla + AliInfo(Form("Trigger set for magnetic field = %f Tesla \n",field)); + + trdTrigger.SetRunLoader(runLoader); + trdTrigger.Init(); + + trdTrigger.Open(runLoader->GetFileName(), runLoader->GetEventNumber()); + trdTrigger.ReadDigits(); + trdTrigger.MakeTracklets(kTRUE); + trdTrigger.WriteTracklets(-1); + + // Trigger (tracks, GTU) + + Float_t highPt = AliTRDtrigParam::Instance()->GetHighPt(); + Float_t jetLowPt = AliTRDtrigParam::Instance()->GetJetLowPt(); + Float_t jetHighPt = AliTRDtrigParam::Instance()->GetJetHighPt(); + + Float_t pid; + Float_t pt; + Int_t det; + Int_t sec; + Bool_t isElectron; + + const Int_t kMaxEle = 1000; + + Int_t electronPlus; + Int_t electronMinus; + Int_t sectorElePlus[kMaxEle]; + Int_t sectorEleMinus[kMaxEle]; + Float_t ptElePlus[kMaxEle]; + Float_t ptEleMinus[kMaxEle]; + Int_t hadronLowPt; + Int_t hadronHighPt; + Int_t hadronJetLowPt; + Int_t hadronJetHighPt; + + hadronJetLowPt = 0; + hadronJetHighPt = 0; + + hadronLowPt = 0; + hadronHighPt = 0; + + electronPlus = 0; + electronMinus = 0; + + AliTRDgtuTrack *gtuTrack; + Int_t nTracks = trdTrigger.GetNumberOfTracks(); + for (Int_t iTrack = 0; iTrack < nTracks; iTrack++) { + + gtuTrack = trdTrigger.GetTrack(iTrack); + + pid = gtuTrack->GetPID(); + isElectron = gtuTrack->IsElectron(); + pt = gtuTrack->GetPt(); + det = gtuTrack->GetDetector(); + sec = geo.GetSector(det); + + if (isElectron) { + + if (pt < 0.0) { + sectorEleMinus[electronMinus] = sec; + ptEleMinus[electronMinus] = pt; + electronMinus++; + } + else { + sectorElePlus[electronPlus] = sec; + ptElePlus[electronPlus] = pt; + electronPlus++; + } + + } + else { + + if (TMath::Abs(pt) < highPt) { + hadronLowPt++; + } + else { + hadronHighPt++; + } + + if (TMath::Abs(pt) > jetLowPt ) { + hadronJetLowPt++; + } + if (TMath::Abs(pt) > jetHighPt) { + hadronJetHighPt++; + } + + } + + } + + loader->UnloadTracks(); + + // Hadrons + if (hadronLowPt) { + SetInput("TRD_Hadr_LPt_L1"); + } + if (hadronHighPt) { + SetInput("TRD_Hadr_HPt_L1"); + } + + // Hadrons from jets + if (hadronJetLowPt >= AliTRDtrigParam::Instance()->GetNPartJetLow() ) { + SetInput("TRD_Jet_LPt_L1"); + } + if (hadronJetHighPt >= AliTRDtrigParam::Instance()->GetNPartJetHigh()) { + SetInput("TRD_Jet_HPt_L1"); + } + + // Electron-positron pairs (open angle > 80 deg) + Int_t secPlus; + Int_t secMinus; + Int_t secDiff; + Bool_t electronUnlikePair = kFALSE; + Bool_t electronUnlikePairHPt = kFALSE; + + if ((electronMinus > 0) && + (electronPlus > 0)) { + for (Int_t iPlus = 0; iPlus < electronPlus; iPlus++) { + secPlus = sectorElePlus[iPlus]; + for (Int_t iMinus = 0; iMinus < electronMinus; iMinus++) { + secMinus = sectorEleMinus[iMinus]; + secDiff = TMath::Abs(secPlus-secMinus); + if (secDiff > 9) { + secDiff = 18 - secDiff; + } + if (secDiff >= 5) { + electronUnlikePair = kTRUE; + if ((TMath::Abs(ptElePlus[iPlus]) > highPt) && + (TMath::Abs(ptEleMinus[iMinus]) > highPt)) { + electronUnlikePairHPt = kTRUE; + } + } + } + } + } + + if (electronUnlikePair) { + SetInput("TRD_Unlike_EPair_L1"); + } + //if (electronUnlikePairHPt) { + // SetInput("TRD_Unlike_EPair_HPt_L1"); + //} + + // Like electron/positron pairs + Bool_t ele1; + Bool_t ele1HPt; + Bool_t ele2; + Bool_t ele2HPt; + + // Positive + ele1 = kFALSE; + ele2 = kFALSE; + ele1HPt = kFALSE; + ele2HPt = kFALSE; + if (electronPlus > 1) { + for (Int_t iPlus = 0; iPlus < electronPlus; iPlus++) { + if (!ele1) { + ele1 = kTRUE; + } + else if (!ele2) { + ele2 = kTRUE; + } + if (TMath::Abs(ptElePlus[iPlus]) > highPt) { + if (!ele1HPt) { + ele1HPt = kTRUE; + } + else if (!ele2HPt) { + ele2HPt = kTRUE; + } + } + } + } + + if (ele1 && ele2 ) { + SetInput("TRD_Like_EPair_L1"); + } + //if (ele1HPt && ele2HPt) { + // SetInput("TRD_Like_EPair_HPt_L1"); + //} + + // Negative + ele1 = kFALSE; + ele2 = kFALSE; + ele1HPt = kFALSE; + ele2HPt = kFALSE; + if (electronMinus > 1) { + for (Int_t iMinus = 0; iMinus < electronMinus; iMinus++) { + if (!ele1) { + ele1 = kTRUE; + } + else if (!ele2) { + ele2 = kTRUE; + } + if (TMath::Abs(ptEleMinus[iMinus]) > highPt) { + if (!ele1HPt) { + ele1HPt = kTRUE; + } + else if (!ele2HPt) { + ele2HPt = kTRUE; + } + } + } + } + + if (ele1 && ele2 ) { + SetInput("TRD_Like_EPair_L1"); + } + //if (ele1HPt && ele2HPt) { + // SetInput("TRD_Like_EPair_HPt_L1"); + //} + + // Single electron/positron + + if ((electronPlus > 0) || + (electronMinus > 0)) { + SetInput("TRD_Electron_L1"); + /* + for (Int_t iPlus = 0; iPlus < electronPlus; iPlus++) { + if (TMath::Abs(ptElePlus[iPlus]) > highPt) SetInput("TRD_Electron_HPt_L1"); + break; + } + for (Int_t iMinus = 0; iMinus < electronMinus; iMinus++) { + if (TMath::Abs(ptEleMinus[iMinus]) > highPt) SetInput("TRD_Electron_HPt_L1"); + break; + } + */ + } + +} + diff --git a/TRD/attic/AliTRDTriggerL1.h b/TRD/attic/AliTRDTriggerL1.h new file mode 100644 index 00000000000..f2862e521ca --- /dev/null +++ b/TRD/attic/AliTRDTriggerL1.h @@ -0,0 +1,26 @@ +#ifndef ALITRDTRIGGERL1_H +#define ALITRDTRIGGERL1_H + +/////////////////////////////////////////////////////// +// // +// TRD trigger for L1 // +// // +/////////////////////////////////////////////////////// + +#include "AliTriggerDetector.h" + +class AliTRDTriggerL1 : public AliTriggerDetector +{ + + public: + + AliTRDTriggerL1(); + virtual ~AliTRDTriggerL1() {} + virtual void CreateInputs(); + virtual void Trigger(); + + ClassDef(AliTRDTriggerL1,1) // TRD Trigger Detector class + +}; + +#endif diff --git a/TRD/attic/AliTRDmodule.cxx b/TRD/attic/AliTRDmodule.cxx new file mode 100644 index 00000000000..8989c7866b3 --- /dev/null +++ b/TRD/attic/AliTRDmodule.cxx @@ -0,0 +1,682 @@ +/************************************************************************** + * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * * + * Author: The ALICE Off-line Project. * + * Contributors are mentioned in the code where appropriate. * + * * + * Permission to use, copy, modify and distribute this software and its * + * documentation strictly for non-commercial purposes is hereby granted * + * without fee, provided that the above copyright notice appears in all * + * copies and that both the copyright notice and this permission notice * + * appear in the supporting documentation. The authors make no claims * + * about the suitability of this software for any purpose. It is * + * provided "as is" without express or implied warranty. * + **************************************************************************/ + +/////////////////////////////////////////////////////////////////////////////// +// // +// // +// TRD 6-chambers stack // +// // +// // +/////////////////////////////////////////////////////////////////////////////// + +#include + +#include "AliRun.h" +#include "AliLog.h" + +#include "AliTRDgeometry.h" +#include "AliTRDmodule.h" +#include "AliTRDltuTracklet.h" +#include "AliTRDgtuTrack.h" +#include "AliTRDtrigParam.h" +#include "AliTRDzmaps.h" + +ClassImp(AliTRDmodule) + +//_____________________________________________________________________________ +AliTRDmodule::AliTRDmodule() + :TObject() + ,fXprojPlane(0) + ,fField(0) + ,fTracklets(new TObjArray(400)) + ,fTracks(new TObjArray(400)) + ,fDeltaY(0) + ,fDeltaS(0) + ,fLTUtrk(0) + ,fGTUtrk(0) +{ + // + // AliTRDmodule default constructor + // + + fXprojPlane = AliTRDtrigParam::Instance()->GetXprojPlane(); + fDeltaY = AliTRDtrigParam::Instance()->GetDeltaY(); + fDeltaS = AliTRDtrigParam::Instance()->GetDeltaS(); + + // The magnetic field strength + Double_t x[3] = { 0.0, 0.0, 0.0 }; + Double_t b[3]; + gAlice->Field(x,b); // b[] is in kilo Gauss + fField = b[2] * 0.1; // Tesla + + for (Int_t iLayer = 0; iLayer < AliTRDgeometry::Nlayer(); iLayer++) { + for (Int_t i = 0; i < kNsubZchan; i++) { + fZnchan[iLayer][i] = 0; + for (Int_t j = 0; j < kNmaxZchan; j++) { + fZtrkid[iLayer][j][i] = -1; + } + } + } + +} + +//_____________________________________________________________________________ +AliTRDmodule::AliTRDmodule(const AliTRDmodule &m) + :TObject(m) + ,fXprojPlane(m.fXprojPlane) + ,fField(m.fField) + ,fTracklets(NULL) + ,fTracks(NULL) + ,fDeltaY(m.fDeltaY) + ,fDeltaS(m.fDeltaS) + ,fLTUtrk(NULL) + ,fGTUtrk(NULL) +{ + // + // AliTRDmodule copy constructor + // + + for (Int_t iLayer = 0; iLayer < AliTRDgeometry::Nlayer(); iLayer++) { + for (Int_t i = 0; i < kNsubZchan; i++) { + ((AliTRDmodule &) m).fZnchan[iLayer][i] = 0; + for (Int_t j = 0; j < kNmaxZchan; j++) { + ((AliTRDmodule &) m).fZtrkid[iLayer][j][i] = -1; + } + } + } + +} + +//_____________________________________________________________________________ +AliTRDmodule::~AliTRDmodule() +{ + // + // Destructor + // + +} + +//_____________________________________________________________________________ +AliTRDmodule &AliTRDmodule::operator=(const AliTRDmodule &m) +{ + // + // Assignment operator + // + + if (this != &m) ((AliTRDmodule &) m).Copy(*this); + return *this; + +} + +//_____________________________________________________________________________ +void AliTRDmodule::Copy(TObject &m) const +{ + // + // copy function + // + + ((AliTRDmodule &) m).fXprojPlane = fXprojPlane; + ((AliTRDmodule &) m).fField = fField; + ((AliTRDmodule &) m).fTracklets = NULL; + ((AliTRDmodule &) m).fTracks = NULL; + ((AliTRDmodule &) m).fDeltaY = fDeltaY; + ((AliTRDmodule &) m).fDeltaS = fDeltaS; + ((AliTRDmodule &) m).fLTUtrk = NULL; + ((AliTRDmodule &) m).fGTUtrk = NULL; + + for (Int_t iLayer = 0; iLayer < AliTRDgeometry::Nlayer(); iLayer++) { + for (Int_t i = 0; i < kNsubZchan; i++) { + ((AliTRDmodule &) m).fZnchan[iLayer][i] = 0; + for (Int_t j = 0; j < kNmaxZchan; j++) { + ((AliTRDmodule &) m).fZtrkid[iLayer][j][i] = -1; + } + } + } + +} + +//_____________________________________________________________________________ +void AliTRDmodule::Reset() +{ + // + // Reset the tracks and tracklets in the module + // + + ResetTracklets(); + ResetTracks(); + + fLTUtrk = 0; + fGTUtrk = 0; + fTracklets = new TObjArray(400); + fTracks = new TObjArray(400); + +} + +//_____________________________________________________________________________ +void AliTRDmodule::ResetTracks() +{ + // + // Reset the tracks in the module + // + + if (fTracks) { + + AliTRDgtuTrack *trk; + for (Int_t i = 0; i < GetNtracks(); i++) { + + trk = GetTrack(i); + trk->Reset(); + + } + + fTracks->Delete(); + + } + +} + +//_____________________________________________________________________________ +AliTRDgtuTrack *AliTRDmodule::GetTrack(Int_t pos) const +{ + // + // Return track at position "pos" + // + + if (fTracks == 0) { + return 0; + } + + void *trk = fTracks->UncheckedAt(pos); + if (trk == 0) { + return 0; + } + + return (AliTRDgtuTrack *) trk; + +} + +//_____________________________________________________________________________ +void AliTRDmodule::RemoveTrack(Int_t pos) +{ + // + // Remove the track at position "pos" + // + + if (fTracks == 0) { + return; + } + + fTracks->RemoveAt(pos); + fTracks->Compress(); + +} + +//_____________________________________________________________________________ +void AliTRDmodule::AddTracklet(Int_t det, Int_t row, Float_t rowz, Float_t slope + , Float_t offset, Float_t time, Int_t ncl + , Int_t label, Float_t q) +{ + // + // Add a tracklet to this track + // + + fLTUtrk = new AliTRDltuTracklet(det,row,rowz,slope,offset,time,ncl,label,q); + Tracklets()->Add(fLTUtrk); + +} + +//_____________________________________________________________________________ +AliTRDltuTracklet *AliTRDmodule::GetTracklet(Int_t pos) const +{ + // + // Get the tracklet at position "pos" + // + + if (fTracklets == 0) { + return 0; + } + + void *trk = fTracklets->UncheckedAt(pos); + if (trk == 0) { + return 0; + } + + return (AliTRDltuTracklet *) trk; + +} + +//_____________________________________________________________________________ +void AliTRDmodule::RemoveTracklet(Int_t pos) +{ + // + // Remove the tracklet at position "pos" + // + + if (fTracklets == 0) { + return; + } + + fTracklets->RemoveAt(pos); + fTracklets->Compress(); + +} + +//_____________________________________________________________________________ +void AliTRDmodule::RemoveMultipleTracklets() +{ + // + // Remove multiple found tracklets + // + + Float_t offDiffMin = 0.5; // [cm] + + AliTRDltuTracklet *trk; + Int_t det1, det2, row1, row2, ncl1, ncl2, label1, label2; + Float_t off1, off2; + Int_t itrk = 0; + while (itrk < (GetNtracklets() - 1)) { + + trk = GetTracklet(itrk); + det1 = trk->GetDetector(); + row1 = trk->GetRow(); + off1 = trk->GetOffset(); + ncl1 = trk->GetNclusters(); + label1 = trk->GetLabel(); + + trk = GetTracklet(itrk+1); + det2 = trk->GetDetector(); + row2 = trk->GetRow(); + off2 = trk->GetOffset(); + ncl2 = trk->GetNclusters(); + label2 = trk->GetLabel(); + + if ((det1 == det2) && (row1 == row2)) { + if ((off2 - off1) < offDiffMin) { + if (ncl1 < ncl2) { + RemoveTracklet(itrk ); + } + else { + RemoveTracklet(itrk+1); + } + } + } + + itrk++; + + } + +} + +//_____________________________________________________________________________ +void AliTRDmodule::SortZ(Int_t cha) +{ + // + // Match tracklets in the x-z plane (pad row sorting) + // + + InitZLUT(); + + AliTRDltuTracklet *trk; + Int_t row, pla, det; + + for (Int_t iTrk = 0; iTrk < GetNtracklets(); iTrk++) { + + trk = GetTracklet(iTrk); + row = trk->GetRow(); + det = trk->GetDetector(); + pla = trk->GetPlane(det); + + for (Int_t iZchan = 0; iZchan < kNsubZchan; iZchan++) { + if (fZChannelMap[cha][iZchan][pla][row] == 1) { + fZtrkid[pla][fZnchan[pla][iZchan]][iZchan] = iTrk; + fZnchan[pla][iZchan]++; + } + } + + } + +} + +//_____________________________________________________________________________ +void AliTRDmodule::InitZLUT() +{ + // + // Initialize the pad row sorting look-up-table + // + + for (Int_t iLayer = 0; iLayer < AliTRDgeometry::Nlayer(); iLayer++) { + for (Int_t i = 0; i < kNsubZchan; i++) { + fZnchan[iLayer][i] = 0; + for (Int_t j = 0; j < kNmaxZchan; j++) { + fZtrkid[iLayer][j][i] = -1; + } + } + } + +} + +//_____________________________________________________________________________ +void AliTRDmodule::FindTracks() +{ + // + // Find tracks from tracklets + // + + for (Int_t iZchan = 0; iZchan < kNsubZchan; iZchan++) { + FindTracksCombi(iZchan); + } + +} + +//_____________________________________________________________________________ +void AliTRDmodule::FindTracksCombi(Int_t zchan) +{ + // + // Find tracks by pure combinatorics... + // + + static Int_t trkTrack[12]; + + Int_t nTracklets; + Int_t nPlanes; + Int_t ntrk1; + Int_t trkId1; + Int_t ntrk2; + Int_t trkId2; + + Float_t y1; + Float_t y1min; + Float_t y1max; + Float_t s1; + Float_t z1; + Float_t s1min; + Float_t s1max; + Float_t y2; + Float_t s2; + Float_t z2; + + AliTRDltuTracklet *trk1; + AliTRDltuTracklet *trk2; + AliTRDltuTracklet *trk ; + + Bool_t isPlane[kNplan]; + + for (Int_t iPlan1 = 0; iPlan1 < kNplan; iPlan1++) { + + ntrk1 = fZnchan[iPlan1][zchan]; + + for (Int_t iTrk1 = 0; iTrk1 < ntrk1; iTrk1++) { + + for (Int_t iPlan = 0; iPlan < kNplan; iPlan++) { + isPlane[iPlan] = kFALSE; + } + + trkId1 = fZtrkid[iPlan1][iTrk1][zchan]; + + nTracklets = 0; + for (Int_t iList = 0; iList < kNmaxTrk; iList++) { + trkTrack[iList] = -1; + } + trkTrack[nTracklets++] = trkId1; + + isPlane[iPlan1] = kTRUE; + + trk1 = GetTracklet(trkId1); + y1 = trk1->GetYproj(fXprojPlane); + y1min = y1 - fDeltaY; + y1max = y1 + fDeltaY; + s1 = trk1->GetSlope(); + s1min = s1 - fDeltaS; + s1max = s1 + fDeltaS; + z1 = trk1->GetZproj(fXprojPlane); + + for (Int_t iPlan2 = 0; iPlan2 < kNplan; iPlan2++) { + + if (iPlan2 == iPlan1) continue; + + ntrk2 = fZnchan[iPlan2][zchan]; + + for (Int_t iTrk2 = 0; iTrk2 < ntrk2; iTrk2++) { + + trkId2 = fZtrkid[iPlan2][iTrk2][zchan]; + + if (trkId2 == trkId1) continue; + + trk2 = GetTracklet(trkId2); + y2 = trk2->GetYproj(fXprojPlane); + s2 = trk2->GetSlope(); + z2 = trk2->GetZproj(fXprojPlane); + + if ((y1min < y2 && y2 < y1max) && + (s1min < s2 && s2 < s1max)) { + + if (nTracklets >= kNmaxTrk) { + AliWarning("Too many tracklets for this track."); + } + else { + trkTrack[nTracklets++] = trkId2; + isPlane[iPlan2] = kTRUE; + } + + } + + } // end trk 2 + + } // end plan 2 + + nPlanes = 0; + for (Int_t iPlan = 0; iPlan < kNplan; iPlan++) { + nPlanes += (Int_t) isPlane[iPlan]; + } + + if (nPlanes >= 4) { + + Int_t cha1, cha2, npoints1, npoints2; + for (Int_t iList = 0; iList < (nTracklets - 1); iList++) { + + if (trkTrack[iList] == -1 || trkTrack[iList+1] == -1) continue; + trk1 = GetTracklet(trkTrack[iList ]); + trk2 = GetTracklet(trkTrack[iList+1]); + + cha1 = trk1->GetDetector(); + cha2 = trk2->GetDetector(); + if (cha1 != cha2) continue; + + npoints1 = trk1->GetNclusters(); + npoints2 = trk2->GetNclusters(); + + if (npoints1 == npoints2) { + trkTrack[iList] = -1; + } + else { + if (npoints1 > npoints2) trkTrack[iList+1] = -1; + if (npoints1 < npoints2) trkTrack[iList ] = -1; + } + + } + + fGTUtrk = new AliTRDgtuTrack(); + for (Int_t iList = 0; iList < nTracklets; iList++) { + if (trkTrack[iList] == -1) continue; + trk = GetTracklet(trkTrack[iList]); + fGTUtrk->AddTracklet(trk); + } + fGTUtrk->Track(fXprojPlane,fField); + AddTrack(); + + } + + } // end trk 1 + + } // end plan 1 + +} + +//_____________________________________________________________________________ +void AliTRDmodule::AddTrack() +{ + // + // Add a found track to the module + // + + Tracks()->Add(fGTUtrk); + +} + +//_____________________________________________________________________________ +void AliTRDmodule::RemoveMultipleTracks() +{ + // + // Remove multiple found tracks + // + + AliTRDgtuTrack *trk1; + AliTRDgtuTrack *trk2; + + Float_t yproj1; + Float_t yproj2; + Float_t alpha1; + Float_t alpha2; + Int_t ntrk1; + Int_t ntrk2; + Int_t iTrack = 0; + + while (iTrack < (GetNtracks()-1)) { + + trk1 = GetTrack(iTrack ); + trk2 = GetTrack(iTrack+1); + + ntrk1 = trk1->GetNtracklets(); + yproj1 = trk1->GetYproj(); + alpha1 = trk1->GetSlope(); + ntrk2 = trk2->GetNtracklets(); + yproj2 = trk2->GetYproj(); + alpha2 = trk2->GetSlope(); + + if ((TMath::Abs(yproj1-yproj2) < fDeltaY) && + (TMath::Abs(alpha1-alpha2) < fDeltaS)) { + if (ntrk1 < ntrk2) { + RemoveTrack(iTrack ); + } + else { + RemoveTrack(iTrack+1); + } + } + else { + iTrack++; + } + + } + +} + +//_____________________________________________________________________________ +TObjArray *AliTRDmodule::Tracklets() +{ + // + // Returns the list of tracklets + // + + if (!fTracklets) { + fTracklets = new TObjArray(400); + } + + return fTracklets; + +} + +//_____________________________________________________________________________ +void AliTRDmodule::ResetTracklets() +{ + // + // Resets the list of tracklets + // + + if (fTracklets) { + fTracklets->Delete(); + } + +} + +//_____________________________________________________________________________ +void AliTRDmodule::SortTracklets() +{ + // + // Sorts the list of tracklets + // + + if (fTracklets) { + fTracklets->Sort(); + } + +} + +//_____________________________________________________________________________ +Int_t AliTRDmodule::GetNtracklets() const +{ + // + // Returns the number of tracklets + // + + if (fTracklets) { + return fTracklets->GetEntriesFast(); + } + + return 0; + +} + +//_____________________________________________________________________________ +TObjArray *AliTRDmodule::Tracks() +{ + // + // Returns the list of tracks + // + + if (!fTracks) { + fTracks = new TObjArray(400); + } + + return fTracks; + +} + +//_____________________________________________________________________________ +void AliTRDmodule::SortTracks() +{ + // + // Sort the list of tracks + // + + if (fTracks) { + fTracks->Sort(); + } + +} + +//_____________________________________________________________________________ +Int_t AliTRDmodule::GetNtracks() const +{ + // + // Returns the number of tracks + // + + if (fTracks) { + return fTracks->GetEntriesFast(); + } + + return 0; + +} diff --git a/TRD/attic/AliTRDmodule.h b/TRD/attic/AliTRDmodule.h new file mode 100644 index 00000000000..d61b37dfb64 --- /dev/null +++ b/TRD/attic/AliTRDmodule.h @@ -0,0 +1,78 @@ +#ifndef ALITRDMODULE_H +#define ALITRDMODULE_H +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + +/* $Id: AliTRDmodule.h 19198 2007-06-19 13:50:47Z cblume $ */ + +/////////////////////////////////////////////////////////////////////////////// +// // +// TRD module class // +// // +/////////////////////////////////////////////////////////////////////////////// + +#include + +class AliTRDgtuTrack; +class AliTRDltuTracklet; + +class AliTRDmodule : public TObject { + + public: + + enum { kNplan = 6, kNmaxZchan = 100, kNsubZchan = 16, kNmaxTrk = 12 }; + + AliTRDmodule(); + AliTRDmodule(const AliTRDmodule &m); + virtual ~AliTRDmodule(); + AliTRDmodule &operator=(const AliTRDmodule &m); + + virtual void Copy(TObject &m) const; + + Int_t GetNtracklets() const; + Int_t GetNtracks() const; + + void Reset(); + void AddTracklet(Int_t det, Int_t row, Float_t rowz, Float_t slope, Float_t offset + , Float_t time, Int_t ncl, Int_t label, Float_t q); + void AddTrack(); + + void ResetTracklets(); + void ResetTracks(); + void SortTracklets(); + void SortTracks(); + void RemoveMultipleTracklets(); + void RemoveMultipleTracks(); + void RemoveTracklet(Int_t pos); + void RemoveTrack(Int_t pos); + void SortZ(Int_t cha); + void InitZLUT(); + void FindTracks(); + void FindTracksCombi(Int_t zchan); + + TObjArray *Tracklets(); + TObjArray *Tracks(); + AliTRDltuTracklet *GetTracklet(Int_t pos) const; + AliTRDgtuTrack *GetTrack(Int_t pos) const; + + protected: + + Float_t fXprojPlane; //! X (time) coordinate of the projection plane + Float_t fField; //! Magnetic field + TObjArray *fTracklets; //! Array of LTU tracklets + TObjArray *fTracks; //! Array of GTU tracks + + Int_t fZnchan[kNplan][kNsubZchan]; //! Number of LTU tracklets in each subchannel + Int_t fZtrkid[kNplan][kNmaxZchan][kNsubZchan]; //! List of LTU tracklet id's for each subchannel + + Float_t fDeltaY; // Y (offset) matching window in the GTU + Float_t fDeltaS; // Slope matching window in the GTU + + AliTRDltuTracklet *fLTUtrk; //! Current LTU tracklet + AliTRDgtuTrack *fGTUtrk; //! Current GTU track + + ClassDef(AliTRDmodule,2) // TRD module class + +}; + +#endif diff --git a/TRD/attic/AliTRDtrigger.cxx b/TRD/attic/AliTRDtrigger.cxx new file mode 100644 index 00000000000..e12e9e51bfc --- /dev/null +++ b/TRD/attic/AliTRDtrigger.cxx @@ -0,0 +1,923 @@ +/************************************************************************** + * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * * + * Author: The ALICE Off-line Project. * + * Contributors are mentioned in the code where appropriate. * + * * + * Permission to use, copy, modify and distribute this software and its * + * documentation strictly for non-commercial purposes is hereby granted * + * without fee, provided that the above copyright notice appears in all * + * copies and that both the copyright notice and this permission notice * + * appear in the supporting documentation. The authors make no claims * + * about the suitability of this software for any purpose. It is * + * provided "as is" without express or implied warranty. * + **************************************************************************/ + +/* $Id: AliTRDtrigger.cxx 30433 2008-12-17 12:18:55Z fca $ */ + +/////////////////////////////////////////////////////////////////////////////// +// // +// TRD trigger class // +// // +// Author: // +// Bogdan Vulpescu // +// // +/////////////////////////////////////////////////////////////////////////////// + +#include +#include +#include +#include +#include + +#include "AliLog.h" +#include "AliRun.h" +#include "AliLoader.h" + +#include "AliTRDdigitsManager.h" + +#include "AliTRDarrayDictionary.h" +#include "AliTRDarrayADC.h" + +#include "AliTRDgeometry.h" +#include "AliTRDcalibDB.h" +#include "AliTRDrawData.h" +#include "AliTRDtrigger.h" +#include "AliTRDmodule.h" +#include "AliTRDmcmTracklet.h" +#include "AliTRDgtuTrack.h" +#include "AliTRDtrigParam.h" +#include "AliTRDmcm.h" +#include "AliTRDzmaps.h" +// #include "AliTRDCalibraFillHisto.h" +#include "Cal/AliTRDCalPID.h" + +ClassImp(AliTRDtrigger) + +//_____________________________________________________________________________ +AliTRDtrigger::AliTRDtrigger() + :TNamed() + ,fField(0) + ,fGeo(NULL) + ,fRunLoader(NULL) + ,fDigitsManager(NULL) + ,fTrackletTree(NULL) + ,fTracklets(NULL) + ,fNROB(0) + ,fMCM(NULL) + ,fTrk(NULL) + ,fTrkTest(NULL) + ,fModule(NULL) + ,fGTUtrk(NULL) + ,fNtracklets(0) + ,fDigits(NULL) + ,fTrack0(NULL) + ,fTrack1(NULL) + ,fTrack2(NULL) + ,fNPrimary(0) + ,fTracks(NULL) +{ + // + // AliTRDtrigger default constructor + // + +} + +//_____________________________________________________________________________ +AliTRDtrigger::AliTRDtrigger(const Text_t *name, const Text_t *title) + :TNamed(name,title) + ,fField(0) + ,fGeo(NULL) + ,fRunLoader(NULL) + ,fDigitsManager(new AliTRDdigitsManager()) + ,fTrackletTree(NULL) + ,fTracklets(new TObjArray(400)) + ,fNROB(0) + ,fMCM(NULL) + ,fTrk(NULL) + ,fTrkTest(NULL) + ,fModule(NULL) + ,fGTUtrk(NULL) + ,fNtracklets(0) + ,fDigits(NULL) + ,fTrack0(NULL) + ,fTrack1(NULL) + ,fTrack2(NULL) + ,fNPrimary(0) + ,fTracks(new TClonesArray("AliTRDgtuTrack",1000)) +{ + // + // AliTRDtrigger constructor + // + +} + +//_____________________________________________________________________________ +AliTRDtrigger::AliTRDtrigger(const AliTRDtrigger &p) + :TNamed(p) + ,fField(p.fField) + ,fGeo(NULL) + ,fRunLoader(NULL) + ,fDigitsManager(NULL) + ,fTrackletTree(NULL) + ,fTracklets(NULL) + ,fNROB(p.fNROB) + ,fMCM(NULL) + ,fTrk(NULL) + ,fTrkTest(NULL) + ,fModule(NULL) + ,fGTUtrk(NULL) + ,fNtracklets(p.fNtracklets) + ,fDigits(NULL) + ,fTrack0(NULL) + ,fTrack1(NULL) + ,fTrack2(NULL) + ,fNPrimary(p.fNPrimary) + ,fTracks(NULL) +{ + // + // AliTRDtrigger copy constructor + // + + if (fGeo) { + delete fGeo; + } + fGeo = new AliTRDgeometry(); + +} + +///_____________________________________________________________________________ +AliTRDtrigger::~AliTRDtrigger() +{ + // + // AliTRDtrigger destructor + // + + if (fTracklets) { + fTracklets->Delete(); + delete fTracklets; + } + + if (fTracks) { + fTracks->Delete(); + delete fTracks; + } + + if (fGeo) { + delete fGeo; + } + + delete fDigitsManager; + delete fModule; + delete fTrkTest; + delete fMCM; + // delete fTrk; + +} + +//_____________________________________________________________________________ +AliTRDtrigger &AliTRDtrigger::operator=(const AliTRDtrigger &p) +{ + // + // Assignment operator + // + + if (this != &p) ((AliTRDtrigger &) p).Copy(*this); + return *this; + +} + +//_____________________________________________________________________________ +void AliTRDtrigger::Copy(TObject &) const +{ + // + // Copy function + // + + AliFatal("Not implemented"); + +} + +//_____________________________________________________________________________ +void AliTRDtrigger::Init() +{ + // + // Initialization + // + + fModule = new AliTRDmodule(); + fTracks->Clear(); + + // The magnetic field strength + const Double_t x[3] = { 0.0, 0.0, 0.0 }; + Double_t b[3]; + gAlice->Field(x,b); // b[] is in kilo Gauss + fField = b[2] * 0.1; // Tesla + + fGeo = new AliTRDgeometry(); + + if (!AliTRDcalibDB::Instance()) { + AliError("No instance of AliTRDcalibDB."); + return; + } + +} + +//_____________________________________________________________________________ +Bool_t AliTRDtrigger::Open(const Char_t *name, Int_t nEvent) +{ + // + // Opens the AliROOT file. + // + + TString evfoldname = AliConfig::GetDefaultEventFolderName(); + fRunLoader = AliRunLoader::GetRunLoader(evfoldname); + + if (!fRunLoader) { + fRunLoader = AliRunLoader::Open(name); + } + if (!fRunLoader) { + AliError(Form("Can not open session for file %s.",name)); + return kFALSE; + } + + // Import the Trees for the event nEvent in the file + fRunLoader->GetEvent(nEvent); + + // Open output + TObjArray *ioArray = 0; + AliLoader* loader = fRunLoader->GetLoader("TRDLoader"); + loader->MakeTree("T"); + fTrackletTree = loader->TreeT(); + fTrackletTree->Branch("TRDmcmTracklet","TObjArray",&ioArray,32000,0); + Init(); + + return kTRUE; + +} + +//_____________________________________________________________________________ +Bool_t AliTRDtrigger::ReadDigits() +{ + // + // Reads the digits arrays from the input aliroot file + // + + if (!fRunLoader) { + AliError("Can not find the Run Loader"); + return kFALSE; + } + + AliLoader* loader = fRunLoader->GetLoader("TRDLoader"); + if (!loader->TreeD()) { + loader->LoadDigits(); + } + if (!loader->TreeD()) { + return kFALSE; + } + + return (fDigitsManager->ReadDigits(loader->TreeD())); + +} + +//_____________________________________________________________________________ +Bool_t AliTRDtrigger::ReadDigits(AliRawReader* rawReader) +{ + // + // Reads the digits arrays from the ddl file + // + + AliTRDrawData *raw = new AliTRDrawData(); + fDigitsManager = raw->Raw2Digits(rawReader); + + return kTRUE; + +} + +//_____________________________________________________________________________ +Bool_t AliTRDtrigger::ReadDigits(TTree *digitsTree) +{ + // + // Reads the digits arrays from the input tree + // + + return (fDigitsManager->ReadDigits(digitsTree)); + +} + +//_____________________________________________________________________________ +Bool_t AliTRDtrigger::ReadTracklets(AliRunLoader *rl) +{ + // + // Reads the tracklets find the tracks + // + + Int_t idet; + + AliLoader *loader = rl->GetLoader("TRDLoader"); + loader->LoadTracks(); + fTrackletTree = loader->TreeT(); + + TBranch *branch = fTrackletTree->GetBranch("TRDmcmTracklet"); + if (!branch) { + AliError("Can't get the branch !"); + return kFALSE; + } + TObjArray *tracklets = new TObjArray(400); + branch->SetAddress(&tracklets); + + Int_t nEntries = (Int_t) fTrackletTree->GetEntries(); + Int_t iEntry; + Int_t itrk; + Int_t iStack; + Int_t iStackPrev = -1; + + for (iEntry = 0; iEntry < nEntries; iEntry++) { + + fTrackletTree->GetEvent(iEntry); + + for (itrk = 0; itrk < tracklets->GetEntriesFast(); itrk++) { + + fTrk = (AliTRDmcmTracklet *) tracklets->UncheckedAt(itrk); + idet = fTrk->GetDetector(); + iStack = idet / (AliTRDgeometry::Nlayer()); + + if (iStackPrev != iStack) { + if (iStackPrev == -1) { + iStackPrev = iStack; + } + else { + MakeTracks(idet - AliTRDgeometry::Nlayer()); + ResetTracklets(); + iStackPrev = iStack; + } + } + + Tracklets()->Add(fTrk); + + if ((iEntry == (nEntries-1)) && + (itrk == (tracklets->GetEntriesFast() - 1))) { + idet++; + MakeTracks(idet-AliTRDgeometry::Nlayer()); + ResetTracklets(); + } + + } + + } + + loader->UnloadTracks(); + + return kTRUE; + +} + +//_____________________________________________________________________________ +Bool_t AliTRDtrigger::MakeTracklets(Bool_t makeTracks) +{ + // + // Create tracklets from digits + // + + Int_t stackBeg = 0; + Int_t stackEnd = AliTRDgeometry::Nstack(); + Int_t layerBeg = 0; + Int_t layerEnd = AliTRDgeometry::Nlayer(); + Int_t sectorBeg = 0; + Int_t sectorEnd = AliTRDgeometry::Nsector(); + + fTrkTest = new AliTRDmcmTracklet(0,0,0); + fMCM = new AliTRDmcm(0); + + Int_t time; + Int_t col; + Int_t row; + Int_t col1; + Int_t col2; + Int_t idet = -1; + Int_t iStackCur = -1; + Int_t iStackPrev = -1; + Float_t amp; + + for (Int_t isector = sectorBeg; isector < sectorEnd; isector++) { + + for (Int_t istack = stackBeg; istack < stackEnd; istack++) { + + // Number of ROBs in the chamber + if(istack == 2) { + fNROB = 6; + } + else { + fNROB = 8; + } + + for (Int_t ilayer = layerBeg; ilayer < layerEnd; ilayer++) { + + idet = fGeo->GetDetector(ilayer,istack,isector); + ResetTracklets(); + + if (makeTracks) { + iStackCur = idet / (AliTRDgeometry::Nlayer()); + if (iStackPrev != iStackCur) { + if (iStackPrev == -1) { + iStackPrev = iStackCur; + } + else { + MakeTracks(idet-AliTRDgeometry::Nlayer()); + ResetTracklets(); + iStackPrev = iStackCur; + } + } + } + + Int_t nRowMax = fGeo->GetRowMax(ilayer,istack,isector); + Int_t nColMax = fGeo->GetColMax(ilayer); + Int_t nTimeTotal = AliTRDcalibDB::Instance()->GetNumberOfTimeBins(); + + // Get the digits + fDigits = (AliTRDarrayADC *) fDigitsManager->GetDigits(idet); + if (!fDigits) return kFALSE; + // This is to take care of switched off super modules + if (fDigits->GetNtime() == 0) { + continue; + } + fDigits->Expand(); + fTrack0 = (AliTRDarrayDictionary *) fDigitsManager->GetDictionary(idet,0); + if (!fTrack0) return kFALSE; + fTrack0->Expand(); + fTrack1 = (AliTRDarrayDictionary *) fDigitsManager->GetDictionary(idet,1); + if (!fTrack1) return kFALSE; + fTrack1->Expand(); + fTrack2 = (AliTRDarrayDictionary *) fDigitsManager->GetDictionary(idet,2); + if (!fTrack2) return kFALSE; + fTrack2->Expand(); + + for (Int_t iRob = 0; iRob < fNROB; iRob++) { + + for (Int_t iMcm = 0; iMcm < kNMCM; iMcm++) { + + fMCM->Reset(); + fMCM->SetRobId(iRob); + fMCM->SetChaId(idet); + + SetMCMcoordinates(iMcm); + + row = fMCM->GetRow(); + + if ((row < 0) || (row >= nRowMax)) { + AliError("MCM row number out of range."); + continue; + } + + fMCM->GetColRange(col1,col2); + + for (time = 0; time < nTimeTotal; time++) { + for (col = col1; col < col2; col++) { + if ((col >= 0) && (col < nColMax)) { + amp = TMath::Abs(fDigits->GetData(row,col,time)); + } + else { + amp = 0.0; + } + fMCM->SetADC(col-col1,time,amp); + } + } + + if (AliTRDtrigParam::Instance()->GetTailCancelation()) { + fMCM->Filter(AliTRDtrigParam::Instance()->GetNexponential() + ,AliTRDtrigParam::Instance()->GetFilterType()); + } + + if (fMCM->Run()) { + + for (Int_t iSeed = 0; iSeed < kMaxTrackletsPerMCM; iSeed++) { + + if (fMCM->GetSeedCol()[iSeed] < 0) { + continue; + } + + AliDebug(2,Form("Add tracklet %d in col %02d \n",fNtracklets,fMCM->GetSeedCol()[iSeed])); + + if (TestTracklet(idet,row,iSeed,0)) { + AddTracklet(idet,row,iSeed,fNtracklets++); + } + + } + + } + + } + + + } + + // Compress the arrays + fDigits->Compress(); + fTrack0->Compress(); + fTrack1->Compress(); + fTrack2->Compress(); + + WriteTracklets(idet); + + } + } + } + + if (makeTracks) { + idet++; + MakeTracks(idet - AliTRDgeometry::Nlayer()); + ResetTracklets(); + } + + return kTRUE; + +} + +//_____________________________________________________________________________ +void AliTRDtrigger::SetMCMcoordinates(Int_t imcm) +{ + // + // Configure MCM position in the pad plane + // + + Int_t robid = fMCM->GetRobId(); + + // setting the Row and Col range + + const Int_t kNcolRob = 2; // number of ROBs per chamber in column direction + const Int_t kNmcmRob = 4; // number of MCMs per ROB in column/row direction + + Int_t mcmid = imcm%(kNmcmRob*kNmcmRob); + + if (robid%kNcolRob == 0) { + + if (mcmid%kNmcmRob == 0) { + fMCM->SetColRange(18*0-1,18*1-1+2+1); + } + if (mcmid%kNmcmRob == 1) { + fMCM->SetColRange(18*1-1,18*2-1+2+1); + } + if (mcmid%kNmcmRob == 2) { + fMCM->SetColRange(18*2-1,18*3-1+2+1); + } + if (mcmid%kNmcmRob == 3) { + fMCM->SetColRange(18*3-1,18*4-1+2+1); + } + + } + else { + + if (mcmid%kNmcmRob == 0) { + fMCM->SetColRange(18*4-1,18*5-1+2+1); + } + if (mcmid%kNmcmRob == 1) { + fMCM->SetColRange(18*5-1,18*6-1+2+1); + } + if (mcmid%kNmcmRob == 2) { + fMCM->SetColRange(18*6-1,18*7-1+2+1); + } + if (mcmid%kNmcmRob == 3) { + fMCM->SetColRange(18*7-1,18*8-1+2+1); + } + + } + + fMCM->SetRow(kNmcmRob*(robid/kNcolRob)+mcmid/kNmcmRob); + +} + +//_____________________________________________________________________________ +Bool_t AliTRDtrigger::TestTracklet(Int_t det, Int_t row, Int_t seed, Int_t n) +{ + // + // Check first the tracklet pt + // + + Int_t nTimeTotal = AliTRDcalibDB::Instance()->GetNumberOfTimeBins(); + + // Calibration fill 2D +// AliTRDCalibraFillHisto *calibra = AliTRDCalibraFillHisto::Instance(); +// if (!calibra) { +// AliInfo("Could not get Calibra instance\n"); +// } + + fTrkTest->Reset(); + + fTrkTest->SetDetector(det); + fTrkTest->SetRow(row); + fTrkTest->SetN(n); + + Int_t iCol, iCol1, iCol2, track[3]; + iCol = fMCM->GetSeedCol()[seed]; // 0....20 (MCM) + fMCM->GetColRange(iCol1,iCol2); // range in the pad plane + + Float_t amp[3]; + for (Int_t iTime = 0; iTime < nTimeTotal; iTime++) { + + amp[0] = fMCM->GetADC(iCol-1,iTime); + amp[1] = fMCM->GetADC(iCol ,iTime); + amp[2] = fMCM->GetADC(iCol+1,iTime); + + // extract track contribution only from the central pad + track[0] = fTrack0->GetData(row,iCol+iCol1,iTime); + track[1] = fTrack1->GetData(row,iCol+iCol1,iTime); + track[2] = fTrack2->GetData(row,iCol+iCol1,iTime); + + if (fMCM->IsCluster(iCol,iTime)) { + + fTrkTest->AddCluster(iCol+iCol1,iTime,amp,track); + + } + else if ((iCol+1+1) < kMcmCol) { + + amp[0] = fMCM->GetADC(iCol-1+1,iTime); + amp[1] = fMCM->GetADC(iCol +1,iTime); + amp[2] = fMCM->GetADC(iCol+1+1,iTime); + + if (fMCM->IsCluster(iCol+1,iTime)) { + + // extract track contribution only from the central pad + track[0] = fTrack0->GetData(row,iCol+1+iCol1,iTime); + track[1] = fTrack1->GetData(row,iCol+1+iCol1,iTime); + track[2] = fTrack2->GetData(row,iCol+1+iCol1,iTime); + + fTrkTest->AddCluster(iCol+1+iCol1,iTime,amp,track); + + } + + } + + } + + fTrkTest->CookLabel(0.8); + /* + if (fTrkTest->GetLabel() >= fNPrimary) { + Info("AddTracklet","Only primaries are stored!"); + return; + } + */ + // LTU Pt cut + fTrkTest->MakeTrackletGraph(fGeo,fField); + + fTrkTest->MakeClusAmpGraph(); + + if (TMath::Abs(fTrkTest->GetPt()) < AliTRDtrigParam::Instance()->GetLtuPtCut()) { + return kFALSE; + } + + return kTRUE; + +} + +//_____________________________________________________________________________ +void AliTRDtrigger::AddTracklet(Int_t det, Int_t row, Int_t seed, Int_t n) +{ + // + // Add a found tracklet + // + + Int_t nTimeTotal = AliTRDcalibDB::Instance()->GetNumberOfTimeBins(); + + fTrk = new AliTRDmcmTracklet(det,row,n); + + Int_t iCol, iCol1, iCol2, track[3]; + iCol = fMCM->GetSeedCol()[seed]; // 0....20 (MCM) + fMCM->GetColRange(iCol1,iCol2); // range in the pad plane + + Float_t amp[3]; + for (Int_t iTime = 0; iTime < nTimeTotal; iTime++) { + + amp[0] = fMCM->GetADC(iCol-1,iTime); + amp[1] = fMCM->GetADC(iCol ,iTime); + amp[2] = fMCM->GetADC(iCol+1,iTime); + + // extract track contribution only from the central pad + track[0] = fTrack0->GetData(row,iCol+iCol1,iTime); + track[1] = fTrack1->GetData(row,iCol+iCol1,iTime); + track[2] = fTrack2->GetData(row,iCol+iCol1,iTime); + + if (fMCM->IsCluster(iCol,iTime)) { + + fTrk->AddCluster(iCol+iCol1,iTime,amp,track); + + } + else if ((iCol+1+1) < kMcmCol) { + + amp[0] = fMCM->GetADC(iCol-1+1,iTime); + amp[1] = fMCM->GetADC(iCol +1,iTime); + amp[2] = fMCM->GetADC(iCol+1+1,iTime); + + if (fMCM->IsCluster(iCol+1,iTime)) { + + // extract track contribution only from the central pad + track[0] = fTrack0->GetData(row,iCol+1+iCol1,iTime); + track[1] = fTrack1->GetData(row,iCol+1+iCol1,iTime); + track[2] = fTrack2->GetData(row,iCol+1+iCol1,iTime); + + fTrk->AddCluster(iCol+1+iCol1,iTime,amp,track); + + } + + } + + } + + fTrk->CookLabel(0.8); + /* + if (fTrk->GetLabel() >= fNPrimary) { + Info("AddTracklet","Only primaries are stored!"); + return; + } + */ + // LTU Pt cut + fTrk->MakeTrackletGraph(fGeo,fField); + fTrk->MakeClusAmpGraph(); + if (TMath::Abs(fTrk->GetPt()) < AliTRDtrigParam::Instance()->GetLtuPtCut()) { + return; + } + + Tracklets()->Add(fTrk); + +} + +//_____________________________________________________________________________ +Bool_t AliTRDtrigger::WriteTracklets(Int_t det) +{ + // + // Fills TRDmcmTracklet branch in the tree with the Tracklets + // found in detector = det. For det=-1 writes the tree. + // + + if ((det < -1) || (det >= AliTRDgeometry::Ndet())) { + AliError(Form("Unexpected detector index %d.",det)); + return kFALSE; + } + + TBranch *branch = fTrackletTree->GetBranch("TRDmcmTracklet"); + if (!branch) { + TObjArray *ioArray = 0; + branch = fTrackletTree->Branch("TRDmcmTracklet","TObjArray",&ioArray,32000,0); + } + + if ((det >= 0) && (det < AliTRDgeometry::Ndet())) { + + Int_t nTracklets = Tracklets()->GetEntriesFast(); + TObjArray *detTracklets = new TObjArray(400); + + for (Int_t i = 0; i < nTracklets; i++) { + + AliTRDmcmTracklet *trk = (AliTRDmcmTracklet *) Tracklets()->UncheckedAt(i); + + if (det == trk->GetDetector()) { + detTracklets->AddLast(trk); + } + + } + + branch->SetAddress(&detTracklets); + fTrackletTree->Fill(); + + delete detTracklets; + + return kTRUE; + + } + + if (det == -1) { + + AliInfo(Form("Writing the Tracklet tree %s for event %d." + ,fTrackletTree->GetName(),fRunLoader->GetEventNumber())); + + AliLoader* loader = fRunLoader->GetLoader("TRDLoader"); + loader->WriteTracks("OVERWRITE"); + + return kTRUE; + + } + + return kFALSE; + +} + +//_____________________________________________________________________________ +void AliTRDtrigger::MakeTracks(Int_t det) +{ + // + // Create GTU tracks per module (stack of 6 chambers) + // + + fModule->Reset(); + + Int_t nRowMax, ilayer, istack, isector, row; + + if ((det < 0) || (det >= AliTRDgeometry::Ndet())) { + AliError(Form("Unexpected detector index %d.",det)); + return; + } + + Int_t nTracklets = Tracklets()->GetEntriesFast(); + + AliTRDmcmTracklet *trk; + for (Int_t i = 0; i < nTracklets; i++) { + + trk = (AliTRDmcmTracklet *) Tracklets()->UncheckedAt(i); + + ilayer = fGeo->GetLayer(trk->GetDetector()); + istack = fGeo->GetStack(trk->GetDetector()); + isector = fGeo->GetSector(trk->GetDetector()); + + nRowMax = fGeo->GetRowMax(ilayer,istack,isector); + row = trk->GetRow(); + + fModule->AddTracklet(trk->GetDetector(), + row, + trk->GetRowz(), + trk->GetSlope(), + trk->GetOffset(), + trk->GetTime0(), + trk->GetNclusters(), + trk->GetLabel(), + trk->GetdQdl()); + + } + + fModule->SortTracklets(); + fModule->RemoveMultipleTracklets(); + fModule->SortZ((Int_t)fGeo->GetStack(det)); + fModule->FindTracks(); + fModule->SortTracks(); + fModule->RemoveMultipleTracks(); + + Int_t nModTracks = fModule->GetNtracks(); + AliTRDgtuTrack *gtutrk; + for (Int_t i = 0; i < nModTracks; i++) { + gtutrk = (AliTRDgtuTrack*)fModule->GetTrack(i); + if (TMath::Abs(gtutrk->GetPt()) < AliTRDtrigParam::Instance()->GetGtuPtCut()) continue; + gtutrk->CookLabel(); + gtutrk->MakePID(); + AddTrack(gtutrk,det); + } + +} + +//_____________________________________________________________________________ +void AliTRDtrigger::AddTrack(const AliTRDgtuTrack *t, Int_t det) +{ + // + // Add a track to the list + // + + AliTRDgtuTrack *track = new(fTracks->operator[](fTracks->GetEntriesFast())) + AliTRDgtuTrack(*t); + track->SetDetector(det); + +} + +//_____________________________________________________________________________ +TObjArray* AliTRDtrigger::Tracklets() +{ + // + // Returns list of tracklets + // + + if (!fTracklets) { + fTracklets = new TObjArray(400); + } + return fTracklets; + +} + +//_____________________________________________________________________________ +void AliTRDtrigger::ResetTracklets() +{ + // + // Resets the list of tracklets + // + + if (fTracklets) { + fTracklets->Delete(); + } + +} + +//_____________________________________________________________________________ +Int_t AliTRDtrigger::GetNumberOfTracks() const +{ + // + // Returns number of tracks + // + + return fTracks->GetEntriesFast(); + +} + +//_____________________________________________________________________________ +AliTRDgtuTrack* AliTRDtrigger::GetTrack(Int_t i) const +{ + // + // Returns a given track from the list + // + + return (AliTRDgtuTrack *) fTracks->UncheckedAt(i); + +} diff --git a/TRD/attic/AliTRDtrigger.h b/TRD/attic/AliTRDtrigger.h new file mode 100644 index 00000000000..8e127fb4b95 --- /dev/null +++ b/TRD/attic/AliTRDtrigger.h @@ -0,0 +1,102 @@ +#ifndef ALITRDTRIGGER_H +#define ALITRDTRIGGER_H +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + +/* $Id: AliTRDtrigger.h 29960 2008-11-18 18:08:05Z cblume $ */ + +/////////////////////////////////////////////////////////////////////////////// +// // +// TRD trigger class // +// // +/////////////////////////////////////////////////////////////////////////////// + +#include + +class TTree; +class TClonesArray; +class TObjArray; + +class AliRunLoader; +class AliRawReader; + +class AliTRDmcmTracklet; +class AliTRDgtuTrack; +class AliTRDmcm; +class AliTRDmodule; +class AliTRDdigitsManager; +class AliTRDarrayDictionary; +class AliTRDarrayADC; +class AliTRDgeometry; + +class AliTRDtrigger : public TNamed { + + public: + + enum { kNMCM = 16, kMaxTrackletsPerMCM = 4, kMcmCol = 21 }; + + AliTRDtrigger(); + AliTRDtrigger(const Text_t* name, const Text_t* title); + AliTRDtrigger(const AliTRDtrigger &p); + virtual ~AliTRDtrigger(); + AliTRDtrigger &operator=(const AliTRDtrigger &p); + + virtual void Copy(TObject &p) const; + + void Init(); + + Bool_t Open(const Char_t *name, Int_t nEvent = 0); + Bool_t ReadDigits(); + Bool_t ReadDigits(AliRawReader *rawReader); + Bool_t ReadDigits(TTree *digitsTree); + Bool_t MakeTracklets(Bool_t makeTracks = kFALSE); + void MakeTracks(Int_t det); + Bool_t WriteTracklets(Int_t det); + Bool_t ReadTracklets(AliRunLoader *rl); + + void AddTracklet(Int_t det, Int_t row, Int_t seed, Int_t n); + void AddTrack(const AliTRDgtuTrack *t, Int_t det); + Bool_t TestTracklet(Int_t det, Int_t row, Int_t seed, Int_t n); + TObjArray *Tracklets(); + void ResetTracklets(); + + Int_t GetNumberOfTracks() const; + Int_t GetNPrimary() const { return fNPrimary; }; + AliTRDgtuTrack *GetTrack(Int_t i) const; + + void SetRunLoader(AliRunLoader *rl) { fRunLoader = rl; }; + void SetMCMcoordinates(Int_t imcm); + + protected: + + Float_t fField; //! Magnetic field + AliTRDgeometry *fGeo; //! TRD geometry + + AliRunLoader *fRunLoader; //! Run Loader + AliTRDdigitsManager *fDigitsManager; //! TRD digits manager + TTree *fTrackletTree; //! Tree with tracklets + TObjArray *fTracklets; //! Array of tracklets + + Int_t fNROB; //! Number of ROBs in the current chamber + AliTRDmcm *fMCM; //! Current MCM + AliTRDmcmTracklet *fTrk; //! Current tracklet + AliTRDmcmTracklet *fTrkTest; //! Test tracklet + AliTRDmodule *fModule; //! Current module + AliTRDgtuTrack *fGTUtrk; //! Current GTU track + + Int_t fNtracklets; //! Tracklets counter + + AliTRDarrayADC *fDigits; //! Array with digits + AliTRDarrayDictionary *fTrack0; //! Track dictionary 0 + AliTRDarrayDictionary *fTrack1; //! Track dictionary 1 + AliTRDarrayDictionary *fTrack2; //! Track dictionary 2 + + Int_t fNPrimary; //! Number of primary tracks + + TClonesArray *fTracks; //! Array of GTU tracks + + ClassDef(AliTRDtrigger,6) // TRD trigger class + +}; + +#endif diff --git a/TRD/attic/AliTRDzmaps.h b/TRD/attic/AliTRDzmaps.h new file mode 100644 index 00000000000..03b1f8d75bd --- /dev/null +++ b/TRD/attic/AliTRDzmaps.h @@ -0,0 +1,1146 @@ +#ifndef ALITRDZMAPS_H +#define ALITRDZMAPS_H + +/////////////////////////////////////////////////////// +// Z maps for Z-sorting channels // +/////////////////////////////////////////////////////// + +/* This file has been generated by zChannelGen.cxx */ + +/* Access as: ZChannelMap[chamber][channel][plane][row] */ + +const Int_t fZChannelMap[5][16][6][16] = { + +{ /* --- Chamber 0 --- */ + +/* x . . . . . . . . . . . . . . . */ +/* x . . . . . . . . . . . . . . . */ +/* X . . . . . . . . . . . . . . . */ +/* x x . . . . . . . . . . . . . . */ +/* x . . . . . . . . . . . . . . . */ +/* . . . . . . . . . . . . . . . . */ + +{{1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, + +/* x x . . . . . . . . . . . . . . */ +/* x x . . . . . . . . . . . . . . */ +/* . X . . . . . . . . . . . . . . */ +/* . x x . . . . . . . . . . . . . */ +/* x x . . . . . . . . . . . . . . */ +/* x . . . . . . . . . . . . . . . */ + +{{1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, + +/* . x x . . . . . . . . . . . . . */ +/* . x x . . . . . . . . . . . . . */ +/* . . X . . . . . . . . . . . . . */ +/* . . x x . . . . . . . . . . . . */ +/* . x x . . . . . . . . . . . . . */ +/* x x . . . . . . . . . . . . . . */ + +{{0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, + +/* . . x x . . . . . . . . . . . . */ +/* . . x x . . . . . . . . . . . . */ +/* . . . X . . . . . . . . . . . . */ +/* . . . x x . . . . . . . . . . . */ +/* . . x x . . . . . . . . . . . . */ +/* x x x . . . . . . . . . . . . . */ + +{{0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, + +/* . . . x x x . . . . . . . . . . */ +/* . . . x x x . . . . . . . . . . */ +/* . . . . X . . . . . . . . . . . */ +/* . . . . x x . . . . . . . . . . */ +/* . . . x x . . . . . . . . . . . */ +/* . x x x . . . . . . . . . . . . */ + +{{0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, + +/* . . . . x x x . . . . . . . . . */ +/* . . . . x x x . . . . . . . . . */ +/* . . . . . X . . . . . . . . . . */ +/* . . . . x x x . . . . . . . . . */ +/* . . . . x x . . . . . . . . . . */ +/* . . x x x . . . . . . . . . . . */ + +{{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, + +/* . . . . . x x x . . . . . . . . */ +/* . . . . . x x x . . . . . . . . */ +/* . . . . . . X . . . . . . . . . */ +/* . . . . . x x x . . . . . . . . */ +/* . . . . . x x . . . . . . . . . */ +/* . . . x x x . . . . . . . . . . */ + +{{0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, + +/* . . . . . . x x x . . . . . . . */ +/* . . . . . . x x x . . . . . . . */ +/* . . . . . . . X . . . . . . . . */ +/* . . . . . . x x x . . . . . . . */ +/* . . . . . . x x . . . . . . . . */ +/* . . . . x x x . . . . . . . . . */ + +{{0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, + +/* . . . . . . . x x x . . . . . . */ +/* . . . . . . . x x x . . . . . . */ +/* . . . . . . . . X . . . . . . . */ +/* . . . . . . . x x x . . . . . . */ +/* . . . . . . . x x . . . . . . . */ +/* . . . . . x x x . . . . . . . . */ + +{{0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0}}, + +/* . . . . . . . . x x x . . . . . */ +/* . . . . . . . . x x x . . . . . */ +/* . . . . . . . . . X . . . . . . */ +/* . . . . . . . . x x x . . . . . */ +/* . . . . . . . . x x . . . . . . */ +/* . . . . . . x x x . . . . . . . */ + +{{0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0}}, + +/* . . . . . . . . . x x x . . . . */ +/* . . . . . . . . . x x x . . . . */ +/* . . . . . . . . . . X . . . . . */ +/* . . . . . . . . . x x x . . . . */ +/* . . . . . . . . . x x . . . . . */ +/* . . . . . . . x x x . . . . . . */ + +{{0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0}}, + +/* . . . . . . . . . . x x x . . . */ +/* . . . . . . . . . . x x x . . . */ +/* . . . . . . . . . . . X . . . . */ +/* . . . . . . . . . . x x x . . . */ +/* . . . . . . . . . . x x . . . . */ +/* . . . . . . . . . x x . . . . . */ + +{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0}}, + +/* . . . . . . . . . . . x x x . . */ +/* . . . . . . . . . . . x x x . . */ +/* . . . . . . . . . . . . X . . . */ +/* . . . . . . . . . . . x x x . . */ +/* . . . . . . . . . . . x x . . . */ +/* . . . . . . . . . . x x . . . . */ + +{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0}}, + +/* . . . . . . . . . . . . x x x . */ +/* . . . . . . . . . . . . x x x . */ +/* . . . . . . . . . . . . . X . . */ +/* . . . . . . . . . . . . x x x . */ +/* . . . . . . . . . . . . x x . . */ +/* . . . . . . . . . . . x x . . . */ + +{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0}}, + +/* . . . . . . . . . . . . . x x x */ +/* . . . . . . . . . . . . . x x x */ +/* . . . . . . . . . . . . . . X . */ +/* . . . . . . . . . . . . . x x x */ +/* . . . . . . . . . . . . . x x . */ +/* . . . . . . . . . . . . x x . . */ + +{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0}}, + +/* . . . . . . . . . . . . . . x x */ +/* . . . . . . . . . . . . . . x x */ +/* . . . . . . . . . . . . . . . X */ +/* . . . . . . . . . . . . . . x x */ +/* . . . . . . . . . . . . . . x x */ +/* . . . . . . . . . . . . . x x . */ + +{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0}}}, + +{ /* --- Chamber 1 --- */ + +/* x x . . . . . . . . . . . . . . */ +/* x x . . . . . . . . . . . . . . */ +/* X . . . . . . . . . . . . . . . */ +/* x x . . . . . . . . . . . . . . */ +/* x . . . . . . . . . . . . . . . */ +/* . . . . . . . . . . . . . . . . */ + +{{1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, + +/* x x x . . . . . . . . . . . . . */ +/* x x x . . . . . . . . . . . . . */ +/* . X . . . . . . . . . . . . . . */ +/* x x x . . . . . . . . . . . . . */ +/* x x . . . . . . . . . . . . . . */ +/* x . . . . . . . . . . . . . . . */ + +{{1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, + +/* . x x x . . . . . . . . . . . . */ +/* . x x x . . . . . . . . . . . . */ +/* . . X . . . . . . . . . . . . . */ +/* . x x x . . . . . . . . . . . . */ +/* . x x . . . . . . . . . . . . . */ +/* x x . . . . . . . . . . . . . . */ + +{{0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, + +/* . . x x x . . . . . . . . . . . */ +/* . . x x x . . . . . . . . . . . */ +/* . . . X . . . . . . . . . . . . */ +/* . . x x . . . . . . . . . . . . */ +/* . . x x . . . . . . . . . . . . */ +/* . x x . . . . . . . . . . . . . */ + +{{0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, + +/* . . . . x x . . . . . . . . . . */ +/* . . . . x x . . . . . . . . . . */ +/* . . . . X . . . . . . . . . . . */ +/* . . . x x . . . . . . . . . . . */ +/* . . . x x . . . . . . . . . . . */ +/* . . x x x . . . . . . . . . . . */ + +{{0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, + +/* . . . . . x x . . . . . . . . . */ +/* . . . . . x x . . . . . . . . . */ +/* . . . . . X . . . . . . . . . . */ +/* . . . . x x . . . . . . . . . . */ +/* . . . . x x . . . . . . . . . . */ +/* . . . x x x . . . . . . . . . . */ + +{{0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, + +/* . . . . . . x x . . . . . . . . */ +/* . . . . . . x x . . . . . . . . */ +/* . . . . . . X . . . . . . . . . */ +/* . . . . . x x . . . . . . . . . */ +/* . . . . . x x . . . . . . . . . */ +/* . . . . x x x . . . . . . . . . */ + +{{0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, + +/* . . . . . . . x x . . . . . . . */ +/* . . . . . . . x x . . . . . . . */ +/* . . . . . . . X . . . . . . . . */ +/* . . . . . . x x . . . . . . . . */ +/* . . . . . . x x . . . . . . . . */ +/* . . . . . x x x . . . . . . . . */ + +{{0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0}}, + +/* . . . . . . . . x x . . . . . . */ +/* . . . . . . . . x x . . . . . . */ +/* . . . . . . . . X . . . . . . . */ +/* . . . . . . . x x . . . . . . . */ +/* . . . . . . . x x . . . . . . . */ +/* . . . . . . x x x . . . . . . . */ + +{{0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0}}, + +/* . . . . . . . . . x x . . . . . */ +/* . . . . . . . . . x x . . . . . */ +/* . . . . . . . . . X . . . . . . */ +/* . . . . . . . . x x . . . . . . */ +/* . . . . . . . . x x . . . . . . */ +/* . . . . . . . x x x . . . . . . */ + +{{0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0}}, + +/* . . . . . . . . . . x x . . . . */ +/* . . . . . . . . . . x x . . . . */ +/* . . . . . . . . . . X . . . . . */ +/* . . . . . . . . . x x . . . . . */ +/* . . . . . . . . . x x . . . . . */ +/* . . . . . . . . x x x . . . . . */ + +{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}}, + +/* . . . . . . . . . . . x x . . . */ +/* . . . . . . . . . . . x x . . . */ +/* . . . . . . . . . . . X . . . . */ +/* . . . . . . . . . . x x . . . . */ +/* . . . . . . . . . . x x . . . . */ +/* . . . . . . . . . x x x . . . . */ + +{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}}, + +/* . . . . . . . . . . . . x x . . */ +/* . . . . . . . . . . . . x x . . */ +/* . . . . . . . . . . . . X . . . */ +/* . . . . . . . . . . . x x . . . */ +/* . . . . . . . . . . . x x . . . */ +/* . . . . . . . . . . x x x . . . */ + +{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0}}, + +/* . . . . . . . . . . . . . x x . */ +/* . . . . . . . . . . . . . x x . */ +/* . . . . . . . . . . . . . X . . */ +/* . . . . . . . . . . . . x x . . */ +/* . . . . . . . . . . . . x x . . */ +/* . . . . . . . . . . . x x x . . */ + +{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0}}, + +/* . . . . . . . . . . . . . . x x */ +/* . . . . . . . . . . . . . . x x */ +/* . . . . . . . . . . . . . . X . */ +/* . . . . . . . . . . . . . x x . */ +/* . . . . . . . . . . . . . x x . */ +/* . . . . . . . . . . . . x x x . */ + +{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0}}, + +/* . . . . . . . . . . . . . . . x */ +/* . . . . . . . . . . . . . . . x */ +/* . . . . . . . . . . . . . . . X */ +/* . . . . . . . . . . . . . . x x */ +/* . . . . . . . . . . . . . . x x */ +/* . . . . . . . . . . . . . x x x */ + +{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1}}}, + +{ /* --- Chamber 2 --- */ + +/* x x . . . . . . . . . . */ +/* x x . . . . . . . . . . */ +/* X . . . . . . . . . . . */ +/* x . . . . . . . . . . . */ +/* x . . . . . . . . . . . */ +/* x . . . . . . . . . . . */ + +{{1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, + +/* . x x . . . . . . . . . */ +/* . x x . . . . . . . . . */ +/* . X . . . . . . . . . . */ +/* x x . . . . . . . . . . */ +/* x x . . . . . . . . . . */ +/* x x . . . . . . . . . . */ + +{{0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, + +/* . . x x . . . . . . . . */ +/* . . x x . . . . . . . . */ +/* . . X . . . . . . . . . */ +/* . x x . . . . . . . . . */ +/* . x x . . . . . . . . . */ +/* . x x . . . . . . . . . */ + +{{0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, + +/* . . . x x . . . . . . . */ +/* . . . x x . . . . . . . */ +/* . . . X . . . . . . . . */ +/* . . x x x . . . . . . . */ +/* . . x x x . . . . . . . */ +/* . . x x x . . . . . . . */ + +{{0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, + +/* . . . x x x . . . . . . */ +/* . . . x x x . . . . . . */ +/* . . . . X . . . . . . . */ +/* . . . x x x . . . . . . */ +/* . . . x x x . . . . . . */ +/* . . . x x x . . . . . . */ + +{{0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, + +/* . . . . x x x . . . . . */ +/* . . . . x x x . . . . . */ +/* . . . . . X . . . . . . */ +/* . . . . x x x . . . . . */ +/* . . . . x x x . . . . . */ +/* . . . . x x x . . . . . */ + +{{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, + +/* . . . . . x x x . . . . */ +/* . . . . . x x x . . . . */ +/* . . . . . . X . . . . . */ +/* . . . . . x x x . . . . */ +/* . . . . . x x x . . . . */ +/* . . . . . x x x . . . . */ + +{{0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0}}, + +/* . . . . . . x x x . . . */ +/* . . . . . . x x x . . . */ +/* . . . . . . . X . . . . */ +/* . . . . . . x x x . . . */ +/* . . . . . . x x x . . . */ +/* . . . . . . x x x . . . */ + +{{0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0}}, + +/* . . . . . . . x x . . . */ +/* . . . . . . . x x . . . */ +/* . . . . . . . . X . . . */ +/* . . . . . . . x x x . . */ +/* . . . . . . . x x x . . */ +/* . . . . . . . x x x . . */ + +{{0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0}}, + +/* . . . . . . . . x x . . */ +/* . . . . . . . . x x . . */ +/* . . . . . . . . . X . . */ +/* . . . . . . . . . x x . */ +/* . . . . . . . . . x x . */ +/* . . . . . . . . . x x . */ + +{{0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0}}, + +/* . . . . . . . . . x x . */ +/* . . . . . . . . . x x . */ +/* . . . . . . . . . . X . */ +/* . . . . . . . . . . x x */ +/* . . . . . . . . . . x x */ +/* . . . . . . . . . . x x */ + +{{0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0}}, + +/* . . . . . . . . . . x x */ +/* . . . . . . . . . . x x */ +/* . . . . . . . . . . . X */ +/* . . . . . . . . . . . x */ +/* . . . . . . . . . . . x */ +/* . . . . . . . . . . . x */ + +{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0}}, + +/* . . . . . . . . . . . . */ +/* . . . . . . . . . . . . */ +/* . . . . . . . . . . . . */ +/* . . . . . . . . . . . . */ +/* . . . . . . . . . . . . */ +/* . . . . . . . . . . . . */ + +{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, + +/* . . . . . . . . . . . . */ +/* . . . . . . . . . . . . */ +/* . . . . . . . . . . . . */ +/* . . . . . . . . . . . . */ +/* . . . . . . . . . . . . */ +/* . . . . . . . . . . . . */ + +{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, + +/* . . . . . . . . . . . . */ +/* . . . . . . . . . . . . */ +/* . . . . . . . . . . . . */ +/* . . . . . . . . . . . . */ +/* . . . . . . . . . . . . */ +/* . . . . . . . . . . . . */ + +{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, + +/* . . . . . . . . . . . . */ +/* . . . . . . . . . . . . */ +/* . . . . . . . . . . . . */ +/* . . . . . . . . . . . . */ +/* . . . . . . . . . . . . */ +/* . . . . . . . . . . . . */ + +{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}}, + +{ /* --- Chamber 3 --- */ + +/* x . . . . . . . . . . . . . . . */ +/* x . . . . . . . . . . . . . . . */ +/* X . . . . . . . . . . . . . . . */ +/* x x . . . . . . . . . . . . . . */ +/* x x . . . . . . . . . . . . . . */ +/* x x x . . . . . . . . . . . . . */ + +{{1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, + +/* x x . . . . . . . . . . . . . . */ +/* x x . . . . . . . . . . . . . . */ +/* . X . . . . . . . . . . . . . . */ +/* . x x . . . . . . . . . . . . . */ +/* . x x . . . . . . . . . . . . . */ +/* . x x x . . . . . . . . . . . . */ + +{{1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, + +/* . x x . . . . . . . . . . . . . */ +/* . x x . . . . . . . . . . . . . */ +/* . . X . . . . . . . . . . . . . */ +/* . . x x . . . . . . . . . . . . */ +/* . . x x . . . . . . . . . . . . */ +/* . . x x x . . . . . . . . . . . */ + +{{0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, + +/* . . x x . . . . . . . . . . . . */ +/* . . x x . . . . . . . . . . . . */ +/* . . . X . . . . . . . . . . . . */ +/* . . . x x . . . . . . . . . . . */ +/* . . . x x . . . . . . . . . . . */ +/* . . . x x x . . . . . . . . . . */ + +{{0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, + +/* . . . x x . . . . . . . . . . . */ +/* . . . x x . . . . . . . . . . . */ +/* . . . . X . . . . . . . . . . . */ +/* . . . . x x . . . . . . . . . . */ +/* . . . . x x . . . . . . . . . . */ +/* . . . . x x x . . . . . . . . . */ + +{{0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, + +/* . . . . x x . . . . . . . . . . */ +/* . . . . x x . . . . . . . . . . */ +/* . . . . . X . . . . . . . . . . */ +/* . . . . . x x . . . . . . . . . */ +/* . . . . . x x . . . . . . . . . */ +/* . . . . . x x x . . . . . . . . */ + +{{0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0}}, + +/* . . . . . x x . . . . . . . . . */ +/* . . . . . x x . . . . . . . . . */ +/* . . . . . . X . . . . . . . . . */ +/* . . . . . . x x . . . . . . . . */ +/* . . . . . . x x . . . . . . . . */ +/* . . . . . . x x x . . . . . . . */ + +{{0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0}}, + +/* . . . . . . x x . . . . . . . . */ +/* . . . . . . x x . . . . . . . . */ +/* . . . . . . . X . . . . . . . . */ +/* . . . . . . . x x . . . . . . . */ +/* . . . . . . . x x . . . . . . . */ +/* . . . . . . . x x x . . . . . . */ + +{{0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0}}, + +/* . . . . . . . x x . . . . . . . */ +/* . . . . . . . x x . . . . . . . */ +/* . . . . . . . . X . . . . . . . */ +/* . . . . . . . . x x . . . . . . */ +/* . . . . . . . . x x . . . . . . */ +/* . . . . . . . . x x x . . . . . */ + +{{0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}}, + +/* . . . . . . . . x x . . . . . . */ +/* . . . . . . . . x x . . . . . . */ +/* . . . . . . . . . X . . . . . . */ +/* . . . . . . . . . x x . . . . . */ +/* . . . . . . . . . x x . . . . . */ +/* . . . . . . . . . x x x . . . . */ + +{{0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}}, + +/* . . . . . . . . . x x . . . . . */ +/* . . . . . . . . . x x . . . . . */ +/* . . . . . . . . . . X . . . . . */ +/* . . . . . . . . . . x x . . . . */ +/* . . . . . . . . . . x x . . . . */ +/* . . . . . . . . . . x x x . . . */ + +{{0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0}}, + +/* . . . . . . . . . . x x . . . . */ +/* . . . . . . . . . . x x . . . . */ +/* . . . . . . . . . . . X . . . . */ +/* . . . . . . . . . . . x x . . . */ +/* . . . . . . . . . . . x x . . . */ +/* . . . . . . . . . . . x x x . . */ + +{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0}}, + +/* . . . . . . . . . . . x x x . . */ +/* . . . . . . . . . . . x x x . . */ +/* . . . . . . . . . . . . X . . . */ +/* . . . . . . . . . . . . x x . . */ +/* . . . . . . . . . . . . x x . . */ +/* . . . . . . . . . . . . . x x . */ + +{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0}}, + +/* . . . . . . . . . . . . x x x . */ +/* . . . . . . . . . . . . x x x . */ +/* . . . . . . . . . . . . . X . . */ +/* . . . . . . . . . . . . x x x . */ +/* . . . . . . . . . . . . . x x . */ +/* . . . . . . . . . . . . . . x x */ + +{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1}}, + +/* . . . . . . . . . . . . . x x x */ +/* . . . . . . . . . . . . . x x x */ +/* . . . . . . . . . . . . . . X . */ +/* . . . . . . . . . . . . . x x x */ +/* . . . . . . . . . . . . . . x x */ +/* . . . . . . . . . . . . . . . x */ + +{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}}, + +/* . . . . . . . . . . . . . . x x */ +/* . . . . . . . . . . . . . . x x */ +/* . . . . . . . . . . . . . . . X */ +/* . . . . . . . . . . . . . . x x */ +/* . . . . . . . . . . . . . . . x */ +/* . . . . . . . . . . . . . . . . */ + +{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}}, + +{ /* --- Chamber 4 --- */ + +/* x x . . . . . . . . . . . . . . */ +/* x x . . . . . . . . . . . . . . */ +/* X . . . . . . . . . . . . . . . */ +/* x x . . . . . . . . . . . . . . */ +/* x x . . . . . . . . . . . . . . */ +/* . x x . . . . . . . . . . . . . */ + +{{1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, + +/* x x x . . . . . . . . . . . . . */ +/* x x x . . . . . . . . . . . . . */ +/* . X . . . . . . . . . . . . . . */ +/* x x x . . . . . . . . . . . . . */ +/* . x x . . . . . . . . . . . . . */ +/* . . x x . . . . . . . . . . . . */ + +{{1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, + +/* . x x x . . . . . . . . . . . . */ +/* . x x x . . . . . . . . . . . . */ +/* . . X . . . . . . . . . . . . . */ +/* . x x x . . . . . . . . . . . . */ +/* . . x x . . . . . . . . . . . . */ +/* . . . x x . . . . . . . . . . . */ + +{{0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, + +/* . . x x x . . . . . . . . . . . */ +/* . . x x x . . . . . . . . . . . */ +/* . . . X . . . . . . . . . . . . */ +/* . . x x x . . . . . . . . . . . */ +/* . . . x x . . . . . . . . . . . */ +/* . . . . x x . . . . . . . . . . */ + +{{0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, + +/* . . . x x x . . . . . . . . . . */ +/* . . . x x x . . . . . . . . . . */ +/* . . . . X . . . . . . . . . . . */ +/* . . . x x x . . . . . . . . . . */ +/* . . . . x x . . . . . . . . . . */ +/* . . . . . x x . . . . . . . . . */ + +{{0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, + +/* . . . . x x x . . . . . . . . . */ +/* . . . . x x x . . . . . . . . . */ +/* . . . . . X . . . . . . . . . . */ +/* . . . . x x x . . . . . . . . . */ +/* . . . . . x x . . . . . . . . . */ +/* . . . . . . x x x . . . . . . . */ + +{{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0}}, + +/* . . . . . x x x . . . . . . . . */ +/* . . . . . x x x . . . . . . . . */ +/* . . . . . . X . . . . . . . . . */ +/* . . . . . x x x . . . . . . . . */ +/* . . . . . . x x . . . . . . . . */ +/* . . . . . . . x x x . . . . . . */ + +{{0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0}}, + +/* . . . . . . x x x . . . . . . . */ +/* . . . . . . x x x . . . . . . . */ +/* . . . . . . . X . . . . . . . . */ +/* . . . . . . x x x . . . . . . . */ +/* . . . . . . . x x . . . . . . . */ +/* . . . . . . . . x x x . . . . . */ + +{{0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}}, + +/* . . . . . . . x x x . . . . . . */ +/* . . . . . . . x x x . . . . . . */ +/* . . . . . . . . X . . . . . . . */ +/* . . . . . . . x x x . . . . . . */ +/* . . . . . . . . x x . . . . . . */ +/* . . . . . . . . . x x x . . . . */ + +{{0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}}, + +/* . . . . . . . . x x x . . . . . */ +/* . . . . . . . . x x x . . . . . */ +/* . . . . . . . . . X . . . . . . */ +/* . . . . . . . . x x x . . . . . */ +/* . . . . . . . . . x x . . . . . */ +/* . . . . . . . . . . x x x . . . */ + +{{0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0}}, + +/* . . . . . . . . . x x x . . . . */ +/* . . . . . . . . . x x x . . . . */ +/* . . . . . . . . . . X . . . . . */ +/* . . . . . . . . . x x x . . . . */ +/* . . . . . . . . . . x x . . . . */ +/* . . . . . . . . . . . x x x . . */ + +{{0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0}}, + +/* . . . . . . . . . . x x x . . . */ +/* . . . . . . . . . . x x x . . . */ +/* . . . . . . . . . . . X . . . . */ +/* . . . . . . . . . . x x . . . . */ +/* . . . . . . . . . . . x x . . . */ +/* . . . . . . . . . . . . x x x . */ + +{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0}}, + +/* . . . . . . . . . . . . x x . . */ +/* . . . . . . . . . . . . x x . . */ +/* . . . . . . . . . . . . X . . . */ +/* . . . . . . . . . . . x x . . . */ +/* . . . . . . . . . . . . x x . . */ +/* . . . . . . . . . . . . . x x x */ + +{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1}}, + +/* . . . . . . . . . . . . . x x . */ +/* . . . . . . . . . . . . . x x . */ +/* . . . . . . . . . . . . . X . . */ +/* . . . . . . . . . . . . x x . . */ +/* . . . . . . . . . . . . . x x . */ +/* . . . . . . . . . . . . . . x x */ + +{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1}}, + +/* . . . . . . . . . . . . . . x x */ +/* . . . . . . . . . . . . . . x x */ +/* . . . . . . . . . . . . . . X . */ +/* . . . . . . . . . . . . . x x . */ +/* . . . . . . . . . . . . . . x x */ +/* . . . . . . . . . . . . . . . x */ + +{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}}, + +/* . . . . . . . . . . . . . . . x */ +/* . . . . . . . . . . . . . . . x */ +/* . . . . . . . . . . . . . . . X */ +/* . . . . . . . . . . . . . . x x */ +/* . . . . . . . . . . . . . . . x */ +/* . . . . . . . . . . . . . . . . */ + +{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}} + +}; + +#endif -- 2.39.3