// Do NOT change. Changes will be lost next time file is generated

#define R__DICTIONARY_FILENAME dIhomedIyuhwdIwcdIwiremIcelldIbuilddIdatadIWCPDataDict
#define R__NO_DEPRECATION

/*******************************************************************/
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#define G__DICTIONARY
#include "RConfig.h"
#include "TClass.h"
#include "TDictAttributeMap.h"
#include "TInterpreter.h"
#include "TROOT.h"
#include "TBuffer.h"
#include "TMemberInspector.h"
#include "TInterpreter.h"
#include "TVirtualMutex.h"
#include "TError.h"

#ifndef G__ROOT
#define G__ROOT
#endif

#include "RtypesImp.h"
#include "TIsAProxy.h"
#include "TFileMergeInfo.h"
#include <algorithm>
#include "TCollectionProxyInfo.h"
/*******************************************************************/

#include "TDataMember.h"

// The generated code does not explicitly qualifies STL entities
namespace std {} using namespace std;

// Header files passed as explicit arguments
#include "/home/yuhw/wc/wire-cell/data/inc/WCPData/COphit.h"
#include "/home/yuhw/wc/wire-cell/data/inc/WCPData/CellCharge.h"
#include "/home/yuhw/wc/wire-cell/data/inc/WCPData/ChannelCharge.h"
#include "/home/yuhw/wc/wire-cell/data/inc/WCPData/ClusterTrack.h"
#include "/home/yuhw/wc/wire-cell/data/inc/WCPData/DynamicToyPointCloud.h"
#include "/home/yuhw/wc/wire-cell/data/inc/WCPData/Edge.h"
#include "/home/yuhw/wc/wire-cell/data/inc/WCPData/FlashTPCBundle.h"
#include "/home/yuhw/wc/wire-cell/data/inc/WCPData/Frame.h"
#include "/home/yuhw/wc/wire-cell/data/inc/WCPData/GeomCell.h"
#include "/home/yuhw/wc/wire-cell/data/inc/WCPData/GeomCluster.h"
#include "/home/yuhw/wc/wire-cell/data/inc/WCPData/GeomWCPMap.h"
#include "/home/yuhw/wc/wire-cell/data/inc/WCPData/GeomWire.h"
#include "/home/yuhw/wc/wire-cell/data/inc/WCPData/Intersection.h"
#include "/home/yuhw/wc/wire-cell/data/inc/WCPData/LAr.h"
#include "/home/yuhw/wc/wire-cell/data/inc/WCPData/LMBDT.h"
#include "/home/yuhw/wc/wire-cell/data/inc/WCPData/Line.h"
#include "/home/yuhw/wc/wire-cell/data/inc/WCPData/MCParticle.h"
#include "/home/yuhw/wc/wire-cell/data/inc/WCPData/MergeClusterTrack.h"
#include "/home/yuhw/wc/wire-cell/data/inc/WCPData/MergeGeomCell.h"
#include "/home/yuhw/wc/wire-cell/data/inc/WCPData/MergeGeomWire.h"
#include "/home/yuhw/wc/wire-cell/data/inc/WCPData/MergeSpaceCell.h"
#include "/home/yuhw/wc/wire-cell/data/inc/WCPData/Opflash.h"
#include "/home/yuhw/wc/wire-cell/data/inc/WCPData/PMTNoiseROI.h"
#include "/home/yuhw/wc/wire-cell/data/inc/WCPData/PR3DCluster.h"
#include "/home/yuhw/wc/wire-cell/data/inc/WCPData/PhotonLibrary.h"
#include "/home/yuhw/wc/wire-cell/data/inc/WCPData/Plane.h"
#include "/home/yuhw/wc/wire-cell/data/inc/WCPData/Point.h"
#include "/home/yuhw/wc/wire-cell/data/inc/WCPData/Projected2DCluster.h"
#include "/home/yuhw/wc/wire-cell/data/inc/WCPData/SignalROI.h"
#include "/home/yuhw/wc/wire-cell/data/inc/WCPData/SimTruth.h"
#include "/home/yuhw/wc/wire-cell/data/inc/WCPData/Singleton.h"
#include "/home/yuhw/wc/wire-cell/data/inc/WCPData/Slice.h"
#include "/home/yuhw/wc/wire-cell/data/inc/WCPData/Slim3DCluster.h"
#include "/home/yuhw/wc/wire-cell/data/inc/WCPData/Slim3DDeadCluster.h"
#include "/home/yuhw/wc/wire-cell/data/inc/WCPData/SlimMergeGeomCell.h"
#include "/home/yuhw/wc/wire-cell/data/inc/WCPData/SpaceCell.h"
#include "/home/yuhw/wc/wire-cell/data/inc/WCPData/TPCParams.h"
#include "/home/yuhw/wc/wire-cell/data/inc/WCPData/ToyCTPointCloud.h"
#include "/home/yuhw/wc/wire-cell/data/inc/WCPData/ToyPointCloud.h"
#include "/home/yuhw/wc/wire-cell/data/inc/WCPData/Trace.h"
#include "/home/yuhw/wc/wire-cell/data/inc/WCPData/TrackInfo.h"
#include "/home/yuhw/wc/wire-cell/data/inc/WCPData/Units.h"
#include "/home/yuhw/wc/wire-cell/data/inc/WCPData/Vector.h"
#include "/home/yuhw/wc/wire-cell/data/inc/WCPData/WCPointCloud.h"
#include "/home/yuhw/wc/wire-cell/data/inc/WCPData/WCShower.h"
#include "/home/yuhw/wc/wire-cell/data/inc/WCPData/WCTrack.h"
#include "/home/yuhw/wc/wire-cell/data/inc/WCPData/WCVertex.h"
#include "/home/yuhw/wc/wire-cell/data/inc/WCPData/WireCharge.h"

// Header files passed via #pragma extra_include

namespace WCP {
   namespace ROOT {
      inline ::ROOT::TGenericClassInfo *GenerateInitInstance();
      static TClass *WCP_Dictionary();

      // Function generating the singleton type initializer
      inline ::ROOT::TGenericClassInfo *GenerateInitInstance()
      {
         static ::ROOT::TGenericClassInfo 
            instance("WCP", 0 /*version*/, "", 10,
                     ::ROOT::Internal::DefineBehavior((void*)0,(void*)0),
                     &WCP_Dictionary, 0);
         return &instance;
      }
      // Insure that the inline function is _not_ optimized away by the compiler
      ::ROOT::TGenericClassInfo *(*_R__UNIQUE_DICT_(InitFunctionKeeper))() = &GenerateInitInstance;  
      // Static variable to force the class initialization
      static ::ROOT::TGenericClassInfo *_R__UNIQUE_DICT_(Init) = GenerateInitInstance(); R__UseDummy(_R__UNIQUE_DICT_(Init));

      // Dictionary for non-ClassDef classes
      static TClass *WCP_Dictionary() {
         return GenerateInitInstance()->GetClass();
      }

   }
}

namespace units {
   namespace ROOT {
      inline ::ROOT::TGenericClassInfo *GenerateInitInstance();
      static TClass *units_Dictionary();

      // Function generating the singleton type initializer
      inline ::ROOT::TGenericClassInfo *GenerateInitInstance()
      {
         static ::ROOT::TGenericClassInfo 
            instance("units", 0 /*version*/, "WCPData/Units.h", 8,
                     ::ROOT::Internal::DefineBehavior((void*)0,(void*)0),
                     &units_Dictionary, 0);
         return &instance;
      }
      // Insure that the inline function is _not_ optimized away by the compiler
      ::ROOT::TGenericClassInfo *(*_R__UNIQUE_DICT_(InitFunctionKeeper))() = &GenerateInitInstance;  
      // Static variable to force the class initialization
      static ::ROOT::TGenericClassInfo *_R__UNIQUE_DICT_(Init) = GenerateInitInstance(); R__UseDummy(_R__UNIQUE_DICT_(Init));

      // Dictionary for non-ClassDef classes
      static TClass *units_Dictionary() {
         return GenerateInitInstance()->GetClass();
      }

   }
}

namespace ROOT {
   static TClass *pairlEWCPcLcLD3VectorlEdoublegRcOWCPcLcLD3VectorlEdoublegRsPgR_Dictionary();
   static void pairlEWCPcLcLD3VectorlEdoublegRcOWCPcLcLD3VectorlEdoublegRsPgR_TClassManip(TClass*);
   static void *new_pairlEWCPcLcLD3VectorlEdoublegRcOWCPcLcLD3VectorlEdoublegRsPgR(void *p = 0);
   static void *newArray_pairlEWCPcLcLD3VectorlEdoublegRcOWCPcLcLD3VectorlEdoublegRsPgR(Long_t size, void *p);
   static void delete_pairlEWCPcLcLD3VectorlEdoublegRcOWCPcLcLD3VectorlEdoublegRsPgR(void *p);
   static void deleteArray_pairlEWCPcLcLD3VectorlEdoublegRcOWCPcLcLD3VectorlEdoublegRsPgR(void *p);
   static void destruct_pairlEWCPcLcLD3VectorlEdoublegRcOWCPcLcLD3VectorlEdoublegRsPgR(void *p);

   // Function generating the singleton type initializer
   static TGenericClassInfo *GenerateInitInstanceLocal(const pair<WCP::D3Vector<double>,WCP::D3Vector<double> >*)
   {
      pair<WCP::D3Vector<double>,WCP::D3Vector<double> > *ptr = 0;
      static ::TVirtualIsAProxy* isa_proxy = new ::TIsAProxy(typeid(pair<WCP::D3Vector<double>,WCP::D3Vector<double> >));
      static ::ROOT::TGenericClassInfo 
         instance("pair<WCP::D3Vector<double>,WCP::D3Vector<double> >", "string", 208,
                  typeid(pair<WCP::D3Vector<double>,WCP::D3Vector<double> >), ::ROOT::Internal::DefineBehavior(ptr, ptr),
                  &pairlEWCPcLcLD3VectorlEdoublegRcOWCPcLcLD3VectorlEdoublegRsPgR_Dictionary, isa_proxy, 0,
                  sizeof(pair<WCP::D3Vector<double>,WCP::D3Vector<double> >) );
      instance.SetNew(&new_pairlEWCPcLcLD3VectorlEdoublegRcOWCPcLcLD3VectorlEdoublegRsPgR);
      instance.SetNewArray(&newArray_pairlEWCPcLcLD3VectorlEdoublegRcOWCPcLcLD3VectorlEdoublegRsPgR);
      instance.SetDelete(&delete_pairlEWCPcLcLD3VectorlEdoublegRcOWCPcLcLD3VectorlEdoublegRsPgR);
      instance.SetDeleteArray(&deleteArray_pairlEWCPcLcLD3VectorlEdoublegRcOWCPcLcLD3VectorlEdoublegRsPgR);
      instance.SetDestructor(&destruct_pairlEWCPcLcLD3VectorlEdoublegRcOWCPcLcLD3VectorlEdoublegRsPgR);

      ::ROOT::AddClassAlternate("pair<WCP::D3Vector<double>,WCP::D3Vector<double> >","WCP::VectorPair");

      ::ROOT::AddClassAlternate("pair<WCP::D3Vector<double>,WCP::D3Vector<double> >","std::pair<WCP::D3Vector<double>, WCP::D3Vector<double> >");
      return &instance;
   }
   // Static variable to force the class initialization
   static ::ROOT::TGenericClassInfo *_R__UNIQUE_DICT_(Init) = GenerateInitInstanceLocal((const pair<WCP::D3Vector<double>,WCP::D3Vector<double> >*)0x0); R__UseDummy(_R__UNIQUE_DICT_(Init));

   // Dictionary for non-ClassDef classes
   static TClass *pairlEWCPcLcLD3VectorlEdoublegRcOWCPcLcLD3VectorlEdoublegRsPgR_Dictionary() {
      TClass* theClass =::ROOT::GenerateInitInstanceLocal((const pair<WCP::D3Vector<double>,WCP::D3Vector<double> >*)0x0)->GetClass();
      pairlEWCPcLcLD3VectorlEdoublegRcOWCPcLcLD3VectorlEdoublegRsPgR_TClassManip(theClass);
   return theClass;
   }

   static void pairlEWCPcLcLD3VectorlEdoublegRcOWCPcLcLD3VectorlEdoublegRsPgR_TClassManip(TClass* ){
   }

} // end of namespace ROOT

namespace ROOT {
   static TClass *WCPcLcLD3VectorlEdoublegR_Dictionary();
   static void WCPcLcLD3VectorlEdoublegR_TClassManip(TClass*);
   static void *new_WCPcLcLD3VectorlEdoublegR(void *p = 0);
   static void *newArray_WCPcLcLD3VectorlEdoublegR(Long_t size, void *p);
   static void delete_WCPcLcLD3VectorlEdoublegR(void *p);
   static void deleteArray_WCPcLcLD3VectorlEdoublegR(void *p);
   static void destruct_WCPcLcLD3VectorlEdoublegR(void *p);

   // Function generating the singleton type initializer
   static TGenericClassInfo *GenerateInitInstanceLocal(const ::WCP::D3Vector<double>*)
   {
      ::WCP::D3Vector<double> *ptr = 0;
      static ::TVirtualIsAProxy* isa_proxy = new ::TIsAProxy(typeid(::WCP::D3Vector<double>));
      static ::ROOT::TGenericClassInfo 
         instance("WCP::D3Vector<double>", "WCPData/Vector.h", 22,
                  typeid(::WCP::D3Vector<double>), ::ROOT::Internal::DefineBehavior(ptr, ptr),
                  &WCPcLcLD3VectorlEdoublegR_Dictionary, isa_proxy, 0,
                  sizeof(::WCP::D3Vector<double>) );
      instance.SetNew(&new_WCPcLcLD3VectorlEdoublegR);
      instance.SetNewArray(&newArray_WCPcLcLD3VectorlEdoublegR);
      instance.SetDelete(&delete_WCPcLcLD3VectorlEdoublegR);
      instance.SetDeleteArray(&deleteArray_WCPcLcLD3VectorlEdoublegR);
      instance.SetDestructor(&destruct_WCPcLcLD3VectorlEdoublegR);

      ::ROOT::AddClassAlternate("WCP::D3Vector<double>","WCP::Vector");
      return &instance;
   }
   TGenericClassInfo *GenerateInitInstance(const ::WCP::D3Vector<double>*)
   {
      return GenerateInitInstanceLocal((::WCP::D3Vector<double>*)0);
   }
   // Static variable to force the class initialization
   static ::ROOT::TGenericClassInfo *_R__UNIQUE_DICT_(Init) = GenerateInitInstanceLocal((const ::WCP::D3Vector<double>*)0x0); R__UseDummy(_R__UNIQUE_DICT_(Init));

   // Dictionary for non-ClassDef classes
   static TClass *WCPcLcLD3VectorlEdoublegR_Dictionary() {
      TClass* theClass =::ROOT::GenerateInitInstanceLocal((const ::WCP::D3Vector<double>*)0x0)->GetClass();
      WCPcLcLD3VectorlEdoublegR_TClassManip(theClass);
   return theClass;
   }

   static void WCPcLcLD3VectorlEdoublegR_TClassManip(TClass* ){
   }

} // end of namespace ROOT

namespace ROOT {
   static TClass *WCPcLcLD3VectorlEfloatgR_Dictionary();
   static void WCPcLcLD3VectorlEfloatgR_TClassManip(TClass*);
   static void *new_WCPcLcLD3VectorlEfloatgR(void *p = 0);
   static void *newArray_WCPcLcLD3VectorlEfloatgR(Long_t size, void *p);
   static void delete_WCPcLcLD3VectorlEfloatgR(void *p);
   static void deleteArray_WCPcLcLD3VectorlEfloatgR(void *p);
   static void destruct_WCPcLcLD3VectorlEfloatgR(void *p);

   // Function generating the singleton type initializer
   static TGenericClassInfo *GenerateInitInstanceLocal(const ::WCP::D3Vector<float>*)
   {
      ::WCP::D3Vector<float> *ptr = 0;
      static ::TVirtualIsAProxy* isa_proxy = new ::TIsAProxy(typeid(::WCP::D3Vector<float>));
      static ::ROOT::TGenericClassInfo 
         instance("WCP::D3Vector<float>", "WCPData/Vector.h", 22,
                  typeid(::WCP::D3Vector<float>), ::ROOT::Internal::DefineBehavior(ptr, ptr),
                  &WCPcLcLD3VectorlEfloatgR_Dictionary, isa_proxy, 0,
                  sizeof(::WCP::D3Vector<float>) );
      instance.SetNew(&new_WCPcLcLD3VectorlEfloatgR);
      instance.SetNewArray(&newArray_WCPcLcLD3VectorlEfloatgR);
      instance.SetDelete(&delete_WCPcLcLD3VectorlEfloatgR);
      instance.SetDeleteArray(&deleteArray_WCPcLcLD3VectorlEfloatgR);
      instance.SetDestructor(&destruct_WCPcLcLD3VectorlEfloatgR);

      ::ROOT::AddClassAlternate("WCP::D3Vector<float>","WCP::Point");
      return &instance;
   }
   TGenericClassInfo *GenerateInitInstance(const ::WCP::D3Vector<float>*)
   {
      return GenerateInitInstanceLocal((::WCP::D3Vector<float>*)0);
   }
   // Static variable to force the class initialization
   static ::ROOT::TGenericClassInfo *_R__UNIQUE_DICT_(Init) = GenerateInitInstanceLocal((const ::WCP::D3Vector<float>*)0x0); R__UseDummy(_R__UNIQUE_DICT_(Init));

   // Dictionary for non-ClassDef classes
   static TClass *WCPcLcLD3VectorlEfloatgR_Dictionary() {
      TClass* theClass =::ROOT::GenerateInitInstanceLocal((const ::WCP::D3Vector<float>*)0x0)->GetClass();
      WCPcLcLD3VectorlEfloatgR_TClassManip(theClass);
   return theClass;
   }

   static void WCPcLcLD3VectorlEfloatgR_TClassManip(TClass* ){
   }

} // end of namespace ROOT

namespace ROOT {
   static TClass *WCPcLcLGeomWire_Dictionary();
   static void WCPcLcLGeomWire_TClassManip(TClass*);
   static void *new_WCPcLcLGeomWire(void *p = 0);
   static void *newArray_WCPcLcLGeomWire(Long_t size, void *p);
   static void delete_WCPcLcLGeomWire(void *p);
   static void deleteArray_WCPcLcLGeomWire(void *p);
   static void destruct_WCPcLcLGeomWire(void *p);

   // Function generating the singleton type initializer
   static TGenericClassInfo *GenerateInitInstanceLocal(const ::WCP::GeomWire*)
   {
      ::WCP::GeomWire *ptr = 0;
      static ::TVirtualIsAProxy* isa_proxy = new ::TIsAProxy(typeid(::WCP::GeomWire));
      static ::ROOT::TGenericClassInfo 
         instance("WCP::GeomWire", "WCPData/GeomWire.h", 28,
                  typeid(::WCP::GeomWire), ::ROOT::Internal::DefineBehavior(ptr, ptr),
                  &WCPcLcLGeomWire_Dictionary, isa_proxy, 0,
                  sizeof(::WCP::GeomWire) );
      instance.SetNew(&new_WCPcLcLGeomWire);
      instance.SetNewArray(&newArray_WCPcLcLGeomWire);
      instance.SetDelete(&delete_WCPcLcLGeomWire);
      instance.SetDeleteArray(&deleteArray_WCPcLcLGeomWire);
      instance.SetDestructor(&destruct_WCPcLcLGeomWire);
      return &instance;
   }
   TGenericClassInfo *GenerateInitInstance(const ::WCP::GeomWire*)
   {
      return GenerateInitInstanceLocal((::WCP::GeomWire*)0);
   }
   // Static variable to force the class initialization
   static ::ROOT::TGenericClassInfo *_R__UNIQUE_DICT_(Init) = GenerateInitInstanceLocal((const ::WCP::GeomWire*)0x0); R__UseDummy(_R__UNIQUE_DICT_(Init));

   // Dictionary for non-ClassDef classes
   static TClass *WCPcLcLGeomWire_Dictionary() {
      TClass* theClass =::ROOT::GenerateInitInstanceLocal((const ::WCP::GeomWire*)0x0)->GetClass();
      WCPcLcLGeomWire_TClassManip(theClass);
   return theClass;
   }

   static void WCPcLcLGeomWire_TClassManip(TClass* ){
   }

} // end of namespace ROOT

namespace ROOT {
   static TClass *WCPcLcLGeomCell_Dictionary();
   static void WCPcLcLGeomCell_TClassManip(TClass*);
   static void *new_WCPcLcLGeomCell(void *p = 0);
   static void *newArray_WCPcLcLGeomCell(Long_t size, void *p);
   static void delete_WCPcLcLGeomCell(void *p);
   static void deleteArray_WCPcLcLGeomCell(void *p);
   static void destruct_WCPcLcLGeomCell(void *p);

   // Function generating the singleton type initializer
   static TGenericClassInfo *GenerateInitInstanceLocal(const ::WCP::GeomCell*)
   {
      ::WCP::GeomCell *ptr = 0;
      static ::TVirtualIsAProxy* isa_proxy = new ::TIsAProxy(typeid(::WCP::GeomCell));
      static ::ROOT::TGenericClassInfo 
         instance("WCP::GeomCell", "WCPData/GeomCell.h", 18,
                  typeid(::WCP::GeomCell), ::ROOT::Internal::DefineBehavior(ptr, ptr),
                  &WCPcLcLGeomCell_Dictionary, isa_proxy, 0,
                  sizeof(::WCP::GeomCell) );
      instance.SetNew(&new_WCPcLcLGeomCell);
      instance.SetNewArray(&newArray_WCPcLcLGeomCell);
      instance.SetDelete(&delete_WCPcLcLGeomCell);
      instance.SetDeleteArray(&deleteArray_WCPcLcLGeomCell);
      instance.SetDestructor(&destruct_WCPcLcLGeomCell);
      return &instance;
   }
   TGenericClassInfo *GenerateInitInstance(const ::WCP::GeomCell*)
   {
      return GenerateInitInstanceLocal((::WCP::GeomCell*)0);
   }
   // Static variable to force the class initialization
   static ::ROOT::TGenericClassInfo *_R__UNIQUE_DICT_(Init) = GenerateInitInstanceLocal((const ::WCP::GeomCell*)0x0); R__UseDummy(_R__UNIQUE_DICT_(Init));

   // Dictionary for non-ClassDef classes
   static TClass *WCPcLcLGeomCell_Dictionary() {
      TClass* theClass =::ROOT::GenerateInitInstanceLocal((const ::WCP::GeomCell*)0x0)->GetClass();
      WCPcLcLGeomCell_TClassManip(theClass);
   return theClass;
   }

   static void WCPcLcLGeomCell_TClassManip(TClass* ){
   }

} // end of namespace ROOT

namespace ROOT {
   static TClass *WCPcLcLMergeGeomCell_Dictionary();
   static void WCPcLcLMergeGeomCell_TClassManip(TClass*);
   static void *new_WCPcLcLMergeGeomCell(void *p = 0);
   static void *newArray_WCPcLcLMergeGeomCell(Long_t size, void *p);
   static void delete_WCPcLcLMergeGeomCell(void *p);
   static void deleteArray_WCPcLcLMergeGeomCell(void *p);
   static void destruct_WCPcLcLMergeGeomCell(void *p);

   // Function generating the singleton type initializer
   static TGenericClassInfo *GenerateInitInstanceLocal(const ::WCP::MergeGeomCell*)
   {
      ::WCP::MergeGeomCell *ptr = 0;
      static ::TVirtualIsAProxy* isa_proxy = new ::TIsAProxy(typeid(::WCP::MergeGeomCell));
      static ::ROOT::TGenericClassInfo 
         instance("WCP::MergeGeomCell", "WCPData/MergeGeomCell.h", 8,
                  typeid(::WCP::MergeGeomCell), ::ROOT::Internal::DefineBehavior(ptr, ptr),
                  &WCPcLcLMergeGeomCell_Dictionary, isa_proxy, 0,
                  sizeof(::WCP::MergeGeomCell) );
      instance.SetNew(&new_WCPcLcLMergeGeomCell);
      instance.SetNewArray(&newArray_WCPcLcLMergeGeomCell);
      instance.SetDelete(&delete_WCPcLcLMergeGeomCell);
      instance.SetDeleteArray(&deleteArray_WCPcLcLMergeGeomCell);
      instance.SetDestructor(&destruct_WCPcLcLMergeGeomCell);
      return &instance;
   }
   TGenericClassInfo *GenerateInitInstance(const ::WCP::MergeGeomCell*)
   {
      return GenerateInitInstanceLocal((::WCP::MergeGeomCell*)0);
   }
   // Static variable to force the class initialization
   static ::ROOT::TGenericClassInfo *_R__UNIQUE_DICT_(Init) = GenerateInitInstanceLocal((const ::WCP::MergeGeomCell*)0x0); R__UseDummy(_R__UNIQUE_DICT_(Init));

   // Dictionary for non-ClassDef classes
   static TClass *WCPcLcLMergeGeomCell_Dictionary() {
      TClass* theClass =::ROOT::GenerateInitInstanceLocal((const ::WCP::MergeGeomCell*)0x0)->GetClass();
      WCPcLcLMergeGeomCell_TClassManip(theClass);
   return theClass;
   }

   static void WCPcLcLMergeGeomCell_TClassManip(TClass* ){
   }

} // end of namespace ROOT

namespace ROOT {
   static TClass *WCPcLcLTrace_Dictionary();
   static void WCPcLcLTrace_TClassManip(TClass*);
   static void *new_WCPcLcLTrace(void *p = 0);
   static void *newArray_WCPcLcLTrace(Long_t size, void *p);
   static void delete_WCPcLcLTrace(void *p);
   static void deleteArray_WCPcLcLTrace(void *p);
   static void destruct_WCPcLcLTrace(void *p);

   // Function generating the singleton type initializer
   static TGenericClassInfo *GenerateInitInstanceLocal(const ::WCP::Trace*)
   {
      ::WCP::Trace *ptr = 0;
      static ::TVirtualIsAProxy* isa_proxy = new ::TIsAProxy(typeid(::WCP::Trace));
      static ::ROOT::TGenericClassInfo 
         instance("WCP::Trace", "WCPData/Trace.h", 20,
                  typeid(::WCP::Trace), ::ROOT::Internal::DefineBehavior(ptr, ptr),
                  &WCPcLcLTrace_Dictionary, isa_proxy, 0,
                  sizeof(::WCP::Trace) );
      instance.SetNew(&new_WCPcLcLTrace);
      instance.SetNewArray(&newArray_WCPcLcLTrace);
      instance.SetDelete(&delete_WCPcLcLTrace);
      instance.SetDeleteArray(&deleteArray_WCPcLcLTrace);
      instance.SetDestructor(&destruct_WCPcLcLTrace);
      return &instance;
   }
   TGenericClassInfo *GenerateInitInstance(const ::WCP::Trace*)
   {
      return GenerateInitInstanceLocal((::WCP::Trace*)0);
   }
   // Static variable to force the class initialization
   static ::ROOT::TGenericClassInfo *_R__UNIQUE_DICT_(Init) = GenerateInitInstanceLocal((const ::WCP::Trace*)0x0); R__UseDummy(_R__UNIQUE_DICT_(Init));

   // Dictionary for non-ClassDef classes
   static TClass *WCPcLcLTrace_Dictionary() {
      TClass* theClass =::ROOT::GenerateInitInstanceLocal((const ::WCP::Trace*)0x0)->GetClass();
      WCPcLcLTrace_TClassManip(theClass);
   return theClass;
   }

   static void WCPcLcLTrace_TClassManip(TClass* ){
   }

} // end of namespace ROOT

namespace ROOT {
   static TClass *WCPcLcLFrame_Dictionary();
   static void WCPcLcLFrame_TClassManip(TClass*);
   static void *new_WCPcLcLFrame(void *p = 0);
   static void *newArray_WCPcLcLFrame(Long_t size, void *p);
   static void delete_WCPcLcLFrame(void *p);
   static void deleteArray_WCPcLcLFrame(void *p);
   static void destruct_WCPcLcLFrame(void *p);

   // Function generating the singleton type initializer
   static TGenericClassInfo *GenerateInitInstanceLocal(const ::WCP::Frame*)
   {
      ::WCP::Frame *ptr = 0;
      static ::TVirtualIsAProxy* isa_proxy = new ::TIsAProxy(typeid(::WCP::Frame));
      static ::ROOT::TGenericClassInfo 
         instance("WCP::Frame", "", 493,
                  typeid(::WCP::Frame), ::ROOT::Internal::DefineBehavior(ptr, ptr),
                  &WCPcLcLFrame_Dictionary, isa_proxy, 0,
                  sizeof(::WCP::Frame) );
      instance.SetNew(&new_WCPcLcLFrame);
      instance.SetNewArray(&newArray_WCPcLcLFrame);
      instance.SetDelete(&delete_WCPcLcLFrame);
      instance.SetDeleteArray(&deleteArray_WCPcLcLFrame);
      instance.SetDestructor(&destruct_WCPcLcLFrame);
      return &instance;
   }
   TGenericClassInfo *GenerateInitInstance(const ::WCP::Frame*)
   {
      return GenerateInitInstanceLocal((::WCP::Frame*)0);
   }
   // Static variable to force the class initialization
   static ::ROOT::TGenericClassInfo *_R__UNIQUE_DICT_(Init) = GenerateInitInstanceLocal((const ::WCP::Frame*)0x0); R__UseDummy(_R__UNIQUE_DICT_(Init));

   // Dictionary for non-ClassDef classes
   static TClass *WCPcLcLFrame_Dictionary() {
      TClass* theClass =::ROOT::GenerateInitInstanceLocal((const ::WCP::Frame*)0x0)->GetClass();
      WCPcLcLFrame_TClassManip(theClass);
   return theClass;
   }

   static void WCPcLcLFrame_TClassManip(TClass* ){
   }

} // end of namespace ROOT

namespace ROOT {
   static TClass *WCPcLcLGeomCluster_Dictionary();
   static void WCPcLcLGeomCluster_TClassManip(TClass*);
   static void delete_WCPcLcLGeomCluster(void *p);
   static void deleteArray_WCPcLcLGeomCluster(void *p);
   static void destruct_WCPcLcLGeomCluster(void *p);

   // Function generating the singleton type initializer
   static TGenericClassInfo *GenerateInitInstanceLocal(const ::WCP::GeomCluster*)
   {
      ::WCP::GeomCluster *ptr = 0;
      static ::TVirtualIsAProxy* isa_proxy = new ::TIsAProxy(typeid(::WCP::GeomCluster));
      static ::ROOT::TGenericClassInfo 
         instance("WCP::GeomCluster", "", 633,
                  typeid(::WCP::GeomCluster), ::ROOT::Internal::DefineBehavior(ptr, ptr),
                  &WCPcLcLGeomCluster_Dictionary, isa_proxy, 0,
                  sizeof(::WCP::GeomCluster) );
      instance.SetDelete(&delete_WCPcLcLGeomCluster);
      instance.SetDeleteArray(&deleteArray_WCPcLcLGeomCluster);
      instance.SetDestructor(&destruct_WCPcLcLGeomCluster);
      return &instance;
   }
   TGenericClassInfo *GenerateInitInstance(const ::WCP::GeomCluster*)
   {
      return GenerateInitInstanceLocal((::WCP::GeomCluster*)0);
   }
   // Static variable to force the class initialization
   static ::ROOT::TGenericClassInfo *_R__UNIQUE_DICT_(Init) = GenerateInitInstanceLocal((const ::WCP::GeomCluster*)0x0); R__UseDummy(_R__UNIQUE_DICT_(Init));

   // Dictionary for non-ClassDef classes
   static TClass *WCPcLcLGeomCluster_Dictionary() {
      TClass* theClass =::ROOT::GenerateInitInstanceLocal((const ::WCP::GeomCluster*)0x0)->GetClass();
      WCPcLcLGeomCluster_TClassManip(theClass);
   return theClass;
   }

   static void WCPcLcLGeomCluster_TClassManip(TClass* ){
   }

} // end of namespace ROOT

namespace ROOT {
   static TClass *WCPcLcLMergeGeomWire_Dictionary();
   static void WCPcLcLMergeGeomWire_TClassManip(TClass*);
   static void delete_WCPcLcLMergeGeomWire(void *p);
   static void deleteArray_WCPcLcLMergeGeomWire(void *p);
   static void destruct_WCPcLcLMergeGeomWire(void *p);

   // Function generating the singleton type initializer
   static TGenericClassInfo *GenerateInitInstanceLocal(const ::WCP::MergeGeomWire*)
   {
      ::WCP::MergeGeomWire *ptr = 0;
      static ::TVirtualIsAProxy* isa_proxy = new ::TIsAProxy(typeid(::WCP::MergeGeomWire));
      static ::ROOT::TGenericClassInfo 
         instance("WCP::MergeGeomWire", "", 1317,
                  typeid(::WCP::MergeGeomWire), ::ROOT::Internal::DefineBehavior(ptr, ptr),
                  &WCPcLcLMergeGeomWire_Dictionary, isa_proxy, 0,
                  sizeof(::WCP::MergeGeomWire) );
      instance.SetDelete(&delete_WCPcLcLMergeGeomWire);
      instance.SetDeleteArray(&deleteArray_WCPcLcLMergeGeomWire);
      instance.SetDestructor(&destruct_WCPcLcLMergeGeomWire);
      return &instance;
   }
   TGenericClassInfo *GenerateInitInstance(const ::WCP::MergeGeomWire*)
   {
      return GenerateInitInstanceLocal((::WCP::MergeGeomWire*)0);
   }
   // Static variable to force the class initialization
   static ::ROOT::TGenericClassInfo *_R__UNIQUE_DICT_(Init) = GenerateInitInstanceLocal((const ::WCP::MergeGeomWire*)0x0); R__UseDummy(_R__UNIQUE_DICT_(Init));

   // Dictionary for non-ClassDef classes
   static TClass *WCPcLcLMergeGeomWire_Dictionary() {
      TClass* theClass =::ROOT::GenerateInitInstanceLocal((const ::WCP::MergeGeomWire*)0x0)->GetClass();
      WCPcLcLMergeGeomWire_TClassManip(theClass);
   return theClass;
   }

   static void WCPcLcLMergeGeomWire_TClassManip(TClass* ){
   }

} // end of namespace ROOT

namespace ROOT {
   static TClass *WCPcLcLSlice_Dictionary();
   static void WCPcLcLSlice_TClassManip(TClass*);
   static void *new_WCPcLcLSlice(void *p = 0);
   static void *newArray_WCPcLcLSlice(Long_t size, void *p);
   static void delete_WCPcLcLSlice(void *p);
   static void deleteArray_WCPcLcLSlice(void *p);
   static void destruct_WCPcLcLSlice(void *p);

   // Function generating the singleton type initializer
   static TGenericClassInfo *GenerateInitInstanceLocal(const ::WCP::Slice*)
   {
      ::WCP::Slice *ptr = 0;
      static ::TVirtualIsAProxy* isa_proxy = new ::TIsAProxy(typeid(::WCP::Slice));
      static ::ROOT::TGenericClassInfo 
         instance("WCP::Slice", "", 2230,
                  typeid(::WCP::Slice), ::ROOT::Internal::DefineBehavior(ptr, ptr),
                  &WCPcLcLSlice_Dictionary, isa_proxy, 0,
                  sizeof(::WCP::Slice) );
      instance.SetNew(&new_WCPcLcLSlice);
      instance.SetNewArray(&newArray_WCPcLcLSlice);
      instance.SetDelete(&delete_WCPcLcLSlice);
      instance.SetDeleteArray(&deleteArray_WCPcLcLSlice);
      instance.SetDestructor(&destruct_WCPcLcLSlice);
      return &instance;
   }
   TGenericClassInfo *GenerateInitInstance(const ::WCP::Slice*)
   {
      return GenerateInitInstanceLocal((::WCP::Slice*)0);
   }
   // Static variable to force the class initialization
   static ::ROOT::TGenericClassInfo *_R__UNIQUE_DICT_(Init) = GenerateInitInstanceLocal((const ::WCP::Slice*)0x0); R__UseDummy(_R__UNIQUE_DICT_(Init));

   // Dictionary for non-ClassDef classes
   static TClass *WCPcLcLSlice_Dictionary() {
      TClass* theClass =::ROOT::GenerateInitInstanceLocal((const ::WCP::Slice*)0x0)->GetClass();
      WCPcLcLSlice_TClassManip(theClass);
   return theClass;
   }

   static void WCPcLcLSlice_TClassManip(TClass* ){
   }

} // end of namespace ROOT

