BmnRoot
Loading...
Searching...
No Matches
BmnHistToF700.h
Go to the documentation of this file.
1/*
2 * File: BmnHistToF700.h
3 * Author: ilnur
4 *
5 * Created on November 29, 2016, 1:24 PM
6 */
7
8#ifndef BMNHISTTOF700_H
9#define BMNHISTTOF700_H 1
10// STL
11#include <exception>
12#include <stdlib.h>
13#include <vector>
14// FairSoft
15#include "BmnEventHeader.h"
16#include "TCanvas.h"
17#include "TChain.h"
18#include "TClonesArray.h"
19#include "TFile.h"
20#include "TFolder.h"
21#include "TH1D.h"
22#include "TH1F.h"
23#include "TH2F.h"
24#include "THttpServer.h"
25
26#include <TNamed.h>
27// BmnRoot
28#include "BmnHist.h"
29#include "BmnTof1Digit.h"
30// #include "BmnTof2Raw2DigitNew.h"
31#define TOF2_MAX_CHAMBERS 59
32#define TOF2_MAX_STRIPS_IN_CHAMBER 32
33#define TOF_COLS 3
34#define TOF_ROWS 2
35
36class BmnHistToF700 : public BmnHist
37{
38 public:
39 BmnHistToF700(TString title = "ToF700", TString path = "");
40 virtual ~BmnHistToF700();
41 void Register(THttpServer* serv);
42 void SetDir(TFile* outFile = NULL, TTree* recoTree = NULL);
43 void Reset();
44 void DrawBoth();
45 void ClearRefRun();
46 BmnStatus SetRefRun(Int_t id);
47
48 void FillFromDigi(DigiArrays* fDigiArrays);
49 void SetSelection(Int_t Plane, Int_t Strip);
50
51 void SetPlane(Int_t v) { fSelectedPlane = v; }
52 void SetSide(Int_t v) { fSelectedSide = v; }
53 void SetStrip(Int_t v) { fSelectedStrip = v; }
54 Int_t GetPlane() { return fSelectedPlane; }
55 Int_t GetSide() { return fSelectedSide; }
56 Int_t GetStrip() { return fSelectedStrip; }
57
58 private:
59 TClonesArray* Events;
60 TH1D* histLeadingTime;
61 TH1D* histLeadingTimeSpecific;
62 TH1D* histAmp;
63 TH1D* histAmpSpecific;
64 TH1I* histStrip;
65 // TH1I *histStripSimult;
66 // TH2F *histState;
67 Int_t fSelectedPlane;
68 Int_t fSelectedStrip;
69 Int_t fSelectedSide;
70 TH1I* histL = new TH1I("", "", TOF2_MAX_STRIPS_IN_CHAMBER, 0, TOF2_MAX_STRIPS_IN_CHAMBER);
71 TH1I* histR = new TH1I("", "", TOF2_MAX_STRIPS_IN_CHAMBER, 0, TOF2_MAX_STRIPS_IN_CHAMBER);
72 TH1I histSimultaneous;
73 vector<TString> Names;
74 TCanvas* canTimes;
75 vector<PadInfo*> canTimesPads;
76
77 void SaveHist(TH1* hist, TString path)
78 {
79 TCanvas* c0 = new TCanvas("c0", hist->GetTitle());
80 hist->Draw();
81 c0->SaveAs(TString(path + TString(hist->GetTitle()) + ".png").Data());
82 delete c0;
83 }
84
85 ClassDef(BmnHistToF700, 2)
86};
87#endif /* BMNHISTTOF700_H */
__m128 v
Definition P4_F32vec4.h:1
BmnStatus
Definition BmnEnums.h:24
BmnStatus SetRefRun(Int_t id)
void FillFromDigi(DigiArrays *fDigiArrays)
void SetSelection(Int_t Plane, Int_t Strip)
void SetPlane(Int_t v)
void SetStrip(Int_t v)
virtual ~BmnHistToF700()
void SetSide(Int_t v)
void Register(THttpServer *serv)
void SetDir(TFile *outFile=NULL, TTree *recoTree=NULL)
#define TOF2_MAX_STRIPS_IN_CHAMBER