Public Types | Public Member Functions | Public Attributes | List of all members
dune::AnalysisTreeDataStruct::VertexDataStruct Class Reference

Public Types

template<typename T >
using VertexData_t = std::vector< T >
 

Public Member Functions

 VertexDataStruct ()
 
 VertexDataStruct (size_t maxVertices)
 
void Clear ()
 
void SetMaxVertices (size_t maxVertices)
 
void Resize (size_t nVertices)
 
void SetAddresses (TTree *pTree, std::string tracker, bool isCosmics)
 
size_t GetMaxVertices () const
 

Public Attributes

size_t MaxVertices
 maximum number of storable vertices More...
 
Short_t nvtx
 
VertexData_t< Short_t > vtxId
 
VertexData_t< Float_t > vtxx
 
VertexData_t< Float_t > vtxy
 
VertexData_t< Float_t > vtxz
 
VertexData_t< Short_t > vtxhasPFParticle
 
VertexData_t< Short_t > vtxPFParticleID
 

Detailed Description

Definition at line 298 of file AnalysisTree_module.cc.

Member Typedef Documentation

Definition at line 301 of file AnalysisTree_module.cc.

Constructor & Destructor Documentation

dune::AnalysisTreeDataStruct::VertexDataStruct::VertexDataStruct ( )
inline

Definition at line 314 of file AnalysisTree_module.cc.

dune::AnalysisTreeDataStruct::VertexDataStruct::VertexDataStruct ( size_t  maxVertices)
inline

Definition at line 315 of file AnalysisTree_module.cc.

315 : MaxVertices(maxVertices) { Clear(); }
size_t MaxVertices
maximum number of storable vertices

Member Function Documentation

void dune::AnalysisTreeDataStruct::VertexDataStruct::Clear ( )

Definition at line 1893 of file AnalysisTree_module.cc.

1893  {
1895  nvtx = -9999;
1896 
1897  FillWith(vtxId , -9999 );
1898  FillWith(vtxx , -9999 );
1899  FillWith(vtxy , -9999 );
1900  FillWith(vtxz , -9999 );
1901  FillWith(vtxhasPFParticle, -1 );
1902  FillWith(vtxPFParticleID , -1 );
1903 }
size_t MaxVertices
maximum number of storable vertices
size_t dune::AnalysisTreeDataStruct::VertexDataStruct::GetMaxVertices ( ) const
inline

Definition at line 322 of file AnalysisTree_module.cc.

322 { return MaxVertices; }
size_t MaxVertices
maximum number of storable vertices
void dune::AnalysisTreeDataStruct::VertexDataStruct::Resize ( size_t  nVertices)

Definition at line 1881 of file AnalysisTree_module.cc.

1882 {
1883  MaxVertices = nVertices;
1884  vtxId.resize(MaxVertices);
1885  vtxx.resize(MaxVertices);
1886  vtxy.resize(MaxVertices);
1887  vtxz.resize(MaxVertices);
1888 
1889  vtxhasPFParticle.resize(MaxVertices);
1890  vtxPFParticleID.resize(MaxVertices);
1891 }
size_t MaxVertices
maximum number of storable vertices
void dune::AnalysisTreeDataStruct::VertexDataStruct::SetAddresses ( TTree *  pTree,
std::string  tracker,
bool  isCosmics 
)

Definition at line 1905 of file AnalysisTree_module.cc.

1907  {
1908  if (MaxVertices == 0) return; // no tracks, no tree!
1909 
1910  dune::AnalysisTreeDataStruct::BranchCreator CreateBranch(pTree);
1911 
1912  AutoResettingStringSteam sstr;
1913 
1914  std::string VertexLabel = alg;
1915  std::string BranchName;
1916 
1917  BranchName = "nvtx_" + VertexLabel;
1918  CreateBranch(BranchName, &nvtx, BranchName + "/S");
1919  std::string NVertexIndexStr = "[" + BranchName + "]";
1920 
1921  BranchName = "vtxId_" + VertexLabel;
1922  CreateBranch(BranchName, vtxId, BranchName + NVertexIndexStr + "/S");
1923 
1924  BranchName = "vtxx_" + VertexLabel;
1925  CreateBranch(BranchName, vtxx, BranchName + NVertexIndexStr + "/F");
1926 
1927  BranchName = "vtxy_" + VertexLabel;
1928  CreateBranch(BranchName, vtxy, BranchName + NVertexIndexStr + "/F");
1929 
1930  BranchName = "vtxz_" + VertexLabel;
1931  CreateBranch(BranchName, vtxz, BranchName + NVertexIndexStr + "/F");
1932 
1933  BranchName = "vtxhasPFParticle_" + VertexLabel;
1934  CreateBranch(BranchName, vtxhasPFParticle, BranchName + NVertexIndexStr + "/S");
1935 
1936  BranchName = "vtxPFParticleID_" + VertexLabel;
1937  CreateBranch(BranchName, vtxPFParticleID, BranchName + NVertexIndexStr + "/S");
1938 }
std::string string
Definition: nybbler.cc:12
Little helper functor class to create or reset branches in a tree.
size_t MaxVertices
maximum number of storable vertices
void dune::AnalysisTreeDataStruct::VertexDataStruct::SetMaxVertices ( size_t  maxVertices)
inline

Definition at line 317 of file AnalysisTree_module.cc.

318  { MaxVertices = maxVertices; Resize(MaxVertices); }
size_t MaxVertices
maximum number of storable vertices

Member Data Documentation

size_t dune::AnalysisTreeDataStruct::VertexDataStruct::MaxVertices

maximum number of storable vertices

Definition at line 303 of file AnalysisTree_module.cc.

Short_t dune::AnalysisTreeDataStruct::VertexDataStruct::nvtx

Definition at line 305 of file AnalysisTree_module.cc.

VertexData_t<Short_t> dune::AnalysisTreeDataStruct::VertexDataStruct::vtxhasPFParticle

Definition at line 311 of file AnalysisTree_module.cc.

VertexData_t<Short_t> dune::AnalysisTreeDataStruct::VertexDataStruct::vtxId

Definition at line 306 of file AnalysisTree_module.cc.

VertexData_t<Short_t> dune::AnalysisTreeDataStruct::VertexDataStruct::vtxPFParticleID

Definition at line 312 of file AnalysisTree_module.cc.

VertexData_t<Float_t> dune::AnalysisTreeDataStruct::VertexDataStruct::vtxx

Definition at line 307 of file AnalysisTree_module.cc.

VertexData_t<Float_t> dune::AnalysisTreeDataStruct::VertexDataStruct::vtxy

Definition at line 308 of file AnalysisTree_module.cc.

VertexData_t<Float_t> dune::AnalysisTreeDataStruct::VertexDataStruct::vtxz

Definition at line 309 of file AnalysisTree_module.cc.


The documentation for this class was generated from the following file: