6#define CBMRECOQATASK_H 1
13#include <TDirectoryFile.h>
57#define kNtrkProjections 6
100 View(
const char* n,
const char* p, std::vector<int> set) :
name(n), path(p),
fSelector(set) { ; }
108 bool Load(TVector3* p);
115 std::string path =
"";
119 std::map<eProjectionType, std::tuple<int, float, TH2*>>
fProjection =
133 bool Init(
const char* dname,
bool mc =
false);
142 std::string
makeTrange(
const int scale,
float& range);
143 std::string
makeYrange(
const int scale,
float& range);
159 View*
AddView(
const char* n,
const char* p, std::vector<int> set);
166 bool Init(TDirectoryFile* f,
bool mc =
false);
257 virtual InitStatus
Init();
259 virtual void Exec(Option_t* option);
268 std::vector<TString>
GetPath(TGeoNode* node, TString, TString activeNodeName,
int depth = 0,
269 const TString& path =
"");
301 std::map<ECbmModuleId, TClonesArray*>
fTracks = {};
305 std::map<ECbmModuleId, TClonesArray*>
fHits = {};
306 std::map<ECbmModuleId, CbmMCDataArray*>
fPoints = {};
311 TDirectoryFile
fOutFolder = {
"RecoQA",
"CA track driven reco QA"};
313 std::map<ECbmModuleId, Detector>
fDetQa = {};
Class characterising one event by a collection of links (indices) to data objects,...
Access to a MC data branch for time-based analysis.
Task class creating and managing CbmMCDataArray objects.
CbmMCDataManager * cbm_mc_manager
std::vector< TVector3 > fPrjPlanes
list of QA views
void UseMC(bool set=true)
ClassDef(CbmRecoQaTask, 1)
local storage for the z positions of track projection planes
virtual bool FilterEvent(const CbmEvent *ptr)
Filter events for QA use (e.g. event multiplicity)
std::map< ECbmModuleId, TClonesArray * > fHitMatch
mc points
int GetNviews(eViewType type) const
count views types registered with the task
virtual EventFilter * AddEventFilter(EventFilter::eEventCut cut)
virtual Detector * GetDetector(ECbmModuleId did)
std::map< ECbmModuleId, CbmMCDataArray * > fPoints
reconstructed hits
CbmRecoQaTask & operator=(const CbmRecoQaTask &)
CbmRecoQaTask(const CbmRecoQaTask &)
TClonesArray * fEvents
MC info for the global tracks.
static std::bitset< kRecoQaNConfigs > fuRecoConfig
std::map< ECbmModuleId, Detector > fDetQa
virtual void Exec(Option_t *option)
Executed task.
std::map< ECbmModuleId, TClonesArray * > fHits
Time slice info.
std::vector< EventFilter > fFilterEv
reconstructed hits
std::vector< TrackFilter > fFilterTrk
@ kPVyz
x-z projection of the primary vertex:
@ kXYh
Time to EV residuals as function of coordinate in view.
@ kPVxy
Residual distribution T:
@ kResidualX
Pull distribution Y:
@ kDmult
X-Y hit coorelation in local view.
@ kXYt3
X-Y track projections on a random plane (value 2)
@ kXYt5
X-Y track projections on a random plane (value 4)
@ kXYhMC
local view MC point multiplicity
@ kYpY
X to TRK pulls as function of local X in view.
@ kXYt1
X-Y track projections on a random plane (value 0)
@ kYdYMC
Y to TRK residuals as function of local Y in view.
@ kResidualY
Residual distribution X: (x_RC - x_MC) in cm.
@ kPullX
X-Y MC point coorelation in local view (using HitMatch)
@ kResidualTX
Residual distribution Y:
@ kXYt0
y-z projection of the primary vertex:
@ kXYt2
X-Y track projections on a random plane (value 1)
@ kResidualTY
Residual distribution T:
@ kXdX
X-Y track projections on detection unit.
@ kPullY
Pull distribution X: (RC - MC) / dx_RC.
@ kXYp
X-Y hit coorelation in track filtered data.
@ kPVmult
y-z projection of the primary vertex:
@ kYdY
X to TRK residuals w.r.t MC points.
@ kXdXMC
X to TRK residuals as function of local X in view.
@ kWdT
Y to TRK residuals w.r.t MC points.
@ kPVxz
x-y projection of the primary vertex:
@ kXYt4
X-Y track projections on a random plane (value 3)
@ kDmultMC
local view hit multiplicity
@ kChdT
Y to TRK pulls as function of local Y in view.
CbmTimeSlice * fTimeSlice
reconstructed events
virtual bool FilterTrack(const CbmGlobalTrack *ptr)
Filter tracks for further use (e.g. track projections)
@ kTrdHits
has STS hits (StsHit branch)
@ kMuchHits
has Rich hits (RichHit branch)
@ kUseMC
has Much hits (MuchHit branch)
@ kRichHits
has ToF hits (TofHit branch)
@ kRecoQaNConfigs
use MC even if available
@ kStsHits
has tracks reconstructed (GlobalTrack branch)
@ kRecoTracks
has events reconstructed (CbmEvent branch)
@ kTofHits
has TRD` hits (TrdHit branch)
void SetSetupClass(CbmRecoQaTask::eSetup setup)
Define the set of extra z positions where the track should be projected in the x-y plane.
virtual InitStatus Init()
Perform initialization of data sources and projections.
std::map< ECbmModuleId, TClonesArray * > fTracks
reconstructed global tracks / event
TString GetGeoTagForDetector(const TString &detector)
std::vector< TString > GetPath(TGeoNode *node, TString, TString activeNodeName, int depth=0, const TString &path="")
@ kPV
set of track projection views
virtual const CbmTrack * GetTrack(ECbmModuleId did, int id) const
Retrieve detector specific track by index.
std::map< const char *, View > fViews
list of detector QA
TClonesArray * fTrackMatches
reconstructed global tracks / event
virtual TrackFilter * AddTrackFilter(TrackFilter::eTrackCut cut)
virtual Detector * AddDetector(ECbmModuleId did)
TDirectoryFile fOutFolder
void InitMcbm22()
build QA plots for particular setups
Data class with information on a STS local track.
Bookkeeping of time-slice content.
Data(ECbmDataType i, const char *n)
View * GetView(const char *n)
Detector(ECbmModuleId did=ECbmModuleId::kNotExist)
View * FindView(double x, double y, double z)
std::vector< View > fViews
virtual ~Detector()=default
ClassDef(CbmRecoQaTask::Detector, 1)
View * AddView(const char *n, const char *p, std::vector< int > set)
void HelpMess() const
max no of hits/ev for the systems [STS TRD ToF]
std::string ToString() const
int fMultHit[(int) eEventDef::kNofDetHit]
ClassDef(CbmRecoQaTask::EventFilter, 1)
virtual ~EventFilter()=default
bool SetFilter(std::vector< float > cuts)
bool Accept(const CbmEvent *ptr, const CbmRecoQaTask *lnk)
EventFilter(eEventCut typ=eEventCut::kNone)
@ kNone
cut on vertex definition
@ kVertex
cut on trigger conditions
@ kMultHit
cut on track multiplicity
@ kTrigger
cut on hit multiplicity
std::vector< bool > fStsHits
virtual ~TrackFilter()=default
bool Accept(const CbmGlobalTrack *ptr, const CbmRecoQaTask *lnk)
std::string ToString() const
TrackFilter(eTrackCut typ=eTrackCut::kNone)
bool SetFilter(std::vector< float > cuts)
@ kNone
cut on no of Tof hits / track
@ kTrd
cut on no of Rich hits / track
@ kTof
cut on no of TRD hits / track
@ kMuch
cut on no of STS hits / track
@ kRich
cut on no of Much hits / track
ClassDef(CbmRecoQaTask::TrackFilter, 1)
bool AddProjection(eProjectionType prj, float range=-1, const char *unit="cm")
std::string makeYrange(const int scale, float &range)
bool Load(const CbmHit *h, const FairMCPoint *point, const CbmEvent *ev)
std::vector< int > fSelector
detection element center x0 y0 z0
ClassDef(CbmRecoQaTask::View, 1)
View(const char *n, const char *p, std::vector< int > set)
void SetSetup(CbmRecoQaTask::eSetup setup)
uint Register(TDirectoryFile *f)
build directory structure for all projections of current view.
void SetType(CbmRecoQaTask::eViewType type)
std::string makeTrange(const int scale, float &range)
helper functions to estimate the representation (y) axis
double pos[3]
detection element geometrical dx dy dz dimmensions
std::map< eProjectionType, std::tuple< int, float, TH2 * > > fProjection
defining subset of the address set for this view
bool HasAddress(const CbmHit *h, double &x, double &y, double &dx, double &dy) const
Hit classification on system and view.
eSetup fSetup
multiplicity between 2 reset signals
double size[3]
path to the geo volume describing the module
bool SetProjection(eProjectionType prj, float range, const char *unit)
std::string ToString() const