namespace ROOT {
   // Wrappers around operator new
   static void *new_pairlEWCPcLcLD3VectorlEdoublegRcOWCPcLcLD3VectorlEdoublegRsPgR(void *p) {
      return  p ? ::new((::ROOT::Internal::TOperatorNewHelper*)p) pair<WCP::D3Vector<double>,WCP::D3Vector<double> > : new pair<WCP::D3Vector<double>,WCP::D3Vector<double> >;
   }
   static void *newArray_pairlEWCPcLcLD3VectorlEdoublegRcOWCPcLcLD3VectorlEdoublegRsPgR(Long_t nElements, void *p) {
      return p ? ::new((::ROOT::Internal::TOperatorNewHelper*)p) pair<WCP::D3Vector<double>,WCP::D3Vector<double> >[nElements] : new pair<WCP::D3Vector<double>,WCP::D3Vector<double> >[nElements];
   }
   // Wrapper around operator delete
   static void delete_pairlEWCPcLcLD3VectorlEdoublegRcOWCPcLcLD3VectorlEdoublegRsPgR(void *p) {
      delete ((pair<WCP::D3Vector<double>,WCP::D3Vector<double> >*)p);
   }
   static void deleteArray_pairlEWCPcLcLD3VectorlEdoublegRcOWCPcLcLD3VectorlEdoublegRsPgR(void *p) {
      delete [] ((pair<WCP::D3Vector<double>,WCP::D3Vector<double> >*)p);
   }
   static void destruct_pairlEWCPcLcLD3VectorlEdoublegRcOWCPcLcLD3VectorlEdoublegRsPgR(void *p) {
      typedef pair<WCP::D3Vector<double>,WCP::D3Vector<double> > current_t;
      ((current_t*)p)->~current_t();
   }
} // end of namespace ROOT for class pair<WCP::D3Vector<double>,WCP::D3Vector<double> >

namespace ROOT {
   // Wrappers around operator new
   static void *new_WCPcLcLD3VectorlEdoublegR(void *p) {
      return  p ? ::new((::ROOT::Internal::TOperatorNewHelper*)p) ::WCP::D3Vector<double> : new ::WCP::D3Vector<double>;
   }
   static void *newArray_WCPcLcLD3VectorlEdoublegR(Long_t nElements, void *p) {
      return p ? ::new((::ROOT::Internal::TOperatorNewHelper*)p) ::WCP::D3Vector<double>[nElements] : new ::WCP::D3Vector<double>[nElements];
   }
   // Wrapper around operator delete
   static void delete_WCPcLcLD3VectorlEdoublegR(void *p) {
      delete ((::WCP::D3Vector<double>*)p);
   }
   static void deleteArray_WCPcLcLD3VectorlEdoublegR(void *p) {
      delete [] ((::WCP::D3Vector<double>*)p);
   }
   static void destruct_WCPcLcLD3VectorlEdoublegR(void *p) {
      typedef ::WCP::D3Vector<double> current_t;
      ((current_t*)p)->~current_t();
   }
} // end of namespace ROOT for class ::WCP::D3Vector<double>

namespace ROOT {
   // Wrappers around operator new
   static void *new_WCPcLcLD3VectorlEfloatgR(void *p) {
      return  p ? ::new((::ROOT::Internal::TOperatorNewHelper*)p) ::WCP::D3Vector<float> : new ::WCP::D3Vector<float>;
   }
   static void *newArray_WCPcLcLD3VectorlEfloatgR(Long_t nElements, void *p) {
      return p ? ::new((::ROOT::Internal::TOperatorNewHelper*)p) ::WCP::D3Vector<float>[nElements] : new ::WCP::D3Vector<float>[nElements];
   }
   // Wrapper around operator delete
   static void delete_WCPcLcLD3VectorlEfloatgR(void *p) {
      delete ((::WCP::D3Vector<float>*)p);
   }
   static void deleteArray_WCPcLcLD3VectorlEfloatgR(void *p) {
      delete [] ((::WCP::D3Vector<float>*)p);
   }
   static void destruct_WCPcLcLD3VectorlEfloatgR(void *p) {
      typedef ::WCP::D3Vector<float> current_t;
      ((current_t*)p)->~current_t();
   }
} // end of namespace ROOT for class ::WCP::D3Vector<float>

namespace ROOT {
   // Wrappers around operator new
   static void *new_WCPcLcLGeomWire(void *p) {
      return  p ? ::new((::ROOT::Internal::TOperatorNewHelper*)p) ::WCP::GeomWire : new ::WCP::GeomWire;
   }
   static void *newArray_WCPcLcLGeomWire(Long_t nElements, void *p) {
      return p ? ::new((::ROOT::Internal::TOperatorNewHelper*)p) ::WCP::GeomWire[nElements] : new ::WCP::GeomWire[nElements];
   }
   // Wrapper around operator delete
   static void delete_WCPcLcLGeomWire(void *p) {
      delete ((::WCP::GeomWire*)p);
   }
   static void deleteArray_WCPcLcLGeomWire(void *p) {
      delete [] ((::WCP::GeomWire*)p);
   }
   static void destruct_WCPcLcLGeomWire(void *p) {
      typedef ::WCP::GeomWire current_t;
      ((current_t*)p)->~current_t();
   }
} // end of namespace ROOT for class ::WCP::GeomWire

namespace ROOT {
   // Wrappers around operator new
   static void *new_WCPcLcLGeomCell(void *p) {
      return  p ? ::new((::ROOT::Internal::TOperatorNewHelper*)p) ::WCP::GeomCell : new ::WCP::GeomCell;
   }
   static void *newArray_WCPcLcLGeomCell(Long_t nElements, void *p) {
      return p ? ::new((::ROOT::Internal::TOperatorNewHelper*)p) ::WCP::GeomCell[nElements] : new ::WCP::GeomCell[nElements];
   }
   // Wrapper around operator delete
   static void delete_WCPcLcLGeomCell(void *p) {
      delete ((::WCP::GeomCell*)p);
   }
   static void deleteArray_WCPcLcLGeomCell(void *p) {
      delete [] ((::WCP::GeomCell*)p);
   }
   static void destruct_WCPcLcLGeomCell(void *p) {
      typedef ::WCP::GeomCell current_t;
      ((current_t*)p)->~current_t();
   }
} // end of namespace ROOT for class ::WCP::GeomCell

namespace ROOT {
   // Wrappers around operator new
   static void *new_WCPcLcLMergeGeomCell(void *p) {
      return  p ? ::new((::ROOT::Internal::TOperatorNewHelper*)p) ::WCP::MergeGeomCell : new ::WCP::MergeGeomCell;
   }
   static void *newArray_WCPcLcLMergeGeomCell(Long_t nElements, void *p) {
      return p ? ::new((::ROOT::Internal::TOperatorNewHelper*)p) ::WCP::MergeGeomCell[nElements] : new ::WCP::MergeGeomCell[nElements];
   }
   // Wrapper around operator delete
   static void delete_WCPcLcLMergeGeomCell(void *p) {
      delete ((::WCP::MergeGeomCell*)p);
   }
   static void deleteArray_WCPcLcLMergeGeomCell(void *p) {
      delete [] ((::WCP::MergeGeomCell*)p);
   }
   static void destruct_WCPcLcLMergeGeomCell(void *p) {
      typedef ::WCP::MergeGeomCell current_t;
      ((current_t*)p)->~current_t();
   }
} // end of namespace ROOT for class ::WCP::MergeGeomCell

namespace ROOT {
   // Wrappers around operator new
   static void *new_WCPcLcLTrace(void *p) {
      return  p ? ::new((::ROOT::Internal::TOperatorNewHelper*)p) ::WCP::Trace : new ::WCP::Trace;
   }
   static void *newArray_WCPcLcLTrace(Long_t nElements, void *p) {
      return p ? ::new((::ROOT::Internal::TOperatorNewHelper*)p) ::WCP::Trace[nElements] : new ::WCP::Trace[nElements];
   }
   // Wrapper around operator delete
   static void delete_WCPcLcLTrace(void *p) {
      delete ((::WCP::Trace*)p);
   }
   static void deleteArray_WCPcLcLTrace(void *p) {
      delete [] ((::WCP::Trace*)p);
   }
   static void destruct_WCPcLcLTrace(void *p) {
      typedef ::WCP::Trace current_t;
      ((current_t*)p)->~current_t();
   }
} // end of namespace ROOT for class ::WCP::Trace

namespace ROOT {
   // Wrappers around operator new
   static void *new_WCPcLcLFrame(void *p) {
      return  p ? ::new((::ROOT::Internal::TOperatorNewHelper*)p) ::WCP::Frame : new ::WCP::Frame;
   }
   static void *newArray_WCPcLcLFrame(Long_t nElements, void *p) {
      return p ? ::new((::ROOT::Internal::TOperatorNewHelper*)p) ::WCP::Frame[nElements] : new ::WCP::Frame[nElements];
   }
   // Wrapper around operator delete
   static void delete_WCPcLcLFrame(void *p) {
      delete ((::WCP::Frame*)p);
   }
   static void deleteArray_WCPcLcLFrame(void *p) {
      delete [] ((::WCP::Frame*)p);
   }
   static void destruct_WCPcLcLFrame(void *p) {
      typedef ::WCP::Frame current_t;
      ((current_t*)p)->~current_t();
   }
} // end of namespace ROOT for class ::WCP::Frame

namespace ROOT {
   // Wrapper around operator delete
   static void delete_WCPcLcLGeomCluster(void *p) {
      delete ((::WCP::GeomCluster*)p);
   }
   static void deleteArray_WCPcLcLGeomCluster(void *p) {
      delete [] ((::WCP::GeomCluster*)p);
   }
   static void destruct_WCPcLcLGeomCluster(void *p) {
      typedef ::WCP::GeomCluster current_t;
      ((current_t*)p)->~current_t();
   }
} // end of namespace ROOT for class ::WCP::GeomCluster

namespace ROOT {
   // Wrapper around operator delete
   static void delete_WCPcLcLMergeGeomWire(void *p) {
      delete ((::WCP::MergeGeomWire*)p);
   }
   static void deleteArray_WCPcLcLMergeGeomWire(void *p) {
      delete [] ((::WCP::MergeGeomWire*)p);
   }
   static void destruct_WCPcLcLMergeGeomWire(void *p) {
      typedef ::WCP::MergeGeomWire current_t;
      ((current_t*)p)->~current_t();
   }
} // end of namespace ROOT for class ::WCP::MergeGeomWire

namespace ROOT {
   // Wrappers around operator new
   static void *new_WCPcLcLSlice(void *p) {
      return  p ? ::new((::ROOT::Internal::TOperatorNewHelper*)p) ::WCP::Slice : new ::WCP::Slice;
   }
   static void *newArray_WCPcLcLSlice(Long_t nElements, void *p) {
      return p ? ::new((::ROOT::Internal::TOperatorNewHelper*)p) ::WCP::Slice[nElements] : new ::WCP::Slice[nElements];
   }
   // Wrapper around operator delete
   static void delete_WCPcLcLSlice(void *p) {
      delete ((::WCP::Slice*)p);
   }
   static void deleteArray_WCPcLcLSlice(void *p) {
      delete [] ((::WCP::Slice*)p);
   }
   static void destruct_WCPcLcLSlice(void *p) {
      typedef ::WCP::Slice current_t;
      ((current_t*)p)->~current_t();
   }
} // end of namespace ROOT for class ::WCP::Slice

namespace ROOT {
   static TClass *vectorlEsetlEconstsPWCPcLcLMergeGeomCellmUgRsPgR_Dictionary();
   static void vectorlEsetlEconstsPWCPcLcLMergeGeomCellmUgRsPgR_TClassManip(TClass*);
   static void *new_vectorlEsetlEconstsPWCPcLcLMergeGeomCellmUgRsPgR(void *p = 0);
   static void *newArray_vectorlEsetlEconstsPWCPcLcLMergeGeomCellmUgRsPgR(Long_t size, void *p);
   static void delete_vectorlEsetlEconstsPWCPcLcLMergeGeomCellmUgRsPgR(void *p);
   static void deleteArray_vectorlEsetlEconstsPWCPcLcLMergeGeomCellmUgRsPgR(void *p);
   static void destruct_vectorlEsetlEconstsPWCPcLcLMergeGeomCellmUgRsPgR(void *p);

   // Function generating the singleton type initializer
   static TGenericClassInfo *GenerateInitInstanceLocal(const vector<set<const WCP::MergeGeomCell*> >*)
   {
      vector<set<const WCP::MergeGeomCell*> > *ptr = 0;
      static ::TVirtualIsAProxy* isa_proxy = new ::TIsAProxy(typeid(vector<set<const WCP::MergeGeomCell*> >));
      static ::ROOT::TGenericClassInfo 
         instance("vector<set<const WCP::MergeGeomCell*> >", -2, "vector", 386,
                  typeid(vector<set<const WCP::MergeGeomCell*> >), ::ROOT::Internal::DefineBehavior(ptr, ptr),
                  &vectorlEsetlEconstsPWCPcLcLMergeGeomCellmUgRsPgR_Dictionary, isa_proxy, 4,
                  sizeof(vector<set<const WCP::MergeGeomCell*> >) );
      instance.SetNew(&new_vectorlEsetlEconstsPWCPcLcLMergeGeomCellmUgRsPgR);
      instance.SetNewArray(&newArray_vectorlEsetlEconstsPWCPcLcLMergeGeomCellmUgRsPgR);
      instance.SetDelete(&delete_vectorlEsetlEconstsPWCPcLcLMergeGeomCellmUgRsPgR);
      instance.SetDeleteArray(&deleteArray_vectorlEsetlEconstsPWCPcLcLMergeGeomCellmUgRsPgR);
      instance.SetDestructor(&destruct_vectorlEsetlEconstsPWCPcLcLMergeGeomCellmUgRsPgR);
      instance.AdoptCollectionProxyInfo(TCollectionProxyInfo::Generate(TCollectionProxyInfo::Pushback< vector<set<const WCP::MergeGeomCell*> > >()));

      ::ROOT::AddClassAlternate("vector<set<const WCP::MergeGeomCell*> >","std::vector<std::set<WCP::MergeGeomCell const*, std::less<WCP::MergeGeomCell const*>, std::allocator<WCP::MergeGeomCell const*> >, std::allocator<std::set<WCP::MergeGeomCell const*, std::less<WCP::MergeGeomCell const*>, std::allocator<WCP::MergeGeomCell const*> > > >");
      return &instance;
   }
   // Static variable to force the class initialization
   static ::ROOT::TGenericClassInfo *_R__UNIQUE_DICT_(Init) = GenerateInitInstanceLocal((const vector<set<const WCP::MergeGeomCell*> >*)0x0); R__UseDummy(_R__UNIQUE_DICT_(Init));

   // Dictionary for non-ClassDef classes
   static TClass *vectorlEsetlEconstsPWCPcLcLMergeGeomCellmUgRsPgR_Dictionary() {
      TClass* theClass =::ROOT::GenerateInitInstanceLocal((const vector<set<const WCP::MergeGeomCell*> >*)0x0)->GetClass();
      vectorlEsetlEconstsPWCPcLcLMergeGeomCellmUgRsPgR_TClassManip(theClass);
   return theClass;
   }

   static void vectorlEsetlEconstsPWCPcLcLMergeGeomCellmUgRsPgR_TClassManip(TClass* ){
   }

} // end of namespace ROOT

namespace ROOT {
   // Wrappers around operator new
   static void *new_vectorlEsetlEconstsPWCPcLcLMergeGeomCellmUgRsPgR(void *p) {
      return  p ? ::new((::ROOT::Internal::TOperatorNewHelper*)p) vector<set<const WCP::MergeGeomCell*> > : new vector<set<const WCP::MergeGeomCell*> >;
   }
   static void *newArray_vectorlEsetlEconstsPWCPcLcLMergeGeomCellmUgRsPgR(Long_t nElements, void *p) {
      return p ? ::new((::ROOT::Internal::TOperatorNewHelper*)p) vector<set<const WCP::MergeGeomCell*> >[nElements] : new vector<set<const WCP::MergeGeomCell*> >[nElements];
   }
   // Wrapper around operator delete
   static void delete_vectorlEsetlEconstsPWCPcLcLMergeGeomCellmUgRsPgR(void *p) {
      delete ((vector<set<const WCP::MergeGeomCell*> >*)p);
   }
   static void deleteArray_vectorlEsetlEconstsPWCPcLcLMergeGeomCellmUgRsPgR(void *p) {
      delete [] ((vector<set<const WCP::MergeGeomCell*> >*)p);
   }
   static void destruct_vectorlEsetlEconstsPWCPcLcLMergeGeomCellmUgRsPgR(void *p) {
      typedef vector<set<const WCP::MergeGeomCell*> > current_t;
      ((current_t*)p)->~current_t();
   }
} // end of namespace ROOT for class vector<set<const WCP::MergeGeomCell*> >

namespace ROOT {
   static TClass *vectorlEfloatgR_Dictionary();
   static void vectorlEfloatgR_TClassManip(TClass*);
   static void *new_vectorlEfloatgR(void *p = 0);
   static void *newArray_vectorlEfloatgR(Long_t size, void *p);
   static void delete_vectorlEfloatgR(void *p);
   static void deleteArray_vectorlEfloatgR(void *p);
   static void destruct_vectorlEfloatgR(void *p);

   // Function generating the singleton type initializer
   static TGenericClassInfo *GenerateInitInstanceLocal(const vector<float>*)
   {
      vector<float> *ptr = 0;
      static ::TVirtualIsAProxy* isa_proxy = new ::TIsAProxy(typeid(vector<float>));
      static ::ROOT::TGenericClassInfo 
         instance("vector<float>", -2, "vector", 386,
                  typeid(vector<float>), ::ROOT::Internal::DefineBehavior(ptr, ptr),
                  &vectorlEfloatgR_Dictionary, isa_proxy, 4,
                  sizeof(vector<float>) );
      instance.SetNew(&new_vectorlEfloatgR);
      instance.SetNewArray(&newArray_vectorlEfloatgR);
      instance.SetDelete(&delete_vectorlEfloatgR);
      instance.SetDeleteArray(&deleteArray_vectorlEfloatgR);
      instance.SetDestructor(&destruct_vectorlEfloatgR);
      instance.AdoptCollectionProxyInfo(TCollectionProxyInfo::Generate(TCollectionProxyInfo::Pushback< vector<float> >()));

      ::ROOT::AddClassAlternate("vector<float>","std::vector<float, std::allocator<float> >");
      return &instance;
   }
   // Static variable to force the class initialization
   static ::ROOT::TGenericClassInfo *_R__UNIQUE_DICT_(Init) = GenerateInitInstanceLocal((const vector<float>*)0x0); R__UseDummy(_R__UNIQUE_DICT_(Init));

   // Dictionary for non-ClassDef classes
   static TClass *vectorlEfloatgR_Dictionary() {
      TClass* theClass =::ROOT::GenerateInitInstanceLocal((const vector<float>*)0x0)->GetClass();
      vectorlEfloatgR_TClassManip(theClass);
   return theClass;
   }

   static void vectorlEfloatgR_TClassManip(TClass* ){
   }

} // end of namespace ROOT

namespace ROOT {
   // Wrappers around operator new
   static void *new_vectorlEfloatgR(void *p) {
      return  p ? ::new((::ROOT::Internal::TOperatorNewHelper*)p) vector<float> : new vector<float>;
   }
   static void *newArray_vectorlEfloatgR(Long_t nElements, void *p) {
      return p ? ::new((::ROOT::Internal::TOperatorNewHelper*)p) vector<float>[nElements] : new vector<float>[nElements];
   }
   // Wrapper around operator delete
   static void delete_vectorlEfloatgR(void *p) {
      delete ((vector<float>*)p);
   }
   static void deleteArray_vectorlEfloatgR(void *p) {
      delete [] ((vector<float>*)p);
   }
   static void destruct_vectorlEfloatgR(void *p) {
      typedef vector<float> current_t;
      ((current_t*)p)->~current_t();
   }
} // end of namespace ROOT for class vector<float>

namespace ROOT {
   static TClass *vectorlEconstsPWCPcLcLGeomWiremUgR_Dictionary();
   static void vectorlEconstsPWCPcLcLGeomWiremUgR_TClassManip(TClass*);
   static void *new_vectorlEconstsPWCPcLcLGeomWiremUgR(void *p = 0);
   static void *newArray_vectorlEconstsPWCPcLcLGeomWiremUgR(Long_t size, void *p);
   static void delete_vectorlEconstsPWCPcLcLGeomWiremUgR(void *p);
   static void deleteArray_vectorlEconstsPWCPcLcLGeomWiremUgR(void *p);
   static void destruct_vectorlEconstsPWCPcLcLGeomWiremUgR(void *p);

   // Function generating the singleton type initializer
   static TGenericClassInfo *GenerateInitInstanceLocal(const vector<const WCP::GeomWire*>*)
   {
      vector<const WCP::GeomWire*> *ptr = 0;
      static ::TVirtualIsAProxy* isa_proxy = new ::TIsAProxy(typeid(vector<const WCP::GeomWire*>));
      static ::ROOT::TGenericClassInfo 
         instance("vector<const WCP::GeomWire*>", -2, "vector", 386,
                  typeid(vector<const WCP::GeomWire*>), ::ROOT::Internal::DefineBehavior(ptr, ptr),
                  &vectorlEconstsPWCPcLcLGeomWiremUgR_Dictionary, isa_proxy, 4,
                  sizeof(vector<const WCP::GeomWire*>) );
      instance.SetNew(&new_vectorlEconstsPWCPcLcLGeomWiremUgR);
      instance.SetNewArray(&newArray_vectorlEconstsPWCPcLcLGeomWiremUgR);
      instance.SetDelete(&delete_vectorlEconstsPWCPcLcLGeomWiremUgR);
      instance.SetDeleteArray(&deleteArray_vectorlEconstsPWCPcLcLGeomWiremUgR);
      instance.SetDestructor(&destruct_vectorlEconstsPWCPcLcLGeomWiremUgR);
      instance.AdoptCollectionProxyInfo(TCollectionProxyInfo::Generate(TCollectionProxyInfo::Pushback< vector<const WCP::GeomWire*> >()));

      ::ROOT::AddClassAlternate("vector<const WCP::GeomWire*>","std::vector<WCP::GeomWire const*, std::allocator<WCP::GeomWire const*> >");
      return &instance;
   }
   // Static variable to force the class initialization
   static ::ROOT::TGenericClassInfo *_R__UNIQUE_DICT_(Init) = GenerateInitInstanceLocal((const vector<const WCP::GeomWire*>*)0x0); R__UseDummy(_R__UNIQUE_DICT_(Init));

   // Dictionary for non-ClassDef classes
   static TClass *vectorlEconstsPWCPcLcLGeomWiremUgR_Dictionary() {
      TClass* theClass =::ROOT::GenerateInitInstanceLocal((const vector<const WCP::GeomWire*>*)0x0)->GetClass();
      vectorlEconstsPWCPcLcLGeomWiremUgR_TClassManip(theClass);
   return theClass;
   }

   static void vectorlEconstsPWCPcLcLGeomWiremUgR_TClassManip(TClass* ){
   }

} // end of namespace ROOT

namespace ROOT {
   // Wrappers around operator new
   static void *new_vectorlEconstsPWCPcLcLGeomWiremUgR(void *p) {
      return  p ? ::new((::ROOT::Internal::TOperatorNewHelper*)p) vector<const WCP::GeomWire*> : new vector<const WCP::GeomWire*>;
   }
   static void *newArray_vectorlEconstsPWCPcLcLGeomWiremUgR(Long_t nElements, void *p) {
      return p ? ::new((::ROOT::Internal::TOperatorNewHelper*)p) vector<const WCP::GeomWire*>[nElements] : new vector<const WCP::GeomWire*>[nElements];
   }
   // Wrapper around operator delete
   static void delete_vectorlEconstsPWCPcLcLGeomWiremUgR(void *p) {
      delete ((vector<const WCP::GeomWire*>*)p);
   }
   static void deleteArray_vectorlEconstsPWCPcLcLGeomWiremUgR(void *p) {
      delete [] ((vector<const WCP::GeomWire*>*)p);
   }
   static void destruct_vectorlEconstsPWCPcLcLGeomWiremUgR(void *p) {
      typedef vector<const WCP::GeomWire*> current_t;
      ((current_t*)p)->~current_t();
   }
} // end of namespace ROOT for class vector<const WCP::GeomWire*>

namespace ROOT {
   static TClass *vectorlEconstsPWCPcLcLGeomCellmUgR_Dictionary();
   static void vectorlEconstsPWCPcLcLGeomCellmUgR_TClassManip(TClass*);
   static void *new_vectorlEconstsPWCPcLcLGeomCellmUgR(void *p = 0);
   static void *newArray_vectorlEconstsPWCPcLcLGeomCellmUgR(Long_t size, void *p);
   static void delete_vectorlEconstsPWCPcLcLGeomCellmUgR(void *p);
   static void deleteArray_vectorlEconstsPWCPcLcLGeomCellmUgR(void *p);
   static void destruct_vectorlEconstsPWCPcLcLGeomCellmUgR(void *p);

   // Function generating the singleton type initializer
   static TGenericClassInfo *GenerateInitInstanceLocal(const vector<const WCP::GeomCell*>*)
   {
      vector<const WCP::GeomCell*> *ptr = 0;
      static ::TVirtualIsAProxy* isa_proxy = new ::TIsAProxy(typeid(vector<const WCP::GeomCell*>));
      static ::ROOT::TGenericClassInfo 
         instance("vector<const WCP::GeomCell*>", -2, "vector", 386,
                  typeid(vector<const WCP::GeomCell*>), ::ROOT::Internal::DefineBehavior(ptr, ptr),
                  &vectorlEconstsPWCPcLcLGeomCellmUgR_Dictionary, isa_proxy, 4,
                  sizeof(vector<const WCP::GeomCell*>) );
      instance.SetNew(&new_vectorlEconstsPWCPcLcLGeomCellmUgR);
      instance.SetNewArray(&newArray_vectorlEconstsPWCPcLcLGeomCellmUgR);
      instance.SetDelete(&delete_vectorlEconstsPWCPcLcLGeomCellmUgR);
      instance.SetDeleteArray(&deleteArray_vectorlEconstsPWCPcLcLGeomCellmUgR);
      instance.SetDestructor(&destruct_vectorlEconstsPWCPcLcLGeomCellmUgR);
      instance.AdoptCollectionProxyInfo(TCollectionProxyInfo::Generate(TCollectionProxyInfo::Pushback< vector<const WCP::GeomCell*> >()));

      ::ROOT::AddClassAlternate("vector<const WCP::GeomCell*>","std::vector<WCP::GeomCell const*, std::allocator<WCP::GeomCell const*> >");
      return &instance;
   }
   // Static variable to force the class initialization
   static ::ROOT::TGenericClassInfo *_R__UNIQUE_DICT_(Init) = GenerateInitInstanceLocal((const vector<const WCP::GeomCell*>*)0x0); R__UseDummy(_R__UNIQUE_DICT_(Init));

   // Dictionary for non-ClassDef classes
   static TClass *vectorlEconstsPWCPcLcLGeomCellmUgR_Dictionary() {
      TClass* theClass =::ROOT::GenerateInitInstanceLocal((const vector<const WCP::GeomCell*>*)0x0)->GetClass();
      vectorlEconstsPWCPcLcLGeomCellmUgR_TClassManip(theClass);
   return theClass;
   }

   static void vectorlEconstsPWCPcLcLGeomCellmUgR_TClassManip(TClass* ){
   }

} // end of namespace ROOT

namespace ROOT {
   // Wrappers around operator new
   static void *new_vectorlEconstsPWCPcLcLGeomCellmUgR(void *p) {
      return  p ? ::new((::ROOT::Internal::TOperatorNewHelper*)p) vector<const WCP::GeomCell*> : new vector<const WCP::GeomCell*>;
   }
   static void *newArray_vectorlEconstsPWCPcLcLGeomCellmUgR(Long_t nElements, void *p) {
      return p ? ::new((::ROOT::Internal::TOperatorNewHelper*)p) vector<const WCP::GeomCell*>[nElements] : new vector<const WCP::GeomCell*>[nElements];
   }
   // Wrapper around operator delete
   static void delete_vectorlEconstsPWCPcLcLGeomCellmUgR(void *p) {
      delete ((vector<const WCP::GeomCell*>*)p);
   }
   static void deleteArray_vectorlEconstsPWCPcLcLGeomCellmUgR(void *p) {
      delete [] ((vector<const WCP::GeomCell*>*)p);
   }
   static void destruct_vectorlEconstsPWCPcLcLGeomCellmUgR(void *p) {
      typedef vector<const WCP::GeomCell*> current_t;
      ((current_t*)p)->~current_t();
   }
} // end of namespace ROOT for class vector<const WCP::GeomCell*>

namespace ROOT {
   static TClass *vectorlEWCPcLcLD3VectorlEfloatgRsPgR_Dictionary();
   static void vectorlEWCPcLcLD3VectorlEfloatgRsPgR_TClassManip(TClass*);
   static void *new_vectorlEWCPcLcLD3VectorlEfloatgRsPgR(void *p = 0);
   static void *newArray_vectorlEWCPcLcLD3VectorlEfloatgRsPgR(Long_t size, void *p);
   static void delete_vectorlEWCPcLcLD3VectorlEfloatgRsPgR(void *p);
   static void deleteArray_vectorlEWCPcLcLD3VectorlEfloatgRsPgR(void *p);
   static void destruct_vectorlEWCPcLcLD3VectorlEfloatgRsPgR(void *p);

   // Function generating the singleton type initializer
   static TGenericClassInfo *GenerateInitInstanceLocal(const vector<WCP::D3Vector<float> >*)
   {
      vector<WCP::D3Vector<float> > *ptr = 0;
      static ::TVirtualIsAProxy* isa_proxy = new ::TIsAProxy(typeid(vector<WCP::D3Vector<float> >));
      static ::ROOT::TGenericClassInfo 
         instance("vector<WCP::D3Vector<float> >", -2, "vector", 386,
                  typeid(vector<WCP::D3Vector<float> >), ::ROOT::Internal::DefineBehavior(ptr, ptr),
                  &vectorlEWCPcLcLD3VectorlEfloatgRsPgR_Dictionary, isa_proxy, 4,
                  sizeof(vector<WCP::D3Vector<float> >) );
      instance.SetNew(&new_vectorlEWCPcLcLD3VectorlEfloatgRsPgR);
      instance.SetNewArray(&newArray_vectorlEWCPcLcLD3VectorlEfloatgRsPgR);
      instance.SetDelete(&delete_vectorlEWCPcLcLD3VectorlEfloatgRsPgR);
      instance.SetDeleteArray(&deleteArray_vectorlEWCPcLcLD3VectorlEfloatgRsPgR);
      instance.SetDestructor(&destruct_vectorlEWCPcLcLD3VectorlEfloatgRsPgR);
      instance.AdoptCollectionProxyInfo(TCollectionProxyInfo::Generate(TCollectionProxyInfo::Pushback< vector<WCP::D3Vector<float> > >()));

      ::ROOT::AddClassAlternate("vector<WCP::D3Vector<float> >","std::vector<WCP::D3Vector<float>, std::allocator<WCP::D3Vector<float> > >");
      return &instance;
   }
   // Static variable to force the class initialization
   static ::ROOT::TGenericClassInfo *_R__UNIQUE_DICT_(Init) = GenerateInitInstanceLocal((const vector<WCP::D3Vector<float> >*)0x0); R__UseDummy(_R__UNIQUE_DICT_(Init));

   // Dictionary for non-ClassDef classes
   static TClass *vectorlEWCPcLcLD3VectorlEfloatgRsPgR_Dictionary() {
      TClass* theClass =::ROOT::GenerateInitInstanceLocal((const vector<WCP::D3Vector<float> >*)0x0)->GetClass();
      vectorlEWCPcLcLD3VectorlEfloatgRsPgR_TClassManip(theClass);
   return theClass;
   }

   static void vectorlEWCPcLcLD3VectorlEfloatgRsPgR_TClassManip(TClass* ){
   }

} // end of namespace ROOT

namespace ROOT {
   // Wrappers around operator new
   static void *new_vectorlEWCPcLcLD3VectorlEfloatgRsPgR(void *p) {
      return  p ? ::new((::ROOT::Internal::TOperatorNewHelper*)p) vector<WCP::D3Vector<float> > : new vector<WCP::D3Vector<float> >;
   }
   static void *newArray_vectorlEWCPcLcLD3VectorlEfloatgRsPgR(Long_t nElements, void *p) {
      return p ? ::new((::ROOT::Internal::TOperatorNewHelper*)p) vector<WCP::D3Vector<float> >[nElements] : new vector<WCP::D3Vector<float> >[nElements];
   }
   // Wrapper around operator delete
   static void delete_vectorlEWCPcLcLD3VectorlEfloatgRsPgR(void *p) {
      delete ((vector<WCP::D3Vector<float> >*)p);
   }
   static void deleteArray_vectorlEWCPcLcLD3VectorlEfloatgRsPgR(void *p) {
      delete [] ((vector<WCP::D3Vector<float> >*)p);
   }
   static void destruct_vectorlEWCPcLcLD3VectorlEfloatgRsPgR(void *p) {
      typedef vector<WCP::D3Vector<float> > current_t;
      ((current_t*)p)->~current_t();
   }
} // end of namespace ROOT for class vector<WCP::D3Vector<float> >

namespace ROOT {
   static TClass *setlEconstsPWCPcLcLMergeGeomCellmUgR_Dictionary();
   static void setlEconstsPWCPcLcLMergeGeomCellmUgR_TClassManip(TClass*);
   static void *new_setlEconstsPWCPcLcLMergeGeomCellmUgR(void *p = 0);
   static void *newArray_setlEconstsPWCPcLcLMergeGeomCellmUgR(Long_t size, void *p);
   static void delete_setlEconstsPWCPcLcLMergeGeomCellmUgR(void *p);
   static void deleteArray_setlEconstsPWCPcLcLMergeGeomCellmUgR(void *p);
   static void destruct_setlEconstsPWCPcLcLMergeGeomCellmUgR(void *p);

   // Function generating the singleton type initializer
   static TGenericClassInfo *GenerateInitInstanceLocal(const set<const WCP::MergeGeomCell*>*)
   {
      set<const WCP::MergeGeomCell*> *ptr = 0;
      static ::TVirtualIsAProxy* isa_proxy = new ::TIsAProxy(typeid(set<const WCP::MergeGeomCell*>));
      static ::ROOT::TGenericClassInfo 
         instance("set<const WCP::MergeGeomCell*>", -2, "set", 94,
                  typeid(set<const WCP::MergeGeomCell*>), ::ROOT::Internal::DefineBehavior(ptr, ptr),
                  &setlEconstsPWCPcLcLMergeGeomCellmUgR_Dictionary, isa_proxy, 4,
                  sizeof(set<const WCP::MergeGeomCell*>) );
      instance.SetNew(&new_setlEconstsPWCPcLcLMergeGeomCellmUgR);
      instance.SetNewArray(&newArray_setlEconstsPWCPcLcLMergeGeomCellmUgR);
      instance.SetDelete(&delete_setlEconstsPWCPcLcLMergeGeomCellmUgR);
      instance.SetDeleteArray(&deleteArray_setlEconstsPWCPcLcLMergeGeomCellmUgR);
      instance.SetDestructor(&destruct_setlEconstsPWCPcLcLMergeGeomCellmUgR);
      instance.AdoptCollectionProxyInfo(TCollectionProxyInfo::Generate(TCollectionProxyInfo::Insert< set<const WCP::MergeGeomCell*> >()));

      ::ROOT::AddClassAlternate("set<const WCP::MergeGeomCell*>","std::set<WCP::MergeGeomCell const*, std::less<WCP::MergeGeomCell const*>, std::allocator<WCP::MergeGeomCell const*> >");
      return &instance;
   }
   // Static variable to force the class initialization
   static ::ROOT::TGenericClassInfo *_R__UNIQUE_DICT_(Init) = GenerateInitInstanceLocal((const set<const WCP::MergeGeomCell*>*)0x0); R__UseDummy(_R__UNIQUE_DICT_(Init));

   // Dictionary for non-ClassDef classes
   static TClass *setlEconstsPWCPcLcLMergeGeomCellmUgR_Dictionary() {
      TClass* theClass =::ROOT::GenerateInitInstanceLocal((const set<const WCP::MergeGeomCell*>*)0x0)->GetClass();
      setlEconstsPWCPcLcLMergeGeomCellmUgR_TClassManip(theClass);
   return theClass;
   }

   static void setlEconstsPWCPcLcLMergeGeomCellmUgR_TClassManip(TClass* ){
   }

} // end of namespace ROOT

