Belle II Software  release-05-02-19
SVDMaxStripTTreeModule.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2017 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Giulia Casarosa *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 #include <svd/dataobjects/SVDShaperDigit.h>
14 #include <svd/dataobjects/SVDAPVHistograms.h>
15 
16 #include <framework/core/Module.h>
17 #include <framework/datastore/StoreArray.h>
18 #include <mdst/dataobjects/SoftwareTriggerResult.h>
19 
20 #include <TFile.h>
21 #include <TH1F.h>
22 #include <TTree.h>
23 
24 namespace Belle2 {
33  class SVDMaxStripTTreeModule : public Module {
34 
35  public:
39  void initialize() override;
41  void terminate() override;
43  void event() override;
45  void beginRun() override;
46 
47  private:
48 
49 
51  bool m_skipRejectedEvents = false;
53  std::string m_rootFileName = "";
54  TFile* m_rootFilePtr = nullptr;
56  std::string m_shapersStoreArrayName{"SVDShaperDigits"};
61  TTree* m_t = nullptr;
62  /* Branches */
63  unsigned int m_svdLayer = 0;
64  unsigned int m_svdLadder = 0;
65  unsigned int m_svdSensor = 0;
66  unsigned int m_svdSide = -1;
67  unsigned int m_svdHits = 0;
68  unsigned int m_svdChip = -1;
69  unsigned int m_event = -1;
70  };
72 }
73 
Belle2::SVDMaxStripTTreeModule::m_skipRejectedEvents
bool m_skipRejectedEvents
if true skip events rejected by HLT
Definition: SVDMaxStripTTreeModule.h:59
Belle2::SVDMaxStripTTreeModule::m_hHits
SVDAPVHistograms< TH1F > * m_hHits
hits per APV
Definition: SVDMaxStripTTreeModule.h:67
Belle2::SVDMaxStripTTreeModule::m_svdLadder
unsigned int m_svdLadder
ladder
Definition: SVDMaxStripTTreeModule.h:72
Belle2::SVDMaxStripTTreeModule::m_svdSensor
unsigned int m_svdSensor
sensor
Definition: SVDMaxStripTTreeModule.h:73
Belle2::SVDMaxStripTTreeModule::m_svdChip
unsigned int m_svdChip
chip
Definition: SVDMaxStripTTreeModule.h:76
Belle2::SVDMaxStripTTreeModule::m_svdHits
unsigned int m_svdHits
APV hits per event.
Definition: SVDMaxStripTTreeModule.h:75
Belle2::SVDMaxStripTTreeModule::initialize
void initialize() override
Register input and output data.
Definition: SVDMaxStripTTreeModule.cc:35
Belle2::SVDMaxStripTTreeModule::m_t
TTree * m_t
tree containing info related to the U and V side strips
Definition: SVDMaxStripTTreeModule.h:69
Belle2::SVDMaxStripTTreeModule::event
void event() override
Compute the variables and fill the tree.
Definition: SVDMaxStripTTreeModule.cc:66
Belle2::SVDMaxStripTTreeModule::m_resultStoreObjectPointer
StoreObjPtr< SoftwareTriggerResult > m_resultStoreObjectPointer
Store Object to read the trigger decision.
Definition: SVDMaxStripTTreeModule.h:58
Belle2::SVDMaxStripTTreeModule::m_svdSide
unsigned int m_svdSide
side
Definition: SVDMaxStripTTreeModule.h:74
Belle2::SVDMaxStripTTreeModule::m_rootFileName
std::string m_rootFileName
root file name
Definition: SVDMaxStripTTreeModule.h:61
Belle2::SVDMaxStripTTreeModule::SVDMaxStripTTreeModule
SVDMaxStripTTreeModule()
Constructor.
Definition: SVDMaxStripTTreeModule.cc:26
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::SVDMaxStripTTreeModule::terminate
void terminate() override
Write the TTrees to the file.
Definition: SVDMaxStripTTreeModule.cc:103
Belle2::StoreObjPtr
Type-safe access to single objects in the data store.
Definition: ParticleList.h:33
Belle2::SVDMaxStripTTreeModule::m_svdLayer
unsigned int m_svdLayer
layer
Definition: SVDMaxStripTTreeModule.h:71
Belle2::SVDAPVHistograms< TH1F >
Belle2::SVDMaxStripTTreeModule::m_shapersStoreArrayName
std::string m_shapersStoreArrayName
storeArray name of the input ShaperDigits
Definition: SVDMaxStripTTreeModule.h:64
Belle2::StoreArray
Accessor to arrays stored in the data store.
Definition: ECLMatchingPerformanceExpertModule.h:33
Belle2::SVDMaxStripTTreeModule::m_shapers
StoreArray< SVDShaperDigit > m_shapers
array of SVDShaperDigits
Definition: SVDMaxStripTTreeModule.h:65
Belle2::SVDMaxStripTTreeModule::beginRun
void beginRun() override
Define APVHistogram.
Definition: SVDMaxStripTTreeModule.cc:54
Belle2::SVDMaxStripTTreeModule::m_rootFilePtr
TFile * m_rootFilePtr
pointer at root file used for storing histograms
Definition: SVDMaxStripTTreeModule.h:62
Belle2::SVDMaxStripTTreeModule::m_event
unsigned int m_event
event number
Definition: SVDMaxStripTTreeModule.h:77