8 #ifndef protoDUNE_dEdx_calib_h 9 #define protoDUNE_dEdx_calib_h 111 void LoopLite(std::vector<double> & norm_factors,
114 void LoopMIP(std::vector<double> & norm_factors,
123 fXFile =
new TFile(x_filename.c_str(),
"OPEN");
125 fYZFile =
new TFile(yz_filename.c_str(),
"OPEN");
140 float tot_Ef(
float xval,
float yval,
float zval);
145 #ifdef protoDUNE_dEdx_calib_cxx 154 TFile *
f = (TFile*)gROOT->GetListOfFiles()->FindObject(
"Memory Directory");
155 if (!f || !f->IsOpen()) {
156 f =
new TFile(
"Memory Directory");
158 f->GetObject(
"michelremoving2/Event",tree);
164 TChain * chain =
new TChain(
"michelremoving2/Event",
"");
166 chain->Add(
"/cshare/vol1/data/protodune/calib_files/sceon_files.root/michelremoving2/Event");
169 #endif // SINGLE_TREE 179 delete fChain->GetCurrentFile();
186 return fChain->GetEntry(entry);
192 Long64_t centry =
fChain->LoadTree(entry);
193 if (centry < 0)
return centry;
269 xneg = (TH3F*)ef->Get(
"Reco_ElecField_X_Neg");
270 yneg = (TH3F*)ef->Get(
"Reco_ElecField_Y_Neg");
271 zneg = (TH3F*)ef->Get(
"Reco_ElecField_Z_Neg");
272 xpos = (TH3F*)ef->Get(
"Reco_ElecField_X_Pos");
273 ypos = (TH3F*)ef->Get(
"Reco_ElecField_Y_Pos");
274 zpos = (TH3F*)ef->Get(
"Reco_ElecField_Z_Pos");
294 #endif // #ifdef protoDUNE_dEdx_calib_cxx
void GetEFMaps(TFile *ef)
virtual void Loop(int hitplane, double norm_factor, double calib_factor)
protoDUNE_dEdx_calib(TTree *tree=0)
Float_t trkhitz[30][3][3000]
TBranch * b_adjacent_hits
std::vector< TH3F * > neg_hists
Int_t fCurrent
pointer to the analyzed TTree or TChain
Float_t trkdqdx[30][3][3000]
TBranch * b_unbroken_trks
virtual Int_t GetEntry(Long64_t entry)
virtual void Init(TTree *tree)
void LoopMIP(std::vector< double > &norm_factors, std::vector< std::vector< double >> &calib_factors, TFile &outfile)
Float_t trkendcosxyz[30][3]
Float_t trkresrange[30][3][3000]
Float_t trkdedx[30][3][3000]
T get(std::string const &key) const
virtual void Show(Long64_t entry=-1)
virtual ~protoDUNE_dEdx_calib()
Int_t event
current Tree number in a TChain
std::vector< TH3F * > pos_hists
virtual Long64_t LoadTree(Long64_t entry)
Float_t trkpitch[30][3][3000]
Float_t trkstartcosxyz[30][3]
virtual Int_t Cut(Long64_t entry)
Float_t trkhity[30][3][3000]
float tot_Ef(float xval, float yval, float zval)
TBranch * b_stopping_trks
void SetCaloMaps(const fhicl::ParameterSet &pset)
Float_t trkhitx[30][3][3000]
void LoopLite(std::vector< double > &norm_factors, std::vector< std::vector< double >> &calib_factors, TFile &outfile)
TBranch * b_year_month_date
TBranch * b_trkstartcosxyz
Event finding and building.