namespace ROOT {
   // Wrappers around operator new
   static void *new_setlEconstsPWCPcLcLMergeGeomCellmUgR(void *p) {
      return  p ? ::new((::ROOT::Internal::TOperatorNewHelper*)p) set<const WCP::MergeGeomCell*> : new set<const WCP::MergeGeomCell*>;
   }
   static void *newArray_setlEconstsPWCPcLcLMergeGeomCellmUgR(Long_t nElements, void *p) {
      return p ? ::new((::ROOT::Internal::TOperatorNewHelper*)p) set<const WCP::MergeGeomCell*>[nElements] : new set<const WCP::MergeGeomCell*>[nElements];
   }
   // Wrapper around operator delete
   static void delete_setlEconstsPWCPcLcLMergeGeomCellmUgR(void *p) {
      delete ((set<const WCP::MergeGeomCell*>*)p);
   }
   static void deleteArray_setlEconstsPWCPcLcLMergeGeomCellmUgR(void *p) {
      delete [] ((set<const WCP::MergeGeomCell*>*)p);
   }
   static void destruct_setlEconstsPWCPcLcLMergeGeomCellmUgR(void *p) {
      typedef set<const WCP::MergeGeomCell*> current_t;
      ((current_t*)p)->~current_t();
   }
} // end of namespace ROOT for class set<const WCP::MergeGeomCell*>

namespace ROOT {
   static TClass *setlEWCPcLcLMergeGeomCellmUcOWCPcLcLMergeGeomCellComparegR_Dictionary();
   static void setlEWCPcLcLMergeGeomCellmUcOWCPcLcLMergeGeomCellComparegR_TClassManip(TClass*);
   static void *new_setlEWCPcLcLMergeGeomCellmUcOWCPcLcLMergeGeomCellComparegR(void *p = 0);
   static void *newArray_setlEWCPcLcLMergeGeomCellmUcOWCPcLcLMergeGeomCellComparegR(Long_t size, void *p);
   static void delete_setlEWCPcLcLMergeGeomCellmUcOWCPcLcLMergeGeomCellComparegR(void *p);
   static void deleteArray_setlEWCPcLcLMergeGeomCellmUcOWCPcLcLMergeGeomCellComparegR(void *p);
   static void destruct_setlEWCPcLcLMergeGeomCellmUcOWCPcLcLMergeGeomCellComparegR(void *p);

   // Function generating the singleton type initializer
   static TGenericClassInfo *GenerateInitInstanceLocal(const set<WCP::MergeGeomCell*,WCP::MergeGeomCellCompare>*)
   {
      set<WCP::MergeGeomCell*,WCP::MergeGeomCellCompare> *ptr = 0;
      static ::TVirtualIsAProxy* isa_proxy = new ::TIsAProxy(typeid(set<WCP::MergeGeomCell*,WCP::MergeGeomCellCompare>));
      static ::ROOT::TGenericClassInfo 
         instance("set<WCP::MergeGeomCell*,WCP::MergeGeomCellCompare>", -2, "set", 94,
                  typeid(set<WCP::MergeGeomCell*,WCP::MergeGeomCellCompare>), ::ROOT::Internal::DefineBehavior(ptr, ptr),
                  &setlEWCPcLcLMergeGeomCellmUcOWCPcLcLMergeGeomCellComparegR_Dictionary, isa_proxy, 4,
                  sizeof(set<WCP::MergeGeomCell*,WCP::MergeGeomCellCompare>) );
      instance.SetNew(&new_setlEWCPcLcLMergeGeomCellmUcOWCPcLcLMergeGeomCellComparegR);
      instance.SetNewArray(&newArray_setlEWCPcLcLMergeGeomCellmUcOWCPcLcLMergeGeomCellComparegR);
      instance.SetDelete(&delete_setlEWCPcLcLMergeGeomCellmUcOWCPcLcLMergeGeomCellComparegR);
      instance.SetDeleteArray(&deleteArray_setlEWCPcLcLMergeGeomCellmUcOWCPcLcLMergeGeomCellComparegR);
      instance.SetDestructor(&destruct_setlEWCPcLcLMergeGeomCellmUcOWCPcLcLMergeGeomCellComparegR);
      instance.AdoptCollectionProxyInfo(TCollectionProxyInfo::Generate(TCollectionProxyInfo::Insert< set<WCP::MergeGeomCell*,WCP::MergeGeomCellCompare> >()));

      ::ROOT::AddClassAlternate("set<WCP::MergeGeomCell*,WCP::MergeGeomCellCompare>","std::set<WCP::MergeGeomCell*, WCP::MergeGeomCellCompare, std::allocator<WCP::MergeGeomCell*> >");
      return &instance;
   }
   // Static variable to force the class initialization
   static ::ROOT::TGenericClassInfo *_R__UNIQUE_DICT_(Init) = GenerateInitInstanceLocal((const set<WCP::MergeGeomCell*,WCP::MergeGeomCellCompare>*)0x0); R__UseDummy(_R__UNIQUE_DICT_(Init));

   // Dictionary for non-ClassDef classes
   static TClass *setlEWCPcLcLMergeGeomCellmUcOWCPcLcLMergeGeomCellComparegR_Dictionary() {
      TClass* theClass =::ROOT::GenerateInitInstanceLocal((const set<WCP::MergeGeomCell*,WCP::MergeGeomCellCompare>*)0x0)->GetClass();
      setlEWCPcLcLMergeGeomCellmUcOWCPcLcLMergeGeomCellComparegR_TClassManip(theClass);
   return theClass;
   }

   static void setlEWCPcLcLMergeGeomCellmUcOWCPcLcLMergeGeomCellComparegR_TClassManip(TClass* ){
   }

} // end of namespace ROOT

namespace ROOT {
   // Wrappers around operator new
   static void *new_setlEWCPcLcLMergeGeomCellmUcOWCPcLcLMergeGeomCellComparegR(void *p) {
      return  p ? ::new((::ROOT::Internal::TOperatorNewHelper*)p) set<WCP::MergeGeomCell*,WCP::MergeGeomCellCompare> : new set<WCP::MergeGeomCell*,WCP::MergeGeomCellCompare>;
   }
   static void *newArray_setlEWCPcLcLMergeGeomCellmUcOWCPcLcLMergeGeomCellComparegR(Long_t nElements, void *p) {
      return p ? ::new((::ROOT::Internal::TOperatorNewHelper*)p) set<WCP::MergeGeomCell*,WCP::MergeGeomCellCompare>[nElements] : new set<WCP::MergeGeomCell*,WCP::MergeGeomCellCompare>[nElements];
   }
   // Wrapper around operator delete
   static void delete_setlEWCPcLcLMergeGeomCellmUcOWCPcLcLMergeGeomCellComparegR(void *p) {
      delete ((set<WCP::MergeGeomCell*,WCP::MergeGeomCellCompare>*)p);
   }
   static void deleteArray_setlEWCPcLcLMergeGeomCellmUcOWCPcLcLMergeGeomCellComparegR(void *p) {
      delete [] ((set<WCP::MergeGeomCell*,WCP::MergeGeomCellCompare>*)p);
   }
   static void destruct_setlEWCPcLcLMergeGeomCellmUcOWCPcLcLMergeGeomCellComparegR(void *p) {
      typedef set<WCP::MergeGeomCell*,WCP::MergeGeomCellCompare> current_t;
      ((current_t*)p)->~current_t();
   }
} // end of namespace ROOT for class set<WCP::MergeGeomCell*,WCP::MergeGeomCellCompare>

namespace ROOT {
   static TClass *setlEWCPcLcLGeomWiregR_Dictionary();
   static void setlEWCPcLcLGeomWiregR_TClassManip(TClass*);
   static void *new_setlEWCPcLcLGeomWiregR(void *p = 0);
   static void *newArray_setlEWCPcLcLGeomWiregR(Long_t size, void *p);
   static void delete_setlEWCPcLcLGeomWiregR(void *p);
   static void deleteArray_setlEWCPcLcLGeomWiregR(void *p);
   static void destruct_setlEWCPcLcLGeomWiregR(void *p);

   // Function generating the singleton type initializer
   static TGenericClassInfo *GenerateInitInstanceLocal(const set<WCP::GeomWire>*)
   {
      set<WCP::GeomWire> *ptr = 0;
      static ::TVirtualIsAProxy* isa_proxy = new ::TIsAProxy(typeid(set<WCP::GeomWire>));
      static ::ROOT::TGenericClassInfo 
         instance("set<WCP::GeomWire>", -2, "set", 94,
                  typeid(set<WCP::GeomWire>), ::ROOT::Internal::DefineBehavior(ptr, ptr),
                  &setlEWCPcLcLGeomWiregR_Dictionary, isa_proxy, 4,
                  sizeof(set<WCP::GeomWire>) );
      instance.SetNew(&new_setlEWCPcLcLGeomWiregR);
      instance.SetNewArray(&newArray_setlEWCPcLcLGeomWiregR);
      instance.SetDelete(&delete_setlEWCPcLcLGeomWiregR);
      instance.SetDeleteArray(&deleteArray_setlEWCPcLcLGeomWiregR);
      instance.SetDestructor(&destruct_setlEWCPcLcLGeomWiregR);
      instance.AdoptCollectionProxyInfo(TCollectionProxyInfo::Generate(TCollectionProxyInfo::Insert< set<WCP::GeomWire> >()));

      ::ROOT::AddClassAlternate("set<WCP::GeomWire>","std::set<WCP::GeomWire, std::less<WCP::GeomWire>, std::allocator<WCP::GeomWire> >");
      return &instance;
   }
   // Static variable to force the class initialization
   static ::ROOT::TGenericClassInfo *_R__UNIQUE_DICT_(Init) = GenerateInitInstanceLocal((const set<WCP::GeomWire>*)0x0); R__UseDummy(_R__UNIQUE_DICT_(Init));

   // Dictionary for non-ClassDef classes
   static TClass *setlEWCPcLcLGeomWiregR_Dictionary() {
      TClass* theClass =::ROOT::GenerateInitInstanceLocal((const set<WCP::GeomWire>*)0x0)->GetClass();
      setlEWCPcLcLGeomWiregR_TClassManip(theClass);
   return theClass;
   }

   static void setlEWCPcLcLGeomWiregR_TClassManip(TClass* ){
   }

} // end of namespace ROOT

namespace ROOT {
   // Wrappers around operator new
   static void *new_setlEWCPcLcLGeomWiregR(void *p) {
      return  p ? ::new((::ROOT::Internal::TOperatorNewHelper*)p) set<WCP::GeomWire> : new set<WCP::GeomWire>;
   }
   static void *newArray_setlEWCPcLcLGeomWiregR(Long_t nElements, void *p) {
      return p ? ::new((::ROOT::Internal::TOperatorNewHelper*)p) set<WCP::GeomWire>[nElements] : new set<WCP::GeomWire>[nElements];
   }
   // Wrapper around operator delete
   static void delete_setlEWCPcLcLGeomWiregR(void *p) {
      delete ((set<WCP::GeomWire>*)p);
   }
   static void deleteArray_setlEWCPcLcLGeomWiregR(void *p) {
      delete [] ((set<WCP::GeomWire>*)p);
   }
   static void destruct_setlEWCPcLcLGeomWiregR(void *p) {
      typedef set<WCP::GeomWire> current_t;
      ((current_t*)p)->~current_t();
   }
} // end of namespace ROOT for class set<WCP::GeomWire>

namespace ROOT {
   static TClass *setlEWCPcLcLGeomClustermUgR_Dictionary();
   static void setlEWCPcLcLGeomClustermUgR_TClassManip(TClass*);
   static void *new_setlEWCPcLcLGeomClustermUgR(void *p = 0);
   static void *newArray_setlEWCPcLcLGeomClustermUgR(Long_t size, void *p);
   static void delete_setlEWCPcLcLGeomClustermUgR(void *p);
   static void deleteArray_setlEWCPcLcLGeomClustermUgR(void *p);
   static void destruct_setlEWCPcLcLGeomClustermUgR(void *p);

   // Function generating the singleton type initializer
   static TGenericClassInfo *GenerateInitInstanceLocal(const set<WCP::GeomCluster*>*)
   {
      set<WCP::GeomCluster*> *ptr = 0;
      static ::TVirtualIsAProxy* isa_proxy = new ::TIsAProxy(typeid(set<WCP::GeomCluster*>));
      static ::ROOT::TGenericClassInfo 
         instance("set<WCP::GeomCluster*>", -2, "set", 94,
                  typeid(set<WCP::GeomCluster*>), ::ROOT::Internal::DefineBehavior(ptr, ptr),
                  &setlEWCPcLcLGeomClustermUgR_Dictionary, isa_proxy, 4,
                  sizeof(set<WCP::GeomCluster*>) );
      instance.SetNew(&new_setlEWCPcLcLGeomClustermUgR);
      instance.SetNewArray(&newArray_setlEWCPcLcLGeomClustermUgR);
      instance.SetDelete(&delete_setlEWCPcLcLGeomClustermUgR);
      instance.SetDeleteArray(&deleteArray_setlEWCPcLcLGeomClustermUgR);
      instance.SetDestructor(&destruct_setlEWCPcLcLGeomClustermUgR);
      instance.AdoptCollectionProxyInfo(TCollectionProxyInfo::Generate(TCollectionProxyInfo::Insert< set<WCP::GeomCluster*> >()));

      ::ROOT::AddClassAlternate("set<WCP::GeomCluster*>","std::set<WCP::GeomCluster*, std::less<WCP::GeomCluster*>, std::allocator<WCP::GeomCluster*> >");
      return &instance;
   }
   // Static variable to force the class initialization
   static ::ROOT::TGenericClassInfo *_R__UNIQUE_DICT_(Init) = GenerateInitInstanceLocal((const set<WCP::GeomCluster*>*)0x0); R__UseDummy(_R__UNIQUE_DICT_(Init));

   // Dictionary for non-ClassDef classes
   static TClass *setlEWCPcLcLGeomClustermUgR_Dictionary() {
      TClass* theClass =::ROOT::GenerateInitInstanceLocal((const set<WCP::GeomCluster*>*)0x0)->GetClass();
      setlEWCPcLcLGeomClustermUgR_TClassManip(theClass);
   return theClass;
   }

   static void setlEWCPcLcLGeomClustermUgR_TClassManip(TClass* ){
   }

} // end of namespace ROOT

namespace ROOT {
   // Wrappers around operator new
   static void *new_setlEWCPcLcLGeomClustermUgR(void *p) {
      return  p ? ::new((::ROOT::Internal::TOperatorNewHelper*)p) set<WCP::GeomCluster*> : new set<WCP::GeomCluster*>;
   }
   static void *newArray_setlEWCPcLcLGeomClustermUgR(Long_t nElements, void *p) {
      return p ? ::new((::ROOT::Internal::TOperatorNewHelper*)p) set<WCP::GeomCluster*>[nElements] : new set<WCP::GeomCluster*>[nElements];
   }
   // Wrapper around operator delete
   static void delete_setlEWCPcLcLGeomClustermUgR(void *p) {
      delete ((set<WCP::GeomCluster*>*)p);
   }
   static void deleteArray_setlEWCPcLcLGeomClustermUgR(void *p) {
      delete [] ((set<WCP::GeomCluster*>*)p);
   }
   static void destruct_setlEWCPcLcLGeomClustermUgR(void *p) {
      typedef set<WCP::GeomCluster*> current_t;
      ((current_t*)p)->~current_t();
   }
} // end of namespace ROOT for class set<WCP::GeomCluster*>

namespace ROOT {
   static TClass *setlEWCPcLcLGeomCellcOWCPcLcLGeomCellComparegR_Dictionary();
   static void setlEWCPcLcLGeomCellcOWCPcLcLGeomCellComparegR_TClassManip(TClass*);
   static void *new_setlEWCPcLcLGeomCellcOWCPcLcLGeomCellComparegR(void *p = 0);
   static void *newArray_setlEWCPcLcLGeomCellcOWCPcLcLGeomCellComparegR(Long_t size, void *p);
   static void delete_setlEWCPcLcLGeomCellcOWCPcLcLGeomCellComparegR(void *p);
   static void deleteArray_setlEWCPcLcLGeomCellcOWCPcLcLGeomCellComparegR(void *p);
   static void destruct_setlEWCPcLcLGeomCellcOWCPcLcLGeomCellComparegR(void *p);

   // Function generating the singleton type initializer
   static TGenericClassInfo *GenerateInitInstanceLocal(const set<WCP::GeomCell,WCP::GeomCellCompare>*)
   {
      set<WCP::GeomCell,WCP::GeomCellCompare> *ptr = 0;
      static ::TVirtualIsAProxy* isa_proxy = new ::TIsAProxy(typeid(set<WCP::GeomCell,WCP::GeomCellCompare>));
      static ::ROOT::TGenericClassInfo 
         instance("set<WCP::GeomCell,WCP::GeomCellCompare>", -2, "set", 94,
                  typeid(set<WCP::GeomCell,WCP::GeomCellCompare>), ::ROOT::Internal::DefineBehavior(ptr, ptr),
                  &setlEWCPcLcLGeomCellcOWCPcLcLGeomCellComparegR_Dictionary, isa_proxy, 4,
                  sizeof(set<WCP::GeomCell,WCP::GeomCellCompare>) );
      instance.SetNew(&new_setlEWCPcLcLGeomCellcOWCPcLcLGeomCellComparegR);
      instance.SetNewArray(&newArray_setlEWCPcLcLGeomCellcOWCPcLcLGeomCellComparegR);
      instance.SetDelete(&delete_setlEWCPcLcLGeomCellcOWCPcLcLGeomCellComparegR);
      instance.SetDeleteArray(&deleteArray_setlEWCPcLcLGeomCellcOWCPcLcLGeomCellComparegR);
      instance.SetDestructor(&destruct_setlEWCPcLcLGeomCellcOWCPcLcLGeomCellComparegR);
      instance.AdoptCollectionProxyInfo(TCollectionProxyInfo::Generate(TCollectionProxyInfo::Insert< set<WCP::GeomCell,WCP::GeomCellCompare> >()));

      ::ROOT::AddClassAlternate("set<WCP::GeomCell,WCP::GeomCellCompare>","std::set<WCP::GeomCell, WCP::GeomCellCompare, std::allocator<WCP::GeomCell> >");
      return &instance;
   }
   // Static variable to force the class initialization
   static ::ROOT::TGenericClassInfo *_R__UNIQUE_DICT_(Init) = GenerateInitInstanceLocal((const set<WCP::GeomCell,WCP::GeomCellCompare>*)0x0); R__UseDummy(_R__UNIQUE_DICT_(Init));

   // Dictionary for non-ClassDef classes
   static TClass *setlEWCPcLcLGeomCellcOWCPcLcLGeomCellComparegR_Dictionary() {
      TClass* theClass =::ROOT::GenerateInitInstanceLocal((const set<WCP::GeomCell,WCP::GeomCellCompare>*)0x0)->GetClass();
      setlEWCPcLcLGeomCellcOWCPcLcLGeomCellComparegR_TClassManip(theClass);
   return theClass;
   }

   static void setlEWCPcLcLGeomCellcOWCPcLcLGeomCellComparegR_TClassManip(TClass* ){
   }

} // end of namespace ROOT

namespace ROOT {
   // Wrappers around operator new
   static void *new_setlEWCPcLcLGeomCellcOWCPcLcLGeomCellComparegR(void *p) {
      return  p ? ::new((::ROOT::Internal::TOperatorNewHelper*)p) set<WCP::GeomCell,WCP::GeomCellCompare> : new set<WCP::GeomCell,WCP::GeomCellCompare>;
   }
   static void *newArray_setlEWCPcLcLGeomCellcOWCPcLcLGeomCellComparegR(Long_t nElements, void *p) {
      return p ? ::new((::ROOT::Internal::TOperatorNewHelper*)p) set<WCP::GeomCell,WCP::GeomCellCompare>[nElements] : new set<WCP::GeomCell,WCP::GeomCellCompare>[nElements];
   }
   // Wrapper around operator delete
   static void delete_setlEWCPcLcLGeomCellcOWCPcLcLGeomCellComparegR(void *p) {
      delete ((set<WCP::GeomCell,WCP::GeomCellCompare>*)p);
   }
   static void deleteArray_setlEWCPcLcLGeomCellcOWCPcLcLGeomCellComparegR(void *p) {
      delete [] ((set<WCP::GeomCell,WCP::GeomCellCompare>*)p);
   }
   static void destruct_setlEWCPcLcLGeomCellcOWCPcLcLGeomCellComparegR(void *p) {
      typedef set<WCP::GeomCell,WCP::GeomCellCompare> current_t;
      ((current_t*)p)->~current_t();
   }
} // end of namespace ROOT for class set<WCP::GeomCell,WCP::GeomCellCompare>

namespace ROOT {
   static TClass *maplEconstsPWCPcLcLGeomWiremUcOvectorlEconstsPWCPcLcLGeomWiremUgRcOWCPcLcLGeomWireComparepgR_Dictionary();
   static void maplEconstsPWCPcLcLGeomWiremUcOvectorlEconstsPWCPcLcLGeomWiremUgRcOWCPcLcLGeomWireComparepgR_TClassManip(TClass*);
   static void *new_maplEconstsPWCPcLcLGeomWiremUcOvectorlEconstsPWCPcLcLGeomWiremUgRcOWCPcLcLGeomWireComparepgR(void *p = 0);
   static void *newArray_maplEconstsPWCPcLcLGeomWiremUcOvectorlEconstsPWCPcLcLGeomWiremUgRcOWCPcLcLGeomWireComparepgR(Long_t size, void *p);
   static void delete_maplEconstsPWCPcLcLGeomWiremUcOvectorlEconstsPWCPcLcLGeomWiremUgRcOWCPcLcLGeomWireComparepgR(void *p);
   static void deleteArray_maplEconstsPWCPcLcLGeomWiremUcOvectorlEconstsPWCPcLcLGeomWiremUgRcOWCPcLcLGeomWireComparepgR(void *p);
   static void destruct_maplEconstsPWCPcLcLGeomWiremUcOvectorlEconstsPWCPcLcLGeomWiremUgRcOWCPcLcLGeomWireComparepgR(void *p);

   // Function generating the singleton type initializer
   static TGenericClassInfo *GenerateInitInstanceLocal(const map<const WCP::GeomWire*,vector<const WCP::GeomWire*>,WCP::GeomWireComparep>*)
   {
      map<const WCP::GeomWire*,vector<const WCP::GeomWire*>,WCP::GeomWireComparep> *ptr = 0;
      static ::TVirtualIsAProxy* isa_proxy = new ::TIsAProxy(typeid(map<const WCP::GeomWire*,vector<const WCP::GeomWire*>,WCP::GeomWireComparep>));
      static ::ROOT::TGenericClassInfo 
         instance("map<const WCP::GeomWire*,vector<const WCP::GeomWire*>,WCP::GeomWireComparep>", -2, "map", 100,
                  typeid(map<const WCP::GeomWire*,vector<const WCP::GeomWire*>,WCP::GeomWireComparep>), ::ROOT::Internal::DefineBehavior(ptr, ptr),
                  &maplEconstsPWCPcLcLGeomWiremUcOvectorlEconstsPWCPcLcLGeomWiremUgRcOWCPcLcLGeomWireComparepgR_Dictionary, isa_proxy, 4,
                  sizeof(map<const WCP::GeomWire*,vector<const WCP::GeomWire*>,WCP::GeomWireComparep>) );
      instance.SetNew(&new_maplEconstsPWCPcLcLGeomWiremUcOvectorlEconstsPWCPcLcLGeomWiremUgRcOWCPcLcLGeomWireComparepgR);
      instance.SetNewArray(&newArray_maplEconstsPWCPcLcLGeomWiremUcOvectorlEconstsPWCPcLcLGeomWiremUgRcOWCPcLcLGeomWireComparepgR);
      instance.SetDelete(&delete_maplEconstsPWCPcLcLGeomWiremUcOvectorlEconstsPWCPcLcLGeomWiremUgRcOWCPcLcLGeomWireComparepgR);
      instance.SetDeleteArray(&deleteArray_maplEconstsPWCPcLcLGeomWiremUcOvectorlEconstsPWCPcLcLGeomWiremUgRcOWCPcLcLGeomWireComparepgR);
      instance.SetDestructor(&destruct_maplEconstsPWCPcLcLGeomWiremUcOvectorlEconstsPWCPcLcLGeomWiremUgRcOWCPcLcLGeomWireComparepgR);
      instance.AdoptCollectionProxyInfo(TCollectionProxyInfo::Generate(TCollectionProxyInfo::MapInsert< map<const WCP::GeomWire*,vector<const WCP::GeomWire*>,WCP::GeomWireComparep> >()));

      ::ROOT::AddClassAlternate("map<const WCP::GeomWire*,vector<const WCP::GeomWire*>,WCP::GeomWireComparep>","std::map<WCP::GeomWire const*, std::vector<WCP::GeomWire const*, std::allocator<WCP::GeomWire const*> >, WCP::GeomWireComparep, std::allocator<std::pair<WCP::GeomWire const* const, std::vector<WCP::GeomWire const*, std::allocator<WCP::GeomWire const*> > > > >");
      return &instance;
   }
   // Static variable to force the class initialization
   static ::ROOT::TGenericClassInfo *_R__UNIQUE_DICT_(Init) = GenerateInitInstanceLocal((const map<const WCP::GeomWire*,vector<const WCP::GeomWire*>,WCP::GeomWireComparep>*)0x0); R__UseDummy(_R__UNIQUE_DICT_(Init));

   // Dictionary for non-ClassDef classes
   static TClass *maplEconstsPWCPcLcLGeomWiremUcOvectorlEconstsPWCPcLcLGeomWiremUgRcOWCPcLcLGeomWireComparepgR_Dictionary() {
      TClass* theClass =::ROOT::GenerateInitInstanceLocal((const map<const WCP::GeomWire*,vector<const WCP::GeomWire*>,WCP::GeomWireComparep>*)0x0)->GetClass();
      maplEconstsPWCPcLcLGeomWiremUcOvectorlEconstsPWCPcLcLGeomWiremUgRcOWCPcLcLGeomWireComparepgR_TClassManip(theClass);
   return theClass;
   }

   static void maplEconstsPWCPcLcLGeomWiremUcOvectorlEconstsPWCPcLcLGeomWiremUgRcOWCPcLcLGeomWireComparepgR_TClassManip(TClass* ){
   }

} // end of namespace ROOT

namespace ROOT {
   // Wrappers around operator new
   static void *new_maplEconstsPWCPcLcLGeomWiremUcOvectorlEconstsPWCPcLcLGeomWiremUgRcOWCPcLcLGeomWireComparepgR(void *p) {
      return  p ? ::new((::ROOT::Internal::TOperatorNewHelper*)p) map<const WCP::GeomWire*,vector<const WCP::GeomWire*>,WCP::GeomWireComparep> : new map<const WCP::GeomWire*,vector<const WCP::GeomWire*>,WCP::GeomWireComparep>;
   }
   static void *newArray_maplEconstsPWCPcLcLGeomWiremUcOvectorlEconstsPWCPcLcLGeomWiremUgRcOWCPcLcLGeomWireComparepgR(Long_t nElements, void *p) {
      return p ? ::new((::ROOT::Internal::TOperatorNewHelper*)p) map<const WCP::GeomWire*,vector<const WCP::GeomWire*>,WCP::GeomWireComparep>[nElements] : new map<const WCP::GeomWire*,vector<const WCP::GeomWire*>,WCP::GeomWireComparep>[nElements];
   }
   // Wrapper around operator delete
   static void delete_maplEconstsPWCPcLcLGeomWiremUcOvectorlEconstsPWCPcLcLGeomWiremUgRcOWCPcLcLGeomWireComparepgR(void *p) {
      delete ((map<const WCP::GeomWire*,vector<const WCP::GeomWire*>,WCP::GeomWireComparep>*)p);
   }
   static void deleteArray_maplEconstsPWCPcLcLGeomWiremUcOvectorlEconstsPWCPcLcLGeomWiremUgRcOWCPcLcLGeomWireComparepgR(void *p) {
      delete [] ((map<const WCP::GeomWire*,vector<const WCP::GeomWire*>,WCP::GeomWireComparep>*)p);
   }
   static void destruct_maplEconstsPWCPcLcLGeomWiremUcOvectorlEconstsPWCPcLcLGeomWiremUgRcOWCPcLcLGeomWireComparepgR(void *p) {
      typedef map<const WCP::GeomWire*,vector<const WCP::GeomWire*>,WCP::GeomWireComparep> current_t;
      ((current_t*)p)->~current_t();
   }
} // end of namespace ROOT for class map<const WCP::GeomWire*,vector<const WCP::GeomWire*>,WCP::GeomWireComparep>

namespace ROOT {
   static TClass *maplEconstsPWCPcLcLGeomWiremUcOvectorlEconstsPWCPcLcLGeomCellmUgRcOWCPcLcLGeomWireComparepgR_Dictionary();
   static void maplEconstsPWCPcLcLGeomWiremUcOvectorlEconstsPWCPcLcLGeomCellmUgRcOWCPcLcLGeomWireComparepgR_TClassManip(TClass*);
   static void *new_maplEconstsPWCPcLcLGeomWiremUcOvectorlEconstsPWCPcLcLGeomCellmUgRcOWCPcLcLGeomWireComparepgR(void *p = 0);
   static void *newArray_maplEconstsPWCPcLcLGeomWiremUcOvectorlEconstsPWCPcLcLGeomCellmUgRcOWCPcLcLGeomWireComparepgR(Long_t size, void *p);
   static void delete_maplEconstsPWCPcLcLGeomWiremUcOvectorlEconstsPWCPcLcLGeomCellmUgRcOWCPcLcLGeomWireComparepgR(void *p);
   static void deleteArray_maplEconstsPWCPcLcLGeomWiremUcOvectorlEconstsPWCPcLcLGeomCellmUgRcOWCPcLcLGeomWireComparepgR(void *p);
   static void destruct_maplEconstsPWCPcLcLGeomWiremUcOvectorlEconstsPWCPcLcLGeomCellmUgRcOWCPcLcLGeomWireComparepgR(void *p);

   // Function generating the singleton type initializer
   static TGenericClassInfo *GenerateInitInstanceLocal(const map<const WCP::GeomWire*,vector<const WCP::GeomCell*>,WCP::GeomWireComparep>*)
   {
      map<const WCP::GeomWire*,vector<const WCP::GeomCell*>,WCP::GeomWireComparep> *ptr = 0;
      static ::TVirtualIsAProxy* isa_proxy = new ::TIsAProxy(typeid(map<const WCP::GeomWire*,vector<const WCP::GeomCell*>,WCP::GeomWireComparep>));
      static ::ROOT::TGenericClassInfo 
         instance("map<const WCP::GeomWire*,vector<const WCP::GeomCell*>,WCP::GeomWireComparep>", -2, "map", 100,
                  typeid(map<const WCP::GeomWire*,vector<const WCP::GeomCell*>,WCP::GeomWireComparep>), ::ROOT::Internal::DefineBehavior(ptr, ptr),
                  &maplEconstsPWCPcLcLGeomWiremUcOvectorlEconstsPWCPcLcLGeomCellmUgRcOWCPcLcLGeomWireComparepgR_Dictionary, isa_proxy, 4,
                  sizeof(map<const WCP::GeomWire*,vector<const WCP::GeomCell*>,WCP::GeomWireComparep>) );
      instance.SetNew(&new_maplEconstsPWCPcLcLGeomWiremUcOvectorlEconstsPWCPcLcLGeomCellmUgRcOWCPcLcLGeomWireComparepgR);
      instance.SetNewArray(&newArray_maplEconstsPWCPcLcLGeomWiremUcOvectorlEconstsPWCPcLcLGeomCellmUgRcOWCPcLcLGeomWireComparepgR);
      instance.SetDelete(&delete_maplEconstsPWCPcLcLGeomWiremUcOvectorlEconstsPWCPcLcLGeomCellmUgRcOWCPcLcLGeomWireComparepgR);
      instance.SetDeleteArray(&deleteArray_maplEconstsPWCPcLcLGeomWiremUcOvectorlEconstsPWCPcLcLGeomCellmUgRcOWCPcLcLGeomWireComparepgR);
      instance.SetDestructor(&destruct_maplEconstsPWCPcLcLGeomWiremUcOvectorlEconstsPWCPcLcLGeomCellmUgRcOWCPcLcLGeomWireComparepgR);
      instance.AdoptCollectionProxyInfo(TCollectionProxyInfo::Generate(TCollectionProxyInfo::MapInsert< map<const WCP::GeomWire*,vector<const WCP::GeomCell*>,WCP::GeomWireComparep> >()));

      ::ROOT::AddClassAlternate("map<const WCP::GeomWire*,vector<const WCP::GeomCell*>,WCP::GeomWireComparep>","std::map<WCP::GeomWire const*, std::vector<WCP::GeomCell const*, std::allocator<WCP::GeomCell const*> >, WCP::GeomWireComparep, std::allocator<std::pair<WCP::GeomWire const* const, std::vector<WCP::GeomCell const*, std::allocator<WCP::GeomCell const*> > > > >");
      return &instance;
   }
   // Static variable to force the class initialization
   static ::ROOT::TGenericClassInfo *_R__UNIQUE_DICT_(Init) = GenerateInitInstanceLocal((const map<const WCP::GeomWire*,vector<const WCP::GeomCell*>,WCP::GeomWireComparep>*)0x0); R__UseDummy(_R__UNIQUE_DICT_(Init));

   // Dictionary for non-ClassDef classes
   static TClass *maplEconstsPWCPcLcLGeomWiremUcOvectorlEconstsPWCPcLcLGeomCellmUgRcOWCPcLcLGeomWireComparepgR_Dictionary() {
      TClass* theClass =::ROOT::GenerateInitInstanceLocal((const map<const WCP::GeomWire*,vector<const WCP::GeomCell*>,WCP::GeomWireComparep>*)0x0)->GetClass();
      maplEconstsPWCPcLcLGeomWiremUcOvectorlEconstsPWCPcLcLGeomCellmUgRcOWCPcLcLGeomWireComparepgR_TClassManip(theClass);
   return theClass;
   }

   static void maplEconstsPWCPcLcLGeomWiremUcOvectorlEconstsPWCPcLcLGeomCellmUgRcOWCPcLcLGeomWireComparepgR_TClassManip(TClass* ){
   }

} // end of namespace ROOT

namespace ROOT {
   // Wrappers around operator new
   static void *new_maplEconstsPWCPcLcLGeomWiremUcOvectorlEconstsPWCPcLcLGeomCellmUgRcOWCPcLcLGeomWireComparepgR(void *p) {
      return  p ? ::new((::ROOT::Internal::TOperatorNewHelper*)p) map<const WCP::GeomWire*,vector<const WCP::GeomCell*>,WCP::GeomWireComparep> : new map<const WCP::GeomWire*,vector<const WCP::GeomCell*>,WCP::GeomWireComparep>;
   }
   static void *newArray_maplEconstsPWCPcLcLGeomWiremUcOvectorlEconstsPWCPcLcLGeomCellmUgRcOWCPcLcLGeomWireComparepgR(Long_t nElements, void *p) {
      return p ? ::new((::ROOT::Internal::TOperatorNewHelper*)p) map<const WCP::GeomWire*,vector<const WCP::GeomCell*>,WCP::GeomWireComparep>[nElements] : new map<const WCP::GeomWire*,vector<const WCP::GeomCell*>,WCP::GeomWireComparep>[nElements];
   }
   // Wrapper around operator delete
   static void delete_maplEconstsPWCPcLcLGeomWiremUcOvectorlEconstsPWCPcLcLGeomCellmUgRcOWCPcLcLGeomWireComparepgR(void *p) {
      delete ((map<const WCP::GeomWire*,vector<const WCP::GeomCell*>,WCP::GeomWireComparep>*)p);
   }
   static void deleteArray_maplEconstsPWCPcLcLGeomWiremUcOvectorlEconstsPWCPcLcLGeomCellmUgRcOWCPcLcLGeomWireComparepgR(void *p) {
      delete [] ((map<const WCP::GeomWire*,vector<const WCP::GeomCell*>,WCP::GeomWireComparep>*)p);
   }
   static void destruct_maplEconstsPWCPcLcLGeomWiremUcOvectorlEconstsPWCPcLcLGeomCellmUgRcOWCPcLcLGeomWireComparepgR(void *p) {
      typedef map<const WCP::GeomWire*,vector<const WCP::GeomCell*>,WCP::GeomWireComparep> current_t;
      ((current_t*)p)->~current_t();
   }
} // end of namespace ROOT for class map<const WCP::GeomWire*,vector<const WCP::GeomCell*>,WCP::GeomWireComparep>

