<?xml version="1.0" encoding="UTF-8"?>

<gating:Gating-ML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:gating="http://www.isac-net.org/std/Gating-ML/v2.0/gating"
  xmlns:transforms="http://www.isac-net.org/std/Gating-ML/v2.0/transformations"
  xmlns:data-type="http://www.isac-net.org/std/Gating-ML/v2.0/datatypes"
  xsi:schemaLocation="
        http://www.isac-net.org/std/Gating-ML/v2.0/gating ../XSD/Gating-ML.v2.0.xsd
        http://www.isac-net.org/std/Gating-ML/v2.0/transformations ../XSD/Transformations.v2.0.xsd
        http://www.isac-net.org/std/Gating-ML/v2.0/datatypes ../XSD/DataTypes.v2.0.xsd">
  <data-type:custom_info>
    This Gating-ML 2.0 file is part of Gating-ML examples - an informative part of Gating-ML 2.0 specification.
    <author>
      <name>Josef Spidlen</name>
      <email>jspidlen@bccrc.ca</email>
    </author>
    <copyright>
      Copyright (c) 2012 ISAC (International Society for Advancement of Cytometry). 
      Free of charge distribution and read-only usage permited. Modification
      and all other rights reserved. For all other uses please contact ISAC.
    </copyright>
  </data-type:custom_info>

  <transforms:spectrumMatrix transforms:id="mySpectrum">
    <transforms:fluorochromes>
      <data-type:fcs-dimension data-type:name="F1"/>
      <data-type:fcs-dimension data-type:name="F2"/>
      <data-type:fcs-dimension data-type:name="F3"/>
      <data-type:fcs-dimension data-type:name="F4"/>
    </transforms:fluorochromes>
    <transforms:detectors>
      <data-type:fcs-dimension data-type:name="FL1-H"/>
      <data-type:fcs-dimension data-type:name="FL2-H"/>
      <data-type:fcs-dimension data-type:name="FL3-H"/>
      <data-type:fcs-dimension data-type:name="FL4-H"/>
    </transforms:detectors>
    <transforms:spectrum>
      <transforms:coefficient transforms:value="0.090"/>
      <transforms:coefficient transforms:value="0.131"/>
      <transforms:coefficient transforms:value="0.011"/>
      <transforms:coefficient transforms:value="0.121"/>
    </transforms:spectrum>
    <transforms:spectrum>
      <transforms:coefficient transforms:value="0.071"/>
      <transforms:coefficient transforms:value="1.005"/>
      <transforms:coefficient transforms:value="0.172"/>
      <transforms:coefficient transforms:value="0.103"/>
    </transforms:spectrum>
    <transforms:spectrum>
      <transforms:coefficient transforms:value="0.032"/>
      <transforms:coefficient transforms:value="0.045"/>
      <transforms:coefficient transforms:value="1.002"/>      
      <transforms:coefficient transforms:value="0.076"/>
    </transforms:spectrum>
    <transforms:spectrum>
      <transforms:coefficient transforms:value="0.047"/>
      <transforms:coefficient transforms:value="0.117"/>
      <transforms:coefficient transforms:value="0.012"/>
      <transforms:coefficient transforms:value="1.003"/>
    </transforms:spectrum>
  </transforms:spectrumMatrix>
  
  <transforms:transformation transforms:id="t1">
    <transforms:fasinh transforms:T="10000" transforms:M="4" transforms:A="0" />
  </transforms:transformation>
  
  <transforms:transformation transforms:id="t2">
    <transforms:flin transforms:A="100" transforms:T="10000"></transforms:flin>
  </transforms:transformation>
  
  <transforms:transformation transforms:id="t3">
    <transforms:flog transforms:T="262144" transforms:M="4.3"></transforms:flog>
  </transforms:transformation>
  
  <transforms:transformation transforms:id="t4">
    <transforms:hyperlog transforms:T="262144" transforms:M="4.2" transforms:W="0.3" transforms:A="0.2"></transforms:hyperlog>
  </transforms:transformation>
  
  <transforms:transformation transforms:id="t5">
    <transforms:logicle transforms:T="524288" transforms:M="4.8" transforms:W="0.4" transforms:A="0.1"></transforms:logicle>
  </transforms:transformation>
  
  <transforms:transformation transforms:id="r1">
    <transforms:fratio transforms:A="1" transforms:B="-200" transforms:C="-100">
      <data-type:fcs-dimension data-type:name="FL1"/>
      <data-type:fcs-dimension data-type:name="FL2"/>
    </transforms:fratio>
  </transforms:transformation>
  
  <gating:RectangleGate gating:id="g1">
    <gating:dimension gating:compensation-ref="mySpectrum" gating:transformation-ref="t3" gating:min="0.1" gating:max="0.7">
      <data-type:new-dimension data-type:transformation-ref="r1"/>
    </gating:dimension>
  </gating:RectangleGate>
  
  <gating:RectangleGate gating:id="g2">
    <gating:dimension gating:compensation-ref="mySpectrum" gating:transformation-ref="t3" gating:max="0.7">
      <data-type:new-dimension data-type:transformation-ref="r1"/>
    </gating:dimension>
  </gating:RectangleGate>
  
  <gating:RectangleGate gating:id="g3">
    <gating:dimension gating:compensation-ref="mySpectrum" gating:transformation-ref="t3" gating:min="0.1">
      <data-type:new-dimension data-type:transformation-ref="r1"/>
    </gating:dimension>
  </gating:RectangleGate>
  
  <gating:RectangleGate gating:id="g4">
    <gating:dimension gating:compensation-ref="mySpectrum" gating:transformation-ref="t1" gating:min="0.15" gating:max="0.86">
      <data-type:fcs-dimension data-type:name="FL1"/>
    </gating:dimension>
    <gating:dimension gating:compensation-ref="mySpectrum" gating:transformation-ref="t2" gating:min="0.25" gating:max="0.76">
      <data-type:fcs-dimension data-type:name="FL2"/>
    </gating:dimension>
  </gating:RectangleGate>
  
  <gating:RectangleGate gating:id="g5">
    <gating:dimension gating:compensation-ref="mySpectrum" gating:transformation-ref="t1" gating:min="0.15" gating:max="0.86">
      <data-type:fcs-dimension data-type:name="FL1"/>
    </gating:dimension>
    <gating:dimension gating:compensation-ref="mySpectrum" gating:transformation-ref="t2" gating:min="0.25" gating:max="0.76">
      <data-type:fcs-dimension data-type:name="FL2"/>
    </gating:dimension>
    <gating:dimension gating:compensation-ref="mySpectrum" gating:transformation-ref="t3" gating:min="0.52" gating:max="0.67">
      <data-type:fcs-dimension data-type:name="FL3"/>
    </gating:dimension>
  </gating:RectangleGate>
  
  <gating:RectangleGate gating:id="g6">
    <gating:dimension gating:compensation-ref="mySpectrum" gating:transformation-ref="t1" gating:min="0.15" gating:max="0.86">
      <data-type:fcs-dimension data-type:name="FL1"/>
    </gating:dimension>
    <gating:dimension gating:compensation-ref="mySpectrum" gating:transformation-ref="t2" gating:min="0.25" gating:max="0.76">
      <data-type:fcs-dimension data-type:name="FL2"/>
    </gating:dimension>
    <gating:dimension gating:compensation-ref="mySpectrum" gating:transformation-ref="t3" gating:min="0.52" gating:max="0.67">
      <data-type:fcs-dimension data-type:name="FL3"/>
    </gating:dimension>
    <gating:dimension gating:compensation-ref="mySpectrum" gating:transformation-ref="t4" gating:min="0.28" gating:max="0.91">
      <data-type:fcs-dimension data-type:name="FL4"/>
    </gating:dimension>
  </gating:RectangleGate>
  
  <gating:RectangleGate gating:id="g7" gating:parent_id="g4">
    <gating:dimension gating:compensation-ref="mySpectrum" gating:transformation-ref="t3" gating:min="0.1" gating:max=".9">
      <data-type:fcs-dimension data-type:name="FL3"/>
    </gating:dimension>
  </gating:RectangleGate>
  
  <gating:EllipsoidGate gating:id="g8">
    <gating:dimension gating:compensation-ref="FCS">
      <data-type:fcs-dimension data-type:name="FL1-H"/>
    </gating:dimension>
    <gating:dimension gating:compensation-ref="uncompensated">
      <data-type:fcs-dimension data-type:name="FSC-H"/>
    </gating:dimension>
    <gating:mean>
      <gating:coordinate data-type:value="2.99" />
      <gating:coordinate data-type:value="6.22" />
    </gating:mean>
    <gating:covarianceMatrix>
      <gating:row>
        <gating:entry data-type:value="66.5" />
        <gating:entry data-type:value="37.5" />
      </gating:row>
      <gating:row>
        <gating:entry data-type:value="37.5" />
        <gating:entry data-type:value="66.5" />
      </gating:row>
    </gating:covarianceMatrix>
    <gating:distanceSquare data-type:value="1" />
  </gating:EllipsoidGate>  
  
  <gating:EllipsoidGate gating:id="g9">
    <gating:dimension gating:compensation-ref="FCS">
      <data-type:fcs-dimension data-type:name="FL1-H"/>
    </gating:dimension>
    <gating:dimension gating:compensation-ref="uncompensated">
      <data-type:fcs-dimension data-type:name="FSC-H"/>
    </gating:dimension>
    <gating:mean>
      <gating:coordinate data-type:value="2.99" />
      <gating:coordinate data-type:value="6.22" />
    </gating:mean>
    <gating:covarianceMatrix>
      <gating:row>
        <gating:entry data-type:value="66.5" />
        <gating:entry data-type:value="37.5" />
      </gating:row>
      <gating:row>
        <gating:entry data-type:value="37.5" />
        <gating:entry data-type:value="66.5" />
      </gating:row>
    </gating:covarianceMatrix>
    <gating:distanceSquare data-type:value="0.64" />
  </gating:EllipsoidGate>  
  
  <gating:EllipsoidGate gating:id="g10" gating:parent_id="g9">
    <gating:dimension gating:compensation-ref="FCS">
      <data-type:fcs-dimension data-type:name="FL3-H" />
    </gating:dimension>
    <gating:dimension gating:compensation-ref="mySpectrum">
      <data-type:fcs-dimension data-type:name="FL4-H" />
    </gating:dimension>
    <gating:dimension gating:compensation-ref="FCS">
      <data-type:fcs-dimension data-type:name="FL5-H" />
    </gating:dimension>
    <gating:mean>
      <gating:coordinate data-type:value="60" />
      <gating:coordinate data-type:value="30" />
      <gating:coordinate data-type:value="20" />
    </gating:mean>
    <gating:covarianceMatrix>
      <gating:row>
        <gating:entry data-type:value="2.56" />
        <gating:entry data-type:value="7.51" />
        <gating:entry data-type:value="17.58" />
      </gating:row>
      <gating:row>
        <gating:entry data-type:value="7.55" />
        <gating:entry data-type:value="7.12" />
        <gating:entry data-type:value="13.5" />
      </gating:row>
      <gating:row>
        <gating:entry data-type:value="15.8" />
        <gating:entry data-type:value="13.9" />
        <gating:entry data-type:value="4.32" />
      </gating:row>
    </gating:covarianceMatrix>
    <gating:distanceSquare data-type:value="1.12" />
  </gating:EllipsoidGate>
  
  <gating:PolygonGate gating:id="g11">
    <gating:dimension gating:compensation-ref="FCS" gating:transformation-ref="t5">
      <data-type:fcs-dimension data-type:name="FL1-A"/>
    </gating:dimension>
    <gating:dimension gating:compensation-ref="FCS" gating:transformation-ref="t4">
      <data-type:fcs-dimension data-type:name="FL2-A"/>
    </gating:dimension>
    <gating:vertex>
      <gating:coordinate data-type:value="0.1"/>
      <gating:coordinate data-type:value="0.13"/>
    </gating:vertex>
    <gating:vertex>
      <gating:coordinate data-type:value="0.66"/>
      <gating:coordinate data-type:value="0.19"/>
    </gating:vertex>
    <gating:vertex>
      <gating:coordinate data-type:value="0.78"/>
      <gating:coordinate data-type:value="0.18"/>
    </gating:vertex>
    <gating:vertex>
      <gating:coordinate data-type:value="0.88"/>
      <gating:coordinate data-type:value="0.26"/>
    </gating:vertex>
    <gating:vertex>
      <gating:coordinate data-type:value="0.73"/>
      <gating:coordinate data-type:value="0.32"/>
    </gating:vertex>
    <gating:vertex>
      <gating:coordinate data-type:value="0.34"/>
      <gating:coordinate data-type:value="0.45"/>
    </gating:vertex>
  </gating:PolygonGate>
  
  <gating:PolygonGate gating:id="g12" gating:parent_id="g1">
    <gating:dimension gating:compensation-ref="FCS" gating:transformation-ref="t5">
      <data-type:fcs-dimension data-type:name="FL1-A"/>
    </gating:dimension>
    <gating:dimension gating:compensation-ref="FCS" gating:transformation-ref="t4">
      <data-type:fcs-dimension data-type:name="FL2-A"/>
    </gating:dimension>
    <gating:vertex>
      <gating:coordinate data-type:value="0.1"/>
      <gating:coordinate data-type:value="0.13"/>
    </gating:vertex>
    <gating:vertex>
      <gating:coordinate data-type:value="0.66"/>
      <gating:coordinate data-type:value="0.19"/>
    </gating:vertex>
    <gating:vertex>
      <gating:coordinate data-type:value="0.78"/>
      <gating:coordinate data-type:value="0.18"/>
    </gating:vertex>
    <gating:vertex>
      <gating:coordinate data-type:value="0.88"/>
      <gating:coordinate data-type:value="0.26"/>
    </gating:vertex>
    <gating:vertex>
      <gating:coordinate data-type:value="0.73"/>
      <gating:coordinate data-type:value="0.32"/>
    </gating:vertex>
    <gating:vertex>
      <gating:coordinate data-type:value="0.34"/>
      <gating:coordinate data-type:value="0.45"/>
    </gating:vertex>
  </gating:PolygonGate>
  
  <gating:BooleanGate gating:id="g13">
    <gating:not><gating:gateReference gating:ref="g12"/></gating:not>
  </gating:BooleanGate>
  
  <gating:QuadrantGate gating:id="q1">
    <gating:divider gating:id="d1" gating:compensation-ref="FCS" gating:transformation-ref="t5">
      <data-type:fcs-dimension data-type:name="FL1-H"/>
      <gating:value>0.3</gating:value>
      <gating:value>0.6</gating:value>
    </gating:divider>
    <gating:divider gating:id="d2" gating:compensation-ref="FCS" gating:transformation-ref="t4">
      <data-type:fcs-dimension data-type:name="FL2-H"/>
      <gating:value>0.5</gating:value>
    </gating:divider>
    <gating:Quadrant gating:id="g14">
      <gating:position gating:divider_ref="d1" gating:location="0.8"/>
      <gating:position gating:divider_ref="d2" gating:location="0.8"/>
    </gating:Quadrant>
    <gating:Quadrant gating:id="g15">
      <gating:position gating:divider_ref="d1" gating:location="0"/>
      <gating:position gating:divider_ref="d2" gating:location="0"/>
    </gating:Quadrant>
    <gating:Quadrant gating:id="g16">
      <gating:position gating:divider_ref="d1" gating:location="0.5"/>
      <gating:position gating:divider_ref="d2" gating:location="0"/>
    </gating:Quadrant>
    <gating:Quadrant gating:id="g17">
      <gating:position gating:divider_ref="d1" gating:location="0.8"/>
      <gating:position gating:divider_ref="d2" gating:location="0"/>
    </gating:Quadrant>
    <gating:Quadrant gating:id="g18">
      <gating:position gating:divider_ref="d1" gating:location="0"/>
      <gating:position gating:divider_ref="d2" gating:location="0.8"/>
    </gating:Quadrant>
    <gating:Quadrant gating:id="g19">
      <gating:position gating:divider_ref="d1" gating:location="0.5"/>
      <gating:position gating:divider_ref="d2" gating:location="0.8"/>
    </gating:Quadrant>
  </gating:QuadrantGate>
  
  <gating:QuadrantGate gating:id="q2">
    <gating:divider gating:id="d3" gating:compensation-ref="mySpectrum" gating:transformation-ref="t1">
      <data-type:fcs-dimension data-type:name="FL1"/>
      <gating:value>0.5</gating:value>
    </gating:divider>
    <gating:Quadrant gating:id="g20">
      <gating:position gating:divider_ref="d3" gating:location="0"/>
    </gating:Quadrant>
    <gating:Quadrant gating:id="g21">
      <gating:position gating:divider_ref="d3" gating:location="1"/>
    </gating:Quadrant>
  </gating:QuadrantGate>
  
  <gating:QuadrantGate gating:id="q3">
    <gating:divider gating:id="d4" gating:compensation-ref="mySpectrum" gating:transformation-ref="t1">
      <data-type:fcs-dimension data-type:name="FL1"/>
      <gating:value>0.5</gating:value>
    </gating:divider>
    <gating:divider gating:id="d5" gating:compensation-ref="mySpectrum" gating:transformation-ref="t1">
      <data-type:fcs-dimension data-type:name="FL2"/>
      <gating:value>0.5</gating:value>
    </gating:divider>
    <gating:Quadrant gating:id="g22">
      <gating:position gating:divider_ref="d4" gating:location="0"/>
      <gating:position gating:divider_ref="d5" gating:location="0"/>
    </gating:Quadrant>
    <gating:Quadrant gating:id="g23">
      <gating:position gating:divider_ref="d4" gating:location="1"/>
      <gating:position gating:divider_ref="d5" gating:location="1"/>
    </gating:Quadrant>
    <gating:Quadrant gating:id="g24">
      <gating:position gating:divider_ref="d4" gating:location="0"/>
      <gating:position gating:divider_ref="d5" gating:location="1"/>
    </gating:Quadrant>
    <gating:Quadrant gating:id="g25">
      <gating:position gating:divider_ref="d4" gating:location="1"/>
      <gating:position gating:divider_ref="d5" gating:location="0"/>
    </gating:Quadrant>
  </gating:QuadrantGate>
  
  <gating:QuadrantGate gating:id="q4">
    <gating:divider gating:id="d6" gating:compensation-ref="mySpectrum" gating:transformation-ref="t1">
      <data-type:fcs-dimension data-type:name="FL1"/>
      <gating:value>0.3</gating:value>
    </gating:divider>
    <gating:divider gating:id="d7" gating:compensation-ref="mySpectrum" gating:transformation-ref="t1">
      <data-type:fcs-dimension data-type:name="FL2"/>
      <gating:value>0.5</gating:value>
    </gating:divider>
    <gating:divider gating:id="d8" gating:compensation-ref="mySpectrum" gating:transformation-ref="t1">
      <data-type:fcs-dimension data-type:name="FL3"/>
      <gating:value>0.2</gating:value>
    </gating:divider>
    <gating:divider gating:id="d9" gating:compensation-ref="mySpectrum" gating:transformation-ref="t1">
      <data-type:fcs-dimension data-type:name="FL4"/>
      <gating:value>0.25</gating:value>
      <gating:value>0.45</gating:value>
    </gating:divider>
    <gating:Quadrant gating:id="g26">
      <gating:position gating:divider_ref="d6" gating:location="1"/>
      <gating:position gating:divider_ref="d7" gating:location="0"/>
      <gating:position gating:divider_ref="d8" gating:location="0"/>
      <gating:position gating:divider_ref="d9" gating:location="0"/>
    </gating:Quadrant>
    <gating:Quadrant gating:id="g27">
      <gating:position gating:divider_ref="d6" gating:location="1"/>
      <gating:position gating:divider_ref="d7" gating:location="0"/>
      <gating:position gating:divider_ref="d8" gating:location="0"/>
      <gating:position gating:divider_ref="d9" gating:location="0.3"/>
    </gating:Quadrant>
    <gating:Quadrant gating:id="g28">
      <gating:position gating:divider_ref="d6" gating:location="1"/>
      <gating:position gating:divider_ref="d7" gating:location="0"/>
      <gating:position gating:divider_ref="d9" gating:location="0.3"/>
    </gating:Quadrant>
  </gating:QuadrantGate>
  
  <gating:BooleanGate gating:id="g29">
    <gating:and>
      <gating:gateReference gating:ref="g12"/>
      <gating:gateReference gating:ref="g27"/>
    </gating:and>
  </gating:BooleanGate>
  
  <gating:BooleanGate gating:id="g30">
    <gating:and>
      <gating:gateReference gating:ref="g13"/>
      <gating:gateReference gating:ref="g27"/>
      <gating:gateReference gating:ref="g2"/>
    </gating:and>
  </gating:BooleanGate>
  
  <gating:BooleanGate gating:id="g31" gating:parent_id="g9">
    <gating:and>
      <gating:gateReference gating:ref="g26"/>
      <gating:gateReference gating:ref="g15"/>
      <gating:gateReference gating:ref="g2"/>
      <gating:gateReference gating:ref="g6"/>
    </gating:and>
  </gating:BooleanGate>
  
  <gating:BooleanGate gating:id="g32" gating:parent_id="g9">
    <gating:and>
      <gating:gateReference gating:ref="g26"/>
      <gating:gateReference gating:ref="g15"/>
      <gating:gateReference gating:ref="g2" gating:use-as-complement="false"/>
      <gating:gateReference gating:ref="g6" gating:use-as-complement="true"/>
    </gating:and>
  </gating:BooleanGate>
  
  <gating:BooleanGate gating:id="g33">
    <gating:or>
      <gating:gateReference gating:ref="g26"/>
      <gating:gateReference gating:ref="g12"/>
      <gating:gateReference gating:ref="g2"/>
      <gating:gateReference gating:ref="g6"/>
    </gating:or>
  </gating:BooleanGate>

  <gating:BooleanGate gating:id="g34" gating:parent_id="g6">
    <gating:or>
      <gating:gateReference gating:ref="g26"/>
      <gating:gateReference gating:ref="g12"/>
      <gating:gateReference gating:ref="g2"/>
    </gating:or>
  </gating:BooleanGate>

  <gating:BooleanGate gating:id="g35" gating:parent_id="g6">
    <gating:or>
      <gating:gateReference gating:ref="g26" gating:use-as-complement="true"/>
      <gating:gateReference gating:ref="g12"/>
      <gating:gateReference gating:ref="g2"/>
    </gating:or>
  </gating:BooleanGate>
  
</gating:Gating-ML>
