11// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2- // See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3- // All rights not expressly granted are reserved.
2+ // See https://alice-o2.web.cern.ch/copyright for details of the copyright
3+ // holders. All rights not expressly granted are reserved.
44//
55// This software is distributed under the terms of the GNU General Public
66// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
1010// or submit itself to any jurisdiction.
1111
1212// / \file FemtoWorldCollisionSelection.h
13- // / \brief FemtoWorldCollisionSelection - event selection within the o2femtoworld framework
14- // / \author Andi Mathis, TU München, andreas.mathis@ph.tum.de
15- // / \author Zuzanna Chochulska, WUT Warsaw, zchochul@cern.ch
13+ // / \brief FemtoWorldCollisionSelection - event selection within the
14+ // / o2femtoworld framework \author Andi Mathis, TU München,
15+ // / andreas.mathis@ph.tum.de \author Zuzanna Chochulska, WUT Warsaw,
16+ // / zchochul@cern.ch
1617
1718#ifndef PWGCF_FEMTOWORLD_CORE_FEMTOWORLDCOLLISIONSELECTION_H_
1819#define PWGCF_FEMTOWORLD_CORE_FEMTOWORLDCOLLISIONSELECTION_H_
1920
20- #include < string>
2121#include < iostream>
22+ #include < string>
2223
2324#include " Common/CCDB/TriggerAliases.h"
2425#include " Framework/HistogramRegistry.h"
2526#include " Framework/Logger.h"
2627
2728using namespace o2 ::framework;
2829
29- namespace o2 ::analysis::femtoWorld
30- {
30+ namespace o2 ::analysis::femtoWorld {
3131
3232// / \class FemtoWorldCollisionSelection
33- // / \brief Small selection class to check whether a given collision fulfills the specified selections
34- class FemtoWorldCollisionSelection
35- {
36- public:
33+ // / \brief Small selection class to check whether a given collision fulfills the
34+ // / specified selections
35+ class FemtoWorldCollisionSelection {
36+ public:
3737 // / Destructor
3838 virtual ~FemtoWorldCollisionSelection () = default ;
3939
@@ -42,8 +42,8 @@ class FemtoWorldCollisionSelection
4242 // / \param checkTrigger whether or not to check for the trigger alias
4343 // / \param trig Requested trigger alias
4444 // / \param checkOffline whether or not to check for offline selection criteria
45- void setCuts (float zvtxMax, bool checkTrigger, int trig, bool checkOffline, bool checkRun3)
46- {
45+ void setCuts (float zvtxMax, bool checkTrigger, int trig, bool checkOffline,
46+ bool checkRun3) {
4747 mCutsSet = true ;
4848 mZvtxMax = zvtxMax;
4949 mCheckTrigger = checkTrigger;
@@ -54,23 +54,28 @@ class FemtoWorldCollisionSelection
5454
5555 // / Initializes histograms for the task
5656 // / \param registry Histogram registry to be passed
57- void init (HistogramRegistry* registry)
58- {
57+ void init (HistogramRegistry *registry) {
5958 if (!mCutsSet ) {
6059 LOGF (error, " Event selection not set - quitting!" );
6160 }
6261 mHistogramRegistry = registry;
63- mHistogramRegistry ->add (" Event/zvtxhist" , " ; vtx_{z} (cm); Entries" , kTH1F , {{300 , -12.5 , 12.5 }});
64- mHistogramRegistry ->add (" Event/MultV0M" , " ; vMultV0M; Entries" , kTH1F , {{16384 , 0 , 32768 }});
65- mHistogramRegistry ->add (" Event/MultT0M" , " ; vMultT0M; Entries" , kTH1F , {{4096 , 0 , 8192 }});
66- mHistogramRegistry ->add (" Event/MultNTracksPV" , " ; vMultNTracksPV; Entries" , kTH1F , {{120 , 0 , 120 }});
67- mHistogramRegistry ->add (" Event/MultNTracklets" , " ; vMultNTrackslets; Entries" , kTH1F , {{300 , 0 , 300 }});
68- mHistogramRegistry ->add (" Event/MultTPC" , " ; vMultTPC; Entries" , kTH1I , {{600 , 0 , 600 }});
62+ mHistogramRegistry ->add (" Event/zvtxhist" , " ; vtx_{z} (cm); Entries" , kTH1F ,
63+ {{300 , -12.5 , 12.5 }});
64+ mHistogramRegistry ->add (" Event/MultV0M" , " ; vMultV0M; Entries" , kTH1F ,
65+ {{16384 , 0 , 32768 }});
66+ mHistogramRegistry ->add (" Event/MultT0M" , " ; vMultT0M; Entries" , kTH1F ,
67+ {{4096 , 0 , 8192 }});
68+ mHistogramRegistry ->add (" Event/MultNTracksPV" , " ; vMultNTracksPV; Entries" ,
69+ kTH1F , {{120 , 0 , 120 }});
70+ mHistogramRegistry ->add (" Event/MultNTracklets" ,
71+ " ; vMultNTrackslets; Entries" , kTH1F ,
72+ {{300 , 0 , 300 }});
73+ mHistogramRegistry ->add (" Event/MultTPC" , " ; vMultTPC; Entries" , kTH1I ,
74+ {{600 , 0 , 600 }});
6975 }
7076
7177 // / Print some debug information
72- void printCuts ()
73- {
78+ void printCuts () {
7479 LOG (info) << " Debug information for FemtoDreamCollisionSelection" ;
7580 LOG (info) << " Max. z-vertex: " << mZvtxMax ;
7681 LOG (info) << " Check trigger: " << mCheckTrigger ;
@@ -83,9 +88,7 @@ class FemtoWorldCollisionSelection
8388 // / \tparam T type of the collision
8489 // / \param col Collision
8590 // / \return whether or not the collisions fulfills the specified selections
86- template <typename T>
87- bool isSelected (T const & col)
88- {
91+ template <typename T> bool isSelected (T const &col) {
8992 if (std::abs (col.posZ ()) > mZvtxMax ) {
9093 return false ;
9194 }
@@ -107,19 +110,22 @@ class FemtoWorldCollisionSelection
107110 // / Some basic QA of the event
108111 // / \tparam T type of the collision
109112 // / \param col Collision
110- template <typename T>
111- void fillQA (T const & col)
112- {
113+ template <typename T> void fillQA (T const &col) {
113114 if (mHistogramRegistry ) {
114115 mHistogramRegistry ->fill (HIST (" Event/zvtxhist" ), col.posZ ());
115116 mHistogramRegistry ->fill (HIST (" Event/MultT0M" ), col.multFT0M ());
116- mHistogramRegistry ->fill (HIST (" Event/MultNTracksPV" ), col.multNTracksPV ());
117- mHistogramRegistry ->fill (HIST (" Event/MultNTracklets" ), col.multTracklets ());
117+ mHistogramRegistry ->fill (HIST (" Event/MultNTracksPV" ),
118+ col.multNTracksPV ());
119+ mHistogramRegistry ->fill (HIST (" Event/MultNTracklets" ),
120+ col.multTracklets ());
118121 mHistogramRegistry ->fill (HIST (" Event/MultTPC" ), col.multTPC ());
119122 if (mCheckIsRun3 ) {
120123 mHistogramRegistry ->fill (HIST (" Event/MultV0M" ), col.multFV0M ());
121124 } else {
122- mHistogramRegistry ->fill (HIST (" Event/MultV0M" ), 0.5 * (col.multFV0M ())); // in AliPhysics, the VOM was defined by (V0A + V0C)/2.
125+ mHistogramRegistry ->fill (
126+ HIST (" Event/MultV0M" ),
127+ 0.5 * (col.multFV0M ())); // in AliPhysics, the VOM was defined by
128+ // (V0A + V0C)/2.
123129 }
124130 }
125131 }
@@ -134,20 +140,19 @@ class FemtoWorldCollisionSelection
134140 // / \param tracks All tracks
135141 // / \return value of the sphericity of the event
136142 template <typename T1 , typename T2 >
137- float computeSphericity (T1 const & col, T2 const & tracks)
138- {
143+ float computeSphericity (T1 const &col, T2 const &tracks) {
139144 return 2 .f ;
140145 }
141146
142- private:
143- HistogramRegistry* mHistogramRegistry = nullptr ; // /< For QA output
144- bool mCutsSet = false ; // /< Protection against running without cuts
145- bool mCheckTrigger = false ; // /< Check for trigger
146- bool mCheckOffline = false ; // /< Check for offline criteria (might change)
147- bool mCheckIsRun3 = false ; // /< Check if running on Pilot Beam
148- triggerAliases mTrigger = kINT7 ; // /< Trigger to check for
149- float mZvtxMax = 999 .f; // /< Maximal deviation from nominal z-vertex (cm)
147+ private:
148+ HistogramRegistry * mHistogramRegistry = nullptr ; // /< For QA output
149+ bool mCutsSet = false ; // /< Protection against running without cuts
150+ bool mCheckTrigger = false ; // /< Check for trigger
151+ bool mCheckOffline = false ; // /< Check for offline criteria (might change)
152+ bool mCheckIsRun3 = false ; // /< Check if running on Pilot Beam
153+ triggerAliases mTrigger = kINT7 ; // /< Trigger to check for
154+ float mZvtxMax = 999 .f; // /< Maximal deviation from nominal z-vertex (cm)
150155};
151156} // namespace o2::analysis::femtoWorld
152157
153- #endif // PWGCF_FEMTOWORLD_CORE_FEMTOWORLDCOLLISIONSELECTION_H_
158+ #endif // PWGCF_FEMTOWORLD_CORE_FEMTOWORLDCOLLISIONSELECTION_H_
0 commit comments