namespace ROOT {
   static TClass *maplEconstsPWCPcLcLGeomWiremUcOintcOWCPcLcLGeomWireComparepgR_Dictionary();
   static void maplEconstsPWCPcLcLGeomWiremUcOintcOWCPcLcLGeomWireComparepgR_TClassManip(TClass*);
   static void *new_maplEconstsPWCPcLcLGeomWiremUcOintcOWCPcLcLGeomWireComparepgR(void *p = 0);
   static void *newArray_maplEconstsPWCPcLcLGeomWiremUcOintcOWCPcLcLGeomWireComparepgR(Long_t size, void *p);
   static void delete_maplEconstsPWCPcLcLGeomWiremUcOintcOWCPcLcLGeomWireComparepgR(void *p);
   static void deleteArray_maplEconstsPWCPcLcLGeomWiremUcOintcOWCPcLcLGeomWireComparepgR(void *p);
   static void destruct_maplEconstsPWCPcLcLGeomWiremUcOintcOWCPcLcLGeomWireComparepgR(void *p);

   // Function generating the singleton type initializer
   static TGenericClassInfo *GenerateInitInstanceLocal(const map<const WCP::GeomWire*,int,WCP::GeomWireComparep>*)
   {
      map<const WCP::GeomWire*,int,WCP::GeomWireComparep> *ptr = 0;
      static ::TVirtualIsAProxy* isa_proxy = new ::TIsAProxy(typeid(map<const WCP::GeomWire*,int,WCP::GeomWireComparep>));
      static ::ROOT::TGenericClassInfo 
         instance("map<const WCP::GeomWire*,int,WCP::GeomWireComparep>", -2, "map", 100,
                  typeid(map<const WCP::GeomWire*,int,WCP::GeomWireComparep>), ::ROOT::Internal::DefineBehavior(ptr, ptr),
                  &maplEconstsPWCPcLcLGeomWiremUcOintcOWCPcLcLGeomWireComparepgR_Dictionary, isa_proxy, 4,
                  sizeof(map<const WCP::GeomWire*,int,WCP::GeomWireComparep>) );
      instance.SetNew(&new_maplEconstsPWCPcLcLGeomWiremUcOintcOWCPcLcLGeomWireComparepgR);
      instance.SetNewArray(&newArray_maplEconstsPWCPcLcLGeomWiremUcOintcOWCPcLcLGeomWireComparepgR);
      instance.SetDelete(&delete_maplEconstsPWCPcLcLGeomWiremUcOintcOWCPcLcLGeomWireComparepgR);
      instance.SetDeleteArray(&deleteArray_maplEconstsPWCPcLcLGeomWiremUcOintcOWCPcLcLGeomWireComparepgR);
      instance.SetDestructor(&destruct_maplEconstsPWCPcLcLGeomWiremUcOintcOWCPcLcLGeomWireComparepgR);
      instance.AdoptCollectionProxyInfo(TCollectionProxyInfo::Generate(TCollectionProxyInfo::MapInsert< map<const WCP::GeomWire*,int,WCP::GeomWireComparep> >()));

      ::ROOT::AddClassAlternate("map<const WCP::GeomWire*,int,WCP::GeomWireComparep>","std::map<WCP::GeomWire const*, int, WCP::GeomWireComparep, std::allocator<std::pair<WCP::GeomWire const* const, int> > >");
      return &instance;
   }
   // Static variable to force the class initialization
   static ::ROOT::TGenericClassInfo *_R__UNIQUE_DICT_(Init) = GenerateInitInstanceLocal((const map<const WCP::GeomWire*,int,WCP::GeomWireComparep>*)0x0); R__UseDummy(_R__UNIQUE_DICT_(Init));

   // Dictionary for non-ClassDef classes
   static TClass *maplEconstsPWCPcLcLGeomWiremUcOintcOWCPcLcLGeomWireComparepgR_Dictionary() {
      TClass* theClass =::ROOT::GenerateInitInstanceLocal((const map<const WCP::GeomWire*,int,WCP::GeomWireComparep>*)0x0)->GetClass();
      maplEconstsPWCPcLcLGeomWiremUcOintcOWCPcLcLGeomWireComparepgR_TClassManip(theClass);
   return theClass;
   }

   static void maplEconstsPWCPcLcLGeomWiremUcOintcOWCPcLcLGeomWireComparepgR_TClassManip(TClass* ){
   }

} // end of namespace ROOT

namespace ROOT {
   // Wrappers around operator new
   static void *new_maplEconstsPWCPcLcLGeomWiremUcOintcOWCPcLcLGeomWireComparepgR(void *p) {
      return  p ? ::new((::ROOT::Internal::TOperatorNewHelper*)p) map<const WCP::GeomWire*,int,WCP::GeomWireComparep> : new map<const WCP::GeomWire*,int,WCP::GeomWireComparep>;
   }
   static void *newArray_maplEconstsPWCPcLcLGeomWiremUcOintcOWCPcLcLGeomWireComparepgR(Long_t nElements, void *p) {
      return p ? ::new((::ROOT::Internal::TOperatorNewHelper*)p) map<const WCP::GeomWire*,int,WCP::GeomWireComparep>[nElements] : new map<const WCP::GeomWire*,int,WCP::GeomWireComparep>[nElements];
   }
   // Wrapper around operator delete
   static void delete_maplEconstsPWCPcLcLGeomWiremUcOintcOWCPcLcLGeomWireComparepgR(void *p) {
      delete ((map<const WCP::GeomWire*,int,WCP::GeomWireComparep>*)p);
   }
   static void deleteArray_maplEconstsPWCPcLcLGeomWiremUcOintcOWCPcLcLGeomWireComparepgR(void *p) {
      delete [] ((map<const WCP::GeomWire*,int,WCP::GeomWireComparep>*)p);
   }
   static void destruct_maplEconstsPWCPcLcLGeomWiremUcOintcOWCPcLcLGeomWireComparepgR(void *p) {
      typedef map<const WCP::GeomWire*,int,WCP::GeomWireComparep> current_t;
      ((current_t*)p)->~current_t();
   }
} // end of namespace ROOT for class map<const WCP::GeomWire*,int,WCP::GeomWireComparep>

namespace ROOT {
   static TClass *maplEconstsPWCPcLcLGeomWiremUcOfloatcOWCPcLcLGeomWireComparepgR_Dictionary();
   static void maplEconstsPWCPcLcLGeomWiremUcOfloatcOWCPcLcLGeomWireComparepgR_TClassManip(TClass*);
   static void *new_maplEconstsPWCPcLcLGeomWiremUcOfloatcOWCPcLcLGeomWireComparepgR(void *p = 0);
   static void *newArray_maplEconstsPWCPcLcLGeomWiremUcOfloatcOWCPcLcLGeomWireComparepgR(Long_t size, void *p);
   static void delete_maplEconstsPWCPcLcLGeomWiremUcOfloatcOWCPcLcLGeomWireComparepgR(void *p);
   static void deleteArray_maplEconstsPWCPcLcLGeomWiremUcOfloatcOWCPcLcLGeomWireComparepgR(void *p);
   static void destruct_maplEconstsPWCPcLcLGeomWiremUcOfloatcOWCPcLcLGeomWireComparepgR(void *p);

   // Function generating the singleton type initializer
   static TGenericClassInfo *GenerateInitInstanceLocal(const map<const WCP::GeomWire*,float,WCP::GeomWireComparep>*)
   {
      map<const WCP::GeomWire*,float,WCP::GeomWireComparep> *ptr = 0;
      static ::TVirtualIsAProxy* isa_proxy = new ::TIsAProxy(typeid(map<const WCP::GeomWire*,float,WCP::GeomWireComparep>));
      static ::ROOT::TGenericClassInfo 
         instance("map<const WCP::GeomWire*,float,WCP::GeomWireComparep>", -2, "map", 100,
                  typeid(map<const WCP::GeomWire*,float,WCP::GeomWireComparep>), ::ROOT::Internal::DefineBehavior(ptr, ptr),
                  &maplEconstsPWCPcLcLGeomWiremUcOfloatcOWCPcLcLGeomWireComparepgR_Dictionary, isa_proxy, 4,
                  sizeof(map<const WCP::GeomWire*,float,WCP::GeomWireComparep>) );
      instance.SetNew(&new_maplEconstsPWCPcLcLGeomWiremUcOfloatcOWCPcLcLGeomWireComparepgR);
      instance.SetNewArray(&newArray_maplEconstsPWCPcLcLGeomWiremUcOfloatcOWCPcLcLGeomWireComparepgR);
      instance.SetDelete(&delete_maplEconstsPWCPcLcLGeomWiremUcOfloatcOWCPcLcLGeomWireComparepgR);
      instance.SetDeleteArray(&deleteArray_maplEconstsPWCPcLcLGeomWiremUcOfloatcOWCPcLcLGeomWireComparepgR);
      instance.SetDestructor(&destruct_maplEconstsPWCPcLcLGeomWiremUcOfloatcOWCPcLcLGeomWireComparepgR);
      instance.AdoptCollectionProxyInfo(TCollectionProxyInfo::Generate(TCollectionProxyInfo::MapInsert< map<const WCP::GeomWire*,float,WCP::GeomWireComparep> >()));

      ::ROOT::AddClassAlternate("map<const WCP::GeomWire*,float,WCP::GeomWireComparep>","std::map<WCP::GeomWire const*, float, WCP::GeomWireComparep, std::allocator<std::pair<WCP::GeomWire const* const, float> > >");
      return &instance;
   }
   // Static variable to force the class initialization
   static ::ROOT::TGenericClassInfo *_R__UNIQUE_DICT_(Init) = GenerateInitInstanceLocal((const map<const WCP::GeomWire*,float,WCP::GeomWireComparep>*)0x0); R__UseDummy(_R__UNIQUE_DICT_(Init));

   // Dictionary for non-ClassDef classes
   static TClass *maplEconstsPWCPcLcLGeomWiremUcOfloatcOWCPcLcLGeomWireComparepgR_Dictionary() {
      TClass* theClass =::ROOT::GenerateInitInstanceLocal((const map<const WCP::GeomWire*,float,WCP::GeomWireComparep>*)0x0)->GetClass();
      maplEconstsPWCPcLcLGeomWiremUcOfloatcOWCPcLcLGeomWireComparepgR_TClassManip(theClass);
   return theClass;
   }

   static void maplEconstsPWCPcLcLGeomWiremUcOfloatcOWCPcLcLGeomWireComparepgR_TClassManip(TClass* ){
   }

} // end of namespace ROOT

namespace ROOT {
   // Wrappers around operator new
   static void *new_maplEconstsPWCPcLcLGeomWiremUcOfloatcOWCPcLcLGeomWireComparepgR(void *p) {
      return  p ? ::new((::ROOT::Internal::TOperatorNewHelper*)p) map<const WCP::GeomWire*,float,WCP::GeomWireComparep> : new map<const WCP::GeomWire*,float,WCP::GeomWireComparep>;
   }
   static void *newArray_maplEconstsPWCPcLcLGeomWiremUcOfloatcOWCPcLcLGeomWireComparepgR(Long_t nElements, void *p) {
      return p ? ::new((::ROOT::Internal::TOperatorNewHelper*)p) map<const WCP::GeomWire*,float,WCP::GeomWireComparep>[nElements] : new map<const WCP::GeomWire*,float,WCP::GeomWireComparep>[nElements];
   }
   // Wrapper around operator delete
   static void delete_maplEconstsPWCPcLcLGeomWiremUcOfloatcOWCPcLcLGeomWireComparepgR(void *p) {
      delete ((map<const WCP::GeomWire*,float,WCP::GeomWireComparep>*)p);
   }
   static void deleteArray_maplEconstsPWCPcLcLGeomWiremUcOfloatcOWCPcLcLGeomWireComparepgR(void *p) {
      delete [] ((map<const WCP::GeomWire*,float,WCP::GeomWireComparep>*)p);
   }
   static void destruct_maplEconstsPWCPcLcLGeomWiremUcOfloatcOWCPcLcLGeomWireComparepgR(void *p) {
      typedef map<const WCP::GeomWire*,float,WCP::GeomWireComparep> current_t;
      ((current_t*)p)->~current_t();
   }
} // end of namespace ROOT for class map<const WCP::GeomWire*,float,WCP::GeomWireComparep>

namespace ROOT {
   static TClass *maplEconstsPWCPcLcLGeomWiremUcOWCPcLcLGeomWiremUcOWCPcLcLGeomWireComparepgR_Dictionary();
   static void maplEconstsPWCPcLcLGeomWiremUcOWCPcLcLGeomWiremUcOWCPcLcLGeomWireComparepgR_TClassManip(TClass*);
   static void *new_maplEconstsPWCPcLcLGeomWiremUcOWCPcLcLGeomWiremUcOWCPcLcLGeomWireComparepgR(void *p = 0);
   static void *newArray_maplEconstsPWCPcLcLGeomWiremUcOWCPcLcLGeomWiremUcOWCPcLcLGeomWireComparepgR(Long_t size, void *p);
   static void delete_maplEconstsPWCPcLcLGeomWiremUcOWCPcLcLGeomWiremUcOWCPcLcLGeomWireComparepgR(void *p);
   static void deleteArray_maplEconstsPWCPcLcLGeomWiremUcOWCPcLcLGeomWiremUcOWCPcLcLGeomWireComparepgR(void *p);
   static void destruct_maplEconstsPWCPcLcLGeomWiremUcOWCPcLcLGeomWiremUcOWCPcLcLGeomWireComparepgR(void *p);

   // Function generating the singleton type initializer
   static TGenericClassInfo *GenerateInitInstanceLocal(const map<const WCP::GeomWire*,WCP::GeomWire*,WCP::GeomWireComparep>*)
   {
      map<const WCP::GeomWire*,WCP::GeomWire*,WCP::GeomWireComparep> *ptr = 0;
      static ::TVirtualIsAProxy* isa_proxy = new ::TIsAProxy(typeid(map<const WCP::GeomWire*,WCP::GeomWire*,WCP::GeomWireComparep>));
      static ::ROOT::TGenericClassInfo 
         instance("map<const WCP::GeomWire*,WCP::GeomWire*,WCP::GeomWireComparep>", -2, "map", 100,
                  typeid(map<const WCP::GeomWire*,WCP::GeomWire*,WCP::GeomWireComparep>), ::ROOT::Internal::DefineBehavior(ptr, ptr),
                  &maplEconstsPWCPcLcLGeomWiremUcOWCPcLcLGeomWiremUcOWCPcLcLGeomWireComparepgR_Dictionary, isa_proxy, 4,
                  sizeof(map<const WCP::GeomWire*,WCP::GeomWire*,WCP::GeomWireComparep>) );
      instance.SetNew(&new_maplEconstsPWCPcLcLGeomWiremUcOWCPcLcLGeomWiremUcOWCPcLcLGeomWireComparepgR);
      instance.SetNewArray(&newArray_maplEconstsPWCPcLcLGeomWiremUcOWCPcLcLGeomWiremUcOWCPcLcLGeomWireComparepgR);
      instance.SetDelete(&delete_maplEconstsPWCPcLcLGeomWiremUcOWCPcLcLGeomWiremUcOWCPcLcLGeomWireComparepgR);
      instance.SetDeleteArray(&deleteArray_maplEconstsPWCPcLcLGeomWiremUcOWCPcLcLGeomWiremUcOWCPcLcLGeomWireComparepgR);
      instance.SetDestructor(&destruct_maplEconstsPWCPcLcLGeomWiremUcOWCPcLcLGeomWiremUcOWCPcLcLGeomWireComparepgR);
      instance.AdoptCollectionProxyInfo(TCollectionProxyInfo::Generate(TCollectionProxyInfo::MapInsert< map<const WCP::GeomWire*,WCP::GeomWire*,WCP::GeomWireComparep> >()));

      ::ROOT::AddClassAlternate("map<const WCP::GeomWire*,WCP::GeomWire*,WCP::GeomWireComparep>","std::map<WCP::GeomWire const*, WCP::GeomWire*, WCP::GeomWireComparep, std::allocator<std::pair<WCP::GeomWire const* const, WCP::GeomWire*> > >");
      return &instance;
   }
   // Static variable to force the class initialization
   static ::ROOT::TGenericClassInfo *_R__UNIQUE_DICT_(Init) = GenerateInitInstanceLocal((const map<const WCP::GeomWire*,WCP::GeomWire*,WCP::GeomWireComparep>*)0x0); R__UseDummy(_R__UNIQUE_DICT_(Init));

   // Dictionary for non-ClassDef classes
   static TClass *maplEconstsPWCPcLcLGeomWiremUcOWCPcLcLGeomWiremUcOWCPcLcLGeomWireComparepgR_Dictionary() {
      TClass* theClass =::ROOT::GenerateInitInstanceLocal((const map<const WCP::GeomWire*,WCP::GeomWire*,WCP::GeomWireComparep>*)0x0)->GetClass();
      maplEconstsPWCPcLcLGeomWiremUcOWCPcLcLGeomWiremUcOWCPcLcLGeomWireComparepgR_TClassManip(theClass);
   return theClass;
   }

   static void maplEconstsPWCPcLcLGeomWiremUcOWCPcLcLGeomWiremUcOWCPcLcLGeomWireComparepgR_TClassManip(TClass* ){
   }

} // end of namespace ROOT

namespace ROOT {
   // Wrappers around operator new
   static void *new_maplEconstsPWCPcLcLGeomWiremUcOWCPcLcLGeomWiremUcOWCPcLcLGeomWireComparepgR(void *p) {
      return  p ? ::new((::ROOT::Internal::TOperatorNewHelper*)p) map<const WCP::GeomWire*,WCP::GeomWire*,WCP::GeomWireComparep> : new map<const WCP::GeomWire*,WCP::GeomWire*,WCP::GeomWireComparep>;
   }
   static void *newArray_maplEconstsPWCPcLcLGeomWiremUcOWCPcLcLGeomWiremUcOWCPcLcLGeomWireComparepgR(Long_t nElements, void *p) {
      return p ? ::new((::ROOT::Internal::TOperatorNewHelper*)p) map<const WCP::GeomWire*,WCP::GeomWire*,WCP::GeomWireComparep>[nElements] : new map<const WCP::GeomWire*,WCP::GeomWire*,WCP::GeomWireComparep>[nElements];
   }
   // Wrapper around operator delete
   static void delete_maplEconstsPWCPcLcLGeomWiremUcOWCPcLcLGeomWiremUcOWCPcLcLGeomWireComparepgR(void *p) {
      delete ((map<const WCP::GeomWire*,WCP::GeomWire*,WCP::GeomWireComparep>*)p);
   }
   static void deleteArray_maplEconstsPWCPcLcLGeomWiremUcOWCPcLcLGeomWiremUcOWCPcLcLGeomWireComparepgR(void *p) {
      delete [] ((map<const WCP::GeomWire*,WCP::GeomWire*,WCP::GeomWireComparep>*)p);
   }
   static void destruct_maplEconstsPWCPcLcLGeomWiremUcOWCPcLcLGeomWiremUcOWCPcLcLGeomWireComparepgR(void *p) {
      typedef map<const WCP::GeomWire*,WCP::GeomWire*,WCP::GeomWireComparep> current_t;
      ((current_t*)p)->~current_t();
   }
} // end of namespace ROOT for class map<const WCP::GeomWire*,WCP::GeomWire*,WCP::GeomWireComparep>

namespace ROOT {
   static TClass *maplEconstsPWCPcLcLGeomCellmUcOvectorlEconstsPWCPcLcLGeomWiremUgRcOWCPcLcLGeomCellComparepgR_Dictionary();
   static void maplEconstsPWCPcLcLGeomCellmUcOvectorlEconstsPWCPcLcLGeomWiremUgRcOWCPcLcLGeomCellComparepgR_TClassManip(TClass*);
   static void *new_maplEconstsPWCPcLcLGeomCellmUcOvectorlEconstsPWCPcLcLGeomWiremUgRcOWCPcLcLGeomCellComparepgR(void *p = 0);
   static void *newArray_maplEconstsPWCPcLcLGeomCellmUcOvectorlEconstsPWCPcLcLGeomWiremUgRcOWCPcLcLGeomCellComparepgR(Long_t size, void *p);
   static void delete_maplEconstsPWCPcLcLGeomCellmUcOvectorlEconstsPWCPcLcLGeomWiremUgRcOWCPcLcLGeomCellComparepgR(void *p);
   static void deleteArray_maplEconstsPWCPcLcLGeomCellmUcOvectorlEconstsPWCPcLcLGeomWiremUgRcOWCPcLcLGeomCellComparepgR(void *p);
   static void destruct_maplEconstsPWCPcLcLGeomCellmUcOvectorlEconstsPWCPcLcLGeomWiremUgRcOWCPcLcLGeomCellComparepgR(void *p);

   // Function generating the singleton type initializer
   static TGenericClassInfo *GenerateInitInstanceLocal(const map<const WCP::GeomCell*,vector<const WCP::GeomWire*>,WCP::GeomCellComparep>*)
   {
      map<const WCP::GeomCell*,vector<const WCP::GeomWire*>,WCP::GeomCellComparep> *ptr = 0;
      static ::TVirtualIsAProxy* isa_proxy = new ::TIsAProxy(typeid(map<const WCP::GeomCell*,vector<const WCP::GeomWire*>,WCP::GeomCellComparep>));
      static ::ROOT::TGenericClassInfo 
         instance("map<const WCP::GeomCell*,vector<const WCP::GeomWire*>,WCP::GeomCellComparep>", -2, "map", 100,
                  typeid(map<const WCP::GeomCell*,vector<const WCP::GeomWire*>,WCP::GeomCellComparep>), ::ROOT::Internal::DefineBehavior(ptr, ptr),
                  &maplEconstsPWCPcLcLGeomCellmUcOvectorlEconstsPWCPcLcLGeomWiremUgRcOWCPcLcLGeomCellComparepgR_Dictionary, isa_proxy, 4,
                  sizeof(map<const WCP::GeomCell*,vector<const WCP::GeomWire*>,WCP::GeomCellComparep>) );
      instance.SetNew(&new_maplEconstsPWCPcLcLGeomCellmUcOvectorlEconstsPWCPcLcLGeomWiremUgRcOWCPcLcLGeomCellComparepgR);
      instance.SetNewArray(&newArray_maplEconstsPWCPcLcLGeomCellmUcOvectorlEconstsPWCPcLcLGeomWiremUgRcOWCPcLcLGeomCellComparepgR);
      instance.SetDelete(&delete_maplEconstsPWCPcLcLGeomCellmUcOvectorlEconstsPWCPcLcLGeomWiremUgRcOWCPcLcLGeomCellComparepgR);
      instance.SetDeleteArray(&deleteArray_maplEconstsPWCPcLcLGeomCellmUcOvectorlEconstsPWCPcLcLGeomWiremUgRcOWCPcLcLGeomCellComparepgR);
      instance.SetDestructor(&destruct_maplEconstsPWCPcLcLGeomCellmUcOvectorlEconstsPWCPcLcLGeomWiremUgRcOWCPcLcLGeomCellComparepgR);
      instance.AdoptCollectionProxyInfo(TCollectionProxyInfo::Generate(TCollectionProxyInfo::MapInsert< map<const WCP::GeomCell*,vector<const WCP::GeomWire*>,WCP::GeomCellComparep> >()));

      ::ROOT::AddClassAlternate("map<const WCP::GeomCell*,vector<const WCP::GeomWire*>,WCP::GeomCellComparep>","std::map<WCP::GeomCell const*, std::vector<WCP::GeomWire const*, std::allocator<WCP::GeomWire const*> >, WCP::GeomCellComparep, std::allocator<std::pair<WCP::GeomCell const* const, std::vector<WCP::GeomWire const*, std::allocator<WCP::GeomWire const*> > > > >");
      return &instance;
   }
   // Static variable to force the class initialization
   static ::ROOT::TGenericClassInfo *_R__UNIQUE_DICT_(Init) = GenerateInitInstanceLocal((const map<const WCP::GeomCell*,vector<const WCP::GeomWire*>,WCP::GeomCellComparep>*)0x0); R__UseDummy(_R__UNIQUE_DICT_(Init));

   // Dictionary for non-ClassDef classes
   static TClass *maplEconstsPWCPcLcLGeomCellmUcOvectorlEconstsPWCPcLcLGeomWiremUgRcOWCPcLcLGeomCellComparepgR_Dictionary() {
      TClass* theClass =::ROOT::GenerateInitInstanceLocal((const map<const WCP::GeomCell*,vector<const WCP::GeomWire*>,WCP::GeomCellComparep>*)0x0)->GetClass();
      maplEconstsPWCPcLcLGeomCellmUcOvectorlEconstsPWCPcLcLGeomWiremUgRcOWCPcLcLGeomCellComparepgR_TClassManip(theClass);
   return theClass;
   }

   static void maplEconstsPWCPcLcLGeomCellmUcOvectorlEconstsPWCPcLcLGeomWiremUgRcOWCPcLcLGeomCellComparepgR_TClassManip(TClass* ){
   }

} // end of namespace ROOT

namespace ROOT {
   // Wrappers around operator new
   static void *new_maplEconstsPWCPcLcLGeomCellmUcOvectorlEconstsPWCPcLcLGeomWiremUgRcOWCPcLcLGeomCellComparepgR(void *p) {
      return  p ? ::new((::ROOT::Internal::TOperatorNewHelper*)p) map<const WCP::GeomCell*,vector<const WCP::GeomWire*>,WCP::GeomCellComparep> : new map<const WCP::GeomCell*,vector<const WCP::GeomWire*>,WCP::GeomCellComparep>;
   }
   static void *newArray_maplEconstsPWCPcLcLGeomCellmUcOvectorlEconstsPWCPcLcLGeomWiremUgRcOWCPcLcLGeomCellComparepgR(Long_t nElements, void *p) {
      return p ? ::new((::ROOT::Internal::TOperatorNewHelper*)p) map<const WCP::GeomCell*,vector<const WCP::GeomWire*>,WCP::GeomCellComparep>[nElements] : new map<const WCP::GeomCell*,vector<const WCP::GeomWire*>,WCP::GeomCellComparep>[nElements];
   }
   // Wrapper around operator delete
   static void delete_maplEconstsPWCPcLcLGeomCellmUcOvectorlEconstsPWCPcLcLGeomWiremUgRcOWCPcLcLGeomCellComparepgR(void *p) {
      delete ((map<const WCP::GeomCell*,vector<const WCP::GeomWire*>,WCP::GeomCellComparep>*)p);
   }
   static void deleteArray_maplEconstsPWCPcLcLGeomCellmUcOvectorlEconstsPWCPcLcLGeomWiremUgRcOWCPcLcLGeomCellComparepgR(void *p) {
      delete [] ((map<const WCP::GeomCell*,vector<const WCP::GeomWire*>,WCP::GeomCellComparep>*)p);
   }
   static void destruct_maplEconstsPWCPcLcLGeomCellmUcOvectorlEconstsPWCPcLcLGeomWiremUgRcOWCPcLcLGeomCellComparepgR(void *p) {
      typedef map<const WCP::GeomCell*,vector<const WCP::GeomWire*>,WCP::GeomCellComparep> current_t;
      ((current_t*)p)->~current_t();
   }
} // end of namespace ROOT for class map<const WCP::GeomCell*,vector<const WCP::GeomWire*>,WCP::GeomCellComparep>

namespace ROOT {
   static TClass *maplEconstsPWCPcLcLGeomCellmUcOintcOWCPcLcLGeomCellComparepgR_Dictionary();
   static void maplEconstsPWCPcLcLGeomCellmUcOintcOWCPcLcLGeomCellComparepgR_TClassManip(TClass*);
   static void *new_maplEconstsPWCPcLcLGeomCellmUcOintcOWCPcLcLGeomCellComparepgR(void *p = 0);
   static void *newArray_maplEconstsPWCPcLcLGeomCellmUcOintcOWCPcLcLGeomCellComparepgR(Long_t size, void *p);
   static void delete_maplEconstsPWCPcLcLGeomCellmUcOintcOWCPcLcLGeomCellComparepgR(void *p);
   static void deleteArray_maplEconstsPWCPcLcLGeomCellmUcOintcOWCPcLcLGeomCellComparepgR(void *p);
   static void destruct_maplEconstsPWCPcLcLGeomCellmUcOintcOWCPcLcLGeomCellComparepgR(void *p);

   // Function generating the singleton type initializer
   static TGenericClassInfo *GenerateInitInstanceLocal(const map<const WCP::GeomCell*,int,WCP::GeomCellComparep>*)
   {
      map<const WCP::GeomCell*,int,WCP::GeomCellComparep> *ptr = 0;
      static ::TVirtualIsAProxy* isa_proxy = new ::TIsAProxy(typeid(map<const WCP::GeomCell*,int,WCP::GeomCellComparep>));
      static ::ROOT::TGenericClassInfo 
         instance("map<const WCP::GeomCell*,int,WCP::GeomCellComparep>", -2, "map", 100,
                  typeid(map<const WCP::GeomCell*,int,WCP::GeomCellComparep>), ::ROOT::Internal::DefineBehavior(ptr, ptr),
                  &maplEconstsPWCPcLcLGeomCellmUcOintcOWCPcLcLGeomCellComparepgR_Dictionary, isa_proxy, 4,
                  sizeof(map<const WCP::GeomCell*,int,WCP::GeomCellComparep>) );
      instance.SetNew(&new_maplEconstsPWCPcLcLGeomCellmUcOintcOWCPcLcLGeomCellComparepgR);
      instance.SetNewArray(&newArray_maplEconstsPWCPcLcLGeomCellmUcOintcOWCPcLcLGeomCellComparepgR);
      instance.SetDelete(&delete_maplEconstsPWCPcLcLGeomCellmUcOintcOWCPcLcLGeomCellComparepgR);
      instance.SetDeleteArray(&deleteArray_maplEconstsPWCPcLcLGeomCellmUcOintcOWCPcLcLGeomCellComparepgR);
      instance.SetDestructor(&destruct_maplEconstsPWCPcLcLGeomCellmUcOintcOWCPcLcLGeomCellComparepgR);
      instance.AdoptCollectionProxyInfo(TCollectionProxyInfo::Generate(TCollectionProxyInfo::MapInsert< map<const WCP::GeomCell*,int,WCP::GeomCellComparep> >()));

      ::ROOT::AddClassAlternate("map<const WCP::GeomCell*,int,WCP::GeomCellComparep>","std::map<WCP::GeomCell const*, int, WCP::GeomCellComparep, std::allocator<std::pair<WCP::GeomCell const* const, int> > >");
      return &instance;
   }
   // Static variable to force the class initialization
   static ::ROOT::TGenericClassInfo *_R__UNIQUE_DICT_(Init) = GenerateInitInstanceLocal((const map<const WCP::GeomCell*,int,WCP::GeomCellComparep>*)0x0); R__UseDummy(_R__UNIQUE_DICT_(Init));

   // Dictionary for non-ClassDef classes
   static TClass *maplEconstsPWCPcLcLGeomCellmUcOintcOWCPcLcLGeomCellComparepgR_Dictionary() {
      TClass* theClass =::ROOT::GenerateInitInstanceLocal((const map<const WCP::GeomCell*,int,WCP::GeomCellComparep>*)0x0)->GetClass();
      maplEconstsPWCPcLcLGeomCellmUcOintcOWCPcLcLGeomCellComparepgR_TClassManip(theClass);
   return theClass;
   }

   static void maplEconstsPWCPcLcLGeomCellmUcOintcOWCPcLcLGeomCellComparepgR_TClassManip(TClass* ){
   }

} // end of namespace ROOT

namespace ROOT {
   // Wrappers around operator new
   static void *new_maplEconstsPWCPcLcLGeomCellmUcOintcOWCPcLcLGeomCellComparepgR(void *p) {
      return  p ? ::new((::ROOT::Internal::TOperatorNewHelper*)p) map<const WCP::GeomCell*,int,WCP::GeomCellComparep> : new map<const WCP::GeomCell*,int,WCP::GeomCellComparep>;
   }
   static void *newArray_maplEconstsPWCPcLcLGeomCellmUcOintcOWCPcLcLGeomCellComparepgR(Long_t nElements, void *p) {
      return p ? ::new((::ROOT::Internal::TOperatorNewHelper*)p) map<const WCP::GeomCell*,int,WCP::GeomCellComparep>[nElements] : new map<const WCP::GeomCell*,int,WCP::GeomCellComparep>[nElements];
   }
   // Wrapper around operator delete
   static void delete_maplEconstsPWCPcLcLGeomCellmUcOintcOWCPcLcLGeomCellComparepgR(void *p) {
      delete ((map<const WCP::GeomCell*,int,WCP::GeomCellComparep>*)p);
   }
   static void deleteArray_maplEconstsPWCPcLcLGeomCellmUcOintcOWCPcLcLGeomCellComparepgR(void *p) {
      delete [] ((map<const WCP::GeomCell*,int,WCP::GeomCellComparep>*)p);
   }
   static void destruct_maplEconstsPWCPcLcLGeomCellmUcOintcOWCPcLcLGeomCellComparepgR(void *p) {
      typedef map<const WCP::GeomCell*,int,WCP::GeomCellComparep> current_t;
      ((current_t*)p)->~current_t();
   }
} // end of namespace ROOT for class map<const WCP::GeomCell*,int,WCP::GeomCellComparep>

namespace ROOT {
   static TClass *maplEconstsPWCPcLcLGeomCellmUcOfloatcOWCPcLcLGeomCellComparepgR_Dictionary();
   static void maplEconstsPWCPcLcLGeomCellmUcOfloatcOWCPcLcLGeomCellComparepgR_TClassManip(TClass*);
   static void *new_maplEconstsPWCPcLcLGeomCellmUcOfloatcOWCPcLcLGeomCellComparepgR(void *p = 0);
   static void *newArray_maplEconstsPWCPcLcLGeomCellmUcOfloatcOWCPcLcLGeomCellComparepgR(Long_t size, void *p);
   static void delete_maplEconstsPWCPcLcLGeomCellmUcOfloatcOWCPcLcLGeomCellComparepgR(void *p);
   static void deleteArray_maplEconstsPWCPcLcLGeomCellmUcOfloatcOWCPcLcLGeomCellComparepgR(void *p);
   static void destruct_maplEconstsPWCPcLcLGeomCellmUcOfloatcOWCPcLcLGeomCellComparepgR(void *p);

   // Function generating the singleton type initializer
   static TGenericClassInfo *GenerateInitInstanceLocal(const map<const WCP::GeomCell*,float,WCP::GeomCellComparep>*)
   {
      map<const WCP::GeomCell*,float,WCP::GeomCellComparep> *ptr = 0;
      static ::TVirtualIsAProxy* isa_proxy = new ::TIsAProxy(typeid(map<const WCP::GeomCell*,float,WCP::GeomCellComparep>));
      static ::ROOT::TGenericClassInfo 
         instance("map<const WCP::GeomCell*,float,WCP::GeomCellComparep>", -2, "map", 100,
                  typeid(map<const WCP::GeomCell*,float,WCP::GeomCellComparep>), ::ROOT::Internal::DefineBehavior(ptr, ptr),
                  &maplEconstsPWCPcLcLGeomCellmUcOfloatcOWCPcLcLGeomCellComparepgR_Dictionary, isa_proxy, 4,
                  sizeof(map<const WCP::GeomCell*,float,WCP::GeomCellComparep>) );
      instance.SetNew(&new_maplEconstsPWCPcLcLGeomCellmUcOfloatcOWCPcLcLGeomCellComparepgR);
      instance.SetNewArray(&newArray_maplEconstsPWCPcLcLGeomCellmUcOfloatcOWCPcLcLGeomCellComparepgR);
      instance.SetDelete(&delete_maplEconstsPWCPcLcLGeomCellmUcOfloatcOWCPcLcLGeomCellComparepgR);
      instance.SetDeleteArray(&deleteArray_maplEconstsPWCPcLcLGeomCellmUcOfloatcOWCPcLcLGeomCellComparepgR);
      instance.SetDestructor(&destruct_maplEconstsPWCPcLcLGeomCellmUcOfloatcOWCPcLcLGeomCellComparepgR);
      instance.AdoptCollectionProxyInfo(TCollectionProxyInfo::Generate(TCollectionProxyInfo::MapInsert< map<const WCP::GeomCell*,float,WCP::GeomCellComparep> >()));

      ::ROOT::AddClassAlternate("map<const WCP::GeomCell*,float,WCP::GeomCellComparep>","std::map<WCP::GeomCell const*, float, WCP::GeomCellComparep, std::allocator<std::pair<WCP::GeomCell const* const, float> > >");
      return &instance;
   }
   // Static variable to force the class initialization
   static ::ROOT::TGenericClassInfo *_R__UNIQUE_DICT_(Init) = GenerateInitInstanceLocal((const map<const WCP::GeomCell*,float,WCP::GeomCellComparep>*)0x0); R__UseDummy(_R__UNIQUE_DICT_(Init));

