9#include <svd/modules/svdPerformance/SVDMaxStripTTreeModule.h>
10#include <hlt/softwaretrigger/core/FinalTriggerDecisionCalculator.h>
12#include <vxd/dataobjects/VxdID.h>
13#include <vxd/geometry/GeoCache.h>
17using namespace SoftwareTrigger;
23 setDescription(
"The module is used to create a TTree to study the number of strips per APV per event.");
24 addParam(
"outputFileName",
m_rootFileName,
"Name of output root file.", std::string(
"SVDMaxStripTTree.root"));
37 m_t =
new TTree(
"tree",
"Tree for SVD u/v-strips");
52 TH1F hHits(
"nHits_L@layerL@ladderS@sensor@view@apv",
53 "Number of Hits per Event in @layer.@ladder.@sensor chip @apv on the @view/@side side",
66 if (!eventAccepted)
return;
71 m_hHits->
fill(shaper.getSensorID(), shaper.isUStrip(), shaper.getCellID() / 128, 0);
77 for (
auto ladder : geoCache.getLadders(layer))
80 for (
int apv = 0; apv < 6; apv ++) {
void setDescription(const std::string &description)
Sets the description of the module.
template class for the APV Histograms
H * getHistogram(const VxdID &vxdID, int view, int apv)
get a reference to the histogram for
void fill(const VxdID &vxdID, int view, int apv, Types ... args)
fill the histogram for
std::string m_rootFileName
root file name
unsigned int m_svdLadder
ladder
std::string m_shapersStoreArrayName
storeArray name of the input ShaperDigits
unsigned int m_svdLayer
layer
bool m_skipRejectedEvents
if true skip events rejected by HLT
void initialize() override
Register input and output data.
unsigned int m_svdSensor
sensor
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.
unsigned int m_svdChip
chip
SVDAPVHistograms< TH1F > * m_hHits
hits per APV
void beginRun() override
Define APVHistogram.
unsigned int m_event
event number
SVDMaxStripTTreeModule()
Constructor.
unsigned int m_svdSide
side
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
static bool getFinalTriggerDecision(const SoftwareTriggerResult &result, bool forgetTotalResult=false)
Calculate the final cut decision using all "total_results" of all sub triggers in the software trigge...
Class to faciliate easy access to sensor information of the VXD like coordinate transformations or pi...
static GeoCache & getInstance()
Return a reference to the singleton instance.
Class to uniquely identify a any structure of the PXD and SVD.
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.