Typedefs | |
using | branches = =======================================**In template expressions, the type`T`is a type that can properly represent *the single value being stored in the branch(e.g., UInt_t, Double_t, etc.).**The`CreateBranch`in the"create branch"row is an instance of *BranchCreator constructed with a pointer to the ROOT tree |
Functions | |
*file AnalysisTree_module cc *brief Module to create a TTree for analysis *authors tjyang fnal sowjanyag phys ksu edu **Taken from uboone code Imported by Karl k warburton sheffield ac uk *with the help of Tingjun Yang **Current implementation with one set of branches for each tracking algorithm *The data structure which hosts the addresses of the tree branches is *dynamically allocated on and it can be optionally destroyed at the *end of each event *The data | structure (AnalysisTreeDataStruct) directly contains the truth and *simulation information as C arrays.The data from tracking algorithms is the *largest |
*file AnalysisTree_module cc *brief Module to create a TTree for analysis *authors tjyang fnal sowjanyag phys ksu edu **Taken from uboone code Imported by Karl k warburton sheffield ac uk *with the help of Tingjun Yang **Current implementation with one set of branches for each tracking algorithm *The data structure which hosts the addresses of the tree branches is *dynamically allocated on and it can be optionally destroyed at the *end of each event *The data and it is contained in a C vector of | structures (TrackDataStruct) |
*file AnalysisTree_module cc *brief Module to create a TTree for analysis *authors tjyang fnal sowjanyag phys ksu edu **Taken from uboone code Imported by Karl k warburton sheffield ac uk *with the help of Tingjun Yang **Current implementation with one set of branches for each tracking algorithm *The data structure which hosts the addresses of the tree branches is *dynamically allocated on and it can be optionally destroyed at the *end of each event *The data and it is contained in a C vector of *one per algorithm These structures can also be allocated on demand *Each of these structures is connected to a set of one branch per *data member Data members are vectors of numbers or vectors of fixed size *C arrays The vector index represents the tracks reconstructed by the and each has a fixed size pool for | hits (do ROOT trees support *branches with more than one dimension with variable size?).*The data structures can assign default values to their data |
*file AnalysisTree_module cc *brief Module to create a TTree for analysis *authors tjyang fnal sowjanyag phys ksu edu **Taken from uboone code Imported by Karl k warburton sheffield ac uk *with the help of Tingjun Yang **Current implementation with one set of branches for each tracking algorithm *The data structure which hosts the addresses of the tree branches is *dynamically allocated on and it can be optionally destroyed at the *end of each event *The data and it is contained in a C vector of *one per algorithm These structures can also be allocated on demand *Each of these structures is connected to a set of one branch per *data member Data members are vectors of numbers or vectors of fixed size *C arrays The vector index represents the tracks reconstructed by the and each has a fixed size pool for connect to a *ROOT | tree (creating the branches they need) and resize.*The AnalysisTreeDataStruct is const ructed with as many tracking algorithms as *there are named in the module configuration(even if they are not backed by *any available tracking data).*By default const ruction |
*file AnalysisTree_module cc *brief Module to create a TTree for analysis *authors tjyang fnal sowjanyag phys ksu edu **Taken from uboone code Imported by Karl k warburton sheffield ac uk *with the help of Tingjun Yang **Current implementation with one set of branches for each tracking algorithm *The data structure which hosts the addresses of the tree branches is *dynamically allocated on and it can be optionally destroyed at the *end of each event *The data and it is contained in a C vector of *one per algorithm These structures can also be allocated on demand *Each of these structures is connected to a set of one branch per *data member Data members are vectors of numbers or vectors of fixed size *C arrays The vector index represents the tracks reconstructed by the and each has a fixed size pool for connect to a *ROOT TrackDataStruct is initialized in a state which does *not allow any | track (maximum tracks number is zero) |
*file AnalysisTree_module cc *brief Module to create a TTree for analysis *authors tjyang fnal sowjanyag phys ksu edu **Taken from uboone code Imported by Karl k warburton sheffield ac uk *with the help of Tingjun Yang **Current implementation with one set of branches for each tracking algorithm *The data structure which hosts the addresses of the tree branches is *dynamically allocated on and it can be optionally destroyed at the *end of each event *The data and it is contained in a C vector of *one per algorithm These structures can also be allocated on demand *Each of these structures is connected to a set of one branch per *data member Data members are vectors of numbers or vectors of fixed size *C arrays The vector index represents the tracks reconstructed by the and each has a fixed size pool for connect to a *ROOT TrackDataStruct is initialized in a state which does *not allow any and in such state trying *to connect to a tree has no effect This is done so that the *AnalysisTreeDataStruct can be initialized | first (and with unusable track data *structures) |
*file AnalysisTree_module cc *brief Module to create a TTree for analysis *authors tjyang fnal sowjanyag phys ksu edu **Taken from uboone code Imported by Karl k warburton sheffield ac uk *with the help of Tingjun Yang **Current implementation with one set of branches for each tracking algorithm *The data structure which hosts the addresses of the tree branches is *dynamically allocated on and it can be optionally destroyed at the *end of each event *The data and it is contained in a C vector of *one per algorithm These structures can also be allocated on demand *Each of these structures is connected to a set of one branch per *data member Data members are vectors of numbers or vectors of fixed size *C arrays The vector index represents the tracks reconstructed by the and each has a fixed size pool for connect to a *ROOT TrackDataStruct is initialized in a state which does *not allow any and in such state trying *to connect to a tree has no effect This is done so that the *AnalysisTreeDataStruct can be initialized and then the TrackDataStruct instances are initialized one by *one when the number of tracks needed is known *A similar mechanism is implemented for the truth information **The connected to *the ROOT | tree (the addresses of the available branches are assigned) |
*file AnalysisTree_module cc *brief Module to create a TTree for analysis *authors tjyang fnal sowjanyag phys ksu edu **Taken from uboone code Imported by Karl k warburton sheffield ac uk *with the help of Tingjun Yang **Current implementation with one set of branches for each tracking algorithm *The data structure which hosts the addresses of the tree branches is *dynamically allocated on and it can be optionally destroyed at the *end of each event *The data and it is contained in a C vector of *one per algorithm These structures can also be allocated on demand *Each of these structures is connected to a set of one branch per *data member Data members are vectors of numbers or vectors of fixed size *C arrays The vector index represents the tracks reconstructed by the and each has a fixed size pool for connect to a *ROOT TrackDataStruct is initialized in a state which does *not allow any and in such state trying *to connect to a tree has no effect This is done so that the *AnalysisTreeDataStruct can be initialized and then the TrackDataStruct instances are initialized one by *one when the number of tracks needed is known *A similar mechanism is implemented for the truth information **The connected to *the ROOT then *each of the tracking algorithm data is resized to host the correct number *of reconstructed tracks and connected to the tree Then the normal process of *filling the event data and then the tree take place the whole *data structure is freed and the tree is left in a invalid | state (branch *addresses are invalid).It could be possible to make the tree in a valid *state by resetting the addresses |
*file AnalysisTree_module cc *brief Module to create a TTree for analysis *authors tjyang fnal sowjanyag phys ksu edu **Taken from uboone code Imported by Karl k warburton sheffield ac uk *with the help of Tingjun Yang **Current implementation with one set of branches for each tracking algorithm *The data structure which hosts the addresses of the tree branches is *dynamically allocated on and it can be optionally destroyed at the *end of each event *The data and it is contained in a C vector of *one per algorithm These structures can also be allocated on demand *Each of these structures is connected to a set of one branch per *data member Data members are vectors of numbers or vectors of fixed size *C arrays The vector index represents the tracks reconstructed by the and each has a fixed size pool for connect to a *ROOT TrackDataStruct is initialized in a state which does *not allow any and in such state trying *to connect to a tree has no effect This is done so that the *AnalysisTreeDataStruct can be initialized and then the TrackDataStruct instances are initialized one by *one when the number of tracks needed is known *A similar mechanism is implemented for the truth information **The connected to *the ROOT then *each of the tracking algorithm data is resized to host the correct number *of reconstructed tracks and connected to the tree Then the normal process of *filling the event data and then the tree take place the whole *data structure is freed and the tree is left in a invalid but there is no advantage in that **The the data structure is left * | around (and the tree is in a valid state).On the next event |
really ***Steps to reduce memory usage ***create the data structure connected to the tree only when needed *reduce the size of the elemental | items (Double_t=> Float_t could damage precision)*[x] create a different structure for each tracker |
really ***Steps to reduce memory usage ***create the data structure connected to the tree only when needed *reduce the size of the elemental allocate only what needed *use variable size array buffers for each tracker datum instead of *[kMaxTrack] turn the truth GEANT information into vectors *move hit_trkid into the track remove kMaxTrackers *turn the hit information into | vectors (~1 MB worth) |
*other assign the variable with an invalid | value (e.g.,-9999.) |
*Create branch | CreateBranch (BranchName, VarName, BranchName+"[geant_list_size]/T") |
****Example energy observed by the detector *Data structure AuxDetMCData_t< T > *Indices *(2)|first Create branch | CreateBranch (BranchName, VarName, BranchName+"[geant_list_size]"+MaxAuxDetIndexStr+"/T") |
Variables | |
*file AnalysisTree_module cc *brief Module to create a TTree for analysis *authors tjyang fnal | gov |
*file AnalysisTree_module cc *brief Module to create a TTree for analysis *authors tjyang fnal sowjanyag phys ksu edu **Taken from uboone code Imported by Karl | Warburton |
*file AnalysisTree_module cc *brief Module to create a TTree for analysis *authors tjyang fnal sowjanyag phys ksu edu **Taken from uboone code Imported by Karl k warburton sheffield ac uk *with the help of Tingjun Yang **Current implementation with one set of branches for each tracking algorithm *The data structure which hosts the addresses of the tree branches is *dynamically allocated on | demand |
*file AnalysisTree_module cc *brief Module to create a TTree for analysis *authors tjyang fnal sowjanyag phys ksu edu **Taken from uboone code Imported by Karl k warburton sheffield ac uk *with the help of Tingjun Yang **Current implementation with one set of branches for each tracking algorithm *The data structure which hosts the addresses of the tree branches is *dynamically allocated on and it can be optionally destroyed at the *end of each event *The data and it is contained in a C vector of *one per algorithm These structures can also be allocated on demand *Each of these structures is connected to a set of one branch per *data member Data members are vectors of numbers or vectors of fixed size *C arrays The vector index represents the tracks reconstructed by the * | algorithm |
*file AnalysisTree_module cc *brief Module to create a TTree for analysis *authors tjyang fnal sowjanyag phys ksu edu **Taken from uboone code Imported by Karl k warburton sheffield ac uk *with the help of Tingjun Yang **Current implementation with one set of branches for each tracking algorithm *The data structure which hosts the addresses of the tree branches is *dynamically allocated on and it can be optionally destroyed at the *end of each event *The data and it is contained in a C vector of *one per algorithm These structures can also be allocated on demand *Each of these structures is connected to a set of one branch per *data member Data members are vectors of numbers or vectors of fixed size *C arrays The vector index represents the tracks reconstructed by the and each has a fixed size pool for connect to a *ROOT TrackDataStruct is initialized in a state which does *not allow any and in such state trying *to connect to a tree has no effect This is done so that the *AnalysisTreeDataStruct can be initialized and then the TrackDataStruct instances are initialized one by *one when the number of tracks needed is known *A similar mechanism is implemented for the truth information **The | UseBuffers |
*file AnalysisTree_module cc *brief Module to create a TTree for analysis *authors tjyang fnal sowjanyag phys ksu edu **Taken from uboone code Imported by Karl k warburton sheffield ac uk *with the help of Tingjun Yang **Current implementation with one set of branches for each tracking algorithm *The data structure which hosts the addresses of the tree branches is *dynamically allocated on and it can be optionally destroyed at the *end of each event *The data and it is contained in a C vector of *one per algorithm These structures can also be allocated on demand *Each of these structures is connected to a set of one branch per *data member Data members are vectors of numbers or vectors of fixed size *C arrays The vector index represents the tracks reconstructed by the and each has a fixed size pool for connect to a *ROOT TrackDataStruct is initialized in a state which does *not allow any and in such state trying *to connect to a tree has no effect This is done so that the *AnalysisTreeDataStruct can be initialized and then the TrackDataStruct instances are initialized one by *one when the number of tracks needed is known *A similar mechanism is implemented for the truth information **The connected to *the ROOT then *each of the tracking algorithm data is resized to host the correct number *of reconstructed tracks and connected to the tree Then the normal process of *filling the event data and then the tree take place | Finally |
*file AnalysisTree_module cc *brief Module to create a TTree for analysis *authors tjyang fnal sowjanyag phys ksu edu **Taken from uboone code Imported by Karl k warburton sheffield ac uk *with the help of Tingjun Yang **Current implementation with one set of branches for each tracking algorithm *The data structure which hosts the addresses of the tree branches is *dynamically allocated on and it can be optionally destroyed at the *end of each event *The data and it is contained in a C vector of *one per algorithm These structures can also be allocated on demand *Each of these structures is connected to a set of one branch per *data member Data members are vectors of numbers or vectors of fixed size *C arrays The vector index represents the tracks reconstructed by the and each has a fixed size pool for connect to a *ROOT TrackDataStruct is initialized in a state which does *not allow any and in such state trying *to connect to a tree has no effect This is done so that the *AnalysisTreeDataStruct can be initialized and then the TrackDataStruct instances are initialized one by *one when the number of tracks needed is known *A similar mechanism is implemented for the truth information **The connected to *the ROOT then *each of the tracking algorithm data is resized to host the correct number *of reconstructed tracks and connected to the tree Then the normal process of *filling the event data and then the tree take place the whole *data structure is freed and the tree is left in a invalid but there is no advantage in that **The the data structure is left all the *addresses are | checked |
*file AnalysisTree_module cc *brief Module to create a TTree for analysis *authors tjyang fnal sowjanyag phys ksu edu **Taken from uboone code Imported by Karl k warburton sheffield ac uk *with the help of Tingjun Yang **Current implementation with one set of branches for each tracking algorithm *The data structure which hosts the addresses of the tree branches is *dynamically allocated on and it can be optionally destroyed at the *end of each event *The data and it is contained in a C vector of *one per algorithm These structures can also be allocated on demand *Each of these structures is connected to a set of one branch per *data member Data members are vectors of numbers or vectors of fixed size *C arrays The vector index represents the tracks reconstructed by the and each has a fixed size pool for connect to a *ROOT TrackDataStruct is initialized in a state which does *not allow any and in such state trying *to connect to a tree has no effect This is done so that the *AnalysisTreeDataStruct can be initialized and then the TrackDataStruct instances are initialized one by *one when the number of tracks needed is known *A similar mechanism is implemented for the truth information **The connected to *the ROOT then *each of the tracking algorithm data is resized to host the correct number *of reconstructed tracks and connected to the tree Then the normal process of *filling the event data and then the tree take place the whole *data structure is freed and the tree is left in a invalid but there is no advantage in that **The the data structure is left all the *addresses are then for each tracker the data is resized to *accommodate the right number of tracks for tis event If the memory is * | increased |
*file AnalysisTree_module cc *brief Module to create a TTree for analysis *authors tjyang fnal sowjanyag phys ksu edu **Taken from uboone code Imported by Karl k warburton sheffield ac uk *with the help of Tingjun Yang **Current implementation with one set of branches for each tracking algorithm *The data structure which hosts the addresses of the tree branches is *dynamically allocated on and it can be optionally destroyed at the *end of each event *The data and it is contained in a C vector of *one per algorithm These structures can also be allocated on demand *Each of these structures is connected to a set of one branch per *data member Data members are vectors of numbers or vectors of fixed size *C arrays The vector index represents the tracks reconstructed by the and each has a fixed size pool for connect to a *ROOT TrackDataStruct is initialized in a state which does *not allow any and in such state trying *to connect to a tree has no effect This is done so that the *AnalysisTreeDataStruct can be initialized and then the TrackDataStruct instances are initialized one by *one when the number of tracks needed is known *A similar mechanism is implemented for the truth information **The connected to *the ROOT then *each of the tracking algorithm data is resized to host the correct number *of reconstructed tracks and connected to the tree Then the normal process of *filling the event data and then the tree take place the whole *data structure is freed and the tree is left in a invalid but there is no advantage in that **The the data structure is left all the *addresses are then for each tracker the data is resized to *accommodate the right number of tracks for tis event If the memory is the address will be changed All the branches are reconnected to *the data | structure |
*file AnalysisTree_module cc *brief Module to create a TTree for analysis *authors tjyang fnal sowjanyag phys ksu edu **Taken from uboone code Imported by Karl k warburton sheffield ac uk *with the help of Tingjun Yang **Current implementation with one set of branches for each tracking algorithm *The data structure which hosts the addresses of the tree branches is *dynamically allocated on and it can be optionally destroyed at the *end of each event *The data and it is contained in a C vector of *one per algorithm These structures can also be allocated on demand *Each of these structures is connected to a set of one branch per *data member Data members are vectors of numbers or vectors of fixed size *C arrays The vector index represents the tracks reconstructed by the and each has a fixed size pool for connect to a *ROOT TrackDataStruct is initialized in a state which does *not allow any and in such state trying *to connect to a tree has no effect This is done so that the *AnalysisTreeDataStruct can be initialized and then the TrackDataStruct instances are initialized one by *one when the number of tracks needed is known *A similar mechanism is implemented for the truth information **The connected to *the ROOT then *each of the tracking algorithm data is resized to host the correct number *of reconstructed tracks and connected to the tree Then the normal process of *filling the event data and then the tree take place the whole *data structure is freed and the tree is left in a invalid but there is no advantage in that **The the data structure is left all the *addresses are then for each tracker the data is resized to *accommodate the right number of tracks for tis event If the memory is the address will be changed All the branches are reconnected to *the data and the procedure goes on as normal **Note that reducing the maximum number of tracks in a TrackDataStruct does not *necessarily make memory | available |
that feature can be | implemented |
that feature can be but it currently has not been **The BoxedArray class is a wrapper around a normal C | array |
it is needed *to be able to include such structure in a std::vector This container *requires its objects to be default constructible and copy | constructible |
it is needed *to be able to include such structure in a std::vector This container *requires its objects to be default constructible and copy *and a C array is neither BoxedArray | is |
really ***Steps to reduce memory usage ***create the data structure connected to the tree only when needed *reduce the size of the elemental allocate only what needed *use variable size array buffers for each tracker datum instead of *[kMaxTrack] turn the truth GEANT information into vectors *move hit_trkid into the track | information |
really ***Steps to reduce memory usage ***create the data structure connected to the tree only when needed *reduce the size of the elemental allocate only what needed *use variable size array buffers for each tracker datum instead of *[kMaxTrack] turn the truth GEANT information into vectors *move hit_trkid into the track remove kMaxTrackers *turn the hit information into remove kMaxHits *fill the tree branch by branch ***Quick guide to addition of branches the following reference guide describes the *concrete implementation of each of the concepts explained here ***Declare a variable ***If the variable is a track | variable |
if *it is a PFParticle add it to *AnalysisTreeDataStruct::PFParticleDataStruct | Otherwise |
if *it is a PFParticle add it to *AnalysisTreeDataStruct::PFParticleDataStruct add it directly *to AnalysisTreeDataStruct **category of variable where to add the variable **track AnalysisTreeDataStruct::TrackDataStruct *shower AnalysisTreeDataStruct::ShowerDataStruct *PFParticle AnalysisTreeDataStruct::PFParticleDataStruct *other AnalysisTreeDataStruct ***Create a branch assign the branch address ***Assigning a branch an address is done by adding in the location described *in this table the Create branch command shown below *The BranchCreator creates the branch if it does not | exist |
in its | arguments |
in its *T must be replaced with the correct ROOT branch code ***Simple data types ***Example number of generated particles *Data structure T *Indices none *Fill call | VarName = Value |
*Create branch CreateBranch *(BranchName,&VarName, BranchName+"/T")`|***One-dimension vectors *----------------------**|Example|energy of the generated particles|*|Data structure|`std Create branch | CreateBranch (BranchName,&VarName, BranchName+NTracksIndexStr+"/T")`|*||`CreateBranch(BranchName |
*Create branch CreateBranch *(BranchName,&VarName, BranchName+"/T")`|***One-dimension vectors *----------------------**|Example|energy of the generated particles|*|Data structure|`std Create branch BranchName NShowerIndexStr T *****Example Number of hits in the plane *Data structure PlaneData_t< T > *Indices *(2)|first Create branch BranchName NShowerIndexStr[3] T *****Example dE dX of a single hit *Data structure HitData_t< T > *Indices *(3)|first Create branch BranchName NShowerIndexStr[3] MaxShowerHitsIndexStr T *****Example position coordinates of a hit *Data structure HitCoordData_t< T > *Indices *(4)|first Create branch BranchName NShowerIndexStr[3] MaxShowerHitsIndexStr[3] T ***Auxiliary detector information *****Example number of auxiliary detectors a particle crossed *Data structure std::vector< T > *Index | first |
*Create branch CreateBranch *(BranchName,&VarName, BranchName+"/T")`|***One-dimension vectors *----------------------**|Example|energy of the generated particles|*|Data structure|`std Create branch BranchName NShowerIndexStr T *****Example Number of hits in the plane *Data structure PlaneData_t< T > *Indices *(2)|first Create branch BranchName NShowerIndexStr[3] T *****Example dE dX of a single hit *Data structure HitData_t< T > *Indices *(3)|first Create branch BranchName NShowerIndexStr[3] MaxShowerHitsIndexStr T *****Example position coordinates of a hit *Data structure HitCoordData_t< T > *Indices *(4)|first Create branch BranchName NShowerIndexStr[3] MaxShowerHitsIndexStr[3] T ***Auxiliary detector information *****Example number of auxiliary detectors a particle crossed *Data structure std::vector< T > *Index | Value |
*file AnalysisTree_module cc *brief Module to create a TTree for analysis *authors tjyang fnal sowjanyag phys ksu edu **Taken from uboone code Imported by Karl k warburton sheffield ac uk *with the help of Tingjun Yang **Current implementation with one set of branches for each tracking algorithm *The data structure which hosts the addresses of the tree branches is *dynamically allocated on and it can be optionally destroyed at the *end of each event *The data and it is contained in a C vector of *one per algorithm These structures can also be allocated on demand *Each of these structures is connected to a set of branches |
Definition at line 173 of file HowToUseAnalysisTree.txt.
* file AnalysisTree_module cc* brief Module to create a TTree for analysis* authors tjyang fnal sowjanyag phys ksu edu* * Taken from uboone code Imported by Karl k warburton sheffield ac uk* with the help of Tingjun Yang* * Current implementation with one set of branches for each tracking algorithm* The data structure which hosts the addresses of the tree branches is* dynamically allocated on and it can be optionally destroyed at the* end of each event* The data and it is contained in a C vector of * one per algorithm These structures can also be allocated on demand* Each of these structures is connected to a set of one branch per* data member Data members are vectors of numbers or vectors of fixed size* C arrays The vector index represents the tracks reconstructed by the and each has a fixed size pool for connect to a* ROOT TrackDataStruct is initialized in a state which does* not allow any and in such state trying* to connect to a tree has no effect This is done so that the* AnalysisTreeDataStruct can be initialized and then the TrackDataStruct instances are initialized one by* one when the number of tracks needed is known* A similar mechanism is implemented for the truth information* * The connected to* the ROOT then* each of the tracking algorithm data is resized to host the correct number* of reconstructed tracks and connected to the tree Then the normal process of* filling the event data and then the tree take place the whole* data structure is freed and the tree is left in a invalid but there is no advantage in that* * The the data structure is left* around | ( | and the tree is in a valid | state | ) |
* * * * Example energy observed by the detector* Data structure AuxDetMCData_t<T>* Indices* (2) | first Create branch CreateBranch | ( | BranchName | , |
VarName | , | ||
BranchName+""+MaxAuxDetIndexStr+"/T" | [geant_list_size] | ||
) |
* file AnalysisTree_module cc* brief Module to create a TTree for analysis* authors tjyang fnal sowjanyag phys ksu edu* * Taken from uboone code Imported by Karl k warburton sheffield ac uk* with the help of Tingjun Yang* * Current implementation with one set of branches for each tracking algorithm* The data structure which hosts the addresses of the tree branches is* dynamically allocated on and it can be optionally destroyed at the* end of each event* The data and it is contained in a C vector of * one per algorithm These structures can also be allocated on demand* Each of these structures is connected to a set of one branch per* data member Data members are vectors of numbers or vectors of fixed size* C arrays The vector index represents the tracks reconstructed by the and each has a fixed size pool for connect to a* ROOT TrackDataStruct is initialized in a state which does* not allow any and in such state trying* to connect to a tree has no effect This is done so that the* AnalysisTreeDataStruct can be initialized first | ( | and with unusable track data * | structures | ) |
* file AnalysisTree_module cc* brief Module to create a TTree for analysis* authors tjyang fnal sowjanyag phys ksu edu* * Taken from uboone code Imported by Karl k warburton sheffield ac uk* with the help of Tingjun Yang* * Current implementation with one set of branches for each tracking algorithm* The data structure which hosts the addresses of the tree branches is* dynamically allocated on and it can be optionally destroyed at the* end of each event* The data and it is contained in a C vector of * one per algorithm These structures can also be allocated on demand* Each of these structures is connected to a set of one branch per* data member Data members are vectors of numbers or vectors of fixed size* C arrays The vector index represents the tracks reconstructed by the and each has a fixed size pool for hits | ( | do ROOT trees support *branches with more than one dimension with variable size? | ) |
really* * * Steps to reduce memory usage* * * create the data structure connected to the tree only when needed* reduce the size of the elemental items | ( | Double_t | , |
Float_t could damage | precision | ||
) |
* file AnalysisTree_module cc* brief Module to create a TTree for analysis* authors tjyang fnal sowjanyag phys ksu edu* * Taken from uboone code Imported by Karl k warburton sheffield ac uk* with the help of Tingjun Yang* * Current implementation with one set of branches for each tracking algorithm* The data structure which hosts the addresses of the tree branches is* dynamically allocated on and it can be optionally destroyed at the* end of each event* The data and it is contained in a C vector of * one per algorithm These structures can also be allocated on demand* Each of these structures is connected to a set of one branch per* data member Data members are vectors of numbers or vectors of fixed size* C arrays The vector index represents the tracks reconstructed by the and each has a fixed size pool for connect to a* ROOT TrackDataStruct is initialized in a state which does* not allow any and in such state trying* to connect to a tree has no effect This is done so that the* AnalysisTreeDataStruct can be initialized and then the TrackDataStruct instances are initialized one by* one when the number of tracks needed is known* A similar mechanism is implemented for the truth information* * The connected to* the ROOT then* each of the tracking algorithm data is resized to host the correct number* of reconstructed tracks and connected to the tree Then the normal process of* filling the event data and then the tree take place the whole* data structure is freed and the tree is left in a invalid state | ( | branch *addresses are | invalid | ) |
* file AnalysisTree_module cc* brief Module to create a TTree for analysis* authors tjyang fnal sowjanyag phys ksu edu* * Taken from uboone code Imported by Karl k warburton sheffield ac uk* with the help of Tingjun Yang* * Current implementation with one set of branches for each tracking algorithm* The data structure which hosts the addresses of the tree branches is* dynamically allocated on and it can be optionally destroyed at the* end of each event* The data structure | ( | AnalysisTreeDataStruct | ) |
* file AnalysisTree_module cc* brief Module to create a TTree for analysis* authors tjyang fnal sowjanyag phys ksu edu* * Taken from uboone code Imported by Karl k warburton sheffield ac uk* with the help of Tingjun Yang* * Current implementation with one set of branches for each tracking algorithm* The data structure which hosts the addresses of the tree branches is* dynamically allocated on and it can be optionally destroyed at the* end of each event* The data and it is contained in a C vector of structures | ( | TrackDataStruct | ) |
* file AnalysisTree_module cc* brief Module to create a TTree for analysis* authors tjyang fnal sowjanyag phys ksu edu* * Taken from uboone code Imported by Karl k warburton sheffield ac uk* with the help of Tingjun Yang* * Current implementation with one set of branches for each tracking algorithm* The data structure which hosts the addresses of the tree branches is* dynamically allocated on and it can be optionally destroyed at the* end of each event* The data and it is contained in a C vector of * one per algorithm These structures can also be allocated on demand* Each of these structures is connected to a set of one branch per* data member Data members are vectors of numbers or vectors of fixed size* C arrays The vector index represents the tracks reconstructed by the and each has a fixed size pool for connect to a* ROOT TrackDataStruct is initialized in a state which does* not allow any track | ( | maximum tracks number is | zero | ) |
* file AnalysisTree_module cc* brief Module to create a TTree for analysis* authors tjyang fnal sowjanyag phys ksu edu* * Taken from uboone code Imported by Karl k warburton sheffield ac uk* with the help of Tingjun Yang* * Current implementation with one set of branches for each tracking algorithm* The data structure which hosts the addresses of the tree branches is* dynamically allocated on and it can be optionally destroyed at the* end of each event* The data and it is contained in a C vector of * one per algorithm These structures can also be allocated on demand* Each of these structures is connected to a set of one branch per* data member Data members are vectors of numbers or vectors of fixed size* C arrays The vector index represents the tracks reconstructed by the and each has a fixed size pool for connect to a* ROOT tree | ( | creating the branches they | need | ) | const |
* file AnalysisTree_module cc* brief Module to create a TTree for analysis* authors tjyang fnal sowjanyag phys ksu edu* * Taken from uboone code Imported by Karl k warburton sheffield ac uk* with the help of Tingjun Yang* * Current implementation with one set of branches for each tracking algorithm* The data structure which hosts the addresses of the tree branches is* dynamically allocated on and it can be optionally destroyed at the* end of each event* The data and it is contained in a C vector of * one per algorithm These structures can also be allocated on demand* Each of these structures is connected to a set of one branch per* data member Data members are vectors of numbers or vectors of fixed size* C arrays The vector index represents the tracks reconstructed by the and each has a fixed size pool for connect to a* ROOT TrackDataStruct is initialized in a state which does* not allow any and in such state trying* to connect to a tree has no effect This is done so that the* AnalysisTreeDataStruct can be initialized and then the TrackDataStruct instances are initialized one by* one when the number of tracks needed is known* A similar mechanism is implemented for the truth information* * The connected to* the ROOT tree | ( | the addresses of the available branches are | assigned | ) |
really* * * Steps to reduce memory usage* * * create the data structure connected to the tree only when needed* reduce the size of the elemental allocate only what needed* use variable size array buffers for each tracker datum instead of* [kMaxTrack] turn the truth GEANT information into vectors* move hit_trkid into the track remove kMaxTrackers* turn the hit information into vectors | ( | ~1 MB | worth | ) |
clusters flagged as tracks do by contribute to the shower tensor or feature in mop up algorithms Improved version of ConeBasedMerging algorithm |
Definition at line 20 of file HowToUseAnalysisTree.txt.
in its arguments |
Definition at line 173 of file HowToUseAnalysisTree.txt.
that feature can be but it currently has not been* * The BoxedArray class is a wrapper around a normal C array |
Definition at line 61 of file HowToUseAnalysisTree.txt.
* file AnalysisTree_module cc* brief Module to create a TTree for analysis* authors tjyang fnal sowjanyag phys ksu edu* * Taken from uboone code Imported by Karl k warburton sheffield ac uk* with the help of Tingjun Yang* * Current implementation with one set of branches for each tracking algorithm* The data structure which hosts the addresses of the tree branches is* dynamically allocated on and it can be optionally destroyed at the* end of each event* The data and it is contained in a C vector of * one per algorithm These structures can also be allocated on demand* Each of these structures is connected to a set of one branch per* data member Data members are vectors of numbers or vectors of fixed size* C arrays The vector index represents the tracks reconstructed by the and each has a fixed size pool for connect to a* ROOT TrackDataStruct is initialized in a state which does* not allow any and in such state trying* to connect to a tree has no effect This is done so that the* AnalysisTreeDataStruct can be initialized and then the TrackDataStruct instances are initialized one by* one when the number of tracks needed is known* A similar mechanism is implemented for the truth information* * The connected to* the ROOT then* each of the tracking algorithm data is resized to host the correct number* of reconstructed tracks and connected to the tree Then the normal process of* filling the event data and then the tree take place the whole* data structure is freed and the tree is left in a invalid but there is no advantage in that* * The the data structure is left all the* addresses are then for each tracker the data is resized to* accommodate the right number of tracks for tis event If the memory is the address will be changed All the branches are reconnected to* the data and the procedure goes on as normal* * Note that reducing the maximum number of tracks in a TrackDataStruct does not* necessarily make memory available |
Definition at line 52 of file HowToUseAnalysisTree.txt.
* file AnalysisTree_module cc* brief Module to create a TTree for analysis* authors tjyang fnal sowjanyag phys ksu edu* * Taken from uboone code Imported by Karl k warburton sheffield ac uk* with the help of Tingjun Yang* * Current implementation with one set of branches for each tracking algorithm* The data structure which hosts the addresses of the tree branches is* dynamically allocated on and it can be optionally destroyed at the* end of each event* The data and it is contained in a C vector of * one per algorithm These structures can also be allocated on demand* Each of these structures is connected to a set of one branch per* data member Data members are vectors of numbers or vectors of fixed size* C arrays The vector index represents the tracks reconstructed by the and each has a fixed size pool for connect to a* ROOT TrackDataStruct is initialized in a state which does* not allow any and in such state trying* to connect to a tree has no effect This is done so that the* AnalysisTreeDataStruct can be initialized and then the TrackDataStruct instances are initialized one by* one when the number of tracks needed is known* A similar mechanism is implemented for the truth information* * The connected to* the ROOT then* each of the tracking algorithm data is resized to host the correct number* of reconstructed tracks and connected to the tree Then the normal process of* filling the event data and then the tree take place the whole* data structure is freed and the tree is left in a invalid but there is no advantage in that* * The the data structure is left all the* addresses are checked |
Definition at line 52 of file HowToUseAnalysisTree.txt.
it is needed* to be able to include such structure in a std::vector This container* requires its objects to be default constructible and copy constructible |
Definition at line 63 of file HowToUseAnalysisTree.txt.
* Create branch CreateBranch* (BranchName, &VarName, BranchName + "/T")` | * * * One-dimension vectors * ---------------------- * * | Example | energy of the generated particles | * | Data structure | `std Create branch BranchName NShowerIndexStr T* * * * * Example Number of hits in the plane* Data structure PlaneData_t<T>* Indices* (2) | first Create branch BranchName NShowerIndexStr [3] T* * * * * Example dE dX of a single hit* Data structure HitData_t<T>* Indices* (3) | first Create branch BranchName NShowerIndexStr [3] MaxShowerHitsIndexStr T* * * * * Example position coordinates of a hit* Data structure HitCoordData_t<T>* Indices* (4) | first Create branch CreateBranch(BranchName,&VarName, BranchName+NTracksIndexStr+"[3]"+MaxTrackHitsIndexStr+"[3]/T")`|*||`CreateBranch(BranchName |
Definition at line 208 of file HowToUseAnalysisTree.txt.
* file AnalysisTree_module cc* brief Module to create a TTree for analysis* authors tjyang fnal sowjanyag phys ksu edu* * Taken from uboone code Imported by Karl k warburton sheffield ac uk* with the help of Tingjun Yang* * Current implementation with one set of branches for each tracking algorithm* The data structure which hosts the addresses of the tree branches is* dynamically allocated on demand |
Definition at line 10 of file HowToUseAnalysisTree.txt.
if* it is a PFParticle add it to* AnalysisTreeDataStruct::PFParticleDataStruct add it directly* to AnalysisTreeDataStruct* * category of variable where to add the variable* * track AnalysisTreeDataStruct::TrackDataStruct* shower AnalysisTreeDataStruct::ShowerDataStruct* PFParticle AnalysisTreeDataStruct::PFParticleDataStruct* other AnalysisTreeDataStruct* * * Create a branch assign the branch address* * * Assigning a branch an address is done by adding in the location described* in this table the Create branch command shown below* The BranchCreator creates the branch if it does not exist |
Definition at line 102 of file HowToUseAnalysisTree.txt.
* file AnalysisTree_module cc* brief Module to create a TTree for analysis* authors tjyang fnal sowjanyag phys ksu edu* * Taken from uboone code Imported by Karl k warburton sheffield ac uk* with the help of Tingjun Yang* * Current implementation with one set of branches for each tracking algorithm* The data structure which hosts the addresses of the tree branches is* dynamically allocated on and it can be optionally destroyed at the* end of each event* The data and it is contained in a C vector of * one per algorithm These structures can also be allocated on demand* Each of these structures is connected to a set of one branch per* data member Data members are vectors of numbers or vectors of fixed size* C arrays The vector index represents the tracks reconstructed by the and each has a fixed size pool for connect to a* ROOT TrackDataStruct is initialized in a state which does* not allow any and in such state trying* to connect to a tree has no effect This is done so that the* AnalysisTreeDataStruct can be initialized and then the TrackDataStruct instances are initialized one by* one when the number of tracks needed is known* A similar mechanism is implemented for the truth information* * The connected to* the ROOT then* each of the tracking algorithm data is resized to host the correct number* of reconstructed tracks and connected to the tree Then the normal process of* filling the event data and then the tree take place Finally |
Definition at line 43 of file HowToUseAnalysisTree.txt.
* Create branch CreateBranch* (BranchName, &VarName, BranchName + "/T")` | * * * One-dimension vectors * ---------------------- * * | Example | energy of the generated particles | * | Data structure | `std Create branch BranchName NShowerIndexStr T* * * * * Example Number of hits in the plane* Data structure PlaneData_t<T>* Indices* (2) | first Create branch BranchName NShowerIndexStr [3] T* * * * * Example dE dX of a single hit* Data structure HitData_t<T>* Indices* (3) | first Create branch BranchName NShowerIndexStr [3] MaxShowerHitsIndexStr T* * * * * Example position coordinates of a hit* Data structure HitCoordData_t<T>* Indices* (4) | first Create branch BranchName NShowerIndexStr [3] MaxShowerHitsIndexStr [3] T* * * Auxiliary detector information* * * * * Example number of auxiliary detectors a particle crossed* Data structure std::vector<T>* Index first |
Definition at line 245 of file HowToUseAnalysisTree.txt.
Definition at line 4 of file HowToUseAnalysisTree.txt.
that feature can be implemented |
Definition at line 59 of file HowToUseAnalysisTree.txt.
* file AnalysisTree_module cc* brief Module to create a TTree for analysis* authors tjyang fnal sowjanyag phys ksu edu* * Taken from uboone code Imported by Karl k warburton sheffield ac uk* with the help of Tingjun Yang* * Current implementation with one set of branches for each tracking algorithm* The data structure which hosts the addresses of the tree branches is* dynamically allocated on and it can be optionally destroyed at the* end of each event* The data and it is contained in a C vector of * one per algorithm These structures can also be allocated on demand* Each of these structures is connected to a set of one branch per* data member Data members are vectors of numbers or vectors of fixed size* C arrays The vector index represents the tracks reconstructed by the and each has a fixed size pool for connect to a* ROOT TrackDataStruct is initialized in a state which does* not allow any and in such state trying* to connect to a tree has no effect This is done so that the* AnalysisTreeDataStruct can be initialized and then the TrackDataStruct instances are initialized one by* one when the number of tracks needed is known* A similar mechanism is implemented for the truth information* * The connected to* the ROOT then* each of the tracking algorithm data is resized to host the correct number* of reconstructed tracks and connected to the tree Then the normal process of* filling the event data and then the tree take place the whole* data structure is freed and the tree is left in a invalid but there is no advantage in that* * The the data structure is left all the* addresses are then for each tracker the data is resized to* accommodate the right number of tracks for tis event If the memory is* increased |
Definition at line 52 of file HowToUseAnalysisTree.txt.
really* * * Steps to reduce memory usage* * * create the data structure connected to the tree only when needed* reduce the size of the elemental allocate only what needed* use variable size array buffers for each tracker datum instead of* [kMaxTrack] turn the truth GEANT information into vectors* move hit_trkid into the track information |
Definition at line 77 of file HowToUseAnalysisTree.txt.
it is needed* to be able to include such structure in a std::vector This container* requires its objects to be default constructible and copy * and a C array is neither BoxedArray is |
Definition at line 63 of file HowToUseAnalysisTree.txt.
Definition at line 102 of file HowToUseAnalysisTree.txt.
* file AnalysisTree_module cc* brief Module to create a TTree for analysis* authors tjyang fnal sowjanyag phys ksu edu* * Taken from uboone code Imported by Karl k warburton sheffield ac uk* with the help of Tingjun Yang* * Current implementation with one set of branches for each tracking algorithm* The data structure which hosts the addresses of the tree branches is* dynamically allocated on and it can be optionally destroyed at the* end of each event* The data and it is contained in a C vector of * one per algorithm These structures can also be allocated on demand* Each of these structures is connected to a set of one branch per* data member Data members are vectors of numbers or vectors of fixed size* C arrays The vector index represents the tracks reconstructed by the and each has a fixed size pool for connect to a* ROOT TrackDataStruct is initialized in a state which does* not allow any and in such state trying* to connect to a tree has no effect This is done so that the* AnalysisTreeDataStruct can be initialized and then the TrackDataStruct instances are initialized one by* one when the number of tracks needed is known* A similar mechanism is implemented for the truth information* * The connected to* the ROOT then* each of the tracking algorithm data is resized to host the correct number* of reconstructed tracks and connected to the tree Then the normal process of* filling the event data and then the tree take place the whole* data structure is freed and the tree is left in a invalid but there is no advantage in that* * The the data structure is left all the* addresses are then for each tracker the data is resized to* accommodate the right number of tracks for tis event If the memory is the address will be changed All the branches are reconnected to* the data structure |
Definition at line 52 of file HowToUseAnalysisTree.txt.
*file AnalysisTree_module cc *brief Module to create a TTree for analysis *authors tjyang fnal sowjanyag phys ksu edu **Taken from uboone code Imported by Karl k warburton sheffield ac uk *with the help of Tingjun Yang **Current implementation with one set of branches for each tracking algorithm *The data structure which hosts the addresses of the tree branches is *dynamically allocated on and it can be optionally destroyed at the *end of each event *The data and it is contained in a C vector of *one per algorithm These structures can also be allocated on demand *Each of these structures is connected to a set of one branch per *data member Data members are vectors of numbers or vectors of fixed size *C arrays The vector index represents the tracks reconstructed by the and each has a fixed size pool for connect to a *ROOT TrackDataStruct is initialized in a state which does *not allow any and in such state trying *to connect to a tree has no effect This is done so that the *AnalysisTreeDataStruct can be initialized and then the TrackDataStruct instances are initialized one by *one when the number of tracks needed is known *A similar mechanism is implemented for the truth information **The connected to *the ROOT then *each of the tracking algorithm data is resized to host the correct number *of reconstructed tracks and connected to the tree Then the normal process of *filling the event data and then the tree take place the whole *data structure is freed and the tree is left in a invalid but there is no advantage in that **The UseBuffers |
Definition at line 39 of file HowToUseAnalysisTree.txt.
* Create branch CreateBranch* (BranchName, &VarName, BranchName + "/T")` | * * * One-dimension vectors * ---------------------- * * | Example | energy of the generated particles | * | Data structure | `std Create branch BranchName NShowerIndexStr T* * * * * Example Number of hits in the plane* Data structure PlaneData_t<T>* Indices* (2) | first Create branch BranchName NShowerIndexStr [3] T* * * * * Example dE dX of a single hit* Data structure HitData_t<T>* Indices* (3) | first Create branch BranchName NShowerIndexStr [3] MaxShowerHitsIndexStr T* * * * * Example position coordinates of a hit* Data structure HitCoordData_t<T>* Indices* (4) | first Create branch BranchName NShowerIndexStr [3] MaxShowerHitsIndexStr [3] T* * * Auxiliary detector information* * * * * Example number of auxiliary detectors a particle crossed* Data structure std::vector<T>* Index Value |
Definition at line 245 of file HowToUseAnalysisTree.txt.
* Create branch CreateBranch* (BranchName, &VarName, BranchName + "/T")` | * * * One-dimension vectors * ---------------------- * * | Example | energy of the generated particles | * | Data structure | `std Create branch BranchName NShowerIndexStr T* * * * * Example Number of hits in the plane* Data structure PlaneData_t<T>* Indices* (2) | first Create branch BranchName NShowerIndexStr [3] T* * * * * Example dE dX of a single hit* Data structure HitData_t<T>* Indices* (3) | first Create branch BranchName NShowerIndexStr [3] MaxShowerHitsIndexStr T* * * * * Example position coordinates of a hit* Data structure HitCoordData_t<T>* Indices* (4) | first Create branch & VarName = Value |
Definition at line 183 of file HowToUseAnalysisTree.txt.