   // Dictionary for non-ClassDef classes
   static TClass *maplEconstsPWCPcLcLGeomCellmUcOfloatcOWCPcLcLGeomCellComparepgR_Dictionary() {
      TClass* theClass =::ROOT::GenerateInitInstanceLocal((const map<const WCP::GeomCell*,float,WCP::GeomCellComparep>*)0x0)->GetClass();
      maplEconstsPWCPcLcLGeomCellmUcOfloatcOWCPcLcLGeomCellComparepgR_TClassManip(theClass);
   return theClass;
   }

   static void maplEconstsPWCPcLcLGeomCellmUcOfloatcOWCPcLcLGeomCellComparepgR_TClassManip(TClass* ){
   }

} // end of namespace ROOT

namespace ROOT {
   // Wrappers around operator new
   static void *new_maplEconstsPWCPcLcLGeomCellmUcOfloatcOWCPcLcLGeomCellComparepgR(void *p) {
      return  p ? ::new((::ROOT::Internal::TOperatorNewHelper*)p) map<const WCP::GeomCell*,float,WCP::GeomCellComparep> : new map<const WCP::GeomCell*,float,WCP::GeomCellComparep>;
   }
   static void *newArray_maplEconstsPWCPcLcLGeomCellmUcOfloatcOWCPcLcLGeomCellComparepgR(Long_t nElements, void *p) {
      return p ? ::new((::ROOT::Internal::TOperatorNewHelper*)p) map<const WCP::GeomCell*,float,WCP::GeomCellComparep>[nElements] : new map<const WCP::GeomCell*,float,WCP::GeomCellComparep>[nElements];
   }
   // Wrapper around operator delete
   static void delete_maplEconstsPWCPcLcLGeomCellmUcOfloatcOWCPcLcLGeomCellComparepgR(void *p) {
      delete ((map<const WCP::GeomCell*,float,WCP::GeomCellComparep>*)p);
   }
   static void deleteArray_maplEconstsPWCPcLcLGeomCellmUcOfloatcOWCPcLcLGeomCellComparepgR(void *p) {
      delete [] ((map<const WCP::GeomCell*,float,WCP::GeomCellComparep>*)p);
   }
   static void destruct_maplEconstsPWCPcLcLGeomCellmUcOfloatcOWCPcLcLGeomCellComparepgR(void *p) {
      typedef map<const WCP::GeomCell*,float,WCP::GeomCellComparep> current_t;
      ((current_t*)p)->~current_t();
   }
} // end of namespace ROOT for class map<const WCP::GeomCell*,float,WCP::GeomCellComparep>

namespace {
  void TriggerDictionaryInitialization_WCPDataDict_Impl() {
    static const char* headers[] = {
"0",
0
    };
    static const char* includePaths[] = {
0
    };
    static const char* fwdDeclCode = R"DICTFWDDCLS(
#line 1 "WCPDataDict dictionary forward declarations' payload"
#pragma clang diagnostic ignored "-Wkeyword-compat"
#pragma clang diagnostic ignored "-Wignored-attributes"
#pragma clang diagnostic ignored "-Wreturn-type-c-linkage"
extern int __Cling_AutoLoading_Map;
namespace WCP{template <class T> class __attribute__((annotate("$clingAutoload$WCPData/Vector.h")))  __attribute__((annotate("$clingAutoload$WCPData/GeomCell.h")))  D3Vector;
}
namespace std{template <typename _T1, typename _T2> struct __attribute__((annotate("$clingAutoload$bits/stl_pair.h")))  __attribute__((annotate("$clingAutoload$string")))  pair;
}
namespace std{template <typename _Tp> class __attribute__((annotate("$clingAutoload$bits/allocator.h")))  __attribute__((annotate("$clingAutoload$string")))  allocator;
}
namespace WCP{class __attribute__((annotate("$clingAutoload$WCPData/GeomWire.h")))  __attribute__((annotate("$clingAutoload$WCPData/GeomCell.h")))  GeomWire;}
namespace WCP{class __attribute__((annotate("$clingAutoload$WCPData/GeomCell.h")))  GeomCell;}
namespace WCP{class __attribute__((annotate("$clingAutoload$WCPData/MergeSpaceCell.h")))  MergeGeomCell;}
namespace std{template <typename _Tp = void> struct __attribute__((annotate("$clingAutoload$bits/stl_function.h")))  __attribute__((annotate("$clingAutoload$string")))  less;
}
namespace WCP{struct __attribute__((annotate("$clingAutoload$WCPData/GeomWire.h")))  __attribute__((annotate("$clingAutoload$WCPData/GeomCell.h")))  GeomWireComparep;}
namespace WCP{struct __attribute__((annotate("$clingAutoload$WCPData/GeomCell.h")))  GeomCellComparep;}
namespace WCP{struct __attribute__((annotate("$clingAutoload$WCPData/GeomCell.h")))  GeomCellCompare;}
namespace WCP{struct __attribute__((annotate("$clingAutoload$WCPData/MergeSpaceCell.h")))  MergeGeomCellCompare;}
namespace WCP{class GeomCluster;}
namespace WCP{struct __attribute__((annotate("$clingAutoload$WCPData/Trace.h")))  Trace;}
namespace WCP{struct Frame;}
namespace WCP{class MergeGeomWire;}
namespace WCP{class Slice;}
namespace WCP{typedef WCP::D3Vector<double> Vector __attribute__((annotate("$clingAutoload$WCPData/Vector.h")))  __attribute__((annotate("$clingAutoload$WCPData/GeomCell.h"))) ;}
namespace WCP{typedef std::pair<WCP::Vector, WCP::Vector> VectorPair __attribute__((annotate("$clingAutoload$WCPData/Vector.h")))  __attribute__((annotate("$clingAutoload$WCPData/GeomCell.h"))) ;}
namespace WCP{typedef D3Vector<float> Point __attribute__((annotate("$clingAutoload$WCPData/Point.h")))  __attribute__((annotate("$clingAutoload$WCPData/GeomCell.h"))) ;}
)DICTFWDDCLS";
    static const char* payloadCode = R"DICTPAYLOAD(
#line 1 "WCPDataDict dictionary payload"


#define _BACKWARD_BACKWARD_WARNING_H
// Inline headers
#ifndef COphit_h
#define COphit_h

#include "TH1S.h"
#include <vector>


namespace WCP{

  class COphit{
  public:
    COphit(int ch_no, TH1S *hist, double time, double gain, double gain_err);
    ~COphit();

    double get_time(){return time;};
    double get_baseline(){return baseline;};
    double get_peak(){return peak;};
    double get_integral(){return integral;};
    double get_gain(){return gain;}
    int get_ch_no(){return channel_no;};

    // derivated ... 
    double get_PE(){return PE;};
    double get_PE_err(){return PE_err;};
    bool get_type(){return good_baseline;};

    
  protected:
    double cal_integral(double peak);
    bool good_baseline;
    
    int channel_no; // FEM channel number
    double gain; // to be set
    double gain_err;
    
    double time; // start time in us ... 
    double baseline; // baseline 
    double peak; // maximum PE
    double integral; // integral 

    double PE;
    double PE_err;
    
  };

  typedef std::vector<COphit*> COphitSelection;
  
}

#endif
#ifndef WIRECELL_CELLCHARGE_H
#define WIRECELL_CELLCHARGE_H

#include "WCPData/GeomCell.h"
#include "WCPData/Point.h"

namespace WCP {

    /// The Cell namespace holds types and functions related to a
    /// single charge on a cell.  The contents of this namespace have
    /// some symmetry with those of the Wire namespace.

    namespace Cell {

	/// An association between a geometry and GeomCell and a charge
	typedef std::pair<const GeomCell*,float> Charge;

	/// A simple collection of Cell::Charge objects.
	typedef std::vector<Charge> Group;

	/// A collection of Cell::Group objects
	typedef std::vector<Group> GroupCollection;

	/// Sum of charges
	double charge(const Group& group);

	/// The charge weighted center of centers.
	WCP::Point center_of_charge(const Group& group);

	/// The total cross section
	double cross_section(const Group& group);

	/// Take a Cell::Group and return a Cell::GroupCollection
	/// which contains one Cell::Charge per group.
	GroupCollection singlets(const Group& group);

    } // namespace WCP::Cell
}     // namespace WCP


#endif
#ifndef WIRECELL_CHANNELCHARGE_H
#define WIRECELL_CHANNELCHARGE_H

#include <map>			// for pair
#include <vector>

namespace WCP {

    /// The Channel namespace holds types and functions related to a
    /// single charge on a channel.  The contents of this namespace
    /// have some symmetry with those of the Cell namespace.

    namespace Channel {

	/// An association between a channel and a charge
	typedef std::pair<int, float> Charge;

	/// A simple collection of Channel::Charge objects.
	typedef std::vector<Charge> Group;

	/// A collection of Channel::Group objects
	typedef std::vector<Group> GroupCollection;

	/// Sum of charges
	double charge(const Group& group);

	/// Take a Channel::Group and return a
	/// Channel::GroupCollection which contains one
	/// Channel::Charge per group.
	GroupCollection singlets(const Group& group);

    }
}    


#endif
#ifndef ClusterTrack_h
#define ClusterTrack_h

#include "WCPData/MergeSpaceCell.h"
#include "TH2F.h"
#include <vector>
#include <map>


namespace WCP {
  
  class ClusterTrack {
  public:
    ClusterTrack(MergeSpaceCell *cell);
    ~ClusterTrack();//{};

    bool AddMSCell(MergeSpaceCell *cell);
    bool AddMSCell_anyway(MergeSpaceCell *cell);
    MergeSpaceCellSelection& Get_allmcells(){return all_mcells;};

    MergeSpaceCell* Get_FirstMSCell(){return all_mcells.front();};
    MergeSpaceCell* Get_LastMSCell(){return all_mcells.back();};

    void SC_Hough(Point& p, float dis = -1, int flag = 1);
    void SC_Hough(Point& p1, Point&p, float dis = -1, int flag = 1);
    Point SC_IterativeHough(Point &p, float dis = 3 * units::cm, int flag = 1);

    int CrossNum(Point &p, float theta, float phi);
    int CrossNum(MergeSpaceCell *mcell1, float theta, float phi);

    float Get_Theta();
    float Get_Phi();

    float Get_CTheta(Point &p);
    float Get_CPhi(Point &p);

  protected:
    MergeSpaceCellSelection all_mcells;
   
    float theta_hough;
    float phi_hough;

    //    TH2F *hough;
    /* std::vector<double> sc_theta; */
    /* std::vector<double> sc_phi; */
    /* std::vector<double> sc_q; */

  };
  
  typedef std::vector<ClusterTrack*> ClusterTrackSelection;
  typedef std::map<ClusterTrack*,MergeSpaceCellSelection> ClusterMSpaceCellMap;
  typedef std::map<MergeSpaceCell*,ClusterTrackSelection> MSpaceCellClusterMap;
}

#endif
#ifndef WCP_DYNAMICTOYPOINTCLOUD_H
#define WCP_DYNAMICTOYPOINTCLOUD_H

#include "WCPNanoflann/nanoflann.h" 
#include "WCPData/WCPointCloud.h"
#include "WCPData/PR3DCluster.h"

#include "TVector3.h"

#include  <map>

typedef nanoflann::KDTreeSingleIndexDynamicAdaptor<
    nanoflann::L2_Simple_Adaptor<double, WCP::WCPointCloud<double> > ,
    WCP::WCPointCloud<double>,
    3 /* dim */
  > my_dynamic_kd_tree_t;

typedef nanoflann::KDTreeSingleIndexDynamicAdaptor<
    nanoflann::L2_Simple_Adaptor<double, WCP::WC2DPointCloud<double> > ,
    WCP::WC2DPointCloud<double>,
    2 /* dim */
  > my_dynamic_kd_tree_2d_t;


namespace WCP{
  class DynamicToyPointCloud{
  public:
    DynamicToyPointCloud(double angle_u = 1.0472, double angle_v = -1.0472, double angle_w = 0);
    ~DynamicToyPointCloud();

    void AddPoints(PR3DCluster* cluster, int flag=0, double step = 0.6*units::cm); // flag 1 points, flag 2 scheleton
    void AddPoints(PointVector& pts, double step = 0.6*units::cm); // directly add points ...
    void AddPoints(ToyPointCloud* point_cloud, double step = 0.6*units::cm);
    
    void AddPoints(PR3DCluster* cluster, Point& p_test, TVector3& dir, double range, double step, double angle);

    std::tuple<double, PR3DCluster*, size_t> get_closest_point_info(WCP::Point& p);
    std::tuple<double, PR3DCluster*, size_t> get_closest_2d_point_info(WCP::Point& p, int plane);
    std::vector<std::tuple<double, PR3DCluster*, size_t>> get_2d_points_info(WCP::Point& p, double radius,  int plane);
    
    
    PR3DCluster* get_cluster(int index);

    std::vector<std::pair<WCP::SlimMergeGeomCell*,Point>> get_closest_points(WCP::Point& p, double radius);
    
    
    std::pair<double,double> HoughTrans(Point& p, double dis);
    TVector3 VHoughTrans(Point& p, double dis);

    WCP::WCPointCloud<double>& get_cloud(){return cloud;};
    int get_num_points();
    
  protected:
    std::vector<std::pair<size_t,double>> get_closest_index(WCP::Point& p, int N); 
    std::vector<std::pair<size_t,double>> get_closest_index(WCP::Point& p, double radius); 

    
    std::vector<std::pair<size_t,double>> get_closest_2d_index(double x, double y, int N, int plane); 
    std::vector<std::pair<size_t,double>> get_closest_2d_index(double x, double y, double radius, int plane);

    
    double angle_u, angle_v, angle_w;
    WCP::WCPointCloud<double> cloud;
    my_dynamic_kd_tree_t *index;
    WCP::WC2DPointCloud<double> cloud_u;
    my_dynamic_kd_tree_2d_t *index_u;
    WCP::WC2DPointCloud<double> cloud_v;
    my_dynamic_kd_tree_2d_t *index_v;
    WCP::WC2DPointCloud<double> cloud_w;
    my_dynamic_kd_tree_2d_t *index_w;

    std::vector<PR3DCluster*> vec_index_cluster;
    
  };
}

#endif
#ifndef WCPData_Edge_h
#define WCPData_Edge_h

#include "WCPData/Point.h"

namespace WCP {
  typedef std::pair<WCP::Point,WCP::Point> Edge;
  typedef std::vector<WCP::Edge> EdgeVector;
  
  static bool operator==(const WCP::Edge& a, const WCP::Edge& b){
    if ((a.first==b.first && a.second == b.second) ||
    	(a.second == b.first && a.first == b.second)){
      return true;
    }else{
      return false;
    }
  }

  static bool CompareEdge(const WCP::Edge& a, const WCP::Edge& b){
    double dis1,dis2,dis3,dis4;
    dis1 = sqrt(pow(a.first.x-b.first.x,2)+pow(a.first.y-b.first.y,2)+pow(a.first.z-b.first.z,2))/units::m;
    dis2 = sqrt(pow(a.second.x-b.second.x,2)+pow(a.second.y-b.second.y,2)+pow(a.second.z-b.second.z,2))/units::m;
    dis3 = sqrt(pow(a.first.x-b.second.x,2)+pow(a.first.y-b.second.y,2)+pow(a.first.z-b.second.z,2))/units::m;
    dis4 = sqrt(pow(a.second.x-b.first.x,2)+pow(a.second.y-b.first.y,2)+pow(a.second.z-b.first.z,2))/units::m;
    if ((dis1<0.0002 && dis2<0.0002) || (dis3 < 0.0002 && dis4 < 0.0002)){
      return true;
    }else{
      return false;
    }
  }
  
  static bool ComparePoint(const WCP::Point& a, const WCP::Point& b){
    double dis = sqrt(pow(a.x-b.x,2)+pow(a.y-b.y,2)+pow(a.z-b.z,2))/units::m;
    if (dis < 0.0002){
      return true;
    }else{
      return false;
    }
  }

  
}

#endif
#ifndef WIRECELL_FLASHTPCBUNDLE_H
#define WIRECELL_FLASHTPCBUNDLE_H

#include "WCPData/PR3DCluster.h"
#include "WCPData/Opflash.h"

namespace WCP{
  class FlashTPCBundle{
  public:
    FlashTPCBundle(Opflash* flash, PR3DCluster *main_cluster, int flash_index_id, int cluster_index_id);
    ~FlashTPCBundle();

    void set_flag_close_to_PMT(bool value){flag_close_to_PMT = value;};
    void set_flag_at_x_boundary(bool value){flag_at_x_boundary = value;};
    
    bool get_flag_close_to_PMT(){return flag_close_to_PMT;};
    bool get_flag_at_x_boundary(){return flag_at_x_boundary;};

    std::vector<double>& get_pred_pmt_light(){return pred_pmt_light;};
    void set_pred_pmt_light(std::vector<double> values){pred_pmt_light = values;};
    Opflash* get_flash(){return flash;};
    void set_flash(Opflash* flash1){flash=flash1;};
    double get_total_pred_light();
    
    PR3DCluster* get_main_cluster(){return main_cluster;};
    void set_main_cluster(PR3DCluster* cluster){main_cluster = cluster;};

    PR3DCluster* get_orig_cluster(){return orig_main_cluster;};
    void set_orig_cluster(PR3DCluster* cluster){orig_main_cluster = cluster;};
    
    PR3DClusterSelection& get_other_clusters(){return other_clusters;};
    PR3DClusterSelection& get_more_clusters(){return more_clusters;};
    void clear_other_clusters(){other_clusters.clear();};
    void clear_more_clusters(){more_clusters.clear();};
    void add_other_cluster(PR3DCluster* cluster){other_clusters.push_back(cluster);};
    
    bool examine_bundle(Double_t *cos_pe_low, Double_t *cos_pe_mid);
    bool examine_bundle(FlashTPCBundle* bundle, Double_t *cos_pe_low, Double_t *cos_pe_mid);
    bool examine_bundle_rank(FlashTPCBundle* bundle, Double_t *cos_pe_low, Double_t *cos_pe_mid);
    void add_bundle(FlashTPCBundle* bundle, Double_t *cos_pe_low, Double_t *cos_pe_mid);
    bool examine_beam_bundle();

    //  bool check_tgm( WCP2dToy::ToyFiducial *fid, double offset_x );
    
    
    double get_chi2(){return chi2;};
    void set_chi2(double value){chi2 = value;}; 
    int get_ndf(){return ndf;};
    void set_ndf(int value){ndf = value;};
    double get_ks_dis(){return ks_dis;};
    void set_ks_dis(double value){ks_dis = value;};
    void set_consistent_flag(bool value){flag_high_consistent = value;};
    bool get_consistent_flag(){return flag_high_consistent;};

    void set_spec_end_flag(bool value){flag_spec_end = value;};
    bool get_spec_end_flag(){return flag_spec_end;};
    bool get_potential_bad_match_flag(){return flag_potential_bad_match;};
    void set_potential_bad_match_flag(bool value){flag_potential_bad_match = value;};
      
    double get_strength(){return strength;};
    void set_strength(double value){ strength = value;};

    void examine_merge_clusters(double dis_cut = 3.6*units::cm);

    int get_flash_index_id(){return flash_index_id;};
    int get_cluster_index_id(){return cluster_index_id;};
    
  private:
    Opflash *flash;
    PR3DCluster *main_cluster;
    PR3DCluster *orig_main_cluster;

    double strength;
    
    int cluster_index_id;
    int flash_index_id;

    bool flag_close_to_PMT;
    bool flag_at_x_boundary;
    bool flag_spec_end;

    bool flag_potential_bad_match;
    
    std::vector<double> pred_pmt_light; // prediction

    double ks_dis;
    double chi2;
    int ndf;
    bool flag_high_consistent;

    // add some varialbes for LM events ...

    // place holder for Brooke ...
    
    PR3DClusterSelection other_clusters; // save every other one 
    PR3DClusterSelection more_clusters;  // save ones satisfying the cut    
  };

  typedef std::vector<FlashTPCBundle*> FlashTPCBundleSelection;

  struct FlashTPCBundleComparePtr {
	bool operator() (FlashTPCBundle* a, FlashTPCBundle* b) const {
	  if (a && b) {
	    if (a->get_flash() && b->get_flash()){
	      if (a->get_flash()->get_flash_id() < b->get_flash()->get_flash_id()){
		return true;
	      }else if (a->get_flash()->get_flash_id() == b->get_flash()->get_flash_id()){
		if (a->get_main_cluster()->get_cluster_id() < b->get_main_cluster()->get_cluster_id()){
		  return true;
		}else{
		  return false;
		}
	      }else{
		return false;
	      }
	    }else if (a->get_flash()==0 && b->get_flash()){
	      return false;
	    }else if (a->get_flash() && b->get_flash()==0){
	      return true;
	    }else if (a->get_flash()==0 && b->get_flash()==0){
	      if (a->get_main_cluster()->get_cluster_id() < b->get_main_cluster()->get_cluster_id()){
		return true;
	      }else{
		return false;
	      }
	    }else{
	      return false;
	    }
	  }
	  return false;
	}
    };

  struct OpflashComparePtr {
    bool operator() (Opflash* a, Opflash* b) const {
      if (a && b) {
	if (a->get_flash_id() < b->get_flash_id()){
	  return true;
	}else{
	  return false;
	}
      }
      return false;
    }
  };

   struct PR3DClusterComparePtr {
    bool operator() (PR3DCluster* a, PR3DCluster* b) const {
      if (a && b) {
	if (a->get_cluster_id() < b->get_cluster_id()){
	  return true;
	}else{
	  return false;
	}
      }
      return false;
    }
  };

  
  
  
  typedef std::set<FlashTPCBundle*, FlashTPCBundleComparePtr> FlashTPCBundleSet;
  typedef std::map<Opflash*, FlashTPCBundleSelection, OpflashComparePtr > Flash_bundles_map;
  typedef std::map<PR3DCluster*, FlashTPCBundleSelection, PR3DClusterComparePtr > Cluster_bundles_map;
  
}


#endif
#ifndef WIRECELL_FRAME_h
#define WIRECELL_FRAME_h

#include "WCPData/Trace.h"

namespace WCP {

    /** Frame - a collection of Trace objects read out over some
     * contemporaneous time period.
     */
    struct Frame {

	Frame(int index=-1, const TraceCollection& traces = TraceCollection());
	void clear();

	/// Index into collection of frames.
	int index;
	/// A collection of traces 
	TraceCollection traces;
    };

};	

#endif
#ifndef GeomWCPData_Cell_h
#define GeomWCPData_Cell_h

#include "WCPData/Units.h"
#include "WCPData/Point.h"
#include "WCPData/Edge.h"
#include "WCPData/GeomWire.h"

#include <set>
#include <vector>
#include <iostream>
#include <list>

namespace WCP {

    /** WCP::Cell - information about one cell
     */
    class GeomCell {
    public:
	GeomCell(int ident = 0, 
		 const PointVector& boundary = PointVector(),
		 int flag = 0); // default is to not turn on edge ... 
	GeomCell(const GeomCell *cell, int flag = 0);

	~GeomCell();
	
	/// A globally unique ID number (0 is illegal)
	int ident() const { return _ident; }
	/// The cross sectional area of cell parallel to wire plane in [length^2] 
	double cross_section() const;
	/// Unbiased "center of mass" of boundary points
	Point center() const;
	/// A list of point giving the outline of the cell.
	PointVector boundary() const { return _boundary;}
	/* EdgeVector edge() const {return _edge;} */
	/* const EdgeVector* redge() const { return &_edge;} */

	bool operator== (const GeomCell &b) const { return this->ident()==b.ident();}
	
	const GeomWire* get_uwire() const{return uwire;};
	const GeomWire* get_vwire() const{return vwire;};
	const GeomWire* get_wwire() const{return wwire;};

	void set_uwire(const GeomWire *wire){uwire = wire;};
	void set_vwire(const GeomWire *wire){vwire = wire;};
	void set_wwire(const GeomWire *wire){wwire = wire;};
	void set_tpc_no(int value){tpc_no = value;};
	int get_face() const{return tpc_no%10;};
	int get_cryo() const{return int(tpc_no/10000.);};
	int get_apa() const{return int((tpc_no-get_cryo()*10000)/10.);};
	int get_tpc_no() const {return tpc_no;};
	
    protected:
	int _ident;
	int tpc_no;
	
	const GeomWire *uwire;
	const GeomWire *vwire;
	const GeomWire *wwire;

	PointVector _boundary;
	//	EdgeVector _edge;
	int order_boundary();
	
	mutable int flag_center;
	mutable int flag_cross_section;
	mutable Point ret;
	mutable double area;

        friend std::ostream & operator<<(std::ostream &os, const GeomCell& gc);
    };

    std::ostream & operator<<(std::ostream &os, const GeomCell& gc);

    /// Compare ident
    struct GeomCellCompare {
      bool operator() (const GeomCell& a, const GeomCell& b) const {
	
	return a.ident() < b.ident();
      }
      
    };

    // ensure the order ...
    struct GeomCellComparep {
      bool operator() (const GeomCell* a, const GeomCell* b) const {

	if (a && b){
	  if (a->ident() != b->ident())
	    return a->ident() < b->ident();
	  else
	    return a < b;
	}
	return false;
      }
    };

    /// Used to store a definitive, ordered set of cells
    typedef std::set<WCP::GeomCell, GeomCellCompare> GeomCellSet;
    
    /// Used to temporarily collect some subset
    typedef std::vector<const WCP::GeomCell*> GeomCellSelection;
    typedef std::vector<WCP::GeomCellSelection> GeomCellSelectionV;
    typedef std::list<const WCP::GeomCell*> GeomCellList;
    typedef std::set<const WCP::GeomCell*, GeomCellComparep> GeomCellSetp;

    typedef std::map<const GeomCell*, float, GeomCellComparep> CellChargeMap; 

    typedef std::map<const GeomCell*, int, GeomCellComparep> CellIndexMap;
    typedef std::map<const Edge*, const GeomCell*> EdgeCellMap;
}
#endif
#ifndef GeomWCPData_Cluster_h
#define GeomWCPData_Cluster_h

#include "WCPData/Units.h"
#include "WCPData/MergeGeomCell.h"

#include <set>
#include <vector>

namespace WCP {
  typedef std::vector<std::set<const MergeGeomCell*>> MergeCellCluster;

  class GeomCluster {
  public:
    GeomCluster(MergeGeomCell& cell);
  
    ~GeomCluster();

    int AddCell(MergeGeomCell &cell); // add a cell, 0, no need to add, 1 add in
    GeomCellSelection get_allcell();
    MergeCellCluster get_ordercell(){return cluster;};

    void MergeCluster(GeomCluster& cluster1);
    

  protected:
    MergeCellCluster cluster; // vector of time 
    GeomCellSelection gcluster; // all merged cell
  };

  typedef std::set<GeomCluster*> GeomClusterSet;
  typedef std::list<GeomCluster*> GeomClusterList;
};

#endif
#ifndef WIRECELL_WIRECELLMAP
#define WIRECELL_WIRECELLMAP

#include "WCPData/GeomCell.h"
#include "WCPData/GeomWire.h"

#include <map>

namespace WCP {

    /**
       Taken together, a (geometry) wire and a cell map provides a
       "binodal mesh" consisting of nodes of type GeomCell and
       Geomwire which connect to each other but not themselves.  Nodes
       hold pointers to the actual objects maintained elsewhere (see
       GeomCellSet and GeomWireSet).
     */

  typedef std::map<const GeomCell*, GeomWireSelection, GeomCellComparep > GeomCellMap;
  typedef std::map<const GeomWire*, GeomCellSelection, GeomWireComparep> GeomWireMap;
  typedef std::map<const GeomWire*, GeomCellList, GeomWireComparep> GeomWireLMap;

  typedef std::map<const GeomWire*, GeomWire*, GeomWireComparep> GeomWireWireMap;
  typedef std::map<const GeomWire*, GeomWireSelection, GeomWireComparep> GeomWireWiresMap;

  typedef std::map<const GeomCell*, GeomCell*, GeomCellComparep > GeomCellCellMap;
  typedef std::map<const GeomCell*, GeomCellSelection, GeomCellComparep > GeomCellCellsMap;
}

#endif
#ifndef GeomWCPData_Wire_h
#define GeomWCPData_Wire_h

#include "WCPData/Units.h"
#include "WCPData/Point.h"
#include "TMath.h"

#include <set>
#include <vector>
#include <list>
#include <iostream>

namespace WCP {

    /// Wire set plane/direction types
  enum WirePlaneType_t {kUwire, kVwire, kYwire, kU1wire, kV1wire, kY1wire, kUnknownWirePlaneType = -1};

    /// A pair of wire plane/direction type and index w/in that plane of wires
    typedef std::pair<WirePlaneType_t, int> WirePlaneIndex;


    /** WCP::GeomWire - geometry information about one wire.

	Any detector application of wire cell must provide wire
	information for this class and satisfy the requirements
	given in the comments on its elements.
    */
    class GeomWire {

    public:
      /*
        GeomWire(int ident = -1,
		 WirePlaneType_t plane = kUnknownWirePlaneType,  
		 int index = -1,
		 int channel = -1,
		 const Point& point1 = Point(),
		 const Point& point2 = Point(),
		 char segment = 0,
		 char face = 0,
		 short apa = 0);
      */
       GeomWire(unsigned int ident = 0,
		WirePlaneType_t plane = kUnknownWirePlaneType,  
		int index = -1,
		int channel = -1,
		const Point& point1 = Point(),
		const Point& point2 = Point(),
		char segment = 0,
		int face = -999,
		short apa = 0,
		short cryo = -1);
       
       ~GeomWire();

	/// Detector-dependent, globally unique ID number.  Negative
	/// is illegal, not guaranteed consecutive.
       int ident() const { return _ident; }
	/// The plane/direction enum of the wire 
	WirePlaneType_t plane() const { return _plane; }
	int iplane() const { return (int)_plane; }

	/// Consecutive, zero-based index into ordered sequence of wires in their plane
	int index() const { return _index; }
	/// Detector-dependent electronics channel number, negative is illegal.
	int channel() const { return _channel; }

	/// Return first end point the wire, in System Of Units
	Point point1() const { return _point1; }
	/// Return second end point the wire, in System Of Units
	Point point2() const { return _point2; }

	/// Return the number of wire segments between the channel
	/// input and this wire.  Wire directly attached to channel
	/// input is segment==0.
	int segment() const { return _segment; }

	/// Return which side of the APA this wire exists.  Nominal or
	/// "front" face is 0, other or "back" face is 1.
	int face() const { return _face; }

	/// Return the APA number associated with this wire.
	int apa() const { return _apa; }

	// Return which cryostat this wire resides.
	int cryo() const { return _cryo; }

	double length() const;
	
	/// Return the plane+index pair.
	WirePlaneIndex plane_index() const { return WirePlaneIndex(_plane, _index); }

	bool operator<(const GeomWire& rhs) const {
	  if (cryo() == rhs.cryo()) {
	    if (apa() == rhs.apa()) {
	      if (face() == rhs.face()) {
		if (plane() == rhs.plane()) {
		  return index() < rhs.index();
		}
		return plane() < rhs.plane();
	      }
	      return face() < rhs.face();
	    }
	    return apa() < rhs.apa();
	  }
	  return cryo() < rhs.cryo();
	}

    protected:
	unsigned int _ident;
	WirePlaneType_t _plane;
	int _index;
	int _channel;
	Point _point1, _point2;
	char _segment;
	int _face;
	short _apa;
	short _cryo;

        friend std::ostream & operator<<(std::ostream &os, const GeomWire& gw);
    };

    std::ostream & operator<<(std::ostream &os, const GeomWire& gw);


    struct GeomWireComparePtr {
	bool operator() (const GeomWire* a, const GeomWire* b) const {
	    if (a && b) {
		return (*a) < (*b);
	    }
	    return false;
	}
    };

    struct GeomWireComparep{
      	bool operator() (const GeomWire* a, const GeomWire* b) const {
	    if (a && b) {
	      if (a->ident() != b->ident())
		return a->ident() < b->ident();
	      else
		return a < b;
	    }
	    return false;
	}
    };
    
    
    typedef std::pair<const GeomWire*, const GeomWire*> GeomWirePair;

    /// Used to store definitive, ordered set of wires
    typedef std::set<GeomWire> GeomWireSet;
    
    typedef std::set<const GeomWire*, GeomWireComparePtr> GeomWirePtrSet;

    /// Used to temporarily construct some sub-set of cells
    typedef std::vector<const GeomWire*> GeomWireSelection;
    typedef std::list<const GeomWire*> GeomWireList;
    typedef std::set<const GeomWire*, GeomWireComparep> GeomWireSetp;

    typedef std::map<const GeomWire*, float, GeomWireComparep> WireChargeMap; 

    typedef std::map<const GeomWire*, int, GeomWireComparep> WireIndexMap;

    /// Sort a GeomWireSelection by plane+index
    void sort_by_planeindex(GeomWireSelection& ws);

    /// Sort a GeomWireSelection by wire id
    void sort_by_ident(GeomWireSelection& ws);
    
    /// Sort a GeomWireSelection by channel
    void sort_by_channel(GeomWireSelection& ws);
	
    typedef std::vector<int> WireSelection;
    typedef std::vector<WireSelection> WireSelectionV;
    typedef std::map<int,WireSelection> WireMap;

    typedef std::map<int,std::pair<int,int>> ChirpMap;

    
        

} // namespace WCP
#endif
#ifndef WIRECELLDATA_INTERSECTION
#define WIRECELLDATA_INTERSECTION

#include "WCPData/Vector.h"

namespace WCP {

    /// Determine if ray hits a square.
    int hit_square(int axis0, 
		   const Vector& bmin, const Vector& bmax, 
		   const Vector& point, const Vector& dir,
		   Vector& hit1, Vector& hit2);

    /// Determine if a ray hits a box.
    int box_intersection(const Vector& bmin, const Vector& bmax, 
			 const Vector& point, const Vector& dir,
			 Vector& hit1, Vector& hit2);

    /** Return the distance from a point a ray to the intersection of the ray and a plane.
     * 
     * \param is a point on the ray.
     *
     * \param is a vector in the direction of the ray, distance is returned in units of its magnitude.
     *
     * \param is a plane defined as the perpendicular distance from the origin to a point on the plane.
     *
     * Caveat: assumes ray actually hits plane.
     */
    double dist_to_plane(const Vector& point, const Vector& dir, const Vector& plane);

    /** Return the dot product of the directions of two vectors. */
    double directional_dot(const Vector& v1, const Vector& v2);
    
}

#endif
#include "WCPData/Units.h"


namespace WCP{

  class LAr{
  public: 
    LAr();
    
    // density of liquid Argon vs. temperature g/cm^3
    double Ldensity(double T);
    // density of gas Argon vs. temperature
    double Gdensity(double T);
    // vapor pressure vs. temperature bar
    double VPressure(double T);
    //Enthalpy: measure of the total energy of a thermodynamics system
    // enthalpy of vaporization in kJ/mol
    double Enthalpy(double T); 
    // Heat Capacity Cp, Cv
    double Cp(double T);
    double Cv(double T);
    //Speed of Sound 
    double SpeedofSound(double T);
    //Isothermal Compressibility  cm^2/dyne  1 Newton = 10^5 dyne
    // -1/V * dV/dp |_T
    double IsoCom(double T);
    // Viscosity  muP *s --> Force = Viscosity * A (area) * velocity / y (separation distance)
    double Viscosity(double T);
    
    //electron lifetime in ms, give a concentration in ppb
    double ele_lifetime(double con_ppb, double T=89*units::kelvin, double E=0.5*units::kilovolt/units::cm, int flag=1);
    double ks_f1(double x, double p0, double p1, double p2, double q1);
    double ks_f2(double x, double p0, double p1, double p2, double q1, double q2);
    double ks_f3(double x, double p0, double p1, double p2, double q1, double q2, double q3);
    
