51 partname =
"electron";
72 std::cerr<<
"The specified PDG particle is not included in PID.\n";
76 if( inNuMode != NULL ){
91 std::cerr<<
"Invalid neutrino interaction mode. Valid choices are 0,1,2,3.\n";
96 std::string outFileName = outDir + partname + mode +
"_dedxhists.root";
98 TFile
fout(outFileName.c_str(),
"RECREATE");
151 char hname[100], htitle[200];
152 sprintf(hname,
"hlongdedx_det%d_ebin%d_plane%d", idet, iebin, iplane);
153 sprintf(htitle,
"Longitudinal dE/dx: Det Region %d, Energy Bin %d, Plane %d;dE/dX (GeV/cm);Events", idet, iebin, iplane);
154 hlongdedx[idet][iebin][iplane] =
new TH1D(hname, htitle, 50, 0, 0.050);
158 char hname[100], htitle[200];
159 sprintf(hname,
"htransdedx_det%d_ebin%d_plane%d", idet, iebin, iplane);
160 sprintf(htitle,
"Transverse dE/dx: Det Region %d, Energy Bin %d, Plane %d;dE/dX (GeV/cm);Events", idet, iebin, iplane);
168 if( iplane>=3 && iplane<=5 )
170 if( iplane>=6 && iplane<=9 )
172 if( iplane>=10 && iplane<=14 )
176 htransdedx[idet][iebin][iplane] =
new TH1D(hname, htitle, 500, 0, hmax);
189 const char* inTreename,
192 const float inDangLower,
193 const float inDangUpper,
197 const double* eTrueFrac)
200 fChain =
new TChain(inTreename);
224 if( inNuPdg != NULL ){
229 if( inNuMode != NULL ){
234 if( inNuCC != NULL ){
239 if( eTrueFrac != NULL ){
256 if( showerEBin == -1)
272 for(
int iplane =0; iplane <
nplanes; ++iplane)
double showerPlaneDedx[200]
TH1D * htransdedx[kNumXYRegion][kNumEnergyBin][kNumTransversePlane]
fvar< T > fabs(const fvar< T > &x)
static const double kEnergyBins[]
void SaveHists(const int inPdg, const std::string outDir, const int *inNuMode)
static const int kNumTransversePlane
void FillHists(const char *inFnames, const char *inTreename, const char *outDir, const int inPdg, const float inDangLower, const float inDangUpper, const int *inNuPdg, const int *inNuMode, const int *inNuCC, const double *eTrueFrac)
TH1D * hlongdedx[kNumXYRegion][kNumEnergyBin][kNumLongitudinalPlane]
correl_yv Fill(-(dy[iP-1][iC-1]), hyv->GetBinContent(iP, iC))
static const int kNumEnergyBin
T min(const caf::Proxy< T > &a, T b)
double showerTransCellDedx[20]
static const int kNumLongitudinalPlane
static const int kNumXYRegion