Belle II Software  release-08-01-10
SVDMaxStripTTreeModule.h
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 
9 #pragma once
10 
11 #include <svd/dataobjects/SVDShaperDigit.h>
12 #include <svd/dataobjects/SVDAPVHistograms.h>
13 
14 #include <framework/core/Module.h>
15 #include <framework/datastore/StoreArray.h>
16 #include <mdst/dataobjects/SoftwareTriggerResult.h>
17 
18 #include <TFile.h>
19 #include <TH1F.h>
20 #include <TTree.h>
21 
22 namespace Belle2 {
31  class SVDMaxStripTTreeModule : public Module {
32 
33  public:
37  void initialize() override;
39  void terminate() override;
41  void event() override;
43  void beginRun() override;
44 
45  private:
46 
47 
49  bool m_skipRejectedEvents = false;
51  std::string m_rootFileName = "";
52  TFile* m_rootFilePtr = nullptr;
54  std::string m_shapersStoreArrayName{"SVDShaperDigits"};
59  TTree* m_t = nullptr;
60  /* Branches */
61  unsigned int m_svdLayer = 0;
62  unsigned int m_svdLadder = 0;
63  unsigned int m_svdSensor = 0;
64  unsigned int m_svdSide = -1;
65  unsigned int m_svdHits = 0;
66  unsigned int m_svdChip = -1;
67  unsigned int m_event = -1;
68  };
70 }
71 
Base class for Modules.
Definition: Module.h:72
The module is used to create a TTree to study the number of strips fired per event per APV chip.
std::string m_rootFileName
root file name
std::string m_shapersStoreArrayName
storeArray name of the input ShaperDigits
bool m_skipRejectedEvents
if true skip events rejected by HLT
void initialize() override
Register input and output data.
unsigned int m_svdHits
APV hits per event.
StoreArray< SVDShaperDigit > m_shapers
array of SVDShaperDigits
void event() override
Compute the variables and fill the tree.
void terminate() override
Write the TTrees to the file.
SVDAPVHistograms< TH1F > * m_hHits
hits per APV
void beginRun() override
Define APVHistogram.
unsigned int m_event
event number
StoreObjPtr< SoftwareTriggerResult > m_resultStoreObjectPointer
Store Object to read the trigger decision.
TTree * m_t
tree containing info related to the U and V side strips
TFile * m_rootFilePtr
pointer at root file used for storing histograms
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
Type-safe access to single objects in the data store.
Definition: StoreObjPtr.h:96
Abstract base class for different kinds of events.