    // Boiling Line
    double BoilAr(double T);
    // Melting Line
    double MeltAr(double T);
    // Sublimation Line
    double SubLimeAr(double T);
    
    
    // Velocity of Ion drift  (theoretical)
    double vDarIonV(double T, double E=0.5*units::kilovolt/units::cm);
    // Velocity of Ion drift (best fit) m/s
    double vDarIon(double T, double E=0.5*units::kilovolt/units::cm);
    //Dielectric constant
    double epsilon(double T);
    //Index of refraction in Gas
    double GInrf(double lambda);
    //Index of refraction in Liquid
    double LInrf(double lambda, double T);
    // Rayleigh Scattering length cm
    double RRLAr(double lambda, double T);
    // Drift velocity
    double vD(double T, double E=0.5*units::kilovolt/units::cm, int flag=1);
    // Drift velocity set I  unit: mm/us
    double vDrift(double T, double E=0.5*units::kilovolt/units::cm);
    //Diffusions flag==1 logintudinal ==2 transverse
    // the sigma_L = sqrt(2*results*Delta_z / E), unit is eV
    double Diffusion(double T, double E=0.5*units::kilovolt/units::cm, int flag=1);
    double fPade(double T, double t0, double p1, double p2, double q1, double q2);
    double fPoly(double T, double t0, double p1, double p2, double p3);
    //Recombinations Birks
    double recombine_Birks(double dEodx, double T, double E=0.5*units::kilovolt/units::cm, int flag=1);
    //Recombinations Box model
    double recombine_Box(double dEodx, double T, double E=0.5*units::kilovolt/units::cm, int flag=1);
    //Electron attachments
    
    
    void print_critical();
    void print_triple();
    void print_boiling();
    
    
    double T_c, p_c, rho_c; //Critical point
    // Critical point occurs under conditions at which no phase boundaries exist
    
    double T_t, p_t; // Triple Point
    // Three phases coexist in equilibruim
    
    double T_NBP;  // Normal Boiling Point
  };

};
#ifndef WIRECELL_LMBDT_H
#define WIRECELL_LMBDT_H

#include "TMVA/Tools.h"
#include "TMVA/Reader.h"
#include "TMVA/MethodCuts.h"
#include "TH1D.h"

namespace WCP{
  class LMBDT{
  public:
    LMBDT(float pred_PE, float flash_PE, float max_PE, float ks_dis,
	  float chi2, float ndf, float cluster_length, 
	  int event_type, int flag_anode, int flag_boundary);
    ~LMBDT();

    void set_BDT_score(double value);
    
    double get_BDT_score_eff_signal(double value, TH1D* signalEff);
    double get_BDT_score_eff_background(double value, TH1D* backgroundEff);
    double get_BDT_score_max_significance(TH1D* signalEff, TH1D* backgroundEff); // S/sqrt(S+B)

    bool isSignal();
    bool isSignal(double value);
    
  private:
    
  protected:
    double bdtScore;
    
    TMVA::Reader *reader;
    
    float pred_PE;
    float flash_PE;
    float max_PE;
    float ks_dis;
    float chi2;
    float ndf;
    float cluster_length;

    int event_type;
    int flag_anode;
    int flag_boundary;

    float mag;
    float shape;
    float chi;
    float max;
    float cluster;
    float pred;
  };
}

#endif
  
#ifndef WCPData_Line_h
#define WCPData_Line_h

#include "WCPData/Point.h"
#include "TVector3.h"

namespace WCP {
  class Line {
  public:
    Line(Point& p1, Point& p2);
    Line(Point& p1, TVector3& dir);
    ~Line();

    void UpdatePoint(int flag, Point &p3);

    double closest_dis(Point &p3);
    double closest_dis(Line &l1);
    std::pair<Point, Point> closest_dis_points(Line &l1);
    
    TVector3& get_dir(){return dir;};
    Point& get_p1(){return p1;};
    Point& get_p2(){return p2;};
    
    void update_dir();
    TVector3& vec(){return dir;};
    void ReverseDir();

  protected:
    Point p1;
    Point p2;
    TVector3 dir;
  };
}


#endif
#ifndef WCPData_MCParticle_h
#define WCPData_MCParticle_h

namespace WCP{
  class MCParticle{
  public: 
    MCParticle(){};
    ~MCParticle(){};

    int pdg;
    float startXYZT[4];
    float endXYZT[4];
    float startMomentum[4];
    std::vector<Point> trajectory;
  };
  
  typedef std::vector<WCP::MCParticle*> MCParticleSelection;

}



#endif
#ifndef MergeClusterTrack_h
#define MergeClusterTrack_h

#include "WCPData/MergeSpaceCell.h"
#include "WCPData/ClusterTrack.h"
#include "TH2F.h"
#include <vector>
#include <map>
#include <set>

namespace WCP{
  class MergeClusterTrack{
  public:
    MergeClusterTrack(ClusterTrack *ctrack);
    
    MergeClusterTrack(MergeSpaceCellSelection& mcells);

    ~MergeClusterTrack();
    
    void Add(ClusterTrack *ctrack, MergeSpaceCell *mcell1);
    
    void Add(MergeSpaceCell *mcell, int flag);
    void Add(MergeClusterTrack *mctrack, MergeSpaceCell *mcell, int flag);
    
    void AddTrack(MergeClusterTrack *mctrack);
    void Organize();

    MergeSpaceCellSelection& Get_allmcells(){return all_mcells;};
    ClusterTrackSelection& Get_ctracks(){return ctracks;};
    
    void Update();

    void SC_Hough(Point& p, float dis = -1, int flag = 1);
    void SC_Hough(Point& p1, Point&p, float dis = -1, int flag = 1);
    Point SC_IterativeHough(Point &p, float dis = 3 * units::cm, int flag = 1);
   
    Point SC_2Hough(Point &p, float dis = 3 * units::cm, int flag = 1);

    ClusterTrack* GetClusterTrack(MergeSpaceCell* vertex);
    MergeSpaceCell* Get_FirstMSCell(){return all_mcells.front();};
    MergeSpaceCell* Get_LastMSCell(){return all_mcells.back();};

    bool CheckCell(MergeSpaceCell* scell);

    float Get_Theta();
    float Get_Phi();

    int Get_TimeLength();
    MergeSpaceCellSelection& Get_MSCS(int time);
    int Get_Time(int time){return times.at(time);};

  protected:
    ClusterTrackSelection ctracks; // save merged clusters ... 
    MergeSpaceCellSelection all_mcells; // save all the merged cells
    MergeSpaceCellList all_mcells_list; // temporary one ... 

    std::vector<MergeSpaceCellSelection> times_mcells;
    std::vector<int> times;
    
    float theta_hough;
    float phi_hough;
    //TH2F *hough;
    
  };

  struct MergeClusterTrackCompare {
    bool operator() (MergeClusterTrack* a, MergeClusterTrack* b) const{
      if (a->Get_allmcells().size() == b->Get_allmcells().size()){
	return a > b;
      }
      return a->Get_allmcells().size() > b->Get_allmcells().size();
    }
  };

  typedef std::vector<MergeClusterTrack*> MergeClusterTrackSelection;
  typedef std::map<MergeSpaceCell*, MergeClusterTrackSelection> MSC_MCT_Map;
  typedef std::set<MergeClusterTrack*, MergeClusterTrackCompare> MergeClusterTrackSet;
}

#endif
#ifndef GeomWCPData_MergeCell_h
#define GeomWCPData_MergeCell_h

#include "WCPData/GeomCell.h"
#include "WCPData/GeomWCPMap.h"

namespace WCP{
  class MergeGeomCell : public WCP::GeomCell {
  public: 
    MergeGeomCell();
    MergeGeomCell(int ident, const WCP::GeomCell& cell);
    MergeGeomCell(int ident, const WCP::MergeGeomCell& cell);
    ~MergeGeomCell();

    double cross_section() const;
    Point center() const;

    bool Connected(const WCP::GeomCell& cell1,const WCP::GeomCell& cell2);
    void AddNewCell(const WCP::GeomCell& cell);
    
    int AddCell(const WCP::GeomCell& cell, double dis = 0.0002 * units::m);
    int AddCell(WCP::MergeGeomCell& cell, double dis = 0.0002 * units::m);


    int GetTimeSlice() const { return time_slice;};
    void SetTimeSlice(int time){time_slice = time;};

    bool Overlap(const WCP::MergeGeomCell& cell, float num = 0.1) const;
    int  Overlap1(const WCP::MergeGeomCell& cell, float num = 0.1) const;
    bool GetContainTruthCell()const {return contain_truth;};
    float GetTruthCharge() const {return truth_charge;};
    void FindEdges();

    //function to find out corner cells, 
    void FindCorners(WCP::GeomCellMap& cmap, WCP::GeomWireMap& wmap);

    WCP::GeomCellSelection get_allcell() const { return cell_all;}
    WCP::GeomCellSelection get_edgecells() const { return edge_cells;}
    WCP::GeomCellSelection get_truthcell() const{return truth_cells;}
    WCP::GeomCellSelection get_cornercells()const { return corner_cells;}
    //std::vector<int>& get_cornercells_index() {return corner_cells_index;}
    WCP::GeomCellSelection get_cornercells(int index1,int index2)const { return corner_cells_group[index1][index2];}
    CellIndexMap get_cornercells_index(){return corner_cells_index;}
      
    void Organize_edge_boundary();

    bool CheckContainTruthCell(WCP::CellChargeMap &ccmap);
    bool IsBlob(){return blob;};
    bool IsSimpleBlob(){return simple_blob;};
    void SetSimpleBlob(bool value){simple_blob = value;};

    int index(int index1, int index2);
    int index1(int index);
    int index2(int index);

    void set_id(int num) const {mcell_id = num;};
    int get_id() const{return mcell_id;};

    GeomWireSelection get_uwires() const{return uwires;};
    GeomWireSelection get_vwires() const{return vwires;};
    GeomWireSelection get_wwires() const{return wwires;};
    GeomWireSelection get_edge_wires() const{return edge_wires;};
    GeomCellSelection& get_edge_cells(){return edge_cells;};

    //hack for now
    std::set<int> ewires;
    
  protected:
    mutable int mcell_id;

    WCP::GeomWireSelection uwires;
    WCP::GeomWireSelection vwires;
    WCP::GeomWireSelection wwires;


    WCP::GeomCellSelection cell_all;
    WCP::GeomCellSelection edge_cells;
    WCP::GeomWireSelection edge_wires;

    WCP::GeomCellSelection corner_cells;
    WCP::GeomCellSelection corner_cells_group[6][6];

    //std::vector<int> corner_cells_index;
    CellIndexMap corner_cells_index;
    
    int time_slice; // illustrate which time slice this is
    bool contain_truth; // whether it contain truth, default is not
    float truth_charge;
    bool blob;
    bool simple_blob;
    bool flag_corner;
    bool flag_edge;

    mutable int flag_center;
    mutable int flag_cross_section;
    mutable double area;
    mutable Point ret;

    WCP::GeomCellSelection truth_cells;
  };

   /// Compare ident
    struct MergeGeomCellCompare {
      bool operator() (const MergeGeomCell* a, const MergeGeomCell* b) const {
	if (a->cross_section() == b->cross_section()) {
	  return a<b;
	}
	return a->cross_section() < b->cross_section();
      }
      
    };
    
    /// Used to store a definitive, ordered set of cells
    typedef std::set<WCP::MergeGeomCell*, MergeGeomCellCompare> MergeGeomCellSet;

    
}
#endif
#ifndef GeomWCPData_MergeWire_h
#define GeomWCPData_MergeWire_h

#include "WCPData/GeomWire.h"
namespace WCP{
  class MergeGeomWire : public WCP::GeomWire{
  public:
    
    MergeGeomWire(int ident, const WCP::GeomWire& wire);
    MergeGeomWire(int ident, const WCP::MergeGeomWire& wire);
    MergeGeomWire(int ident, GeomWireSelection wires);
    MergeGeomWire(const WCP::MergeGeomWire& wire);
    ~MergeGeomWire();

    // int ident() const { return _ident; }
    
    int AddWire(const WCP::GeomWire& wire);
    int AddWire(WCP::MergeGeomWire& wire);
    int GetTimeSlice() const { return time_slice;};
    void SetTimeSlice(int time){time_slice = time;};
    void order_wires();
    
    WCP::GeomWireSelection get_allwire() const{ return wire_all;}
    
  protected:
    bool sort_flag;
    WCP::GeomWireSelection wire_all;
    int time_slice;
  };

  struct MergeGeomWireCompare {
    bool operator() (MergeGeomWire* a, MergeGeomWire *b) const {
      a->order_wires();
      b->order_wires();
      
      if (a->get_allwire().front()->index() < b->get_allwire().front()->index()){
	return true;
      }else if (a->get_allwire().front()->index() > b->get_allwire().front()->index()){
	return false;
      }else{
	if (a->get_allwire().back()->index() < b->get_allwire().back()->index()){
	  return true;
	}else if (a->get_allwire().back()->index() > b->get_allwire().back()->index()){
	  return false;
	}
      }
      
      return false;
    }
  };
  
  typedef std::set<MergeGeomWire*, MergeGeomWireCompare> MergeGeomWireSet;

}

#endif
#ifndef MergeSpaceWCPData_Cell_h
#define MergeSpaceWCPData_Cell_h
#include "WCPData/Point.h"
#include "WCPData/SpaceCell.h"
#include "MergeGeomCell.h"
//#include "WCPData/MergeClusterTrack.h"

#include <vector>
#include <map>
#include <list>
#include <set>

namespace WCP {

    /** WCP::Cell - information about one space cell
     */
    class MergeSpaceCell {
    public:
      MergeSpaceCell(){center_flag = 0; mcell = 0;
	max_y = -1; min_y = 1; max_z = -1; min_z = 1;  
      };
      ~MergeSpaceCell();
	
      void AddSpaceCell(SpaceCell* cell); 
      SpaceCellSelection& Get_all_spacecell(){return all_spacecell;};
      
      bool Overlap(MergeSpaceCell& mcell, float num = 0.1);

      Point& Get_Center();
      float Get_Charge();

      float thickness(){return all_spacecell.front()->thickness();};

      bool CrossCell(Point &p, float theta, float phi, int flag = 0);
      double ClosestDis(Point &p);

      const MergeGeomCell* get_mcell(){return mcell;}
      void set_mcell(const MergeGeomCell *cell){mcell = cell;};

      void CalMinMax();
      double get_dy(){if (max_y < min_y) CalMinMax();
	return fabs(max_y-min_y)/2.;};
      double get_dz(){if (max_z < min_z) CalMinMax();
	return fabs(max_z-min_z)/2.;};
      double get_maxy(){return max_y;};
      double get_maxz(){return max_z;};
      double get_miny(){return min_y;};
      double get_minz(){return min_z;};

      GeomWireSelection get_uwires() const { if(mcell==0){
	  return uwires;
	}else{
	  return mcell->get_uwires();
	}
      };
      GeomWireSelection get_vwires() const { if(mcell==0){
	  return vwires;
	}else{
	  return mcell->get_vwires();
	}
      };
      GeomWireSelection get_wwires() const {if (mcell==0){
	  return wwires;
	}else{
	  return mcell->get_wwires();
	}
      };

      void set_id(int num){mcell_id = num;};
      int get_id(){return mcell_id;};

    protected:
      int mcell_id;
      const MergeGeomCell* mcell;
      int center_flag;
      Point center;
      GeomWireSelection uwires;
      GeomWireSelection vwires;
      GeomWireSelection wwires;
      SpaceCellSelection all_spacecell;

      double max_y, min_y;
      double max_z, min_z;
      
};
    
    struct MergeSpaceCellCompare{
      bool operator() (MergeSpaceCell *a, MergeSpaceCell *b) const {
	
	if (fabs(a->Get_Center().x - b->Get_Center().x) < 0.1*units::mm ){
	  if (a->Get_all_spacecell().size()==b->Get_all_spacecell().size()){
	    return a > b;
	  }
	  return a->Get_all_spacecell().size() > b->Get_all_spacecell().size();
	}
	return a->Get_Center().x < b->Get_Center().x;
      }
    };

    struct MergeSpaceCellCompare1{
      bool operator() (MergeSpaceCell *a, MergeSpaceCell *b) const {
	
	if (fabs(a->Get_Center().x - b->Get_Center().x)<0.1*units::mm){
	  if (a->Get_all_spacecell().size()==b->Get_all_spacecell().size()){
	    return a > b;
	  }
	  return a->Get_all_spacecell().size() > b->Get_all_spacecell().size();
	}
	return a->Get_Center().x > b->Get_Center().x;
      }
    };

     

    /// Used to temporarily collect some subset
    typedef std::vector<WCP::MergeSpaceCell*> MergeSpaceCellSelection;
    typedef std::map<MergeSpaceCell*, MergeSpaceCellSelection> MergeSpaceCellMap;
    typedef std::map<MergeSpaceCell*, MergeSpaceCell*> MergeSpaceCellMap1;
    typedef std::list<WCP::MergeSpaceCell*> MergeSpaceCellList;
    typedef std::map<MergeSpaceCell*, int> MergeSpaceCellCounter;
    typedef std::set<MergeSpaceCell*, MergeSpaceCellCompare> MergeSpaceCellSet;
    typedef std::set<MergeSpaceCell*, MergeSpaceCellCompare1> MergeSpaceCellSet1;

       
    // typedef std::map<MergeSpaceCell*, MergeClusterTrackSelection> MSC_MCT_Map;
    
}
#endif
#ifndef Opflash_h
#define Opflash_h

#include "WCPData/COphit.h"
#include "TH1F.h"
#include <set>

namespace WCP{
  class Opflash{
  public:
    Opflash(COphitSelection &ophits);
    Opflash(TH1F **hist, double start_time, int start_bin, int end_bin, float bin_width=6*15.625/1000.);
    Opflash(int type, int flash_id, double low_time, double high_time, double time, double total_PE, std::vector<int>& fired_channels, double* temp_PE, double* temp_PE_err, std::vector<double>& l1_fired_time, std::vector<double>& l1_fired_pe);
    ~Opflash();

    void Add_l1info(TH1F* hist1, TH1F *hist2, double start_time , int start_bin, int end_bin, float bin_width=6*15.625/1000.);

    void set_flash_id(int value){flash_id = value;};
    //added by London
    void set_flash_type(int value){type = value;};

    int get_flash_id(){return flash_id;};
    
    double get_time(){return time;};
    double get_total_PE(){return total_PE;};
    double get_PE(int ch){return PE[ch];};
    double get_PE_err(int ch){return PE_err[ch];};
    bool get_fired(int ch);
    int get_num_fired(){return fired_channels.size();};

    int get_type(){return type;}
    double get_low_time(){return low_time;};
    double get_high_time(){return high_time;};

    std::vector<double>& get_l1_fired_time(){return l1_fired_time;};
    std::vector<double>& get_l1_fired_pe(){return l1_fired_pe;};
    
    void swap_channels();
    
  protected:
    
    int type;
    int flash_id;
    double low_time;
    double high_time;
    
    double time;
    double total_PE;
    std::vector<int> fired_channels;
    double PE[32];
    double PE_err[32];

    std::vector<double> l1_fired_time;
    std::vector<double> l1_fired_pe;
  };

  struct OpFlashCompare{
    bool operator() (Opflash *a, Opflash *b) const{
      if (a->get_time() < b->get_time()){
	return true;
      }else{
	return false;
      }
    }
  };
  
  typedef std::vector<Opflash*> OpflashSelection;
  typedef std::set<Opflash*, OpFlashCompare> OpFlashSet;
  
}

#endif
#ifndef PMTNoiseROI_h
#define PMTNoiseROI_h

#include <vector>
#include <map>

namespace WCP{
  class PMTNoiseROI{
  public:
    PMTNoiseROI(int start_bin, int end_bin, int peak, int channel, float peak_height);
    ~PMTNoiseROI();

    int get_start_bin(){return start_bin;};
    int get_end_bin(){return end_bin;};
    
    void insert_peak(int peak);
    
    void insert_uwires(int wire_no, float peak_height);
    void insert_vwires(int wire_no, float peak_height);
    

    std::vector<int>& get_peaks(){return peaks;}
    
    std::vector<int>& get_uwires(){return induction_uwires;}
    std::vector<int>& get_vwires(){return induction_vwires;}
    std::vector<int>& get_wwires(){return collection_wwires;}

    std::map<int,float>& get_uwires_peak_heights(){return uwires_peak_heights;} 
    std::map<int,float>& get_vwires_peak_heights(){return vwires_peak_heights;} 
    std::map<int,float>& get_wwires_peak_heights(){return wwires_peak_heights;} 
    
    float get_average_uwires_peak_height(int group); 
    float get_average_vwires_peak_height(int group); 
    
    
    float get_max_uwires_peak_height(int group);
    float get_max_vwires_peak_height(int group);
    
    float get_average_wwires_peak_height(); 
    float get_max_wwires_peak_height();


    std::vector<std::vector<int>>& get_sorted_uwires(){return sorted_ind_uwires;}     
    std::vector<std::vector<int>>& get_sorted_vwires(){return sorted_ind_vwires;}     
    std::vector<int>& get_sorted_wwires(){return sorted_col_wwires;}    
    
    void sort_wires(int nwire=1);
    bool merge_ROI(PMTNoiseROI& ROI);

  private: 
    std::vector<int> peaks;
    int start_bin;
    int end_bin;

    std::map<int,float> uwires_peak_heights;
    std::map<int,float> vwires_peak_heights;
    std::map<int,float> wwires_peak_heights;


    std::vector<int> induction_uwires;
    std::vector<int> induction_vwires;
    std::vector<int> collection_wwires;
    
    std::vector<std::vector<int>> sorted_ind_uwires;
    std::vector<std::vector<int>> sorted_ind_vwires;
    std::vector<int> sorted_col_wwires;
  };
}

#endif
#ifndef WIRECELL_PR3DCLUSTER_H
#define WIRECELL_PR3DCLUSTER_H 

#include "WCPData/SlimMergeGeomCell.h"
#include "WCPData/ToyPointCloud.h"
#include "WCPData/ToyCTPointCloud.h"
#include "TVector3.h"

#include <boost/graph/adjacency_list.hpp>
#include <boost/graph/dijkstra_shortest_paths.hpp>

using namespace boost;



namespace WCP{

  struct VertexProp {
    int index;
    //WCPointCloud<double>::WCPoint wcpoint;
    // add pointer to merged cell
  };
  struct EdgeProp {
    float dist; // edge distance
  };
  
  typedef adjacency_list<vecS, vecS, undirectedS, VertexProp, EdgeProp> MCUGraph;
  typedef graph_traits<MCUGraph>::vertex_descriptor vertex_descriptor;
  typedef graph_traits<MCUGraph>::edge_descriptor edge_descriptor;
  
  
  
  class PR3DCluster{
  public:
    PR3DCluster(int cluster_id);
    ~PR3DCluster();
    void AddCell(SlimMergeGeomCell* mcell, int time_slice);
    // void AddCell(SlimMergeGeomCell* mcell, int *time_slices, int ntime_slice);
    
    int get_cluster_id() const{return cluster_id;};
    void set_cluster_id(int value){cluster_id=value;};
    int get_num_mcells(){return mcells.size();};
    int get_num_points(){return point_cloud->get_num_points(); };
    int get_num_time_slices(){return time_cells_set_map.size();};

    bool judge_vertex(Point& p_test, double asy_cut = 1./3., double occupied_cut = 0.85);
    
    void Remove_duplicated_mcells();
    SMGCSelection Is_Connected(PR3DCluster* cluster1, int offset);
    std::map<int,SMGCSet>& get_time_cells_set_map(){return time_cells_set_map;};
    SMGCSelection& get_mcells(){return mcells;};
    std::map<SlimMergeGeomCell*, std::set<int>>& get_cell_times_set_map(){return cell_times_set_map;};

    void Create_point_cloud(WCP::ToyPointCloud *global_point_cloud = 0);
    ToyPointCloud* get_point_cloud(){return point_cloud;};
    void Update_mcell_cluster_map(std::map<WCP::SlimMergeGeomCell*,WCP::PR3DCluster*>& mcell_cluster_map);

    
    
    void Create_graph();
    void Create_graph(WCP::ToyCTPointCloud& ct_point_cloud);
    
    
    void Establish_close_connected_graph();
    void Connect_graph();
    void Connect_graph(WCP::ToyCTPointCloud& ct_point_cloud);
    void Connect_graph_overclustering_protection(WCP::ToyCTPointCloud& ct_point_cloud);

    
    void Del_graph();

    // protect against over clustering
    std::vector<SMGCSelection> Examine_graph(WCP::ToyCTPointCloud& ct_point_cloud);

    // new set of function ...
    
    void dijkstra_shortest_paths(WCPointCloud<double>::WCPoint& wcp_source);
    void dijkstra_shortest_paths(WCPointCloud<double>::WCPoint& wcp_source, WCP::ToyCTPointCloud& ct_point_cloud);
    void cal_shortest_path(WCPointCloud<double>::WCPoint& wcp_target);
    // void fine_tracking_old(int num_pts_cut = 10);
    
    void fine_tracking(std::map<int,std::map<const GeomWire*, SMGCSelection > >& global_wc_map, int num_pts_cut = 2);
    void organize_wcps_path(std::vector<WCPointCloud<double>::WCPoint>& path_wcps_vec,  double low_dis_limit);
    void organize_wcps_vec_path(std::vector<WCPointCloud<double>::WCPoint>& path_wcps_vec,  double low_dis_limit);
    
    void fill_2d_charge(std::map<int,std::map<const GeomWire*, SMGCSelection > >& global_wc_map, std::map<std::pair<int,int>,std::tuple<double, double, int> >& map_2D_ut_charge, std::map<std::pair<int,int>, std::tuple<double, double, int> >& map_2D_vt_charge, std::map<std::pair<int,int>, std::tuple<double, double, int> >& map_2D_wt_charge);
    
    void form_map_graph_based(std::vector<WCPointCloud<double>::WCPoint>& path_wcps_vec, std::map<std::pair<int,int>,std::tuple<double,double, int> >& map_2D_ut_charge, std::map<std::pair<int,int>,std::tuple<double,double, int> >& map_2D_vt_charge, std::map<std::pair<int,int>,std::tuple<double,double, int> >& map_2D_wt_charge, std::map<int, std::pair<std::set<std::pair<int,int>>, int> >& map_3D_2DU_set, std::map<int,std::pair<std::set<std::pair<int,int>>, int> >& map_3D_2DV_set, std::map<int,std::pair<std::set<std::pair<int,int>>, int> >& map_3D_2DW_set, std::map<std::pair<int,int>,std::set<int>>& map_2DU_3D_set, std::map<std::pair<int,int>,std::set<int>>& map_2DV_3D_set, std::map<std::pair<int,int>,std::set<int>>& map_2DW_3D_set, double end_point_factor=0.6, double mid_point_factor=0.9, int nlevel = 3, double time_cut = 5, double charge_cut = 2000);
    
    void form_map_projection_based(PointVector& ps_vec, std::map<int,std::pair<std::set<std::pair<int,int>>, int> >& map_3D_2DU_set, std::map<int,std::pair<std::set<std::pair<int,int>>, int> >& map_3D_2DV_set, std::map<int,std::pair<std::set<std::pair<int,int>>, int> >& map_3D_2DW_set, std::map<std::pair<int,int>,std::set<int>>& map_2DU_3D_set, std::map<std::pair<int,int>,std::set<int>>& map_2DV_3D_set, std::map<std::pair<int,int>,std::set<int>>& map_2DW_3D_set,std::map<std::pair<int,int>, std::tuple<double, double, int> >& map_2D_ut_charge, std::map<std::pair<int,int>, std::tuple<double, double, int> >& map_2D_vt_charge, std::map<std::pair<int,int>, std::tuple<double, double, int> >& map_2D_wt_charge, double end_point_factor=0.6, double mid_point_factor=0.9, int nlevel = 3, double time_cut = 5, double charge_cut = 2000);
    
    void trajectory_fit(PointVector& ps_vec, std::map<int, std::pair<std::set<std::pair<int,int>>, int> >& map_3D_2DU_set, std::map<int,std::pair<std::set<std::pair<int,int>>, int> >& map_3D_2DV_set, std::map<int,std::pair<std::set<std::pair<int,int>>, int> >& map_3D_2DW_set, std::map<std::pair<int,int>,std::set<int>>& map_2DU_3D_set, std::map<std::pair<int,int>,std::set<int>>& map_2DV_3D_set, std::map<std::pair<int,int>,std::set<int>>& map_2DW_3D_set,std::map<std::pair<int,int>, std::tuple<double, double, int > >& map_2D_ut_charge, std::map<std::pair<int,int>, std::tuple<double, double, int> >& map_2D_vt_charge, std::map<std::pair<int,int>,std::tuple<double, double, int> >& map_2D_wt_charge);
    void organize_ps_path(PointVector& ps_vec,  double low_dis_limit, std::vector<int >& record_ve);
    void merge_path(PointVector& fine_tracking_path_1st, PointVector& fine_tracking_path_2nd, std::vector<int>& record_vec, std::map<int,std::pair<std::set<std::pair<int,int>>, int> >& map_3D_2DU_set, std::map<int,std::pair<std::set<std::pair<int,int>>, int> >& map_3D_2DV_set, std::map<int,std::pair<std::set<std::pair<int,int>>, int> >& map_3D_2DW_set);
    void examine_path(double low_dis_limit);
    
    void dQ_dx_fit(std::map<int,std::map<const GeomWire*, SMGCSelection > >& global_wc_map, double flash_time = 4*units::microsecond);

    double cal_gaus_integral(int tbin, int wbin, double t_center, double t_sigma, double w_center, double w_sigma, int flag=0, double nsigma = 3);
    double cal_gaus_integral_seg(int tbin, int wbin, std::vector<double>& t_centers, std::vector<double>& t_sigmas, std::vector<double>& w_centers, std::vector<double>& w_sigmas, std::vector<double>& weights, int flag=0, double nsigma = 3);
    
    
    std::pair<WCPointCloud<double>::WCPoint,WCPointCloud<double>::WCPoint> get_highest_lowest_wcps();
    std::pair<WCPointCloud<double>::WCPoint,WCPointCloud<double>::WCPoint> get_front_back_wcps();
    std::pair<WCPointCloud<double>::WCPoint,WCPointCloud<double>::WCPoint> get_earliest_latest_wcps();
    std::pair<WCPointCloud<double>::WCPoint,WCPointCloud<double>::WCPoint> get_main_axis_wcps();

    
    std::vector<std::vector<WCPointCloud<double>::WCPoint>> get_extreme_wcps();
    
    
    std::pair<Point,Point> get_two_extreme_points();


    // bool check_neutrino_candidate(WCPointCloud<double>::WCPoint& wcp1 ,WCPointCloud<double>::WCPoint& wcp2, Point& p_vertex, double& angle_change);
    
    
    WCPointCloud<double>::WCPoint get_furthest_wcpoint(WCPointCloud<double>::WCPoint wcp, TVector3 dir, double step = 5*units::cm, int allowed_nstep = 12);
    void adjust_wcpoints_parallel(WCPointCloud<double>::WCPoint& start_wcp, WCPointCloud<double>::WCPoint& end_wcp);

    bool Construct_skeleton();
    bool Construct_skeleton(WCP::ToyCTPointCloud& ct_point_cloud);
    
    void Calc_PCA();
    bool flag_PCA;
    void Calc_PCA(WCP::PointVector& points);
    Vector get_center(){return center;};
    Vector get_PCA_axis(int axis){return PCA_axis[axis];};
    double get_PCA_value(int axis){return PCA_values[axis];};

    std::pair<int,int> get_num_points(Point& p, TVector3& dir);
    std::pair<int,int> get_num_points(Point& p, TVector3& dir, double dis);
    
    std::pair<double,double> HoughTrans(Point& p, double dis);
    TVector3 VHoughTrans(Point& p, double dis);

    std::pair<double,double> HoughTrans(Point& p, double dis, ToyPointCloud *point_cloud1);
    TVector3 VHoughTrans(Point& p, double dis, ToyPointCloud *point_cloud1);
    
    TVector3 calc_dir(Point& p_test, Point& p, double dis);
    TVector3 calc_PCA_dir(Point& p, double dis);
    TVector3 calc_PCA_dir(Point& p, PointVector& pts);
    
    std::pair<Point, double> get_closest_point_along_vec(Point& p_test, TVector3 dir, double test_dis, double dis_step, double angle_cut, double dis_cut);
    
    std::pair<SlimMergeGeomCell*,Point> get_closest_point_mcell(Point& p_test);
   
    
      
    Point calc_ave_pos(Point& p, double dis);
    Point calc_ave_pos(Point& p, int N);
    int get_num_points(Point& p_test, double dis);

    
    std::list<WCPointCloud<double>::WCPoint>& get_path_wcps(){return path_wcps;};
    std::list<SlimMergeGeomCell*>& get_path_mcells(){return path_mcells;};

    bool get_fine_tracking_flag(){return flag_fine_tracking;};
    PointVector& get_fine_tracking_path(){return fine_tracking_path;};
    std::vector<double>& get_dQ(){return dQ;};
    std::vector<double>& get_dx(){return dx;};
    std::vector<double>& get_pu(){return pu;};
    std::vector<double>& get_pv(){return pv;};
    std::vector<double>& get_pw(){return pw;};
    std::vector<double>& get_pt(){return pt;};

    std::map<std::pair<int,int>, std::tuple<double,double,double> > & get_proj_data_u_map(){return proj_data_u_map;};
    std::map<std::pair<int,int>, std::tuple<double,double,double> > & get_proj_data_v_map(){return proj_data_v_map;};
    std::map<std::pair<int,int>, std::tuple<double,double,double> > & get_proj_data_w_map(){return proj_data_w_map;};

    
    TVector3 get_ft_dir_end(float mean_dis, float dis_cut);

    std::vector<PR3DCluster*> examine_x_boundary(double low_limit = -1*units::cm, double high_limit = 257*units::cm);
    
    void print();
    std::string dump_graph();
    std::vector<int> get_uvwt_range();

    void get_projection(std::vector<int>& proj_channel, std::vector<int>& proj_timeslice, std::vector<int>& proj_charge, std::vector<int>& proj_charge_err , std::vector<int>& proj_flag, std::map<int,std::map<const GeomWire*, SMGCSelection > >& global_wc_map);

    void collect_charge_trajectory(ToyCTPointCloud& ct_point_cloud, double dis_cut = 0.6*units::cm, double range_cut = 1.0*units::cm);
    
  protected:

    bool compare_edge(std::tuple<int,int,double>& index1, std::tuple<int,int,double>& index2);
    
    int cluster_id;
    
    SMGCSelection mcells;
    std::map<int,SMGCSet> time_cells_set_map;
    std::map<SlimMergeGeomCell*, std::set<int>> cell_times_set_map;   

    
    ToyPointCloud *point_cloud;
    Vector center;
    
    Vector PCA_axis[3];
    double PCA_values[3];
    // graph 
    MCUGraph *graph;

    // create things for Dijkstra
    std::vector<vertex_descriptor> parents;
    std::vector<int> distances;
    int source_wcp_index;
    // return ... 
    std::list<WCPointCloud<double>::WCPoint> path_wcps;
    std::list<SlimMergeGeomCell*> path_mcells;
    int dest_wcp_index;
    // fine tracking related ...
    bool flag_fine_tracking;
    PointVector fine_tracking_path;
    std::vector<double> dQ;
    std::vector<double> dx;
    std::vector<double> pu;
    std::vector<double> pv;
    std::vector<double> pw;
    std::vector<double> pt;

    std::map<std::pair<int,int>, std::tuple<double,double,double> > proj_data_u_map;
    std::map<std::pair<int,int>, std::tuple<double,double,double> > proj_data_v_map;
    std::map<std::pair<int,int>, std::tuple<double,double,double> > proj_data_w_map;

    /* std::map<std::pair<int,int>, double> pred_u_map; */
    /* std::map<std::pair<int,int>, double> pred_v_map; */
    /* std::map<std::pair<int,int>, double> pred_w_map; */
    
    
    std::map<std::pair<int,int>,std::pair<int,int>> collected_charge_map;
    
  };

  struct PR3DClusterComparep {
      bool operator() (const PR3DCluster* a, const PR3DCluster* b) const {

	if (a && b){
	  /* if (a->get_cluster_id() != b->get_cluster_id()) */
	  /*   return a->get_cluster_id() < b->get_cluster_id(); */
	  /* else */
	  return a < b;
	}
	return false;
      }
    };
  
  typedef std::vector<PR3DCluster*> PR3DClusterSelection;
  
  typedef std::set<PR3DCluster*, PR3DClusterComparep> PR3DClusterSet;
  typedef std::map<PR3DCluster*, double, PR3DClusterComparep> map_pr3dcluster_double;
  typedef std::map<PR3DCluster*, std::vector<std::pair<WCP::PR3DCluster*,double>>, PR3DClusterComparep> map_cluster_cluster_vec;
}

#endif
#ifndef WIRECELL_PHOTON_LIBRARY_H
#define WIRECELL_PHOTON_LIBRARY_H

#include <vector>
#include <map>
#include <list>

namespace WCP{
  class Photon_Library {
  public:
    std::map<int,int> map_lib_pmt, map_pmt_lib;
    std::vector<std::list<std::pair<int,float>>> library;
    double scaling_light_mag, rel_light_yield_err;
    
    Photon_Library(double eventTime, int run_no = 0, bool flag_data = true, bool flag_add_light_yield_err = false, bool flag_timestamp = false);
  };
  
}

#endif
#ifndef WCPData_Plane_h
#define WCPData_Plane_h

#include "WCPData/Line.h"

namespace WCP {
  class Plane{
  public:
    Plane(Point p1, Point p2, Point p3);
    
    bool sameline();
    
    Line& CrossLineCommonPoint(Plane& plane); 

    void cal_perp();
    TVector3& get_perp_vec(){return perp_vec;};

    Point& get_p1(){return p1;};
    Point& get_p2(){return p2;};
    Point& get_p3(){return p3;};

    ~Plane();
  protected:
    Point p1;
    Point p2;
    Point p3;
    
    TVector3 perp_vec;
  };
}

#endif
/** A 3D point of floats
 *
 * See also WCP::Vector.
 *
 * Use Vector unless you need the smaller memory footprint of floats.
 */ 

#ifndef WCPData_Point_h
#define WCPData_Point_h

#include "WCPData/Vector.h"

#include <map>
#include <vector>

namespace WCP {

    typedef D3Vector<float> Point;
    
    typedef std::vector<WCP::Point> PointVector;
    typedef std::pair<WCP::Point, float> PointValue;
    typedef std::vector<WCP::PointValue> PointValueVector;

    /* bool operator==(const WCP::Point& a, const WCP::Point& b){ */
    /*   if (a.x==b.x && a.y==b.y && a.z==b.z){ */
    /* 	return true; */
    /*   }else{ */
    /* 	return false; */
    /*   } */
    /* } */

}
#endif
#ifndef GeomWCPData_Projected2DCluster_h
#define GeomWCPData_Projected2DCluster_h

#include "WCPData/Units.h"
#include "WCPData/SlimMergeGeomCell.h"

#include <vector>
#include <list>
#include <map>

namespace WCP{
  class Projected2DCluster{
  public:
    Projected2DCluster(int ident, WirePlaneType_t plane_no, int id);
    ~Projected2DCluster();
  
    void AddCell(SlimMergeGeomCell *mcell);

    // +1 the 
    int judge_coverage(Projected2DCluster *cluster);

    std::vector<int> calc_coverage(Projected2DCluster *cluster);
    int judge_coverage_alt(Projected2DCluster *cluster);
    
    WirePlaneType_t GetPlaneNo(){return plane_no;};

    int get_number_time_slices(){return time_slice_array.size();};
    int get_low_time_limit(){return time_slice_limit[0];}
    int get_high_time_limit(){return time_slice_limit[1];}
    int get_low_wire_limit(){return wire_limit[0];};
    int get_high_wire_limit(){return wire_limit[1];};
    std::vector<int>& get_time_slice_array(){return time_slice_array;};
    std::map<int, std::list<std::pair<int,int>>>& get_time_wires_map(){return time_wires_map;};
    int get_charge(std::pair<int,int> time_wire){return time_wire_charge_map[time_wire];};
    void Print();
    int get_parent_cluster_id(){return parent_cluster_id;};
    void set_estimated_total_charge(float value){estimated_total_charge = value;};
    float get_estimated_total_charge(){return estimated_total_charge;};
    int calc_dead_time_wire();
    int get_ident() const{return ident;};
    
  protected:
    int ident;
    float estimated_total_charge;
    int parent_cluster_id;
    //GeomCell *parent_cell;
    // which wire plane
    WirePlaneType_t plane_no;
    // range of time slices
    int time_slice_limit[2];
    // range of wires
    int wire_limit[2];

    std::vector<int> time_slice_array;
    std::map<int,std::list<std::pair<int,int>>> time_wires_map;

    std::vector<int> dead_time_slice_array;
    std::map<int,std::list<std::pair<int,int>>> dead_time_wires_map;
    
    std::map<std::pair<int,int>,float> time_wire_charge_map;
  };

  struct Projected2DClusterComparep {
    bool operator() (const Projected2DCluster* a, const Projected2DCluster* b) const {
      
      if (a && b){
	if (a->get_ident() != b->get_ident())
	  return a->get_ident() < b->get_ident();
	else
	  return a < b;
      }
      return false;
    }
  };
}


#endif
#ifndef SignalROI_h
#define SignalROI_h

#include "WCPData/GeomWire.h"

#include "TH1F.h"

#include <iostream>
#include <vector>
#include <list>
#include <map>


namespace WCP{
  class SignalROI{
   public:
    SignalROI(WirePlaneType_t plane, int chid, int start_bin, int end_bin, TH1F *h1);
    SignalROI(SignalROI *roi);
    ~SignalROI();
    int get_start_bin(){return start_bin;}
    int get_end_bin(){return end_bin;}

    int get_ext_start_bin(){return ext_start_bin;}
    int get_ext_end_bin(){return ext_end_bin;}

    void set_ext_start_bin(int a){ext_start_bin = a;}
    void set_ext_end_bin(int a){ext_end_bin = a;}

    int get_chid(){return chid;}
    WirePlaneType_t get_plane(){return plane;}
    std::vector<float>& get_contents(){return contents;}
    std::vector<std::pair<int,int>> get_above_threshold(float th);
    double get_average_heights();
    
    bool overlap(SignalROI *roi);
    bool overlap(SignalROI *roi1, float th, float th1);
    
  private:
    int start_bin;
    int end_bin;
    
    int ext_start_bin;
    int ext_end_bin;
    
    int chid;
    WirePlaneType_t plane;
    std::vector<float> contents;
  };
  
  typedef std::list<SignalROI*>SignalROIList;
  typedef std::vector<SignalROI*> SignalROISelection; 
  typedef std::vector<SignalROISelection> SignalROIChSelection;
  typedef std::vector<SignalROIList> SignalROIChList;
  typedef std::map<SignalROI*, SignalROISelection> SignalROIMap;

  struct CompareRois{
    bool operator() (SignalROI* roi1, SignalROI* roi2) const{
      return roi1->get_start_bin() < roi2->get_start_bin(); 
    }
  };
  
}

#endif
#ifndef WIRECELLDATA_SIMTRUTH
#define  WIRECELLDATA_SIMTRUTH

#include "WCPData/Point.h"

#include <set>

namespace WCP {

    /** WCP::SimTruth - information about simulation truth.
     */
    class SimTruth {
    public:
	SimTruth(float x, float y, float z, float q, int tdc, int trackid=-1);
	~SimTruth();		// do not inherit

	/// The X,Y,Z position of the deposited charge
	Point pos() const { return Point(_x,_y,_z); };
	/// The X position of the deposited charge
	float x() const { return _x; };
	/// The Y position of the deposited charge
	float y() const { return _y; };
	/// The Z position of the deposited charge
	float z() const { return _z; };
	/// The deposited charge
	float charge() const { return _q; };

	/// The TDC time bin where the majority of the deposited charge is collected.
	int tdc() const { return _tdc; };

	/// The simulation-specific ID of the track that produced the charge
	int trackid() const { return _trackid; };

    private:			// do not inherit
	float _x, _y, _z, _q;
	int _tdc, _trackid;

        friend std::ostream & operator<<(std::ostream &os, const SimTruth& st);
    };

    std::ostream & operator<<(std::ostream &os, const SimTruth& st);

    /// Compare SimTruth objects.
    struct SimTruthCompare {
	bool operator() (const SimTruth& a, const SimTruth& b) const {
	    if (a.tdc() < b.tdc()) {
		return true;
	    }
	    if (a.x() > b.x()) {
		return true;
	    }
	    return a.trackid() < b.trackid();
	}
    };


    /// An ordered, owning set of SimTruth objects.
    typedef std::set<WCP::SimTruth, SimTruthCompare> SimTruthSet;

    /// A selection on SimTruthSet.
    typedef std::vector<const SimTruth*> SimTruthSelection;
}

#endif
#ifndef WIRECELL_SINGLETON
#define WIRECELL_SINGLETON

namespace WCP {

    template <class T>
    class Singleton
    {
    public:
	static T& Instance() {
	    static T instance;
	    return instance;
	}

    private:
	Singleton(){}
	~Singleton(){}
	Singleton(Singleton const&){}
	Singleton& operator=(Singleton const&){}
    };
}

#endif
#ifndef WIRECELLDATA_SLICE_H
#define WIRECELLDATA_SLICE_H

#include "WCPData/ChannelCharge.h"

#include <map>
#include <vector>


namespace WCP {

    /// A group of charges measured in channels at a given time bin
    class Slice {
    public:
	Slice(int tbin=-1, const Channel::Group& group = Channel::Group());
	~Slice();

	/// Forget the contents of the slice.
	void clear();

	/// Reset the values
	void reset(int tbin, const Channel::Group& group);
	
        /// Access the Channel::Group
        const Channel::Group& group() const { return _group; }
	Channel::Group& group() { return _group; }

	/// Access the associated time bin
	int tbin() const { return _tbin; }

    private:

	int _tbin;
	Channel::Group _group;

    };

}


#endif
#ifndef GeomWCPData_Slim3DCluster_h
#define GeomWCPData_Slim3DCluster_h

#include "WCPData/Units.h"
#include "WCPData/SlimMergeGeomCell.h"
#include "WCPData/Projected2DCluster.h"
#include "WCPData/Slim3DDeadCluster.h"

#include <set>
#include <vector>

namespace WCP {
  typedef std::vector<SMGCSet> SlimMergeCellCluster;

  class Slim3DCluster {
  public:
    Slim3DCluster(int ident, SlimMergeGeomCell& cell);
  
    ~Slim3DCluster();

    int AddCell(SlimMergeGeomCell &cell, int offset=1); // add a cell, 0, no need to add, 1 add in
    void DirectAddCell(SlimMergeGeomCell &cell);
    void DirectOrderCells();
    
    GeomCellSelection& get_allcell();
    SlimMergeCellCluster& get_ordercell(){return cluster;};

    void MergeCluster(Slim3DCluster& cluster1);

    void Calc_Projection();
    Projected2DCluster* get_projection(WirePlaneType_t plane);
    int get_flag_saved(){return flag_saved;};
    void set_flag_saved(int value){flag_saved = value;};

    int get_flag_saved_1(){return flag_saved_1;};
    void set_flag_saved_1(int value){flag_saved_1 = value;};

    int get_flag_saved_u(){return flag_saved_u;};
    void set_flag_saved_u(int value){flag_saved_u = value;};
    int get_flag_saved_v(){return flag_saved_v;};
    void set_flag_saved_v(int value){flag_saved_v = value;};
    int get_flag_saved_w(){return flag_saved_w;};
    void set_flag_saved_w(int value){flag_saved_w = value;};
    void set_id(int value){id = value;};
    int get_id(){return id;};
    int get_ident() const{return ident;};
    
    float get_total_charge(){return total_charge;};
    float get_min_total_charge(){return min_total_charge;};

    void Form_maps(int offset, std::map<const GeomCell*, GeomCellSelection, WCP::GeomCellComparep>& front_cell_map, std::map<const GeomCell*, GeomCellSelection, WCP::GeomCellComparep>& back_cell_map);

    GeomCellSelection Is_Connected(Slim3DDeadCluster* cluster1 , int offset=1);
    
  protected:
    int id;

    int ident;
    
    int flag_saved;
    int flag_saved_1;
    int flag_saved_u;
    int flag_saved_v;
    int flag_saved_w;


    float total_charge;
    float min_total_charge;
    
    SlimMergeCellCluster cluster; // vector of time 
    GeomCellSelection gcluster; // all merged cell

    Projected2DCluster *u_proj;
    Projected2DCluster *v_proj;
    Projected2DCluster *w_proj;

    /* std::map<const GeomCell*, GeomCellSelection> front_cell_map; */
    /* std::map<const GeomCell*, GeomCellSelection> back_cell_map; */
    
  };

   struct Slim3DClusterComparep {
      bool operator() (const Slim3DCluster* a, const Slim3DCluster* b) const {

	if (a && b){
	  if (a->get_ident() != b->get_ident())
	    return a->get_ident() < b->get_ident();
	  else
	    return a < b;
	}
	return false;
      }
    };

  
   typedef std::set<Slim3DCluster*, Slim3DClusterComparep> Slim3DClusterSet;
   typedef std::list<Slim3DCluster*> Slim3DClusterList;
};

#endif
#ifndef GeomWCPData_Slim3DDeadCluster_h
#define GeomWCPData_Slim3DDeadCluster_h

#include "WCPData/SlimMergeGeomCell.h"
#include <map>

namespace WCP{
  class Slim3DDeadCluster{
  public:
    Slim3DDeadCluster(int ident, SlimMergeGeomCell& cell, int time_slice);
    ~Slim3DDeadCluster();
    
    int AddCell(SlimMergeGeomCell &cell, int time_slice, int offset=1);
    void MergeCluster(Slim3DDeadCluster &cluster1);

    std::map<int,GeomCellSetp>& get_cluster(){return cluster;};
    GeomCellSetp& get_mcells(){return gcluster;};
    std::map<SlimMergeGeomCell*,std::set<int>>& get_mcell_time_map(){return mcell_time_map;};
    
    bool IsContain(SlimMergeGeomCell &cell, int time_slice);

    bool Extend(int time_slice);
    void set_id(int value){id = value;};
    int get_id(){return id;};
    int get_ident() const{return ident;};
    
  protected:
    int id;
    int ident;
    GeomCellSetp gcluster;
    std::map<int,GeomCellSetp> cluster;
    std::map<SlimMergeGeomCell*,std::set<int>> mcell_time_map;
  };

   // ensure the order ...
    struct Slim3DDeadClusterComparep {
      bool operator() (const Slim3DDeadCluster* a, const Slim3DDeadCluster* b) const {

	if (a && b){
	  if (a->get_ident() != b->get_ident())
	    return a->get_ident() < b->get_ident();
	  else
	    return a < b;
	}
	return false;
      }
    };
  
    typedef std::set<Slim3DDeadCluster*, Slim3DDeadClusterComparep> Slim3DDeadClusterSet;
  
}

#endif
#ifndef GeomWCPData_SlimMergeCell_h
#define GeomWCPData_SlimMergeCell_h

#include "WCPData/GeomCell.h"
#include "WCPData/GeomWCPMap.h"
#include <tuple>


namespace WCP{
class SlimMergeGeomCell : public WCP::GeomCell{
  public:

    SlimMergeGeomCell(int ident);
   ~SlimMergeGeomCell();

    /// Unbiased "center of mass" of boundary points
   
   void AddWire(const GeomWire *wire, WirePlaneType_t plane, float charge=0, float charge_err = 0);
   void AddBoundary( const PointVector& boundary );
   void AddSamplingPoints(const PointVector& sampling_points);
   void AddSamplingPointsWires(std::vector<std::tuple<int,int,int>>& sampling_points_wires);
   void SetMaxWireInterval(WirePlaneType_t type, int value);
   void SetMinWireInterval(WirePlaneType_t type, int value);
   //Point get_sampling_points_center();
    
   GeomWireSelection& get_uwires() {return uwires;};
   GeomWireSelection& get_vwires() {return vwires;};
   GeomWireSelection& get_wwires() {return wwires;};
   
   int GetTimeSlice() { return time_slice;}; 
   void SetTimeSlice(int time){time_slice = time;}; 
   
   void OrderWires();
   
   //   int ident() const { return _ident; }
   int GetIdent() {return _ident;};
   std::vector<WirePlaneType_t> get_bad_planes(){return bad_planes;};
   void add_bad_planes(WirePlaneType_t type);
   bool Overlap(WCP::SlimMergeGeomCell* cell, float num=0.1) ;
   bool Overlap_fast(WCP::SlimMergeGeomCell* cell, int offset=1) ;
   
   bool Adjacent(WCP::SlimMergeGeomCell* cell) ;
   
     
   float Get_Wire_Charge(const GeomWire *wire);
   float Get_Wire_Charge_Err(const GeomWire *wire);
   
   float Estimate_total_charge();
   float Estimate_minimum_charge();
   
   bool IsPointGood(int index_u, int index_v, int index_w, int ncut = 3);

   float get_uq(){return uq;};
   float get_vq(){return vq;};
   float get_wq(){return wq;};
   float get_udq(){return udq;};
   float get_vdq(){return vdq;};
   float get_wdq(){return wdq;};
   float get_q(){if (q==0) {return 1;}else{ return q;}}
   Point center() const;

   void set_uq(float value){uq=value;};
   void set_vq(float value){vq=value;};
   void set_wq(float value){wq=value;};
   void set_udq(float value){udq=value;};
   void set_vdq(float value){vdq=value;};
   void set_wdq(float value){wdq=value;};
   void set_q(float value){q=value;};

   bool IsSame(SlimMergeGeomCell* mcell1);

   PointVector& get_sampling_points(){return sample_points;};
   std::vector<std::tuple<int,int,int>>& get_sampling_points_wires(){return sample_points_wires;};
   int get_max_wire_interval(){return max_wire_interval;};
   int get_min_wire_interval(){return min_wire_interval;};
   WirePlaneType_t get_max_wire_type(){return max_wire_type;};
   WirePlaneType_t get_min_wire_type(){return min_wire_type;};

   WCP::WireChargeMap& get_wirecharge_map(){return wirechargemap;};
   WCP::WireChargeMap& get_wirechargeerr_map(){return wirechargeerrmap;};
   
  protected:
   //    int _ident;
    int time_slice;
    float uq, udq, vq, vdq, wq, wdq, q;

    PointVector sample_points;
    std::vector<std::tuple<int,int,int>> sample_points_wires;
    int max_wire_interval, min_wire_interval;
    WirePlaneType_t max_wire_type, min_wire_type;

    
    //int order_boundary();
    WCP::GeomWireSelection uwires;
    WCP::GeomWireSelection vwires;
    WCP::GeomWireSelection wwires;
    std::vector<WirePlaneType_t> bad_planes;

    WCP::WireChargeMap wirechargemap;
    WCP::WireChargeMap wirechargeerrmap;
    
    std::map<int, const WCP::GeomWire* > map_index_uwire;
    std::map<int, const WCP::GeomWire* > map_index_vwire;
    std::map<int, const WCP::GeomWire* > map_index_wwire;
    
  };

 struct SlimMergeCellComparep {
   bool operator() (const SlimMergeGeomCell* a, const SlimMergeGeomCell* b) const {
     if (a && b){
       if (a->ident() != b->ident())
	 return a->ident() < b->ident();
       else
	 return a < b;
     }
     return false;
   }
 };
 
 typedef std::vector<SlimMergeGeomCell*> SMGCSelection;
 typedef std::set<SlimMergeGeomCell*, SlimMergeCellComparep> SMGCSet;
 
}

#endif
#ifndef SpaceWCPData_Cell_h
#define SpaceWCPData_Cell_h

#include "WCPData/Units.h"
#include "WCPData/Point.h"
#include "WCPData/GeomCell.h"

#include <set>
#include <vector>
#include <iostream>
#include <list>

namespace WCP {

    /** WCP::Cell - information about one space cell
     */
    class SpaceCell {
    public:
      SpaceCell(int ncluster, const GeomCell& cell, double x, double q, double thickness);

      ~SpaceCell(){cell = 0;};
	
      double x(){return _x;};
      double y(){return cell->center().y;};
      double z(){return cell->center().z;};
      float q(){return _q;};
      double area(){return cell->cross_section();};
      //   int ncluster(){return _ncluster;};
      float thickness(){return _thickness;};
      PointVector boundary() const{return cell->boundary();};
      const GeomCell* get_cell(){return cell;};
      const GeomWire* get_uwire(){return cell->get_uwire();};
      const GeomWire* get_vwire(){return cell->get_vwire();};
      const GeomWire* get_wwire(){return cell->get_wwire();};
      
      /* double x(){return _x;}; */
      /* double y(){return _y;}; */
      /* double z(){return ;}; */
      /* float q(){return _q;}; */
      /* double area(){return cell->cross_section();}; */
      /* //   int ncluster(){return _ncluster;}; */
      /* float thickness(){return _thickness;}; */
      /* PointVector boundary() const{return cell->boundary();}; */
      /* const GeomCell* get_cell(){return cell;}; */
            

    protected:
      const GeomCell *cell;
      float _q;
      float _thickness;
      double _x;
      // int _ncluster;    


      /* double _x,_y,_z,_q; */
      /* double _thickness; */
      /* double _area; */
      /* PointVector _boundary; */
      /* int _ncluster; */
      
};
    
    /// Used to temporarily collect some subset
    typedef std::vector<WCP::SpaceCell*> SpaceCellSelection;
}
#endif
#ifndef WIRECELL_TPCPARAMS_H
#define WIRECELL_TPCPARAMS_H

#include "TGraph.h"
#include "TString.h"
#include "WCPData/Point.h"

#include "TH3.h"

namespace WCP{
  class TPCParams {
    double m_pitch_u; // wire pitch u
    double m_pitch_v; // wire pitch v
    double m_pitch_w; // wire pitch w
    
    double m_ts_width; // time slice width 2 us * 1.6 mm/us ~ 3.2 mm

    double m_angle_u;
    double m_angle_v;
    double m_angle_w;

    double first_u_dis;
    double first_v_dis;
    double first_w_dis;

    int nrebin;
    int time_offset;

    bool flag_corr;
    TGraph *gu, *gv, *gw;

    TGraph *g_proton, *g_muon, *g_pion, *g_kaon, *g_electron;

    double mass_proton;
    double mass_neutron;
    double mass_muon;
    double mass_pion;
    double mass_neutral_pion;
    double mass_kaon;
    double mass_electron;
    
    TGraph *g_proton_r2ke, *g_muon_r2ke, *g_pion_r2ke, *g_kaon_r2ke, *g_electron_r2ke;

    
    double electron_lifetime; // value in ms ...

    
    bool flag_PosEfield_corr;
    /* TH3F *hDx; */
    /* TH3F *hDy; */
    /* TH3F *hDz; */
    /* TH3F *hEx; */
    /* TH3F *hEy; */
    /* TH3F *hEz; */    
    TH3D *h3_Dx;
    TH3D *h3_Dy;
    TH3D *h3_Dz;
    TH3D *h3_Ex;
    TH3D *h3_Ey;
    TH3D *h3_Ez;
  public:
    TPCParams();
    ~TPCParams();
    
    double get_mass_proton(){return mass_proton;};
    double get_mass_neutron(){return mass_neutron;};
    double get_mass_kaon(){return mass_kaon;};
    double get_mass_pion(){return mass_pion;};
    double get_mass_muon(){return mass_muon;};
    double get_mass_pi0(){return mass_neutral_pion;};
    double get_mass_electron(){return mass_electron;};
    
    // Position and E-field correction for SCE
    void init_Pos_Efield_SCE_correction(TString filename="input_data_files/SCEoffsets_dataDriven_combined_bkwd_Jan18.root");
    bool get_flag_PosEfield_corr() { return flag_PosEfield_corr; }
    double func_dx_after_Pos_Efield_SCE_correction(double p1_x, double p1_y, double p1_z, double pA_x, double pA_y, double pA_z, double p2_x, double p2_y, double p2_z);// unit:: cm,  p1 --> pA --> p2
    double func_dx_after_Pos_Efield_SCE_correction(double p1_x, double p1_y, double p1_z, double pA_x, double pA_y, double pA_z);// unit:: cm,  p1 --> pA

    void set_flag_PosEfield_corr(bool val){flag_PosEfield_corr = val;};
									
    Point func_pos_SCE_correction(Point& pos);
    

    double func_dQdx_from_dEdx_by_ArgoNeut_model(double dEdx, double e, double alpha, double beta)
{
  double result = log(alpha + beta/1.38/e*dEdx)/(23.6e-6*beta/1.38/e);
  return result;
}

    double func_dEdx_from_dQdx(double dQdx, double e, double alpha, double beta)
{
  double result = exp( dQdx * beta * 23.6e-6/1.38/e ) - alpha;
  result = result/( beta/1.38/e );
  return result;
}

    double func_dQdx_after_Pos_Efield_SCE_correction(double pA_x, double pA_y, double pA_z, double dQ, double dx);

    //set/get u first dis
    void set_first_u_dis(double p){ first_u_dis = p;}
    double get_first_u_dis(){return first_u_dis;}

    //set/get u first dis
    void set_first_v_dis(double p){ first_v_dis = p;}
    double get_first_v_dis(){return first_v_dis;}

    //set/get u first dis
    void set_first_w_dis(double p){ first_w_dis = p;}
    double get_first_w_dis(){return first_w_dis;}
    
    // set/get u pitches
    void set_pitch_u(double p) { m_pitch_u = p; }
    double get_pitch_u() { return m_pitch_u; }

    // set/get v pitches
    void set_pitch_v(double p) { m_pitch_v = p; }
    double get_pitch_v() { return m_pitch_v; }
    
    // set/get w pitches
    void set_pitch_w(double p) { m_pitch_w = p; }
    double get_pitch_w() { return m_pitch_w; }
    
    double get_pitch(){return (m_pitch_u + m_pitch_v + m_pitch_w)/3.;};
    
    void set_ts_width(double p){ m_ts_width = p;}
    double get_ts_width(){return m_ts_width;}

    void set_angle_u(double p){m_angle_u = p;}
    double get_angle_u(){return m_angle_u;};

    void set_angle_v(double p){m_angle_v = p;}
    double get_angle_v(){return m_angle_v;};

    void set_angle_w(double p){m_angle_w = p;}
    double get_angle_w(){return m_angle_w;};
    

    void set_time_offset(int p){time_offset = p;};
    int get_time_offset(){return time_offset;};

    void set_nrebin(int p){nrebin = p;};
    int get_nrebin(){return nrebin;};


    void set_electron_lifetime(double p){electron_lifetime = p;};
    double get_electron_lifetime(){return electron_lifetime;};
    double get_attenuation_ratio(double drift_time); // in ms ...

    
    bool get_flag_corr(){return flag_corr;};
    
    // etc for other parameters you need
    void init_corr_files(TString file_u="input_data_files/calib_u_corr.txt", int ndata_u = 2401, TString file_v="input_data_files/calib_v_corr.txt", int ndata_v = 2401, TString file_w="input_data_files/calib_w_corr.txt", int ndata_w = 3457);
    double get_corr_factor(WCP::Point& p, double offset_u, double slope_yu, double slope_zu, double offset_v, double slope_yv, double slope_zv, double offset_w, double slope_yw, double slope_zw);

    void init_PID_dq_dx(TString filename = "input_data_files/stopping_ave_dQ_dx.root", TString filename1 = "input_data_files/ave_range_to_kenergy.root");
    
    TGraph* get_pion_dq_dx(){return g_pion;};
    TGraph* get_proton_dq_dx(){return g_proton;};
    TGraph* get_muon_dq_dx(){return g_muon;};
    TGraph* get_kaon_dq_dx(){return g_kaon;};
    TGraph *get_electron_dq_dx(){return g_electron;};

    TGraph* get_pion_r2ke(){return g_pion_r2ke;};
    TGraph* get_proton_r2ke(){return g_proton_r2ke;};
    TGraph* get_muon_r2ke(){return g_muon_r2ke;};
    TGraph* get_kaon_r2ke(){return g_kaon_r2ke;};
    TGraph *get_electron_r2ke(){return g_electron_r2ke;};
  };
 }


#endif 
#ifndef WCP_TOYCTPOINTCLOUD_H
#define WCP_TOYCTPOINTCLOUD_H

#include "WCPNanoflann/nanoflann.h"
#include "WCPData/WCPointCloud.h"

#include <map>

typedef nanoflann::KDTreeSingleIndexAdaptor<
nanoflann::L2_Simple_Adaptor<double, WCP::CTPointCloud<double> > ,
  WCP::CTPointCloud<double>,
  2 /* dim */
  > my_kd_tree_ct_t;

namespace WCP{
  class ToyCTPointCloud {
  public:
    ToyCTPointCloud(int u_min_ch, int u_max_ch, int v_min_ch, int v_max_ch, int w_min_ch, int w_max_ch, double offset_t, double offset_u, double offset_v, double offset_w, double slope_t, double slope_u, double slope_v, double slope_w, double angle_u = 1.0472, double angle_v = -1.0472, double angle_w = 0);
    ~ToyCTPointCloud();

    void AddPoint(int ch, int time_sice, int charge, int charge_err);
    void AddPoints(std::vector<int> *timesliceId, std::vector<std::vector<int>> *timesliceChannel, std::vector<std::vector<int>> *raw_charge , std::vector<std::vector<int>> *raw_charge_err);
    void AddDeadChs(std::map<int,std::pair<double,double> >& dead_u_index, std::map<int,std::pair<double,double> >& dead_v_index, std::map<int,std::pair<double,double> >& dead_w_index);
    void UpdateDeadChs();
    void build_kdtree_index();

    int get_num_points(int plane);
    WCP::CTPointCloud<double>& get_cloud(int plane);

    bool is_good_point(WCP::Point& p, double radius = 0.6*units::cm, int ch_range = 1, int allowed_bad = 1);
    bool is_good_point_wc(WCP::Point& p, double radius = 0.6*units::cm, int ch_range = 1, int allowed_bad = 1);
    
    std::vector<int> test_good_point(WCP::Point& p, double radius = 0.6*units::cm, int ch_range = 1);
    double get_ave_charge(WCP::Point& p, double radius = 0.3*units::cm, int plane = 0);
    double get_ave_3d_charge(WCP::Point& p, double radius = 0.3*units::cm);
    
    WCP::CTPointCloud<double> get_closest_points(WCP::Point& p, double radius, int plane);
    bool get_closest_dead_chs(WCP::Point& p, int plane, int ch_range=1);
    
    
    std::vector<std::pair<int,int> > get_overlap_dead_chs(int min_time, int max_time, int min_ch, int max_ch, int plane_no, bool flag_ignore_time=false);
    std::map<int, std::pair<int, int> > get_all_dead_chs();
    
    std::map<std::pair<int,int>, std::pair<double,double> > get_overlap_good_ch_charge(int min_time, int max_time, int min_ch, int max_ch, int plane_no);
    
    void Print(WCP::Point &p);

    std::vector<int> convert_3Dpoint_time_ch(WCP::Point& p);
    std::pair<double,double> convert_time_ch_2Dpoint(int timeslice, int channel, int plane);

    std::pair<int,int> get_uch_limits(){return std::make_pair(u_min_ch, u_max_ch);};
    std::pair<int,int> get_vch_limits(){return std::make_pair(v_min_ch, v_max_ch);};
    std::pair<int,int> get_wch_limits(){return std::make_pair(w_min_ch, w_max_ch);};
    
  protected:

    std::vector<std::pair<size_t,double>> get_closest_index(WCP::Point& p, double radius, int plane);

    // channel index, X range (min to max) ...
    std::map<int, std::pair<double, double> > dead_uchs;
    std::map<int, std::pair<double, double> > dead_vchs;
    std::map<int, std::pair<double, double> > dead_wchs;
    
    double angle_u, angle_v, angle_w; // wire angles 
    int u_min_ch, u_max_ch; // channel range for U
    int v_min_ch, v_max_ch; // channel range for V
    int w_min_ch, w_max_ch; // channel range for W 
    
    // convert time into a position
    // (time_slice - offset_t) / slope_t = position_x 
    double offset_t, slope_t;
    
    // convert u wire number into a position
    // (u_index -offset_u) / slope_u = position_u
    double offset_u, slope_u;
    // convert v wire number into a position
    double offset_v, slope_v;
    // convert w wire number into a position 
    double offset_w, slope_w;
      
    WCP::CTPointCloud<double> cloud_u;
    my_kd_tree_ct_t *index_u;
    WCP::CTPointCloud<double> cloud_v;
    my_kd_tree_ct_t *index_v;
    WCP::CTPointCloud<double> cloud_w;
    my_kd_tree_ct_t *index_w;
  };
}


#endif

#ifndef WCP_TOYPOINTCLOUD_H
#define WCP_TOYPOINTCLOUD_H


#include "WCPNanoflann/nanoflann.h" 
#include "WCPData/WCPointCloud.h"
#include "WCPQuickhull/QuickHull.h"
#include "WCPQuickhull/MathUtils.h"

#include "TVector3.h"

#include  <map>

typedef nanoflann::KDTreeSingleIndexAdaptor<
    nanoflann::L2_Simple_Adaptor<double, WCP::WCPointCloud<double> > ,
    WCP::WCPointCloud<double>,
    3 /* dim */
  > my_kd_tree_t;

typedef nanoflann::KDTreeSingleIndexAdaptor<
    nanoflann::L2_Simple_Adaptor<double, WCP::WC2DPointCloud<double> > ,
    WCP::WC2DPointCloud<double>,
    2 /* dim */
  > my_kd_tree_2d_t;



namespace WCP{
  
  class ToyPointCloud {
  public:
    ToyPointCloud(double angle_u = 1.0472, double angle_v = -1.0472, double angle_w = 0);
    ~ToyPointCloud();

    
    // build point cloud
    void AddPoint(WCPointCloud<double>::WCPoint& wcp, WC2DPointCloud<double>::WC2DPoint& wcp_u, WC2DPointCloud<double>::WC2DPoint& wcp_v, WC2DPointCloud<double>::WC2DPoint& wcp_w);
    void AddPoint(WCP::Point& p, std::tuple<int,int,int>& wires_index, WCP::SlimMergeGeomCell *mcell);
    void AddPoint(WCPointCloud<double>::WCPoint& wcp);
    
    void AddPoints(WCP::PointVector& ps, std::vector<std::tuple<int,int,int>>& wires_indices, WCP::SlimMergeGeomCell *mcell);
    void AddPoints(WCP::PointVector& ps);
    void build_kdtree_index();

    // find 3D oiubts
    std::tuple<int,int,double> get_closest_points(ToyPointCloud *point_could);
    std::pair<int,double> get_closest_point_along_vec(Point& p_test, TVector3& dir, double test_dis, double dis_step, double angle_cut, double dis_cut);
    
    
    // hull, not useful ...
    std::vector<WCPointCloud<double>::WCPoint> get_hull();

    // function to find 3D close points
    std::map<WCP::SlimMergeGeomCell*, WCP::Point> get_closest_mcell(WCP::Point& p, int N);
    std::map<WCP::SlimMergeGeomCell*, WCP::Point> get_closest_mcell(WCP::Point& p, double radius);
    std::vector<std::pair<WCP::SlimMergeGeomCell*,Point>> get_closest_points(WCP::Point& p, int N);
    std::vector<std::pair<WCP::SlimMergeGeomCell*,Point>> get_closest_points(WCP::Point& p, double radius);

    double get_closest_dis(WCP::Point& p);
    double get_closest_2d_dis(double x, double y, int plane);
    std::pair<double, int> get_closest_2d_dis_index(double x, double y, int plane);
    
    std::pair<double, WCP::Point> get_closest_point(WCP::Point& p);

    std::vector<WCP::WCPointCloud<double>::WCPoint > get_closest_wcpoints(WCP::Point& p, int N);
    std::vector<WCP::WCPointCloud<double>::WCPoint > get_closest_wcpoints(WCP::Point& p, double radius);

    WCP::Point get_center_point_radius(WCP::Point& p, double radius);
    
    
    WCP::WCPointCloud<double>::WCPoint& get_closest_wcpoint(WCP::WCPointCloud<double>::WCPoint& wcp);
    WCP::WCPointCloud<double>::WCPoint& get_closest_wcpoint(WCP::Point& p);

    //function to find 2D points ... 
    std::vector<size_t> get_closest_2d_index(WCP::Point& p, int N, int plane);
    std::vector<size_t> get_closest_2d_index(WCP::Point& p, double radius, int plane);

    std::pair<int,double> get_closest_2d_dis(WCP::Point& p, int plane);
    
    int get_num_points(){return cloud.pts.size();};
    WCP::WCPointCloud<double>& get_cloud(){return cloud;};
    WCP::WC2DPointCloud<double>& get_cloud_u(){return cloud_u;};
    WCP::WC2DPointCloud<double>& get_cloud_v(){return cloud_v;};
    WCP::WC2DPointCloud<double>& get_cloud_w(){return cloud_w;};
    
    std::vector<int>& get_mcell_indices(WCP::SlimMergeGeomCell* mcell){
      return map_mcell_indices[mcell];
    };
    

    void Print();

    std::vector<std::pair<size_t,double>> get_closest_index(WCP::Point& p, int N);
    
  protected:

    std::vector<std::pair<size_t,double>> get_closest_index(WCP::Point& p, double radius);

    
    std::vector<std::pair<size_t,double>> get_closest_2d_index(double x, double y, int N, int plane);
    std::vector<std::pair<size_t,double>> get_closest_2d_index(double x, double y, double radius, int plane);

    double angle_u, angle_v, angle_w;
    
    
    WCP::WCPointCloud<double> cloud;
    my_kd_tree_t *index;
    WCP::WC2DPointCloud<double> cloud_u;
    my_kd_tree_2d_t *index_u;
    WCP::WC2DPointCloud<double> cloud_v;
    my_kd_tree_2d_t *index_v;
    WCP::WC2DPointCloud<double> cloud_w;
    my_kd_tree_2d_t *index_w;
    
    // map of mcells to WCPoints
    std::map<WCP::SlimMergeGeomCell*, std::vector<int>> map_mcell_indices; 
    
    

  };

  typedef std::vector<ToyPointCloud*> ToyPointCloudSelection;
   
}

#endif
#ifndef WIRECELLDATA_TRACE_H
#define WIRECELLDATA_TRACE_H

#include <vector>
#include "TH1F.h"

namespace WCP {

    /// A disembodied ordered sequence of charge.
    typedef std::vector<float> ChargeSequence;
  
    /** Trace - a charge/time waveform signal on a wire.
      
      Note: zero-suppressed signals may be turned into an ordered
	collection of traces to save memory.

	See also Frame
     */

    struct Trace {
	/// The ID of the electronics channel from which this trace
	/// was read.  Note: use GeomDataSource to resolve wire id.
	int chid;
	
	/// The time bin relative to some absolute time at which the first ADC/charge exists
	int tbin;

	/// The charge in each time bin
	ChargeSequence charge;

        TH1F *hCharge; // same as charge except in the form of a histogram

        double channel_length;
      
    };

    typedef std::vector<Trace> TraceCollection;
}

#endif
#ifndef WCPTrackInfo_h
#define WCPTrackInfo_h

#include "WCPData/Point.h"
#include "WCPData/ToyPointCloud.h"
#include <vector>
#include <map>

namespace WCP{

  class TrackInfo {
  public:
    TrackInfo(WCP::PointVector& tracking_path, std::vector<double>& dQ, std::vector<double>& dx, std::vector<double>& pu, std::vector<double>& pv, std::vector<double>& pw, std::vector<double>& pt, std::vector<double>& reduced_chi2);
    ~TrackInfo();

    WCP::PointVector& get_tracking_path(){return tracking_path;};
    std::vector<double>& get_dQ(){return dQ;};
    std::vector<double>& get_dx(){return dx;};
    std::vector<double>& get_pu(){return pu;};
    std::vector<double>& get_pv(){return pv;};
    std::vector<double>& get_pw(){return pw;};
    std::vector<double>& get_pt(){return pt;};
    std::vector<double>& get_reduced_chi2(){return reduced_chi2;};

    std::pair<double, WCP::Point> get_closest_point(WCP::Point &p); 
    std::tuple<double, double, double> get_closest_2d_dis(WCP::Point &p); 
    
    WCP::TrackInfo* get_parent_track(){return parent_track;};
    std::vector<WCP::TrackInfo*> get_daughter_tracks(){return daughter_tracks;};

   bool AddTrackInfo(WCP::TrackInfo* track, WCP::Point& pos, WCP::Point& self_pos, bool isparent=false);

   std::pair<bool, std::pair<WCP::Point, WCP::Point> > get_track_points(WCP::TrackInfo* track);
   
   double get_medium_dQ_dx();
   double get_track_length(int flag = 1);
   double get_track_length_threshold(double dQ_dx=75000./units::cm);
   
  protected:
    WCP::PointVector tracking_path;
    std::vector<double> dQ;
    std::vector<double> dx;
    std::vector<double> pu;
    std::vector<double> pv;
    std::vector<double> pw;
    std::vector<double> pt;
    std::vector<double> reduced_chi2;

    // point cloud ...
    WCP::ToyPointCloud* pcloud;
    
    // parent information
    WCP::TrackInfo* parent_track;
    std::vector<WCP::TrackInfo*> daughter_tracks;

    // 
    std::map<WCP::TrackInfo*, std::pair<WCP::Point, WCP::Point> > map_track_points;
    
  };

  typedef std::vector<WCP::TrackInfo*> TrackInfoSelection;
  
}

#endif
/**
  A system of units compatible with (taken from) CLHEP.
*/

#ifndef HEP_SYSTEM_OF_UNITS_H
#define HEP_SYSTEM_OF_UNITS_H

namespace units {

  //
  //
  //
  static const double     pi  = 3.14159265358979323846;
  static const double  twopi  = 2*pi;
  static const double halfpi  = pi/2;
  static const double     pi2 = pi*pi;

  // 
  // Length [L]
  //
  static const double millimeter  = 1.;                        
  static const double millimeter2 = millimeter*millimeter;
  static const double millimeter3 = millimeter*millimeter*millimeter;

  static const double centimeter  = 10.*millimeter;   
  static const double centimeter2 = centimeter*centimeter;
  static const double centimeter3 = centimeter*centimeter*centimeter;

  static const double meter  = 1000.*millimeter;                  
  static const double meter2 = meter*meter;
  static const double meter3 = meter*meter*meter;

  static const double kilometer = 1000.*meter;                   
  static const double kilometer2 = kilometer*kilometer;
  static const double kilometer3 = kilometer*kilometer*kilometer;

  static const double parsec = 3.0856775807e+16*meter;

  static const double micrometer = 1.e-6 *meter;             
  static const double  nanometer = 1.e-9 *meter;
  static const double  angstrom  = 1.e-10*meter;
  static const double  fermi     = 1.e-15*meter;

  static const double      barn = 1.e-28*meter2;
  static const double millibarn = 1.e-3 *barn;
  static const double microbarn = 1.e-6 *barn;
  static const double  nanobarn = 1.e-9 *barn;
  static const double  picobarn = 1.e-12*barn;

  // symbols
  static const double nm  = nanometer;                        
  static const double um  = micrometer;                        

  static const double mm  = millimeter;                        
  static const double mm2 = millimeter2;
  static const double mm3 = millimeter3;

  static const double cm  = centimeter;   
  static const double cm2 = centimeter2;
  static const double cm3 = centimeter3;

  static const double m  = meter;                  
  static const double m2 = meter2;
  static const double m3 = meter3;

  static const double km  = kilometer;                   
  static const double km2 = kilometer2;
  static const double km3 = kilometer3;

  static const double pc = parsec;

  //
  // Angle
  //
  static const double radian      = 1.;                  
  static const double milliradian = 1.e-3*radian;
  static const double degree = (pi/180.0)*radian;

  static const double   steradian = 1.;
  
  // symbols
  static const double rad  = radian;
  static const double mrad = milliradian;
  static const double sr   = steradian;
  static const double deg  = degree;

  //
  // Time [T]
  //
  static const double nanosecond  = 1.;
  static const double second      = 1.e+9 *nanosecond;
  static const double millisecond = 1.e-3 *second;
  static const double microsecond = 1.e-6 *second;
  static const double  picosecond = 1.e-12*second;

  static const double hertz = 1./second;
  static const double kilohertz = 1.e+3*hertz;
  static const double megahertz = 1.e+6*hertz;

  // symbols
  static const double ns = nanosecond;
  static const double  s = second;
  static const double ms = millisecond;

  //
  // Electric charge [Q]
  //
  static const double eplus = 1. ;// positron charge
  static const double e_SI  = 1.602176487e-19;// positron charge in coulomb
  static const double coulomb = eplus/e_SI;// coulomb = 6.24150 e+18 * eplus

  //
  // Energy [E]
  //
  static const double megaelectronvolt = 1. ;
  static const double     electronvolt = 1.e-6*megaelectronvolt;
  static const double kiloelectronvolt = 1.e-3*megaelectronvolt;
  static const double gigaelectronvolt = 1.e+3*megaelectronvolt;
  static const double teraelectronvolt = 1.e+6*megaelectronvolt;
  static const double petaelectronvolt = 1.e+9*megaelectronvolt;

  static const double joule = electronvolt/e_SI;// joule = 6.24150 e+12 * MeV

  // symbols
  static const double MeV = megaelectronvolt;
  static const double  eV = electronvolt;
  static const double keV = kiloelectronvolt;
  static const double GeV = gigaelectronvolt;
  static const double TeV = teraelectronvolt;
  static const double PeV = petaelectronvolt;

  //
  // Mass [E][T^2][L^-2]
  //
  static const double  kilogram = joule*second*second/(meter*meter);   
  static const double      gram = 1.e-3*kilogram;
  static const double milligram = 1.e-3*gram;

  // symbols
  static const double  kg = kilogram;
  static const double   g = gram;
  static const double  mg = milligram;

  //
  // Power [E][T^-1]
  //
  static const double watt = joule/second;// watt = 6.24150 e+3 * MeV/ns

  //
  // Force [E][L^-1]
  //
  static const double newton = joule/meter;// newton = 6.24150 e+9 * MeV/mm

  //
  // Pressure [E][L^-3]
  //
  static const double pascal = newton/m2;   // pascal = 6.24150 e+3 * MeV/mm3
  static const double bar        = 100000*pascal; // bar    = 6.24150 e+8 * MeV/mm3
  static const double atmosphere = 101325*pascal; // atm    = 6.32420 e+8 * MeV/mm3

  //
  // Electric current [Q][T^-1]
  //
  static const double      ampere = coulomb/second; // ampere = 6.24150 e+9 * eplus/ns
  static const double milliampere = 1.e-3*ampere;
  static const double microampere = 1.e-6*ampere;
  static const double  nanoampere = 1.e-9*ampere;

  //
  // Electric potential [E][Q^-1]
  //
  static const double megavolt = megaelectronvolt/eplus;
  static const double kilovolt = 1.e-3*megavolt;
  static const double     volt = 1.e-6*megavolt;

  //
  // Electric resistance [E][T][Q^-2]
  //
  static const double ohm = volt/ampere;// ohm = 1.60217e-16*(MeV/eplus)/(eplus/ns)

  //
  // Electric capacitance [Q^2][E^-1]
  //
  static const double farad = coulomb/volt;// farad = 6.24150e+24 * eplus/Megavolt
  static const double millifarad = 1.e-3*farad;
  static const double microfarad = 1.e-6*farad;
  static const double  nanofarad = 1.e-9*farad;
  static const double  picofarad = 1.e-12*farad;

  //
  // Magnetic Flux [T][E][Q^-1]
  //
  static const double weber = volt*second;// weber = 1000*megavolt*ns

  //
  // Magnetic Field [T][E][Q^-1][L^-2]
  //
  static const double tesla     = volt*second/meter2;// tesla =0.001*megavolt*ns/mm2

  static const double gauss     = 1.e-4*tesla;
  static const double kilogauss = 1.e-1*tesla;

  //
  // Inductance [T^2][E][Q^-2]
  //
  static const double henry = weber/ampere;// henry = 1.60217e-7*MeV*(ns/eplus)**2

  //
  // Temperature
  //
  static const double kelvin = 1.;

  //
  // Amount of substance
  //
  static const double mole = 1.;

  //
  // Activity [T^-1]
  //
  static const double becquerel = 1./second ;
  static const double curie = 3.7e+10 * becquerel;
  static const double kilobecquerel = 1.e+3*becquerel;
  static const double megabecquerel = 1.e+6*becquerel;
  static const double gigabecquerel = 1.e+9*becquerel;
  static const double millicurie = 1.e-3*curie;
  static const double microcurie = 1.e-6*curie;
  static const double Bq = becquerel;
  static const double kBq = kilobecquerel;
  static const double MBq = megabecquerel;
  static const double GBq = gigabecquerel;
  static const double Ci = curie;
  static const double mCi = millicurie;
  static const double uCi = microcurie;

  //
  // Absorbed dose [L^2][T^-2]
  //
  static const double      gray = joule/kilogram ;
  static const double  kilogray = 1.e+3*gray;
  static const double milligray = 1.e-3*gray;
  static const double microgray = 1.e-6*gray;

  //
  // Luminous intensity [I]
  //
  static const double candela = 1.;

  //
  // Luminous flux [I]
  //
  static const double lumen = candela*steradian;

  //
  // Illuminance [I][L^-2]
  //
  static const double lux = lumen/meter2;

  //
  // Miscellaneous
  //
  static const double perCent     = 0.01 ;
  static const double perThousand = 0.001;
  static const double perMillion  = 0.000001;

}  // namespace units

#endif /* HEP_SYSTEM_OF_UNITS_H */
/** Vector a 3-vector of double.
 *
 * See also WCP::Point.
 */

#ifndef WIRECELLDATA_VECTOR
#define WIRECELLDATA_VECTOR

#include <iostream>
#include <cmath>
#include <algorithm>
 
namespace WCP {

    /** Dimension-3 vector class.
     *
     * Adapted in laziness from:
     * http://rosettacode.org/wiki/Vector_products#C.2B.2B
     *
     */
    template< class T >
    class D3Vector {
 
	template< class U >
	friend std::ostream & operator<<( std::ostream & , const D3Vector<U> & ) ;   
 
    public :
	T x , y , z, bogus ;  

	D3Vector( T a=0, T b=0, T c=0) : x(a), y(b), z(c) { }
	// copy constructor
	D3Vector( const D3Vector& o) : x(o.x), y(o.y), z(o.z) { }
	// assignment
	D3Vector& operator=(const D3Vector& o) {
	    x = o.x; y = o.y, z = o.z;
	    return *this;
	}
	// compare
	
	// convert
	template< class TT >
	D3Vector( const D3Vector<TT>& o) : x(o.x), y(o.y), z(o.z) { }
 
	T operator[](std::size_t index) const {
	    if (index == 0) return x;
	    if (index == 1) return y;
	    if (index == 2) return z;
	    return bogus;
	}
	T& operator[](std::size_t index) {
	    if (index == 0) return x;
	    if (index == 1) return y;
	    if (index == 2) return z;
	    return bogus;
	}
	    
	/// Return the vector sum of this vector and the other.
	D3Vector<T> sum( const D3Vector & rhs ) const {
	    return D3Vector(x+rhs.x, y+rhs.y, z+rhs.z);
	}

	/// Return the dot product of this vector and the other.
	T dot ( const D3Vector & rhs ) const {
	    T scalar = x * rhs.x + y * rhs.y + z * rhs.z ;
	    return scalar;
	}
 
	/// Return the magnitude of this vector.
	T magnitude() const {
	    return std::sqrt(x*x+y*y+z*z);
	}

	/// Return a normalized vector in the direction of this vector.
	D3Vector norm() const {
	    T m = this->magnitude();
	    if (m <= 0) {
		return D3Vector();
	    }
	    return D3Vector(x/m, y/m, z/m);
	}	    

	/// Return the cross product of this vector and the other.
	D3Vector cross ( const D3Vector & rhs ) const {
	    T a = y * rhs.z - z * rhs.y ;
	    T b = z * rhs.x - x * rhs.z ;
	    T c = x * rhs.y - y * rhs.x ;
	    D3Vector product( a , b , c ) ;
	    return product ;
	}
 
	/// Return the triple cross product of this vector and the other two.
	D3Vector triplevec( D3Vector & a , D3Vector & b ) const {
	    return cross ( a.cross( b ) ) ;
	}
	/// Return the dot-cross product of this vector and the other two. 
	T triplescal( D3Vector & a, D3Vector & b ) const {
	    return dot( a.cross( b ) ) ;
	}
 
    } ;
 
    template< class T >
    std::ostream & operator<< ( std::ostream & os , const D3Vector<T> & vec ) {
	os << "("  << vec.x << " " << vec.y << " " << vec.z << ")" ;
	return os ;
    }

    template< class T >
    D3Vector<T> operator-(const D3Vector<T> a, const D3Vector<T> b) {
	return D3Vector<T>(a.x-b.x, a.y-b.y, a.z-b.z);
    }

    template< class T >
    D3Vector<T> operator+(const D3Vector<T> a, const D3Vector<T> b) {
	return D3Vector<T>(a.x+b.x, a.y+b.y, a.z+b.z);
    }

    template< class T >
    D3Vector<T> operator*(const D3Vector<T> a, T s) {
	return D3Vector<T>(a.x*s, a.y*s, a.z*s);
    }
    
    template< class T >
    bool operator==(const D3Vector<T>& a,const D3Vector<T>& b){
      if (a.x==b.x&& a.y==b.y && a.z==b.z){
	return true;
      }else{
	return false;
      }
    }
    
    template< class T >
    D3Vector<T> operator*(T s, const D3Vector<T> a) {
	return a*s;
    }


//    template< class T >
//    std::pair< float, float >
//    box_interesect(const D3Vector<T>& minbound, const D3Vector<T>& maxbound,
//		   const D3Vector<T>& point, const D3Vector<T>& ray)


} // namespace WCP

namespace WCP {
    typedef WCP::D3Vector<double> Vector;
    typedef std::pair< WCP::Vector, WCP::Vector > VectorPair;
}

#endif
#ifndef GeomWCPData_WCPOINT_CLOUD_H
#define GeomWCPData_WCPOINT_CLOUD_H

#include "WCPData/SlimMergeGeomCell.h"

namespace WCP{
  
  template <typename T>
    struct WCPointCloud
    {
      struct WCPoint
      {
	T  x,y,z;
	SlimMergeGeomCell *mcell;
	int index_u, index_v, index_w;
	int index;
      };
      
      std::vector<WCPoint>  pts;
      
      // Must return the number of data points
      inline size_t kdtree_get_point_count() const { return pts.size(); }
      inline SlimMergeGeomCell* get_mcell(const size_t idx) const { return pts[idx].mcell;}
      
      // Returns the dim'th component of the idx'th point in the class:
      // Since this is inlined and the "dim" argument is typically an immediate value, the
      //  "if/else's" are actually solved at compile time.
      inline T kdtree_get_pt(const size_t idx, int dim) const
      {
	if (dim == 0) return pts[idx].x;
	else if (dim == 1) return pts[idx].y;
	else return pts[idx].z;
      }
      
      // Optional bounding-box computation: return false to default to a standard bbox computation loop.
      //   Return true if the BBOX was already computed by the class and returned in "bb" so it can be avoided to redo it again.
      //   Look at bb.size() to find out the expected dimensionality (e.g. 2 or 3 for point clouds)
      template <class BBOX>
      bool kdtree_get_bbox(BBOX& /* bb */) const { return false; }
      
    };


  template <typename T>
    struct WC2DPointCloud
    {
      struct WC2DPoint
      {
	T  x,y;
	int index;
      };
      
      std::vector<WC2DPoint>  pts;
      
      // Must return the number of data points
      inline size_t kdtree_get_point_count() const { return pts.size(); }
      
      // Returns the dim'th component of the idx'th point in the class:
      // Since this is inlined and the "dim" argument is typically an immediate value, the
      //  "if/else's" are actually solved at compile time.
      inline T kdtree_get_pt(const size_t idx, int dim) const
      {
	if (dim == 0) return pts[idx].x;
	else if (dim == 1) return pts[idx].y;
      }
      
      // Optional bounding-box computation: return false to default to a standard bbox computation loop.
      //   Return true if the BBOX was already computed by the class and returned in "bb" so it can be avoided to redo it again.
      //   Look at bb.size() to find out the expected dimensionality (e.g. 2 or 3 for point clouds)
      template <class BBOX>
      bool kdtree_get_bbox(BBOX& /* bb */) const { return false; }
      
    };


  template <typename T>
    struct CTPointCloud
    {
      struct CTPoint
      {
	T  x,y;
	int channel;
	int time_slice;
	int charge;
	int charge_err;
	int index;
      };
      
      std::vector<CTPoint>  pts;
      
      // Must return the number of data points
      inline size_t kdtree_get_point_count() const { return pts.size(); }
      
      // Returns the dim'th component of the idx'th point in the class:
      // Since this is inlined and the "dim" argument is typically an immediate value, the
      //  "if/else's" are actually solved at compile time.
      inline T kdtree_get_pt(const size_t idx, int dim) const
      {
	if (dim == 0) return pts[idx].x;
	else if (dim == 1) return pts[idx].y;
      }
      
      // Optional bounding-box computation: return false to default to a standard bbox computation loop.
      //   Return true if the BBOX was already computed by the class and returned in "bb" so it can be avoided to redo it again.
      //   Look at bb.size() to find out the expected dimensionality (e.g. 2 or 3 for point clouds)
      template <class BBOX>
      bool kdtree_get_bbox(BBOX& /* bb */) const { return false; }
      
    };

  
}

#endif
#ifndef WCShower_h
#define WCShower_h

#include "WCPData/WCVertex.h"
#include "WCPData/MergeSpaceCell.h"

namespace WCP{
  
  class WCShower{
  public:
    WCShower(WCVertex *vertex, WCTrack *track, MergeSpaceCellSelection& exclude_cells,MergeSpaceCellMap& mcells_map);
    ~WCShower();
	    
    MergeSpaceCellSelection& get_all_cells(){return all_mcells;};

    void Iterate(MergeSpaceCell *curr_cell, WCP::MergeSpaceCellSelection &curr_cells);
    
    void SC_Hough(Point p);
    float SC_proj_Hough(Point p);

    float Get_Theta(){return theta_hough;};
    float Get_Phi(){return phi_hough;};
    
    WCVertex* get_vertex(){return vertex;};
    WCTrack* get_track(){return track;};

    bool IsShower(MergeSpaceCellSelection& mcells);
    bool IsShower_CheckVertex();
    bool IsContained(WCShower *shower);
    bool Contain(WCTrack *track);
    bool Overlap(WCShower *shower);
    
    float distance_to_center();

  protected:
    WCVertex *vertex;
    WCTrack *track;
    MergeSpaceCellSelection all_mcells;
    MergeSpaceCellSelection& exclude_mcells;
    MergeSpaceCellMap& mcells_map;

    float theta_hough;
    float phi_hough;

    int ncell_out_range;
    int ncell_angle_out_range;
    int ncell_total;
    int nmcell_out_range;
    int nmcell_total;
  };
  
  typedef std::vector<WCShower*> WCShowerSelection;
  
}

#endif
#ifndef WCTrack_h
#define WCTrack_h

#include "WCPData/MergeClusterTrack.h"
//#include "WCPData/WCVertex.h"
#include <vector>
#include <map>

namespace WCP {
  class WCTrack{
  public:
    WCTrack(MergeClusterTrack& mct);
    WCTrack(MergeSpaceCellSelection& mcells);
    ~WCTrack();
    MergeClusterTrack& get_mct(){return *mct;};
    int TrackType(MergeSpaceCell& cell);
    MergeSpaceCellSelection& get_end_scells(){return end_scells;};
    MergeSpaceCellSelection& get_all_cells(){return all_cells;};

    MergeSpaceCell* replace_end_scells(MergeSpaceCell* cell, MergeSpaceCellSelection* cells=0);
    void ModifyCells();
    void ReplaceEndCell(MergeSpaceCell *cell1, MergeSpaceCell *cell2);
    bool Grow(MergeSpaceCell *cell, int flag = 1); 

    bool fine_tracking(int ntrack_p1, Point &p1, double ky1, double kz1, 
		       int ntrack_p2, Point &p2, double ky2, double kz2,
		       int flag = 0);

    PointVector& get_centerVP(){return centerVP;};
    MergeSpaceCellSelection& get_centerVP_cells(){return centerVP_cells;};
    std::vector<double>& get_centerVP_theta(){return centerVP_theta;};
    std::vector<double>& get_centerVP_phi(){return centerVP_phi;};
    std::vector<float>& get_centerVP_energy(){return centerVP_energy;};
    std::vector<float>& get_centerVP_dedx(){return centerVP_dedx;};

    MergeSpaceCellSelection& get_associated_cells(){return associated_cells;};

    int get_fine_tracking_flag(){return fine_tracking_flag;};
    
    bool IsContained(MergeSpaceCell *mcell);
    bool IsBadTrack();
    void reset_fine_tracking();
    bool IsConnected(WCTrack *track1);

    double dist(MergeSpaceCell*mcell,SpaceCell *cell);
    double dist_proj(MergeSpaceCell *mcell, SpaceCell *cell, int flag = 0, float angle=0);
    
    double get_range(){return range;};


    bool Inside(WCTrack *track);
    MergeSpaceCellSelection& get_between_cells();


    std::vector<float> get_direction();
    std::vector<float> get_position();

  protected:
    MergeClusterTrack* mct;
    MergeSpaceCellSelection end_scells;
    MergeSpaceCellSelection all_cells;
    MergeSpaceCellSelection between_cells;

    PointVector centerVP;
    MergeSpaceCellSelection centerVP_cells;
    std::vector<double> centerVP_theta;
    std::vector<double> centerVP_phi;
    std::vector<float> centerVP_energy;
    std::vector<float> centerVP_dedx;

    MergeSpaceCellSelection associated_cells;
    
    Point fp1;
    Point fp2;
    int ntrack_fp1;
    int ntrack_fp2;

    double range;

    int fine_tracking_flag;

  };

  typedef std::vector<WCTrack*> WCTrackSelection;
  typedef std::map<WCTrack*,int> WCTrackCounter;
  typedef std::map<MergeClusterTrack*,WCTrack*> MCT_WCT_Map;
  //typedef std::map<WCTrack*, WCVertexSelection> WCT_WCV_Map;
}

#endif
#ifndef WCVertex_h
#define WCVertex_h

#include "WCPData/Point.h"
#include "WCPData/MergeSpaceCell.h"
#include "WCPData/WCTrack.h"


//#include "Minuit2/Minuit2Minimizer.h"
//#include "Math/Functor.h"
#include "Minuit2/FCNBase.h"



#include <vector>
#include <map>

namespace WCP {
  class WCVertex {
    
  public:
    Point Center();
    WCVertex(MergeSpaceCell& msc);
    ~WCVertex();
    void Add(WCTrack* track);
    int get_ntracks(){return tracks.size();};
    WCTrackSelection& get_tracks(){return tracks;};
    MergeSpaceCell* get_msc(){return msc;};
    void set_msc(MergeSpaceCell * cell){msc=cell;};
    void set_center(Point &p){
      center.x = p.x;
      center.y = p.y;
      center.z = p.z;
    }

    float center_dist();

    int IsInside(WCVertex *vertex);
    bool AddVertex(WCVertex *vertex, int flag = 1);
    bool CheckContain(MergeSpaceCell *cell);
    WCVertex* OrganizeTracks();
    WCTrackSelection BreakTracks();
    WCTrackSelection BreakTracksAngle(WCTrackSelection& finished_tracks);

    void ProcessTracks(WCTrackSelection& break_tracks);
    void OrganizeEnds(MergeSpaceCellSelection& cells, int flag = 1);
    // static double dis2(const double *xx);
    bool FindVertex(int flag = 0);

    void set_ky(WCTrack* track, double ky);
    void set_kz(WCTrack* track, double kz);
   
    double get_ky(WCTrack *track);
    double get_kz(WCTrack *track);

    double get_ky(int i){return tracks_ky.at(i);}
    double get_kz(int i){return tracks_kz.at(i);}
    int get_fit_type(){return fit_type;};
    bool get_fit_success(){return fit_success;};
    bool get_fit_chi2(){return fit_chi2;};
    void reset_center();

    bool MergeVertex(WCVertex *vertex);
    
  protected:
    int fit_type;

    bool fit_success;
    double fit_chi2;

    Point center;
    MergeSpaceCell *msc;
    WCTrackSelection tracks;
    std::vector<double> tracks_ky;
    std::vector<double> tracks_kz;
  };
  
  typedef std::vector<WCVertex*> WCVertexSelection;
  typedef std::map<MergeSpaceCell*, WCVertex*> MSC_WCV_Map;
  //typedef std::map<WCTrack*, WCVertexSelection> WCT_WCVs_Map;


  class MyFCN : public ROOT::Minuit2::FCNBase { 
    
  public: 
    double Up() const { return 1.; }
    
  MyFCN(WCVertex* vertex, int fit_flag) 
      : vertex(vertex)
      , fit_flag(fit_flag)
      {}
    
    ~MyFCN(){}
        
    double operator() (const std::vector<double> & xx) const;
    double get_chi2(const std::vector<double> & xx) const;

  private:
    WCVertex *vertex;
    int fit_flag;
  };

}

#endif
#ifndef WIRECELL_WIRECHARGE_H
#define WIRECELL_WIRECHARGE_H

#include "WCPData/GeomWire.h"

namespace WCP {

    /// The Wire namespace holds types and functions related to a
    /// single charge on a wire.  The contents of this namespace have
    /// some symmetry with those of the Cell namespace.

    namespace Wire {

	/// An association between a geometry and GeomWire and a charge
	typedef std::pair<const GeomWire*,float> Charge;

	/// A simple collection of Wire::Charge objects.
	typedef std::vector<Charge> Group;

	/// A collection of Wire::Group objects
	typedef std::vector<Group> GroupCollection;

	/// Sum of charges
	double charge(const Group& group);

	/// Take a Wire::Group and return a Wire::GroupCollection which
	/// contains one Wire::Charge per group.
	GroupCollection singlets(const Group& group);

    } // namespace WCP::Wire
}     // namespace WCP


#endif

#undef  _BACKWARD_BACKWARD_WARNING_H
)DICTPAYLOAD";
    static const char* classesHeaders[] = {
"WCP::CellChargeMap", payloadCode, "@",
"WCP::CellIndexMap", payloadCode, "@",
"WCP::ChargeSequence", payloadCode, "@",
"WCP::D3Vector<double>", payloadCode, "@",
"WCP::D3Vector<float>", payloadCode, "@",
"WCP::Frame", payloadCode, "@",
"WCP::GeomCell", payloadCode, "@",
"WCP::GeomCellMap", payloadCode, "@",
"WCP::GeomCellSelection", payloadCode, "@",
"WCP::GeomCellSet", payloadCode, "@",
"WCP::GeomCluster", payloadCode, "@",
"WCP::GeomClusterSet", payloadCode, "@",
"WCP::GeomWire", payloadCode, "@",
"WCP::GeomWireMap", payloadCode, "@",
"WCP::GeomWireSelection", payloadCode, "@",
"WCP::GeomWireSet", payloadCode, "@",
"WCP::GeomWireWireMap", payloadCode, "@",
"WCP::GeomWireWiresMap", payloadCode, "@",
"WCP::MergeCellCluster", payloadCode, "@",
"WCP::MergeGeomCell", payloadCode, "@",
"WCP::MergeGeomCellSet", payloadCode, "@",
"WCP::MergeGeomWire", payloadCode, "@",
"WCP::Point", payloadCode, "@",
"WCP::PointVector", payloadCode, "@",
"WCP::Slice", payloadCode, "@",
"WCP::Trace", payloadCode, "@",
"WCP::Vector", payloadCode, "@",
"WCP::VectorPair", payloadCode, "@",
"WCP::WireChargeMap", payloadCode, "@",
"WCP::WireIndexMap", payloadCode, "@",
"WCP::box_intersection", payloadCode, "@",
"units::Bq", payloadCode, "@",
"units::Ci", payloadCode, "@",
"units::GBq", payloadCode, "@",
"units::GeV", payloadCode, "@",
"units::MBq", payloadCode, "@",
"units::MeV", payloadCode, "@",
"units::PeV", payloadCode, "@",
"units::TeV", payloadCode, "@",
"units::ampere", payloadCode, "@",
"units::angstrom", payloadCode, "@",
"units::atmosphere", payloadCode, "@",
"units::bar", payloadCode, "@",
"units::barn", payloadCode, "@",
"units::becquerel", payloadCode, "@",
"units::candela", payloadCode, "@",
"units::centimeter", payloadCode, "@",
"units::centimeter2", payloadCode, "@",
"units::centimeter3", payloadCode, "@",
"units::cm", payloadCode, "@",
"units::cm2", payloadCode, "@",
"units::cm3", payloadCode, "@",
"units::coulomb", payloadCode, "@",
"units::curie", payloadCode, "@",
"units::deg", payloadCode, "@",
"units::degree", payloadCode, "@",
"units::eV", payloadCode, "@",
"units::e_SI", payloadCode, "@",
"units::electronvolt", payloadCode, "@",
"units::eplus", payloadCode, "@",
"units::farad", payloadCode, "@",
"units::fermi", payloadCode, "@",
"units::g", payloadCode, "@",
"units::gauss", payloadCode, "@",
"units::gigabecquerel", payloadCode, "@",
"units::gigaelectronvolt", payloadCode, "@",
"units::gram", payloadCode, "@",
"units::gray", payloadCode, "@",
"units::halfpi", payloadCode, "@",
"units::henry", payloadCode, "@",
"units::hertz", payloadCode, "@",
"units::joule", payloadCode, "@",
"units::kBq", payloadCode, "@",
"units::keV", payloadCode, "@",
"units::kelvin", payloadCode, "@",
"units::kg", payloadCode, "@",
"units::kilobecquerel", payloadCode, "@",
"units::kiloelectronvolt", payloadCode, "@",
"units::kilogauss", payloadCode, "@",
"units::kilogram", payloadCode, "@",
"units::kilogray", payloadCode, "@",
"units::kilohertz", payloadCode, "@",
"units::kilometer", payloadCode, "@",
"units::kilometer2", payloadCode, "@",
"units::kilometer3", payloadCode, "@",
"units::kilovolt", payloadCode, "@",
"units::km", payloadCode, "@",
"units::km2", payloadCode, "@",
"units::km3", payloadCode, "@",
"units::lumen", payloadCode, "@",
"units::lux", payloadCode, "@",
"units::m", payloadCode, "@",
"units::m2", payloadCode, "@",
"units::m3", payloadCode, "@",
"units::mCi", payloadCode, "@",
"units::megabecquerel", payloadCode, "@",
"units::megaelectronvolt", payloadCode, "@",
"units::megahertz", payloadCode, "@",
"units::megavolt", payloadCode, "@",
"units::meter", payloadCode, "@",
"units::meter2", payloadCode, "@",
"units::meter3", payloadCode, "@",
"units::mg", payloadCode, "@",
"units::microampere", payloadCode, "@",
"units::microbarn", payloadCode, "@",
"units::microcurie", payloadCode, "@",
"units::microfarad", payloadCode, "@",
"units::microgray", payloadCode, "@",
"units::micrometer", payloadCode, "@",
"units::microsecond", payloadCode, "@",
"units::milliampere", payloadCode, "@",
"units::millibarn", payloadCode, "@",
"units::millicurie", payloadCode, "@",
"units::millifarad", payloadCode, "@",
"units::milligram", payloadCode, "@",
"units::milligray", payloadCode, "@",
"units::millimeter", payloadCode, "@",
"units::millimeter2", payloadCode, "@",
"units::millimeter3", payloadCode, "@",
"units::milliradian", payloadCode, "@",
"units::millisecond", payloadCode, "@",
"units::mm", payloadCode, "@",
"units::mm2", payloadCode, "@",
"units::mm3", payloadCode, "@",
"units::mole", payloadCode, "@",
"units::mrad", payloadCode, "@",
"units::ms", payloadCode, "@",
"units::nanoampere", payloadCode, "@",
"units::nanobarn", payloadCode, "@",
"units::nanofarad", payloadCode, "@",
"units::nanometer", payloadCode, "@",
"units::nanosecond", payloadCode, "@",
"units::newton", payloadCode, "@",
"units::nm", payloadCode, "@",
"units::ns", payloadCode, "@",
"units::ohm", payloadCode, "@",
"units::parsec", payloadCode, "@",
"units::pascal", payloadCode, "@",
"units::pc", payloadCode, "@",
"units::perCent", payloadCode, "@",
"units::perMillion", payloadCode, "@",
"units::perThousand", payloadCode, "@",
"units::petaelectronvolt", payloadCode, "@",
"units::pi", payloadCode, "@",
"units::pi2", payloadCode, "@",
"units::picobarn", payloadCode, "@",
"units::picofarad", payloadCode, "@",
"units::picosecond", payloadCode, "@",
"units::rad", payloadCode, "@",
"units::radian", payloadCode, "@",
"units::s", payloadCode, "@",
"units::second", payloadCode, "@",
"units::sr", payloadCode, "@",
"units::steradian", payloadCode, "@",
"units::teraelectronvolt", payloadCode, "@",
"units::tesla", payloadCode, "@",
"units::twopi", payloadCode, "@",
"units::uCi", payloadCode, "@",
"units::um", payloadCode, "@",
"units::volt", payloadCode, "@",
"units::watt", payloadCode, "@",
"units::weber", payloadCode, "@",
nullptr
};
    static bool isInitialized = false;
    if (!isInitialized) {
      TROOT::RegisterModule("WCPDataDict",
        headers, includePaths, payloadCode, fwdDeclCode,
        TriggerDictionaryInitialization_WCPDataDict_Impl, {}, classesHeaders, /*hasCxxModule*/false);
      isInitialized = true;
    }
  }
  static struct DictInit {
    DictInit() {
      TriggerDictionaryInitialization_WCPDataDict_Impl();
    }
  } __TheDictionaryInitializer;
}
void TriggerDictionaryInitialization_WCPDataDict() {
  TriggerDictionaryInitialization_WCPDataDict_Impl();
}
