NuPlots Class Reference

#include <NuPlots.h>

List of all members.

Public Member Functions

 NuPlots ()
 ~NuPlots ()
void FillCoilCurrentHistos (const NuEvent &nu) const
void FillContainmentHistos (const NuEvent &nu) const
void FillRelativeAngleHistos (const NuEvent &nu) const
void FillDPIdSigmaQPFailDpIDCutPlots (const NuEvent &nu) const
void FillDPIdSigmaQPFailProbCutPlots (const NuEvent &nu) const
void FillDPIdSigmaQPFailSigQPCutPlots (const NuEvent &nu) const
void FillDPIdSigmaQPPassDpIDCutPlots (const NuEvent &nu) const
void FillDPIdSigmaQPPassPreSelCutPlots (const NuEvent &nu) const
void FillDPIdSigmaQPPassSigQPCutPlots (const NuEvent &nu) const
void FillDPIdSigmaQPPassUVVtxCutPlots (const NuEvent &nu) const
void FillRHCplusRHCminusHistosNQ (const NuEvent &nu) const
void FillRHCplusRHCminusHistosPQ (const NuEvent &nu) const
void FillDPIdSigmaQPPlotsN (const NuEvent &nu) const
void FillEnergyBinHistos (const NuEvent &nu) const
void FillEvtAndSpillTimingPlots (const NuEvent &nu) const
void FillGeneralHistos (const NtpStRecord &ntp, const Bool_t novaBeamFlag=false) const
void FillKinematicsHistos (const NuEvent &nu) const
void FillLowProbPlots (const NtpSRTrack &trk, const NuEvent &nu) const
void FillN_1Plots (const NuEvent &nu) const
void FillSelPlots (const NuEvent &nu, const TString cutname, const TString tag) const
void FillSpectra (const NuEvent &nu, const TString name) const
void FillNtupleEarliestLatestTime (const NuEvent &nu) const
void FillTrueJmIDHistosPQNQ (const NuEvent &nu) const
void FillTrueRoIDHistos (const NuEvent &nu) const
void FillTrueRoIDHistosPQNQ (const NuEvent &nu) const
void FillTrueAbIDHistos (const NuEvent &nu) const
void FillTrueAbIDHistosPQNQ (const NuEvent &nu) const
void FillRangeCurvCompHistos (const NuEvent &nu) const
void FillRecoEnYHistosN (const NuEvent &nu) const
void FillSigmaQPPlots (const NuEvent &nu) const
void FillShwHistos (const NtpStRecord &ntp, const NtpSREvent &evt, const NuEvent &nu) const
void FillStpfitqpPlots (const NtpStRecord &ntp, const NtpSRTrack &trk, const NuEvent &nu) const
void FillTrackResponseHistos (const NtpStRecord &ntp, const NtpSRTrack &trk, const NuEvent &nu) const
void FillTrueDpIDHistos (const NuEvent &nu) const
void FillTrueDpIDHistosPQNQ (const NuEvent &nu) const
void FillTrueFidEnergySpect (const NuEvent &nu) const
void FillTrueFidEnergySpect (const NuMCEvent &mc, const NuBinningScheme::NuBinningScheme_t binningScheme=NuBinningScheme::kUnknown) const
void FillTrueFidEnergySpectSpecial (const NuMCEvent &mc) const
void FillTruePIDHistos (const NuEvent &nu) const
void FillUVHistos (const NuEvent &nu) const
void FillXYZHistos (const NuEvent &nu) const
void FormatPlot (TH1 *h, TString xTitle, TString yTitle="") const
void FillDetectorEdge (const NuEvent &nu, TString post) const
void FillCounts (const NuEvent &nu, TString post, TString cut) const
void FillBRev (const NuEvent &nu, TString post, bool truth=false) const
void FillCoilHole (const NuEvent &nu) const
void FillEffPur (const NuEvent &nu, bool sel) const
void FillHe (const NuEvent &nu, int mode) const
void FillMiscHists (const NuEvent &nu) const
void PrintBlankCommentLine (std::ostream &os) const
std::string PrintEventInfo (std::ostream &os, const NuEvent &nu) const
void PrintMCInfo (std::ostream &os, const NuEvent &nu) const
void PrintRangeEnergy (const NuEvent &nu) const
void PrintRecoInfo (std::ostream &os, const NuEvent &nu) const
void PrintRunSnarlEvent (std::ostream &os, const NuEvent &nu) const
void PrintTrackFitInfo (std::ostream &os, const NuEvent &nu) const

Private Member Functions

TH1F * CreateHist (TString name, TString title, Int_t bins, Double_t minx, Double_t maxx, TString xTitle="", TString yTitle="") const
TH2F * CreateHist (TString name, TString title, Int_t xbins, Double_t minx, Double_t maxx, Int_t ybins, Double_t miny, Double_t maxy, TString xTitle="", TString yTitle="") const

Detailed Description

Definition at line 24 of file NuPlots.h.


Constructor & Destructor Documentation

NuPlots::NuPlots (  ) 

Definition at line 53 of file NuPlots.cxx.

References Msg::kDebug, and MSG.

00054 {
00055   MSG("NuPlots",Msg::kDebug)
00056     <<"Running NuPlots Constructor..."<<endl;
00057 
00058 
00059   MSG("NuPlots",Msg::kDebug)
00060     <<"Finished NuPlots Constructor"<<endl;
00061 }

NuPlots::~NuPlots (  ) 

Definition at line 65 of file NuPlots.cxx.

References Msg::kDebug, and MSG.

00066 {
00067   MSG("NuPlots",Msg::kDebug)
00068     <<"Running NuPlots Destructor..."<<endl;
00069 
00070 
00071   MSG("NuPlots",Msg::kDebug)
00072     <<"Finished NuPlots Destructor"<<endl;
00073 }


Member Function Documentation

TH2F * NuPlots::CreateHist ( TString  name,
TString  title,
Int_t  xbins,
Double_t  minx,
Double_t  maxx,
Int_t  ybins,
Double_t  miny,
Double_t  maxy,
TString  xTitle = "",
TString  yTitle = "" 
) const [private]

Definition at line 47660 of file NuPlots.cxx.

References FormatPlot().

47664 {
47665   TH2F *hist = new TH2F(name, title, xbins, minx, maxx, ybins, miny, maxy);
47666   this->FormatPlot(hist, xTitle, yTitle);
47667   return hist;
47668 }

TH1F * NuPlots::CreateHist ( TString  name,
TString  title,
Int_t  bins,
Double_t  minx,
Double_t  maxx,
TString  xTitle = "",
TString  yTitle = "" 
) const [private]

Definition at line 47648 of file NuPlots.cxx.

References FormatPlot().

Referenced by FillXYZHistos().

47651 {
47652   TH1F *hist = new TH1F(name, title, bins, minx, maxx);
47653   this->FormatPlot(hist, xTitle, yTitle);
47654   return hist;
47655 }

void NuPlots::FillBRev ( const NuEvent nu,
TString  post,
bool  truth = false 
) const

Definition at line 47132 of file NuPlots.cxx.

References NuEvent::beamWeight, NuEvent::charge, NuEvent::containmentFlagPitt, En(), NuEvent::energy, FormatPlot(), NuEvent::inu, Msg::kError, Msg::kInfo, MSG, NuEvent::planeTrkEnd, NuEvent::shwEn, th(), NuEvent::trkEn, NuEvent::trkEnMC, NuEvent::trkvtxdcosz, NuEvent::xTrkEnd, NuEvent::y, NuEvent::yTrkEnd, and NuEvent::zTrkEnd.

Referenced by NuDSTAna::BRevAna().

47133 {
47134   MSG("NuPlots", Msg::kError) << "Can't use RunII weight which no longer exists" << endl;
47135   double rw = nu.beamWeight;
47136 
47137   static const int Nplots = 12;
47138   static const TString names[] = {"PQCo", "NQCo", "PQEx", "NQEx",// pnum
47139                                   "PQ", "NQ",                    // qnum
47140                                   "PQExUp", "NQExUp", "PQExDn",  // rnum
47141                                   "NQExDn", "PQExEnd", "NQExEnd"};//  "
47142 
47143   static vector<TH1F*> TrkEn;
47144   static vector<TH1F*> TrueMuEn;
47145   static vector<TH1F*> En;
47146   static vector<TH1F*> ShwEn;
47147   static vector<TH1F*> RecoY;
47148   static vector<TH1F*> Theta;
47149   static vector<TH1F*> TrkZEnd;
47150   static vector<TH2F*> TrkEndMap;
47151   //static vector<TProfile2D*> TrkEndProfile;
47152 
47153   static map<TString, int> index;
47154 
47155   map<TString,int>::iterator iter = index.find(post);
47156   if( iter == index.end() ) {
47157     index[post] = TrkEn.size();
47158     MSG("NuPlots",Msg::kInfo)
47159       <<"Creating BRev " << post << " plots.  index[post]="
47160       << index[post] << endl;
47161 
47162     TString pre = "h";
47163     TString sTrkEn = pre + "TrkEn_" + post + "_";
47164     TString sTrueMuEn = pre + "TrueMuEn_" + post + "_";
47165     TString sEn    = pre + "En_" + post + "_";
47166     TString sShwEn = pre + "ShwEn_" + post + "_";
47167     TString sRecoY = pre + "RecoY_" + post + "_";
47168     TString sTheta = pre + "Theta_" + post + "_";
47169     TString sTrkZEnd = pre + "TrkZEnd_" + post + "_";
47170     TString sTrkEndMap = pre + "TrkEndMap_" + post + "_";
47171 
47172     float TrkEnBins[21] = {0,1,2,3,4,
47173                            5,6,7,8,9,
47174                            10,11,12,14,
47175                            16,18,20,22,
47176                            24,27,30};
47177     float RecoYBins[17] = {0,.05,.10,.15,.20,
47178                            .25,.30,.35,.40,.45,
47179                            .50,.55,.6,.7,.8,
47180                            .9,1};
47181     float ThetaBins[19] = {0,.02,0.04,0.06,0.08,.10,
47182                            .12,.14,.16,.18,.20,
47183                            .25,.30,.35,.40,.5,
47184                            .6,.8,1};
47185 
47186     for (int i = 0; i < Nplots; ++i) {
47187       TrkEn.push_back(new TH1F(sTrkEn+names[i],sTrkEn+names[i],20,TrkEnBins));//4*320,-32,320));
47188       FormatPlot(TrkEn.back(), "Reconstructed Muon Energy (GeV)");
47189 
47190       TrueMuEn.push_back(new TH1F(sTrueMuEn+names[i],sTrueMuEn+names[i],20,TrkEnBins));//4*320,-32,320));
47191       FormatPlot(TrueMuEn.back(), "True Muon Energy (GeV)");
47192 
47193       RecoY.push_back(new TH1F(sRecoY+names[i],sRecoY+names[i],16,RecoYBins));//1400,-0.2,1.2));
47194       FormatPlot(RecoY.back(), "Reconstructed y");
47195 
47196       Theta.push_back(new TH1F(sTheta+names[i],sTheta+names[i],18,ThetaBins));//2000,-6.3,6.3));
47197       FormatPlot(Theta.back(), "Theta");
47198 
47199       En.push_back(new TH1F(sEn+names[i],sEn+names[i],20,TrkEnBins));//4*320,-32,320));
47200       FormatPlot(En.back(), "Reconstructed Energy (GeV)");
47201 
47202       ShwEn.push_back(new TH1F(sShwEn+names[i],sShwEn+names[i],20,TrkEnBins));//4*320,-32,320));
47203       FormatPlot(ShwEn.back(), "Reconstructed Shower Energy (GeV)");
47204 
47205       TrkZEnd.push_back(new TH1F(sTrkZEnd+names[i],sTrkZEnd+names[i],5*30,0,30));
47206       FormatPlot(TrkZEnd.back(), "Track End Z (m)");
47207 
47208       TrkEndMap.push_back(new TH2F(sTrkEndMap+names[i],sTrkEndMap+names[i],2000,-1,1,2000,-1,1));
47209       FormatPlot(TrkEndMap.back(), "Track End X (m)", "Track End Y (m)");
47210     }
47211   }
47212 
47213   float charge, containment;
47214   int pnum=index[post];
47215   int qnum=pnum+4;
47216   int rnum=qnum+2;
47217   if (truth) {
47218     charge=-1.0*nu.inu;
47219     containment = nu.containmentFlagPitt;
47220   } else {
47221     charge = nu.charge;
47222     containment = nu.containmentFlagPitt;
47223   }
47224 
47225   if (charge < 0)  {  // +    => even
47226     pnum++;         // -    => odd
47227     qnum++;
47228     rnum++;
47229   }
47230   if (containment==2 || containment==4) { // Exiting
47231     pnum += 2;       // exit => 2,3
47232 
47233     if (containment == 2) // Upstream Exit Side
47234       rnum += 0;
47235     else if (containment == 4) { // Downstream Exit (side +1, end +2)
47236       rnum++;
47237       if (nu.planeTrkEnd > 275) // Exit the End
47238         rnum++;
47239     }
47240   }
47241   else {
47242     rnum = -1;
47243   }
47244 
47245   float th = acos(nu.trkvtxdcosz);
47246   //float rTrkEnd = sqrt(pow(nu.xTrkEnd,2) + pow(nu.yTrkEnd,2));
47247 
47248   TrkEn[pnum]->Fill(nu.trkEn, rw);
47249   TrueMuEn[pnum]->Fill(TMath::Abs(nu.trkEnMC), rw);
47250   En[pnum]->Fill(nu.energy, rw);
47251   ShwEn[pnum]->Fill(nu.shwEn, rw);
47252   RecoY[pnum]->Fill(nu.y,rw);
47253   Theta[pnum]->Fill(th, rw);
47254   TrkZEnd[pnum]->Fill(nu.zTrkEnd, rw);
47255   TrkEndMap[pnum]->Fill(nu.xTrkEnd, nu.yTrkEnd, rw);
47256 
47257   TrkEn[qnum]->Fill(nu.trkEn, rw);
47258   TrueMuEn[qnum]->Fill(TMath::Abs(nu.trkEnMC), rw);
47259   En[qnum]->Fill(nu.energy, rw);
47260   ShwEn[qnum]->Fill(nu.shwEn, rw);
47261   RecoY[qnum]->Fill(nu.y,rw);
47262   Theta[qnum]->Fill(th, rw);
47263   TrkZEnd[qnum]->Fill(nu.zTrkEnd, rw);
47264   TrkEndMap[qnum]->Fill(nu.xTrkEnd, nu.yTrkEnd, rw);
47265 
47266   if (rnum > 0) {
47267     TrkEn[rnum]->Fill(nu.trkEn, rw);
47268     TrueMuEn[rnum]->Fill(TMath::Abs(nu.trkEnMC), rw);
47269     En[rnum]->Fill(nu.energy, rw);
47270     ShwEn[rnum]->Fill(nu.shwEn, rw);
47271     RecoY[rnum]->Fill(nu.y,rw);
47272     Theta[rnum]->Fill(th, rw);
47273     TrkZEnd[rnum]->Fill(nu.zTrkEnd, rw);
47274     TrkEndMap[rnum]->Fill(nu.xTrkEnd, nu.yTrkEnd, rw);
47275   }
47276 }

void NuPlots::FillCoilCurrentHistos ( const NuEvent nu  )  const

Definition at line 46791 of file NuPlots.cxx.

References NuEvent::coilCurrent, NuEvent::coilIsOk, Msg::kDebug, and MAXMSG.

Referenced by NuAnalysis::ChargeSeparationOneSnarl(), and NuAnalysis::MakeFullDST().

46792 {
46793   static TH1F* hCoilCurrent=0;
46794   static TH1F* hCoilCurrentBad=0;
46795 
46796   if (!hCoilCurrent){
46797     MAXMSG("NuPlots",Msg::kDebug,1)
46798       <<"Creating CoilCurrent plots..."<<endl;
46799 
46800     hCoilCurrent=new TH1F("hCoilCurrent","hCoilCurrent",
46801                           4000,-10000,10000);
46802     hCoilCurrent->GetXaxis()->SetTitle("Coil current");
46803     hCoilCurrent->GetXaxis()->CenterTitle();
46804     hCoilCurrent->GetYaxis()->SetTitle("");
46805     hCoilCurrent->GetYaxis()->CenterTitle();
46806     //hCoilCurrent->SetBit(TH1::kCanRebin);
46807 
46808     hCoilCurrentBad=new TH1F("hCoilCurrentBad","hCoilCurrentBad",
46809                              4000,-10000,10000);
46810     hCoilCurrentBad->GetXaxis()->SetTitle("Coil current");
46811     hCoilCurrentBad->GetXaxis()->CenterTitle();
46812     hCoilCurrentBad->GetYaxis()->SetTitle("");
46813     hCoilCurrentBad->GetYaxis()->CenterTitle();
46814     //hCoilCurrentBad->SetBit(TH1::kCanRebin);
46815   }
46816 
46817   if (nu.coilIsOk) {
46818     hCoilCurrent->Fill(nu.coilCurrent);
46819   }
46820   else {
46821     hCoilCurrentBad->Fill(nu.coilCurrent);
46822   }
46823 }

void NuPlots::FillCoilHole ( const NuEvent nu  )  const

Definition at line 47281 of file NuPlots.cxx.

References FormatPlot(), SimFlag::kMC, NuEvent::planeTrkEnd, plots(), NuEvent::rw, NuEvent::simFlag, th(), NuEvent::xTrkEnd, and NuEvent::yTrkEnd.

Referenced by NuDSTAna::CoilHoleAna().

47282 {
47283   static TString sim;
47284   static vector<TH1F*> plots;
47285   static bool firstRun = true;
47286   static double th[13] = {-90., -75., -60., -45., -30., -15., 0., 15., 30., 45., 60., 75., 90.};
47287 
47288   if( firstRun ) {
47289     firstRun = false;
47290     if (nu.simFlag == SimFlag::kMC)
47291       sim = "MC";
47292     else
47293       sim = "DA";
47294 
47295     TString name;
47296 
47297     TString axis = "#theta = ";
47298     TString     theta;
47299 
47300     TString plane[4] = {"PartialV","PartialU","FullV","FullU"};
47301 
47302     for (int i = 0; i < 13; i++) {
47303       name = "hCoilHole";
47304       name += sim;
47305       name += i;
47306 
47307       theta = "";
47308       theta += th[i];
47309 
47310       for (int j = 0; j < 4; j++) {
47311         plots.push_back(new TH1F(name+plane[j], name+plane[j],5000,-1,1));
47312         FormatPlot(plots.back(), axis+theta+" "+plane[j]);
47313       }
47314 
47315 
47316     }
47317   }
47318 
47319 
47320   // Plane Numbering Conventions (from NueConventions.cxx)
47321   // make a lookup ptype to hold the type of each plane
47322   // 1 = v partial   2 = u partial
47323   // 3 = v full   4 = u full
47324   // 0 = uninstrumented
47325 
47326   int pl = nu.planeTrkEnd;
47327   int ptype = 0;
47328 
47329   if(pl%2==0)      // a v plane
47330     ptype=1;
47331   else             // a u plane
47332     ptype=2;
47333   if((pl-1)%5 == 0)// fully instrumented
47334     ptype+=2;
47335   else if(pl > 120)// not instrumented
47336     ptype=0;
47337   if (pl > 281)    // plane does not exist
47338     ptype=0;
47339 
47340   if (ptype == 0) return;
47341 
47342   float t, r, ttr, rtr;
47343   int pnum;
47344 
47345   if (nu.xTrkEnd*nu.xTrkEnd + nu.yTrkEnd*nu.yTrkEnd <   0.7*0.7) {
47346     for (int i = 0; i < 13; i++) {
47347       pnum = 4*i + ptype - 1;
47348 
47349       // Select on Transverse position +/- 5 cm
47350       ttr = TMath::DegToRad()*(th[i]+90.);
47351       rtr = TMath::Abs(nu.xTrkEnd*TMath::Cos(ttr) + nu.yTrkEnd*TMath::Sin(ttr));
47352 
47353       if (rtr < 0.05) {
47354         t = TMath::DegToRad()*th[i];
47355         r       = nu.xTrkEnd*TMath::Cos(t) + nu.yTrkEnd*TMath::Sin(t);
47356         plots[pnum]->Fill(r, nu.rw);
47357       }
47358     }
47359   }
47360 }

void NuPlots::FillContainmentHistos ( const NuEvent nu  )  const

Definition at line 20863 of file NuPlots.cxx.

References NuEvent::charge, NuEvent::containmentFlag, NuEvent::distToEdgeEvtVtx, NuEvent::energy, NuEvent::energyMC, NuReco::GetRadiusFromBeamCentre(), NuEvent::iaction, NuLibrary::Instance(), NuEvent::inu, Msg::kDebug, Msg::kInfo, SimFlag::kMC, Msg::kWarning, MAXMSG, MSG, NuLibrary::reco, NuEvent::rw, NuEvent::shwEn, NuEvent::shwEn2MC, NuEvent::shwEnMC, NuEvent::simFlag, NuEvent::trkEn, NuEvent::trkEn2MC, NuEvent::trkEnCurv, NuEvent::trkEnMC, NuEvent::trkEnRange, NuEvent::vtxxMC, NuEvent::vtxyMC, NuEvent::vtxzMC, NuEvent::xEvtEnd, NuEvent::xEvtVtx, NuEvent::xTrkVtx, NuEvent::y, NuEvent::yEvtEnd, NuEvent::yEvtVtx, NuEvent::yMC, NuEvent::yTrkVtx, and NuEvent::zEvtVtx.

Referenced by NuAnalysis::ChargeSeparationOneSnarl(), NuAnalysis::ChargeSignCut(), NuAnalysis::EnergySpect(), NuAnalysis::LIRejectionTest(), NuDSTAna::MakeFinalPlots(), and NuAnalysis::NMBSummaryTreeAna().

20864 {
20865   static TH1F* hMuEnDiffPQ=0;
20866   static TH1F* hMuEnDiffRangePQ=0;
20867   static TH1F* hMuEnDiffRangePQ1=0;
20868   static TH1F* hMuEnDiffRangePQ2=0;
20869   static TH1F* hMuEnDiffRangePQ3=0;
20870   static TH1F* hMuEnDiffRangePQ4=0;
20871   static TH1F* hMuEnDiffCurvPQ=0;
20872   static TH1F* hMuEnDiffCurvPQ1=0;
20873   static TH1F* hMuEnDiffCurvPQ2=0;
20874   static TH1F* hMuEnDiffCurvPQ3=0;
20875   static TH1F* hMuEnDiffCurvPQ4=0;
20876 
20877   static TH1F* hMuEnDiffRangeR07PQ=0;
20878   static TH1F* hMuEnDiffRangeR07PQ1=0;
20879   static TH1F* hMuEnDiffRangeR07PQ2=0;
20880   static TH1F* hMuEnDiffRangeR07PQ3=0;
20881   static TH1F* hMuEnDiffRangeR07PQ4=0;
20882   static TH1F* hMuEnDiffCurvR07PQ=0;
20883   static TH1F* hMuEnDiffCurvR07PQ1=0;
20884   static TH1F* hMuEnDiffCurvR07PQ2=0;
20885   static TH1F* hMuEnDiffCurvR07PQ3=0;
20886   static TH1F* hMuEnDiffCurvR07PQ4=0;
20887 
20888   static TH1F* hShwEnDiffPQ=0;
20889   static TH1F* hShwEn2DiffPQ=0;
20890   static TH1F* hShwEnDiffPQ1=0;
20891   static TH1F* hShwEnDiffPQ2=0;
20892   static TH1F* hShwEnDiffPQ3=0;
20893   static TH1F* hShwEnDiffPQ4=0;
20894 
20895   static TH1F* hNuEnDiffPQ=0;
20896   static TH1F* hNuEnDiffPQ1=0;
20897   static TH1F* hNuEnDiffPQ2=0;
20898   static TH1F* hNuEnDiffPQ3=0;
20899   static TH1F* hNuEnDiffPQ4=0;
20900   static TH1F* hNuEnDiffCCPQ=0;
20901   static TH1F* hNuEnDiffNCPQ=0;
20902 
20903   static TH1F* hEvtVtxTDiffPQ=0;
20904   static TH1F* hEvtVtxZDiffPQ=0;
20905   static TH1F* hEvtVtxSDiffPQ=0;
20906   static TProfile* pEvtVtxTDiffVsDistPQ=0;
20907   static TProfile* pEvtVtxZDiffVsDistPQ=0;
20908   static TProfile* pEvtVtxSDiffVsDistPQ=0;
20909 
20910   //PQ
20911   static TH1F* hMuEnDiffNQ=0;
20912   static TH1F* hMuEnDiffRangeNQ=0;
20913   static TH1F* hMuEnDiffRangeNQ1=0;
20914   static TH1F* hMuEnDiffRangeNQ2=0;
20915   static TH1F* hMuEnDiffRangeNQ3=0;
20916   static TH1F* hMuEnDiffRangeNQ4=0;
20917   static TH1F* hMuEnDiffCurvNQ=0;
20918   static TH1F* hMuEnDiffCurvNQ1=0;
20919   static TH1F* hMuEnDiffCurvNQ2=0;
20920   static TH1F* hMuEnDiffCurvNQ3=0;
20921   static TH1F* hMuEnDiffCurvNQ4=0;
20922 
20923   static TH1F* hMuEnDiffRangeR07NQ=0;
20924   static TH1F* hMuEnDiffRangeR07NQ1=0;
20925   static TH1F* hMuEnDiffRangeR07NQ2=0;
20926   static TH1F* hMuEnDiffRangeR07NQ3=0;
20927   static TH1F* hMuEnDiffRangeR07NQ4=0;
20928   static TH1F* hMuEnDiffCurvR07NQ=0;
20929   static TH1F* hMuEnDiffCurvR07NQ1=0;
20930   static TH1F* hMuEnDiffCurvR07NQ2=0;
20931   static TH1F* hMuEnDiffCurvR07NQ3=0;
20932   static TH1F* hMuEnDiffCurvR07NQ4=0;
20933 
20934   static TH1F* hShwEnDiffNQ=0;
20935   static TH1F* hShwEn2DiffNQ=0;
20936   static TH1F* hShwEnDiffNQ1=0;
20937   static TH1F* hShwEnDiffNQ2=0;
20938   static TH1F* hShwEnDiffNQ3=0;
20939   static TH1F* hShwEnDiffNQ4=0;
20940 
20941   static TH1F* hShwEnDiffNQGeV1=0;
20942   static TH1F* hShwEnDiffNQGeV2=0;
20943   static TH1F* hShwEnDiffNQGeV3=0;
20944   static TH1F* hShwEnDiffNQGeV4=0;
20945   static TH1F* hShwEnDiffNQGeV5=0;
20946   static TH1F* hShwEnDiffNQGeV6=0;
20947 
20948   static TH1F* hNuEnDiffNQ=0;
20949   static TH1F* hNuEnDiffNQ1=0;
20950   static TH1F* hNuEnDiffNQ2=0;
20951   static TH1F* hNuEnDiffNQ3=0;
20952   static TH1F* hNuEnDiffNQ4=0;
20953   static TH1F* hNuEnDiffCCNQ=0;
20954   static TH1F* hNuEnDiffNCNQ=0;
20955 
20956   static TH1F* hEvtVtxTDiffNQ=0;
20957   static TH1F* hEvtVtxZDiffNQ=0;
20958   static TH1F* hEvtVtxSDiffNQ=0;
20959   static TProfile* pEvtVtxTDiffVsDistNQ=0;
20960   static TProfile* pEvtVtxZDiffVsDistNQ=0;
20961   static TProfile* pEvtVtxSDiffVsDistNQ=0;
20962 
20963   //y stuff
20964   static TH1F* hYDiffPQ=0;
20965   static TH1F* hYAbDiffPQ=0;
20966   static TH1F* hMuYDiffMCPQ=0;
20967   static TH1F* hShwYDiffMCPQ=0;
20968   static TH1F* hMuYAbDiffMCPQ=0;
20969   static TH1F* hShwYAbDiffMCPQ=0;
20970 
20971   static TH1F* hYDiffNQ=0;
20972   static TH1F* hYAbDiffNQ=0;
20973   static TH1F* hMuYDiffMCNQ=0;
20974   static TH1F* hShwYDiffMCNQ=0;
20975   static TH1F* hMuYAbDiffMCNQ=0;
20976   static TH1F* hShwYAbDiffMCNQ=0;
20977 
20978   static TProfile* pNuEnDiff20NQ=0;
20979   static TProfile* pNuEnDiff10NQ=0;
20980   static TProfile* pNuEnDiff05NQ=0;
20981   static TProfile* pMuEnDiff20NQ=0;
20982   static TProfile* pMuEnDiff10NQ=0;
20983   static TProfile* pMuEnDiff05NQ=0;
20984   static TProfile* pShwEnDiff20NQ=0;
20985   static TProfile* pShwEnDiff10NQ=0;
20986   static TProfile* pShwEnDiff05NQ=0;
20987 
20988 
20989   static TProfile* pNuEnDiff20PQ=0;
20990   static TProfile* pNuEnDiff10PQ=0;
20991   static TProfile* pNuEnDiff05PQ=0;
20992   static TProfile* pMuEnDiff20PQ=0;
20993   static TProfile* pMuEnDiff10PQ=0;
20994   static TProfile* pMuEnDiff05PQ=0;
20995   static TProfile* pShwEnDiff20PQ=0;
20996   static TProfile* pShwEnDiff10PQ=0;
20997   static TProfile* pShwEnDiff05PQ=0;
20998 
20999 
21000   static TH2F* hShwVsNuEnNQ=0;
21001   static TH2F* hShwVsNuEnPQ=0;
21002   static TH2F* hShwVsNuEnAllNQ=0;
21003   static TH2F* hShwVsNuEnAllPQ=0;
21004 
21005 
21006   //fid vol shower stuff
21007   static TProfile* pShwEnDiffVsDistAllPQ=0;
21008   static TProfile* pShwEnDiffVsDistl05PQ=0;
21009   static TProfile* pShwEnDiffVsDistg05l10PQ=0;
21010   static TProfile* pShwEnDiffVsDistg10l20PQ=0;
21011   static TProfile* pShwEnDiffVsDistg20PQ=0;
21012   static TProfile* pShwEnVsDistPQ=0;
21013 
21014   static TH1F* hEvtsVsDistAllRl75PQ=0;
21015   static TH1F* hEvtsVsDistAllRl50PQ=0;
21016   static TH1F* hEvtsVsDistAllPQ=0;
21017   static TH1F* hEvtsVsDistl05PQ=0;
21018   static TH1F* hEvtsVsDistg05l10PQ=0;
21019   static TH1F* hEvtsVsDistg10l20PQ=0;
21020   static TH1F* hEvtsVsDistg20PQ=0;
21021 
21022   static TProfile* pShwEnDiffVsDistAllNQ=0;
21023   static TProfile* pShwEnDiffVsDistl05NQ=0;
21024   static TProfile* pShwEnDiffVsDistg05l10NQ=0;
21025   static TProfile* pShwEnDiffVsDistg10l20NQ=0;
21026   static TProfile* pShwEnDiffVsDistg20NQ=0;
21027   static TProfile* pShwEnVsDistNQ=0;
21028 
21029   static TH1F* hEvtsVsDistAllRl75NQ=0;
21030   static TH1F* hEvtsVsDistAllRl50NQ=0;
21031   static TH1F* hEvtsVsDistAllNQ=0;
21032   static TH1F* hEvtsVsDistl05NQ=0;
21033   static TH1F* hEvtsVsDistg05l10NQ=0;
21034   static TH1F* hEvtsVsDistg10l20NQ=0;
21035   static TH1F* hEvtsVsDistg20NQ=0;
21036 
21037   if(!hMuEnDiffRangePQ){
21038 
21039     //PQ, was 440,-1.1,1.1
21040     hMuEnDiffPQ=new TH1F("hMuEnDiffPQ","hMuEnDiffPQ",
21041                          4*160,-1.6,1.6);
21042     hMuEnDiffPQ->GetXaxis()->SetTitle("Energy (reco-true)/true");
21043     hMuEnDiffPQ->GetXaxis()->CenterTitle();
21044     hMuEnDiffPQ->GetYaxis()->SetTitle("");
21045     hMuEnDiffPQ->GetYaxis()->CenterTitle();
21046     //hMuEnDiffPQ->SetBit(TH1::kCanRebin);
21047 
21048     hMuEnDiffRangePQ=new TH1F("hMuEnDiffRangePQ","hMuEnDiffRangePQ",
21049                               4*160,-1.6,1.6);
21050     hMuEnDiffRangePQ->GetXaxis()->SetTitle("Energy (reco-true)/true");
21051     hMuEnDiffRangePQ->GetXaxis()->CenterTitle();
21052     hMuEnDiffRangePQ->GetYaxis()->SetTitle("");
21053     hMuEnDiffRangePQ->GetYaxis()->CenterTitle();
21054     //hMuEnDiffRangePQ->SetBit(TH1::kCanRebin);
21055 
21056     hMuEnDiffRangePQ1=new TH1F("hMuEnDiffRangePQ1","hMuEnDiffRangePQ1",
21057                                4*160,-1.6,1.6);
21058     hMuEnDiffRangePQ1->GetXaxis()->SetTitle("Energy (reco-true)/true");
21059     hMuEnDiffRangePQ1->GetXaxis()->CenterTitle();
21060     hMuEnDiffRangePQ1->GetYaxis()->SetTitle("");
21061     hMuEnDiffRangePQ1->GetYaxis()->CenterTitle();
21062     //hMuEnDiffRangePQ1->SetBit(TH1::kCanRebin);
21063 
21064     hMuEnDiffRangePQ2=new TH1F("hMuEnDiffRangePQ2","hMuEnDiffRangePQ2",
21065                                4*160,-1.6,1.6);
21066     hMuEnDiffRangePQ2->GetXaxis()->SetTitle("Energy (reco-true)/true");
21067     hMuEnDiffRangePQ2->GetXaxis()->CenterTitle();
21068     hMuEnDiffRangePQ2->GetYaxis()->SetTitle("");
21069     hMuEnDiffRangePQ2->GetYaxis()->CenterTitle();
21070     //hMuEnDiffRangePQ2->SetBit(TH1::kCanRebin);
21071 
21072     hMuEnDiffRangePQ3=new TH1F("hMuEnDiffRangePQ3","hMuEnDiffRangePQ3",
21073                                4*160,-1.6,1.6);
21074     hMuEnDiffRangePQ3->GetXaxis()->SetTitle("Energy (reco-true)/true");
21075     hMuEnDiffRangePQ3->GetXaxis()->CenterTitle();
21076     hMuEnDiffRangePQ3->GetYaxis()->SetTitle("");
21077     hMuEnDiffRangePQ3->GetYaxis()->CenterTitle();
21078     //hMuEnDiffRangePQ3->SetBit(TH1::kCanRebin);
21079 
21080     hMuEnDiffRangePQ4=new TH1F("hMuEnDiffRangePQ4","hMuEnDiffRangePQ4",
21081                                4*160,-1.6,1.6);
21082     hMuEnDiffRangePQ4->GetXaxis()->SetTitle("Energy (reco-true)/true");
21083     hMuEnDiffRangePQ4->GetXaxis()->CenterTitle();
21084     hMuEnDiffRangePQ4->GetYaxis()->SetTitle("");
21085     hMuEnDiffRangePQ4->GetYaxis()->CenterTitle();
21086     //hMuEnDiffRangePQ4->SetBit(TH1::kCanRebin);
21087 
21088 
21089 
21090     hMuEnDiffCurvPQ=new TH1F("hMuEnDiffCurvPQ","hMuEnDiffCurvPQ",
21091                              4*160,-1.6,1.6);
21092     hMuEnDiffCurvPQ->GetXaxis()->SetTitle("Energy (reco-true)/true");
21093     hMuEnDiffCurvPQ->GetXaxis()->CenterTitle();
21094     hMuEnDiffCurvPQ->GetYaxis()->SetTitle("");
21095     hMuEnDiffCurvPQ->GetYaxis()->CenterTitle();
21096     //hMuEnDiffCurvPQ->SetBit(TH1::kCanRebin);
21097 
21098     hMuEnDiffCurvPQ1=new TH1F("hMuEnDiffCurvPQ1","hMuEnDiffCurvPQ1",
21099                               4*160,-1.6,1.6);
21100     hMuEnDiffCurvPQ1->GetXaxis()->SetTitle("Energy (reco-true)/true");
21101     hMuEnDiffCurvPQ1->GetXaxis()->CenterTitle();
21102     hMuEnDiffCurvPQ1->GetYaxis()->SetTitle("");
21103     hMuEnDiffCurvPQ1->GetYaxis()->CenterTitle();
21104     //hMuEnDiffCurvPQ1->SetBit(TH1::kCanRebin);
21105 
21106     hMuEnDiffCurvPQ2=new TH1F("hMuEnDiffCurvPQ2","hMuEnDiffCurvPQ2",
21107                               4*160,-1.6,1.6);
21108     hMuEnDiffCurvPQ2->GetXaxis()->SetTitle("Energy (reco-true)/true");
21109     hMuEnDiffCurvPQ2->GetXaxis()->CenterTitle();
21110     hMuEnDiffCurvPQ2->GetYaxis()->SetTitle("");
21111     hMuEnDiffCurvPQ2->GetYaxis()->CenterTitle();
21112     //hMuEnDiffCurvPQ2->SetBit(TH1::kCanRebin);
21113 
21114     hMuEnDiffCurvPQ3=new TH1F("hMuEnDiffCurvPQ3","hMuEnDiffCurvPQ3",
21115                               4*160,-1.6,1.6);
21116     hMuEnDiffCurvPQ3->GetXaxis()->SetTitle("Energy (reco-true)/true");
21117     hMuEnDiffCurvPQ3->GetXaxis()->CenterTitle();
21118     hMuEnDiffCurvPQ3->GetYaxis()->SetTitle("");
21119     hMuEnDiffCurvPQ3->GetYaxis()->CenterTitle();
21120     //hMuEnDiffCurvPQ3->SetBit(TH1::kCanRebin);
21121 
21122     hMuEnDiffCurvPQ4=new TH1F("hMuEnDiffCurvPQ4","hMuEnDiffCurvPQ4",
21123                               4*160,-1.6,1.6);
21124     hMuEnDiffCurvPQ4->GetXaxis()->SetTitle("Energy (reco-true)/true");
21125     hMuEnDiffCurvPQ4->GetXaxis()->CenterTitle();
21126     hMuEnDiffCurvPQ4->GetYaxis()->SetTitle("");
21127     hMuEnDiffCurvPQ4->GetYaxis()->CenterTitle();
21128     //hMuEnDiffCurvPQ4->SetBit(TH1::kCanRebin);
21129 
21130 
21131 
21132     hMuEnDiffRangeR07PQ=new TH1F("hMuEnDiffRangeR07PQ",
21133                                  "hMuEnDiffRangeR07PQ",
21134                                  4*160,-1.6,1.6);
21135     hMuEnDiffRangeR07PQ->GetXaxis()->SetTitle("Energy (reco-true)/true");
21136     hMuEnDiffRangeR07PQ->GetXaxis()->CenterTitle();
21137     hMuEnDiffRangeR07PQ->GetYaxis()->SetTitle("");
21138     hMuEnDiffRangeR07PQ->GetYaxis()->CenterTitle();
21139     //hMuEnDiffRangeR07PQ->SetBit(TH1::kCanRebin);
21140 
21141     hMuEnDiffRangeR07PQ1=new TH1F("hMuEnDiffRangeR07PQ1",
21142                                   "hMuEnDiffRangeR07PQ1",
21143                                   4*160,-1.6,1.6);
21144     hMuEnDiffRangeR07PQ1->GetXaxis()->SetTitle("Energy (reco-true)/true");
21145     hMuEnDiffRangeR07PQ1->GetXaxis()->CenterTitle();
21146     hMuEnDiffRangeR07PQ1->GetYaxis()->SetTitle("");
21147     hMuEnDiffRangeR07PQ1->GetYaxis()->CenterTitle();
21148     //hMuEnDiffRangeR07PQ1->SetBit(TH1::kCanRebin);
21149 
21150     hMuEnDiffRangeR07PQ2=new TH1F("hMuEnDiffRangeR07PQ2",
21151                                   "hMuEnDiffRangeR07PQ2",
21152                                   4*160,-1.6,1.6);
21153     hMuEnDiffRangeR07PQ2->GetXaxis()->SetTitle("Energy (reco-true)/true");
21154     hMuEnDiffRangeR07PQ2->GetXaxis()->CenterTitle();
21155     hMuEnDiffRangeR07PQ2->GetYaxis()->SetTitle("");
21156     hMuEnDiffRangeR07PQ2->GetYaxis()->CenterTitle();
21157     //hMuEnDiffRangeR07PQ2->SetBit(TH1::kCanRebin);
21158 
21159     hMuEnDiffRangeR07PQ3=new TH1F("hMuEnDiffRangeR07PQ3",
21160                                   "hMuEnDiffRangeR07PQ3",
21161                                   4*160,-1.6,1.6);
21162     hMuEnDiffRangeR07PQ3->GetXaxis()->SetTitle("Energy (reco-true)/true");
21163     hMuEnDiffRangeR07PQ3->GetXaxis()->CenterTitle();
21164     hMuEnDiffRangeR07PQ3->GetYaxis()->SetTitle("");
21165     hMuEnDiffRangeR07PQ3->GetYaxis()->CenterTitle();
21166     //hMuEnDiffRangeR07PQ3->SetBit(TH1::kCanRebin);
21167 
21168     hMuEnDiffRangeR07PQ4=new TH1F("hMuEnDiffRangeR07PQ4",
21169                                   "hMuEnDiffRangeR07PQ4",
21170                                   4*160,-1.6,1.6);
21171     hMuEnDiffRangeR07PQ4->GetXaxis()->SetTitle("Energy (reco-true)/true");
21172     hMuEnDiffRangeR07PQ4->GetXaxis()->CenterTitle();
21173     hMuEnDiffRangeR07PQ4->GetYaxis()->SetTitle("");
21174     hMuEnDiffRangeR07PQ4->GetYaxis()->CenterTitle();
21175     //hMuEnDiffRangeR07PQ4->SetBit(TH1::kCanRebin);
21176 
21177 
21178 
21179     hMuEnDiffCurvR07PQ=new TH1F("hMuEnDiffCurvR07PQ",
21180                                 "hMuEnDiffCurvR07PQ",
21181                                 4*160,-1.6,1.6);
21182     hMuEnDiffCurvR07PQ->GetXaxis()->SetTitle("Energy (reco-true)/true");
21183     hMuEnDiffCurvR07PQ->GetXaxis()->CenterTitle();
21184     hMuEnDiffCurvR07PQ->GetYaxis()->SetTitle("");
21185     hMuEnDiffCurvR07PQ->GetYaxis()->CenterTitle();
21186     //hMuEnDiffCurvR07PQ->SetBit(TH1::kCanRebin);
21187 
21188     hMuEnDiffCurvR07PQ1=new TH1F("hMuEnDiffCurvR07PQ1",
21189                                  "hMuEnDiffCurvR07PQ1",
21190                                  4*160,-1.6,1.6);
21191     hMuEnDiffCurvR07PQ1->GetXaxis()->SetTitle("Energy (reco-true)/true");
21192     hMuEnDiffCurvR07PQ1->GetXaxis()->CenterTitle();
21193     hMuEnDiffCurvR07PQ1->GetYaxis()->SetTitle("");
21194     hMuEnDiffCurvR07PQ1->GetYaxis()->CenterTitle();
21195     //hMuEnDiffCurvR07PQ1->SetBit(TH1::kCanRebin);
21196 
21197     hMuEnDiffCurvR07PQ2=new TH1F("hMuEnDiffCurvR07PQ2",
21198                                  "hMuEnDiffCurvR07PQ2",
21199                                  4*160,-1.6,1.6);
21200     hMuEnDiffCurvR07PQ2->GetXaxis()->SetTitle("Energy (reco-true)/true");
21201     hMuEnDiffCurvR07PQ2->GetXaxis()->CenterTitle();
21202     hMuEnDiffCurvR07PQ2->GetYaxis()->SetTitle("");
21203     hMuEnDiffCurvR07PQ2->GetYaxis()->CenterTitle();
21204     //hMuEnDiffCurvR07PQ2->SetBit(TH1::kCanRebin);
21205 
21206     hMuEnDiffCurvR07PQ3=new TH1F("hMuEnDiffCurvR07PQ3",
21207                                  "hMuEnDiffCurvR07PQ3",
21208                                  4*160,-1.6,1.6);
21209     hMuEnDiffCurvR07PQ3->GetXaxis()->SetTitle("Energy (reco-true)/true");
21210     hMuEnDiffCurvR07PQ3->GetXaxis()->CenterTitle();
21211     hMuEnDiffCurvR07PQ3->GetYaxis()->SetTitle("");
21212     hMuEnDiffCurvR07PQ3->GetYaxis()->CenterTitle();
21213     //hMuEnDiffCurvR07PQ3->SetBit(TH1::kCanRebin);
21214 
21215     hMuEnDiffCurvR07PQ4=new TH1F("hMuEnDiffCurvR07PQ4",
21216                                  "hMuEnDiffCurvR07PQ4",
21217                                  4*160,-1.6,1.6);
21218     hMuEnDiffCurvR07PQ4->GetXaxis()->SetTitle("Energy (reco-true)/true");
21219     hMuEnDiffCurvR07PQ4->GetXaxis()->CenterTitle();
21220     hMuEnDiffCurvR07PQ4->GetYaxis()->SetTitle("");
21221     hMuEnDiffCurvR07PQ4->GetYaxis()->CenterTitle();
21222     //hMuEnDiffCurvR07PQ4->SetBit(TH1::kCanRebin);
21223 
21224 
21225 
21226     hShwEnDiffPQ=new TH1F("hShwEnDiffPQ","hShwEnDiffPQ",
21227                           4*160,-1.6,1.6);
21228     hShwEnDiffPQ->GetXaxis()->SetTitle("Energy (reco-true)/true");
21229     hShwEnDiffPQ->GetXaxis()->CenterTitle();
21230     hShwEnDiffPQ->GetYaxis()->SetTitle("");
21231     hShwEnDiffPQ->GetYaxis()->CenterTitle();
21232     //hShwEnDiffPQ->SetBit(TH1::kCanRebin);
21233 
21234     hShwEn2DiffPQ=new TH1F("hShwEn2DiffPQ","hShwEn2DiffPQ",
21235                            4*160,-1.6,1.6);
21236     hShwEn2DiffPQ->GetXaxis()->SetTitle("Energy (reco-true)/true");
21237     hShwEn2DiffPQ->GetXaxis()->CenterTitle();
21238     hShwEn2DiffPQ->GetYaxis()->SetTitle("");
21239     hShwEn2DiffPQ->GetYaxis()->CenterTitle();
21240     //hShwEn2DiffPQ->SetBit(TH1::kCanRebin);
21241 
21242     hShwEnDiffPQ1=new TH1F("hShwEnDiffPQ1","hShwEnDiffPQ1",
21243                            4*160,-1.6,1.6);
21244     hShwEnDiffPQ1->GetXaxis()->SetTitle("Energy (reco-true)/true");
21245     hShwEnDiffPQ1->GetXaxis()->CenterTitle();
21246     hShwEnDiffPQ1->GetYaxis()->SetTitle("");
21247     hShwEnDiffPQ1->GetYaxis()->CenterTitle();
21248     //hShwEnDiffPQ1->SetBit(TH1::kCanRebin);
21249 
21250     hShwEnDiffPQ2=new TH1F("hShwEnDiffPQ2","hShwEnDiffPQ2",
21251                            4*160,-1.6,1.6);
21252     hShwEnDiffPQ2->GetXaxis()->SetTitle("Energy (reco-true)/true");
21253     hShwEnDiffPQ2->GetXaxis()->CenterTitle();
21254     hShwEnDiffPQ2->GetYaxis()->SetTitle("");
21255     hShwEnDiffPQ2->GetYaxis()->CenterTitle();
21256     //hShwEnDiffPQ2->SetBit(TH1::kCanRebin);
21257 
21258     hShwEnDiffPQ3=new TH1F("hShwEnDiffPQ3","hShwEnDiffPQ3",
21259                            4*160,-1.6,1.6);
21260     hShwEnDiffPQ3->GetXaxis()->SetTitle("Energy (reco-true)/true");
21261     hShwEnDiffPQ3->GetXaxis()->CenterTitle();
21262     hShwEnDiffPQ3->GetYaxis()->SetTitle("");
21263     hShwEnDiffPQ3->GetYaxis()->CenterTitle();
21264     //hShwEnDiffPQ3->SetBit(TH1::kCanRebin);
21265 
21266     hShwEnDiffPQ4=new TH1F("hShwEnDiffPQ4","hShwEnDiffPQ4",
21267                            4*160,-1.6,1.6);
21268     hShwEnDiffPQ4->GetXaxis()->SetTitle("Energy (reco-true)/true");
21269     hShwEnDiffPQ4->GetXaxis()->CenterTitle();
21270     hShwEnDiffPQ4->GetYaxis()->SetTitle("");
21271     hShwEnDiffPQ4->GetYaxis()->CenterTitle();
21272     //hShwEnDiffPQ4->SetBit(TH1::kCanRebin);
21273 
21274 
21275 
21276     hNuEnDiffPQ=new TH1F("hNuEnDiffPQ","hNuEnDiffPQ",
21277                          4*160,-1.6,1.6);
21278     hNuEnDiffPQ->GetXaxis()->SetTitle("Energy (reco-true)/true");
21279     hNuEnDiffPQ->GetXaxis()->CenterTitle();
21280     hNuEnDiffPQ->GetYaxis()->SetTitle("");
21281     hNuEnDiffPQ->GetYaxis()->CenterTitle();
21282     //hNuEnDiffPQ->SetBit(TH1::kCanRebin);
21283 
21284     hNuEnDiffCCPQ=new TH1F("hNuEnDiffCCPQ","hNuEnDiffCCPQ",
21285                            4*160,-1.6,1.6);
21286     hNuEnDiffCCPQ->GetXaxis()->SetTitle("Energy (reco-true)/true");
21287     hNuEnDiffCCPQ->GetXaxis()->CenterTitle();
21288     hNuEnDiffCCPQ->GetYaxis()->SetTitle("");
21289     hNuEnDiffCCPQ->GetYaxis()->CenterTitle();
21290     //hNuEnDiffCCPQ->SetBit(TH1::kCanRebin);
21291 
21292     hNuEnDiffNCPQ=new TH1F("hNuEnDiffNCPQ","hNuEnDiffNCPQ",
21293                            4*160,-1.6,1.6);
21294     hNuEnDiffNCPQ->GetXaxis()->SetTitle("Energy (reco-true)/true");
21295     hNuEnDiffNCPQ->GetXaxis()->CenterTitle();
21296     hNuEnDiffNCPQ->GetYaxis()->SetTitle("");
21297     hNuEnDiffNCPQ->GetYaxis()->CenterTitle();
21298     //hNuEnDiffNCPQ->SetBit(TH1::kCanRebin);
21299 
21300     hNuEnDiffPQ1=new TH1F("hNuEnDiffPQ1","hNuEnDiffPQ1",
21301                           4*160,-1.6,1.6);
21302     hNuEnDiffPQ1->GetXaxis()->SetTitle("Energy (reco-true)/true");
21303     hNuEnDiffPQ1->GetXaxis()->CenterTitle();
21304     hNuEnDiffPQ1->GetYaxis()->SetTitle("");
21305     hNuEnDiffPQ1->GetYaxis()->CenterTitle();
21306     //hNuEnDiffPQ1->SetBit(TH1::kCanRebin);
21307 
21308     hNuEnDiffPQ2=new TH1F("hNuEnDiffPQ2","hNuEnDiffPQ2",
21309                           4*160,-1.6,1.6);
21310     hNuEnDiffPQ2->GetXaxis()->SetTitle("Energy (reco-true)/true");
21311     hNuEnDiffPQ2->GetXaxis()->CenterTitle();
21312     hNuEnDiffPQ2->GetYaxis()->SetTitle("");
21313     hNuEnDiffPQ2->GetYaxis()->CenterTitle();
21314     //hNuEnDiffPQ2->SetBit(TH1::kCanRebin);
21315 
21316     hNuEnDiffPQ3=new TH1F("hNuEnDiffPQ3","hNuEnDiffPQ3",
21317                           4*160,-1.6,1.6);
21318     hNuEnDiffPQ3->GetXaxis()->SetTitle("Energy (reco-true)/true");
21319     hNuEnDiffPQ3->GetXaxis()->CenterTitle();
21320     hNuEnDiffPQ3->GetYaxis()->SetTitle("");
21321     hNuEnDiffPQ3->GetYaxis()->CenterTitle();
21322     //hNuEnDiffPQ3->SetBit(TH1::kCanRebin);
21323 
21324     hNuEnDiffPQ4=new TH1F("hNuEnDiffPQ4","hNuEnDiffPQ4",
21325                           4*160,-1.6,1.6);
21326     hNuEnDiffPQ4->GetXaxis()->SetTitle("Energy (reco-true)/true");
21327     hNuEnDiffPQ4->GetXaxis()->CenterTitle();
21328     hNuEnDiffPQ4->GetYaxis()->SetTitle("");
21329     hNuEnDiffPQ4->GetYaxis()->CenterTitle();
21330     //hNuEnDiffPQ4->SetBit(TH1::kCanRebin);
21331 
21332 
21333     hEvtVtxTDiffPQ=new TH1F("hEvtVtxTDiffPQ","hEvtVtxTDiffPQ",
21334                             1000,-5,5);
21335     hEvtVtxTDiffPQ->GetXaxis()->SetTitle("Evt Vtx Reco-True Transverse Position (m)");
21336     hEvtVtxTDiffPQ->GetXaxis()->CenterTitle();
21337     hEvtVtxTDiffPQ->GetYaxis()->SetTitle("");
21338     hEvtVtxTDiffPQ->GetYaxis()->CenterTitle();
21339     //hEvtVtxTDiffPQ->SetBit(TH1::kCanRebin);
21340 
21341     hEvtVtxZDiffPQ=new TH1F("hEvtVtxZDiffPQ","hEvtVtxZDiffPQ",
21342                             1000,-5,5);
21343     hEvtVtxZDiffPQ->GetXaxis()->SetTitle("Evt Vtx Reco-True Z Position (m)");
21344     hEvtVtxZDiffPQ->GetXaxis()->CenterTitle();
21345     hEvtVtxZDiffPQ->GetYaxis()->SetTitle("");
21346     hEvtVtxZDiffPQ->GetYaxis()->CenterTitle();
21347     //hEvtVtxZDiffPQ->SetBit(TH1::kCanRebin);
21348 
21349     hEvtVtxSDiffPQ=new TH1F("hEvtVtxSDiffPQ","hEvtVtxSDiffPQ",
21350                             1000,-5,5);
21351     hEvtVtxSDiffPQ->GetXaxis()->SetTitle("Evt Vtx Reco-True S Position (m)");
21352     hEvtVtxSDiffPQ->GetXaxis()->CenterTitle();
21353     hEvtVtxSDiffPQ->GetYaxis()->SetTitle("");
21354     hEvtVtxSDiffPQ->GetYaxis()->CenterTitle();
21355     //hEvtVtxSDiffPQ->SetBit(TH1::kCanRebin);
21356 
21357     pEvtVtxTDiffVsDistPQ=new TProfile
21358       ("pEvtVtxTDiffVsDistPQ","pEvtVtxTDiffVsDistPQ",60,-3,3);
21359     pEvtVtxTDiffVsDistPQ->GetXaxis()->SetTitle("Distance to Edge (m)");
21360     pEvtVtxTDiffVsDistPQ->GetXaxis()->CenterTitle();
21361     pEvtVtxTDiffVsDistPQ->GetYaxis()->SetTitle("Evt Vtx Reco-True Trans. Position (m)");
21362     pEvtVtxTDiffVsDistPQ->GetYaxis()->CenterTitle();
21363 
21364     pEvtVtxZDiffVsDistPQ=new TProfile
21365       ("pEvtVtxZDiffVsDistPQ","pEvtVtxZDiffVsDistPQ",60,-3,3);
21366     pEvtVtxZDiffVsDistPQ->GetXaxis()->SetTitle("Distance to Edge (m)");
21367     pEvtVtxZDiffVsDistPQ->GetXaxis()->CenterTitle();
21368     pEvtVtxZDiffVsDistPQ->GetYaxis()->SetTitle("Evt Vtx Reco-True Z Position (m)");
21369     pEvtVtxZDiffVsDistPQ->GetYaxis()->CenterTitle();
21370 
21371     pEvtVtxSDiffVsDistPQ=new TProfile
21372       ("pEvtVtxSDiffVsDistPQ","pEvtVtxSDiffVsDistPQ",60,-3,3);
21373     pEvtVtxSDiffVsDistPQ->GetXaxis()->SetTitle("Distance to Edge (m)");
21374     pEvtVtxSDiffVsDistPQ->GetXaxis()->CenterTitle();
21375     pEvtVtxSDiffVsDistPQ->GetYaxis()->SetTitle("Evt Vtx Reco-True S Position (m)");
21376     pEvtVtxSDiffVsDistPQ->GetYaxis()->CenterTitle();
21377 
21378 
21380     //NQ
21382     hMuEnDiffNQ=new TH1F("hMuEnDiffNQ","hMuEnDiffNQ",
21383                          4*160,-1.6,1.6);
21384     hMuEnDiffNQ->GetXaxis()->SetTitle("Energy (reco-true)/true");
21385     hMuEnDiffNQ->GetXaxis()->CenterTitle();
21386     hMuEnDiffNQ->GetYaxis()->SetTitle("");
21387     hMuEnDiffNQ->GetYaxis()->CenterTitle();
21388     //hMuEnDiffNQ->SetBit(TH1::kCanRebin);
21389 
21390     hMuEnDiffRangeNQ=new TH1F("hMuEnDiffRangeNQ","hMuEnDiffRangeNQ",
21391                               4*160,-1.6,1.6);
21392     hMuEnDiffRangeNQ->GetXaxis()->SetTitle("Energy (reco-true)/true");
21393     hMuEnDiffRangeNQ->GetXaxis()->CenterTitle();
21394     hMuEnDiffRangeNQ->GetYaxis()->SetTitle("");
21395     hMuEnDiffRangeNQ->GetYaxis()->CenterTitle();
21396     //hMuEnDiffRangeNQ->SetBit(TH1::kCanRebin);
21397 
21398     hMuEnDiffRangeNQ1=new TH1F("hMuEnDiffRangeNQ1","hMuEnDiffRangeNQ1",
21399                                4*160,-1.6,1.6);
21400     hMuEnDiffRangeNQ1->GetXaxis()->SetTitle("Energy (reco-true)/true");
21401     hMuEnDiffRangeNQ1->GetXaxis()->CenterTitle();
21402     hMuEnDiffRangeNQ1->GetYaxis()->SetTitle("");
21403     hMuEnDiffRangeNQ1->GetYaxis()->CenterTitle();
21404     //hMuEnDiffRangeNQ1->SetBit(TH1::kCanRebin);
21405 
21406     hMuEnDiffRangeNQ2=new TH1F("hMuEnDiffRangeNQ2","hMuEnDiffRangeNQ2",
21407                                4*160,-1.6,1.6);
21408     hMuEnDiffRangeNQ2->GetXaxis()->SetTitle("Energy (reco-true)/true");
21409     hMuEnDiffRangeNQ2->GetXaxis()->CenterTitle();
21410     hMuEnDiffRangeNQ2->GetYaxis()->SetTitle("");
21411     hMuEnDiffRangeNQ2->GetYaxis()->CenterTitle();
21412     //hMuEnDiffRangeNQ2->SetBit(TH1::kCanRebin);
21413 
21414     hMuEnDiffRangeNQ3=new TH1F("hMuEnDiffRangeNQ3","hMuEnDiffRangeNQ3",
21415                                4*160,-1.6,1.6);
21416     hMuEnDiffRangeNQ3->GetXaxis()->SetTitle("Energy (reco-true)/true");
21417     hMuEnDiffRangeNQ3->GetXaxis()->CenterTitle();
21418     hMuEnDiffRangeNQ3->GetYaxis()->SetTitle("");
21419     hMuEnDiffRangeNQ3->GetYaxis()->CenterTitle();
21420     //hMuEnDiffRangeNQ3->SetBit(TH1::kCanRebin);
21421 
21422     hMuEnDiffRangeNQ4=new TH1F("hMuEnDiffRangeNQ4","hMuEnDiffRangeNQ4",
21423                                4*160,-1.6,1.6);
21424     hMuEnDiffRangeNQ4->GetXaxis()->SetTitle("Energy (reco-true)/true");
21425     hMuEnDiffRangeNQ4->GetXaxis()->CenterTitle();
21426     hMuEnDiffRangeNQ4->GetYaxis()->SetTitle("");
21427     hMuEnDiffRangeNQ4->GetYaxis()->CenterTitle();
21428     //hMuEnDiffRangeNQ4->SetBit(TH1::kCanRebin);
21429 
21430 
21431 
21432     hMuEnDiffCurvNQ=new TH1F("hMuEnDiffCurvNQ","hMuEnDiffCurvNQ",
21433                              4*160,-1.6,1.6);
21434     hMuEnDiffCurvNQ->GetXaxis()->SetTitle("Energy (reco-true)/true");
21435     hMuEnDiffCurvNQ->GetXaxis()->CenterTitle();
21436     hMuEnDiffCurvNQ->GetYaxis()->SetTitle("");
21437     hMuEnDiffCurvNQ->GetYaxis()->CenterTitle();
21438     //hMuEnDiffCurvNQ->SetBit(TH1::kCanRebin);
21439 
21440     hMuEnDiffCurvNQ1=new TH1F("hMuEnDiffCurvNQ1","hMuEnDiffCurvNQ1",
21441                               4*160,-1.6,1.6);
21442     hMuEnDiffCurvNQ1->GetXaxis()->SetTitle("Energy (reco-true)/true");
21443     hMuEnDiffCurvNQ1->GetXaxis()->CenterTitle();
21444     hMuEnDiffCurvNQ1->GetYaxis()->SetTitle("");
21445     hMuEnDiffCurvNQ1->GetYaxis()->CenterTitle();
21446     //hMuEnDiffCurvNQ1->SetBit(TH1::kCanRebin);
21447 
21448     hMuEnDiffCurvNQ2=new TH1F("hMuEnDiffCurvNQ2","hMuEnDiffCurvNQ2",
21449                               4*160,-1.6,1.6);
21450     hMuEnDiffCurvNQ2->GetXaxis()->SetTitle("Energy (reco-true)/true");
21451     hMuEnDiffCurvNQ2->GetXaxis()->CenterTitle();
21452     hMuEnDiffCurvNQ2->GetYaxis()->SetTitle("");
21453     hMuEnDiffCurvNQ2->GetYaxis()->CenterTitle();
21454     //hMuEnDiffCurvNQ2->SetBit(TH1::kCanRebin);
21455 
21456     hMuEnDiffCurvNQ3=new TH1F("hMuEnDiffCurvNQ3","hMuEnDiffCurvNQ3",
21457                               4*160,-1.6,1.6);
21458     hMuEnDiffCurvNQ3->GetXaxis()->SetTitle("Energy (reco-true)/true");
21459     hMuEnDiffCurvNQ3->GetXaxis()->CenterTitle();
21460     hMuEnDiffCurvNQ3->GetYaxis()->SetTitle("");
21461     hMuEnDiffCurvNQ3->GetYaxis()->CenterTitle();
21462     //hMuEnDiffCurvNQ3->SetBit(TH1::kCanRebin);
21463 
21464     hMuEnDiffCurvNQ4=new TH1F("hMuEnDiffCurvNQ4","hMuEnDiffCurvNQ4",
21465                               4*160,-1.6,1.6);
21466     hMuEnDiffCurvNQ4->GetXaxis()->SetTitle("Energy (reco-true)/true");
21467     hMuEnDiffCurvNQ4->GetXaxis()->CenterTitle();
21468     hMuEnDiffCurvNQ4->GetYaxis()->SetTitle("");
21469     hMuEnDiffCurvNQ4->GetYaxis()->CenterTitle();
21470     //hMuEnDiffCurvNQ4->SetBit(TH1::kCanRebin);
21471 
21472 
21473 
21474     hMuEnDiffRangeR07NQ=new TH1F("hMuEnDiffRangeR07NQ",
21475                                  "hMuEnDiffRangeR07NQ",
21476                                  4*160,-1.6,1.6);
21477     hMuEnDiffRangeR07NQ->GetXaxis()->SetTitle("Energy (reco-true)/true");
21478     hMuEnDiffRangeR07NQ->GetXaxis()->CenterTitle();
21479     hMuEnDiffRangeR07NQ->GetYaxis()->SetTitle("");
21480     hMuEnDiffRangeR07NQ->GetYaxis()->CenterTitle();
21481     //hMuEnDiffRangeR07NQ->SetBit(TH1::kCanRebin);
21482 
21483     hMuEnDiffRangeR07NQ1=new TH1F("hMuEnDiffRangeR07NQ1",
21484                                   "hMuEnDiffRangeR07NQ1",
21485                                   4*160,-1.6,1.6);
21486     hMuEnDiffRangeR07NQ1->GetXaxis()->SetTitle("Energy (reco-true)/true");
21487     hMuEnDiffRangeR07NQ1->GetXaxis()->CenterTitle();
21488     hMuEnDiffRangeR07NQ1->GetYaxis()->SetTitle("");
21489     hMuEnDiffRangeR07NQ1->GetYaxis()->CenterTitle();
21490     //hMuEnDiffRangeR07NQ1->SetBit(TH1::kCanRebin);
21491 
21492     hMuEnDiffRangeR07NQ2=new TH1F("hMuEnDiffRangeR07NQ2",
21493                                   "hMuEnDiffRangeR07NQ2",
21494                                   4*160,-1.6,1.6);
21495     hMuEnDiffRangeR07NQ2->GetXaxis()->SetTitle("Energy (reco-true)/true");
21496     hMuEnDiffRangeR07NQ2->GetXaxis()->CenterTitle();
21497     hMuEnDiffRangeR07NQ2->GetYaxis()->SetTitle("");
21498     hMuEnDiffRangeR07NQ2->GetYaxis()->CenterTitle();
21499     //hMuEnDiffRangeR07NQ2->SetBit(TH1::kCanRebin);
21500 
21501     hMuEnDiffRangeR07NQ3=new TH1F("hMuEnDiffRangeR07NQ3",
21502                                   "hMuEnDiffRangeR07NQ3",
21503                                   4*160,-1.6,1.6);
21504     hMuEnDiffRangeR07NQ3->GetXaxis()->SetTitle("Energy (reco-true)/true");
21505     hMuEnDiffRangeR07NQ3->GetXaxis()->CenterTitle();
21506     hMuEnDiffRangeR07NQ3->GetYaxis()->SetTitle("");
21507     hMuEnDiffRangeR07NQ3->GetYaxis()->CenterTitle();
21508     //hMuEnDiffRangeR07NQ3->SetBit(TH1::kCanRebin);
21509 
21510     hMuEnDiffRangeR07NQ4=new TH1F("hMuEnDiffRangeR07NQ4",
21511                                   "hMuEnDiffRangeR07NQ4",
21512                                   4*160,-1.6,1.6);
21513     hMuEnDiffRangeR07NQ4->GetXaxis()->SetTitle("Energy (reco-true)/true");
21514     hMuEnDiffRangeR07NQ4->GetXaxis()->CenterTitle();
21515     hMuEnDiffRangeR07NQ4->GetYaxis()->SetTitle("");
21516     hMuEnDiffRangeR07NQ4->GetYaxis()->CenterTitle();
21517     //hMuEnDiffRangeR07NQ4->SetBit(TH1::kCanRebin);
21518 
21519 
21520     hMuEnDiffCurvR07NQ=new TH1F("hMuEnDiffCurvR07NQ",
21521                                 "hMuEnDiffCurvR07NQ",
21522                                 4*160,-1.6,1.6);
21523     hMuEnDiffCurvR07NQ->GetXaxis()->SetTitle("Energy (reco-true)/true");
21524     hMuEnDiffCurvR07NQ->GetXaxis()->CenterTitle();
21525     hMuEnDiffCurvR07NQ->GetYaxis()->SetTitle("");
21526     hMuEnDiffCurvR07NQ->GetYaxis()->CenterTitle();
21527     //hMuEnDiffCurvR07NQ->SetBit(TH1::kCanRebin);
21528 
21529     hMuEnDiffCurvR07NQ1=new TH1F("hMuEnDiffCurvR07NQ1",
21530                                  "hMuEnDiffCurvR07NQ1",
21531                                  4*160,-1.6,1.6);
21532     hMuEnDiffCurvR07NQ1->GetXaxis()->SetTitle("Energy (reco-true)/true");
21533     hMuEnDiffCurvR07NQ1->GetXaxis()->CenterTitle();
21534     hMuEnDiffCurvR07NQ1->GetYaxis()->SetTitle("");
21535     hMuEnDiffCurvR07NQ1->GetYaxis()->CenterTitle();
21536     //hMuEnDiffCurvR07NQ1->SetBit(TH1::kCanRebin);
21537 
21538     hMuEnDiffCurvR07NQ2=new TH1F("hMuEnDiffCurvR07NQ2",
21539                                  "hMuEnDiffCurvR07NQ2",
21540                                  4*160,-1.6,1.6);
21541     hMuEnDiffCurvR07NQ2->GetXaxis()->SetTitle("Energy (reco-true)/true");
21542     hMuEnDiffCurvR07NQ2->GetXaxis()->CenterTitle();
21543     hMuEnDiffCurvR07NQ2->GetYaxis()->SetTitle("");
21544     hMuEnDiffCurvR07NQ2->GetYaxis()->CenterTitle();
21545     //hMuEnDiffCurvR07NQ2->SetBit(TH1::kCanRebin);
21546 
21547     hMuEnDiffCurvR07NQ3=new TH1F("hMuEnDiffCurvR07NQ3",
21548                                  "hMuEnDiffCurvR07NQ3",
21549                                  4*160,-1.6,1.6);
21550     hMuEnDiffCurvR07NQ3->GetXaxis()->SetTitle("Energy (reco-true)/true");
21551     hMuEnDiffCurvR07NQ3->GetXaxis()->CenterTitle();
21552     hMuEnDiffCurvR07NQ3->GetYaxis()->SetTitle("");
21553     hMuEnDiffCurvR07NQ3->GetYaxis()->CenterTitle();
21554     //hMuEnDiffCurvR07NQ3->SetBit(TH1::kCanRebin);
21555 
21556     hMuEnDiffCurvR07NQ4=new TH1F("hMuEnDiffCurvR07NQ4",
21557                                  "hMuEnDiffCurvR07NQ4",
21558                                  4*160,-1.6,1.6);
21559     hMuEnDiffCurvR07NQ4->GetXaxis()->SetTitle("Energy (reco-true)/true");
21560     hMuEnDiffCurvR07NQ4->GetXaxis()->CenterTitle();
21561     hMuEnDiffCurvR07NQ4->GetYaxis()->SetTitle("");
21562     hMuEnDiffCurvR07NQ4->GetYaxis()->CenterTitle();
21563     //hMuEnDiffCurvR07NQ4->SetBit(TH1::kCanRebin);
21564 
21565 
21566 
21567     hShwEnDiffNQ=new TH1F("hShwEnDiffNQ","hShwEnDiffNQ",
21568                           4*160,-1.6,1.6);
21569     hShwEnDiffNQ->GetXaxis()->SetTitle("Energy (reco-true)/true");
21570     hShwEnDiffNQ->GetXaxis()->CenterTitle();
21571     hShwEnDiffNQ->GetYaxis()->SetTitle("");
21572     hShwEnDiffNQ->GetYaxis()->CenterTitle();
21573     //hShwEnDiffNQ->SetBit(TH1::kCanRebin);
21574 
21575     hShwEn2DiffNQ=new TH1F("hShwEn2DiffNQ","hShwEn2DiffNQ",
21576                            4*160,-1.6,1.6);
21577     hShwEn2DiffNQ->GetXaxis()->SetTitle("Energy (reco-true)/true");
21578     hShwEn2DiffNQ->GetXaxis()->CenterTitle();
21579     hShwEn2DiffNQ->GetYaxis()->SetTitle("");
21580     hShwEn2DiffNQ->GetYaxis()->CenterTitle();
21581     //hShwEn2DiffNQ->SetBit(TH1::kCanRebin);
21582 
21583     hShwEnDiffNQ1=new TH1F("hShwEnDiffNQ1","hShwEnDiffNQ1",
21584                            4*160,-1.6,1.6);
21585     hShwEnDiffNQ1->GetXaxis()->SetTitle("Energy (reco-true)/true");
21586     hShwEnDiffNQ1->GetXaxis()->CenterTitle();
21587     hShwEnDiffNQ1->GetYaxis()->SetTitle("");
21588     hShwEnDiffNQ1->GetYaxis()->CenterTitle();
21589     //hShwEnDiffNQ1->SetBit(TH1::kCanRebin);
21590 
21591     hShwEnDiffNQ2=new TH1F("hShwEnDiffNQ2","hShwEnDiffNQ2",
21592                            4*160,-1.6,1.6);
21593     hShwEnDiffNQ2->GetXaxis()->SetTitle("Energy (reco-true)/true");
21594     hShwEnDiffNQ2->GetXaxis()->CenterTitle();
21595     hShwEnDiffNQ2->GetYaxis()->SetTitle("");
21596     hShwEnDiffNQ2->GetYaxis()->CenterTitle();
21597     //hShwEnDiffNQ2->SetBit(TH1::kCanRebin);
21598 
21599     hShwEnDiffNQ3=new TH1F("hShwEnDiffNQ3","hShwEnDiffNQ3",
21600                            4*160,-1.6,1.6);
21601     hShwEnDiffNQ3->GetXaxis()->SetTitle("Energy (reco-true)/true");
21602     hShwEnDiffNQ3->GetXaxis()->CenterTitle();
21603     hShwEnDiffNQ3->GetYaxis()->SetTitle("");
21604     hShwEnDiffNQ3->GetYaxis()->CenterTitle();
21605     //hShwEnDiffNQ3->SetBit(TH1::kCanRebin);
21606 
21607     hShwEnDiffNQ4=new TH1F("hShwEnDiffNQ4","hShwEnDiffNQ4",
21608                            4*160,-1.6,1.6);
21609     hShwEnDiffNQ4->GetXaxis()->SetTitle("Energy (reco-true)/true");
21610     hShwEnDiffNQ4->GetXaxis()->CenterTitle();
21611     hShwEnDiffNQ4->GetYaxis()->SetTitle("");
21612     hShwEnDiffNQ4->GetYaxis()->CenterTitle();
21613     //hShwEnDiffNQ4->SetBit(TH1::kCanRebin);
21614 
21615 
21616 
21617 
21618 
21619     hShwEnDiffNQGeV1=new TH1F("hShwEnDiffNQGeV1","hShwEnDiffNQGeV1",
21620                               4*160,-1.6,1.6);
21621     hShwEnDiffNQGeV1->GetXaxis()->SetTitle("Energy (reco-true)/true");
21622     hShwEnDiffNQGeV1->GetXaxis()->CenterTitle();
21623     hShwEnDiffNQGeV1->GetYaxis()->SetTitle("");
21624     hShwEnDiffNQGeV1->GetYaxis()->CenterTitle();
21625     //hShwEnDiffNQGeV1->SetBit(TH1::kCanRebin);
21626 
21627     hShwEnDiffNQGeV2=new TH1F("hShwEnDiffNQGeV2","hShwEnDiffNQGeV2",
21628                               4*160,-1.6,1.6);
21629     hShwEnDiffNQGeV2->GetXaxis()->SetTitle("Energy (reco-true)/true");
21630     hShwEnDiffNQGeV2->GetXaxis()->CenterTitle();
21631     hShwEnDiffNQGeV2->GetYaxis()->SetTitle("");
21632     hShwEnDiffNQGeV2->GetYaxis()->CenterTitle();
21633     //hShwEnDiffNQGeV2->SetBit(TH1::kCanRebin);
21634 
21635     hShwEnDiffNQGeV3=new TH1F("hShwEnDiffNQGeV3","hShwEnDiffNQGeV3",
21636                               4*160,-1.6,1.6);
21637     hShwEnDiffNQGeV3->GetXaxis()->SetTitle("Energy (reco-true)/true");
21638     hShwEnDiffNQGeV3->GetXaxis()->CenterTitle();
21639     hShwEnDiffNQGeV3->GetYaxis()->SetTitle("");
21640     hShwEnDiffNQGeV3->GetYaxis()->CenterTitle();
21641     //hShwEnDiffNQGeV3->SetBit(TH1::kCanRebin);
21642 
21643     hShwEnDiffNQGeV4=new TH1F("hShwEnDiffNQGeV4","hShwEnDiffNQGeV4",
21644                               4*160,-1.6,1.6);
21645     hShwEnDiffNQGeV4->GetXaxis()->SetTitle("Energy (reco-true)/true");
21646     hShwEnDiffNQGeV4->GetXaxis()->CenterTitle();
21647     hShwEnDiffNQGeV4->GetYaxis()->SetTitle("");
21648     hShwEnDiffNQGeV4->GetYaxis()->CenterTitle();
21649     //hShwEnDiffNQGeV4->SetBit(TH1::kCanRebin);
21650 
21651     hShwEnDiffNQGeV5=new TH1F("hShwEnDiffNQGeV5","hShwEnDiffNQGeV5",
21652                               4*160,-1.6,1.6);
21653     hShwEnDiffNQGeV5->GetXaxis()->SetTitle("Energy (reco-true)/true");
21654     hShwEnDiffNQGeV5->GetXaxis()->CenterTitle();
21655     hShwEnDiffNQGeV5->GetYaxis()->SetTitle("");
21656     hShwEnDiffNQGeV5->GetYaxis()->CenterTitle();
21657     //hShwEnDiffNQGeV5->SetBit(TH1::kCanRebin);
21658 
21659     hShwEnDiffNQGeV6=new TH1F("hShwEnDiffNQGeV6","hShwEnDiffNQGeV6",
21660                               4*160,-1.6,1.6);
21661     hShwEnDiffNQGeV6->GetXaxis()->SetTitle("Energy (reco-true)/true");
21662     hShwEnDiffNQGeV6->GetXaxis()->CenterTitle();
21663     hShwEnDiffNQGeV6->GetYaxis()->SetTitle("");
21664     hShwEnDiffNQGeV6->GetYaxis()->CenterTitle();
21665     //hShwEnDiffNQGeV6->SetBit(TH1::kCanRebin);
21666 
21667 
21668 
21669 
21670     hNuEnDiffNQ=new TH1F("hNuEnDiffNQ","hNuEnDiffNQ",
21671                          4*160,-1.6,1.6);
21672     hNuEnDiffNQ->GetXaxis()->SetTitle("Energy (reco-true)/true");
21673     hNuEnDiffNQ->GetXaxis()->CenterTitle();
21674     hNuEnDiffNQ->GetYaxis()->SetTitle("");
21675     hNuEnDiffNQ->GetYaxis()->CenterTitle();
21676     //hNuEnDiffNQ->SetBit(TH1::kCanRebin);
21677 
21678     hNuEnDiffCCNQ=new TH1F("hNuEnDiffCCNQ","hNuEnDiffCCNQ",
21679                            4*160,-1.6,1.6);
21680     hNuEnDiffCCNQ->GetXaxis()->SetTitle("Energy (reco-true)/true");
21681     hNuEnDiffCCNQ->GetXaxis()->CenterTitle();
21682     hNuEnDiffCCNQ->GetYaxis()->SetTitle("");
21683     hNuEnDiffCCNQ->GetYaxis()->CenterTitle();
21684     //hNuEnDiffCCNQ->SetBit(TH1::kCanRebin);
21685 
21686     hNuEnDiffNCNQ=new TH1F("hNuEnDiffNCNQ","hNuEnDiffNCNQ",
21687                            4*160,-1.6,1.6);
21688     hNuEnDiffNCNQ->GetXaxis()->SetTitle("Energy (reco-true)/true");
21689     hNuEnDiffNCNQ->GetXaxis()->CenterTitle();
21690     hNuEnDiffNCNQ->GetYaxis()->SetTitle("");
21691     hNuEnDiffNCNQ->GetYaxis()->CenterTitle();
21692     //hNuEnDiffNCNQ->SetBit(TH1::kCanRebin);
21693 
21694     hNuEnDiffNQ1=new TH1F("hNuEnDiffNQ1","hNuEnDiffNQ1",
21695                           4*160,-1.6,1.6);
21696     hNuEnDiffNQ1->GetXaxis()->SetTitle("Energy (reco-true)/true");
21697     hNuEnDiffNQ1->GetXaxis()->CenterTitle();
21698     hNuEnDiffNQ1->GetYaxis()->SetTitle("");
21699     hNuEnDiffNQ1->GetYaxis()->CenterTitle();
21700     //hNuEnDiffNQ1->SetBit(TH1::kCanRebin);
21701 
21702     hNuEnDiffNQ2=new TH1F("hNuEnDiffNQ2","hNuEnDiffNQ2",
21703                           4*160,-1.6,1.6);
21704     hNuEnDiffNQ2->GetXaxis()->SetTitle("Energy (reco-true)/true");
21705     hNuEnDiffNQ2->GetXaxis()->CenterTitle();
21706     hNuEnDiffNQ2->GetYaxis()->SetTitle("");
21707     hNuEnDiffNQ2->GetYaxis()->CenterTitle();
21708     //hNuEnDiffNQ2->SetBit(TH1::kCanRebin);
21709 
21710     hNuEnDiffNQ3=new TH1F("hNuEnDiffNQ3","hNuEnDiffNQ3",
21711                           4*160,-1.6,1.6);
21712     hNuEnDiffNQ3->GetXaxis()->SetTitle("Energy (reco-true)/true");
21713     hNuEnDiffNQ3->GetXaxis()->CenterTitle();
21714     hNuEnDiffNQ3->GetYaxis()->SetTitle("");
21715     hNuEnDiffNQ3->GetYaxis()->CenterTitle();
21716     //hNuEnDiffNQ3->SetBit(TH1::kCanRebin);
21717 
21718     hNuEnDiffNQ4=new TH1F("hNuEnDiffNQ4","hNuEnDiffNQ4",
21719                           4*160,-1.6,1.6);
21720     hNuEnDiffNQ4->GetXaxis()->SetTitle("Energy (reco-true)/true");
21721     hNuEnDiffNQ4->GetXaxis()->CenterTitle();
21722     hNuEnDiffNQ4->GetYaxis()->SetTitle("");
21723     hNuEnDiffNQ4->GetYaxis()->CenterTitle();
21724     //hNuEnDiffNQ4->SetBit(TH1::kCanRebin);
21725 
21726 
21727     hEvtVtxTDiffNQ=new TH1F("hEvtVtxTDiffNQ","hEvtVtxTDiffNQ",
21728                             1000,-5,5);
21729     hEvtVtxTDiffNQ->GetXaxis()->SetTitle("Evt Vtx Reco-True Transverse Position (m)");
21730     hEvtVtxTDiffNQ->GetXaxis()->CenterTitle();
21731     hEvtVtxTDiffNQ->GetYaxis()->SetTitle("");
21732     hEvtVtxTDiffNQ->GetYaxis()->CenterTitle();
21733     //hEvtVtxTDiffNQ->SetBit(TH1::kCanRebin);
21734 
21735     hEvtVtxZDiffNQ=new TH1F("hEvtVtxZDiffNQ","hEvtVtxZDiffNQ",
21736                             1000,-5,5);
21737     hEvtVtxZDiffNQ->GetXaxis()->SetTitle("Evt Vtx Reco-True Z Position (m)");
21738     hEvtVtxZDiffNQ->GetXaxis()->CenterTitle();
21739     hEvtVtxZDiffNQ->GetYaxis()->SetTitle("");
21740     hEvtVtxZDiffNQ->GetYaxis()->CenterTitle();
21741     //hEvtVtxZDiffNQ->SetBit(TH1::kCanRebin);
21742 
21743     hEvtVtxSDiffNQ=new TH1F("hEvtVtxSDiffNQ","hEvtVtxSDiffNQ",
21744                             1000,-5,5);
21745     hEvtVtxSDiffNQ->GetXaxis()->SetTitle("Evt Vtx Reco-True S Position (m)");
21746     hEvtVtxSDiffNQ->GetXaxis()->CenterTitle();
21747     hEvtVtxSDiffNQ->GetYaxis()->SetTitle("");
21748     hEvtVtxSDiffNQ->GetYaxis()->CenterTitle();
21749     //hEvtVtxSDiffNQ->SetBit(TH1::kCanRebin);
21750 
21751     pEvtVtxTDiffVsDistNQ=new TProfile
21752       ("pEvtVtxTDiffVsDistNQ","pEvtVtxTDiffVsDistNQ",60,-3,3);
21753     pEvtVtxTDiffVsDistNQ->GetXaxis()->SetTitle("Distance to Edge (m)");
21754     pEvtVtxTDiffVsDistNQ->GetXaxis()->CenterTitle();
21755     pEvtVtxTDiffVsDistNQ->GetYaxis()->SetTitle("Evt Vtx Reco-True Trans. Position (m)");
21756     pEvtVtxTDiffVsDistNQ->GetYaxis()->CenterTitle();
21757 
21758     pEvtVtxZDiffVsDistNQ=new TProfile
21759       ("pEvtVtxZDiffVsDistNQ","pEvtVtxZDiffVsDistNQ",60,-3,3);
21760     pEvtVtxZDiffVsDistNQ->GetXaxis()->SetTitle("Distance to Edge (m)");
21761     pEvtVtxZDiffVsDistNQ->GetXaxis()->CenterTitle();
21762     pEvtVtxZDiffVsDistNQ->GetYaxis()->SetTitle("Evt Vtx Reco-True Z Position (m)");
21763     pEvtVtxZDiffVsDistNQ->GetYaxis()->CenterTitle();
21764 
21765     pEvtVtxSDiffVsDistNQ=new TProfile
21766       ("pEvtVtxSDiffVsDistNQ","pEvtVtxSDiffVsDistNQ",60,-3,3);
21767     pEvtVtxSDiffVsDistNQ->GetXaxis()->SetTitle("Distance to Edge (m)");
21768     pEvtVtxSDiffVsDistNQ->GetXaxis()->CenterTitle();
21769     pEvtVtxSDiffVsDistNQ->GetYaxis()->SetTitle("Evt Vtx Reco-True S Position (m)");
21770     pEvtVtxSDiffVsDistNQ->GetYaxis()->CenterTitle();
21771 
21772 
21773 
21774     //y stuff
21775     hYDiffPQ=new TH1F("hYDiffPQ","hYDiffPQ",
21776                       4*160,-1.6,1.6);
21777     hYDiffPQ->GetXaxis()->SetTitle("Y (reco-true)/true");
21778     hYDiffPQ->GetXaxis()->CenterTitle();
21779     hYDiffPQ->GetYaxis()->SetTitle("");
21780     hYDiffPQ->GetYaxis()->CenterTitle();
21781     //hYDiffPQ->SetBit(TH1::kCanRebin);
21782 
21783     hYAbDiffPQ=new TH1F("hYAbDiffPQ","hYAbDiffPQ",
21784                         4*160,-1.6,1.6);
21785     hYAbDiffPQ->GetXaxis()->SetTitle("Y reco-true");
21786     hYAbDiffPQ->GetXaxis()->CenterTitle();
21787     hYAbDiffPQ->GetYaxis()->SetTitle("");
21788     hYAbDiffPQ->GetYaxis()->CenterTitle();
21789     //hYAbDiffPQ->SetBit(TH1::kCanRebin);
21790 
21791     hYDiffNQ=new TH1F("hYDiffNQ","hYDiffNQ",
21792                       4*160,-1.6,1.6);
21793     hYDiffNQ->GetXaxis()->SetTitle("Y (reco-true)/true");
21794     hYDiffNQ->GetXaxis()->CenterTitle();
21795     hYDiffNQ->GetYaxis()->SetTitle("");
21796     hYDiffNQ->GetYaxis()->CenterTitle();
21797     //hYDiffNQ->SetBit(TH1::kCanRebin);
21798 
21799     hYAbDiffNQ=new TH1F("hYAbDiffNQ","hYAbDiffNQ",
21800                         4*160,-1.6,1.6);
21801     hYAbDiffNQ->GetXaxis()->SetTitle("Y reco-true");
21802     hYAbDiffNQ->GetXaxis()->CenterTitle();
21803     hYAbDiffNQ->GetYaxis()->SetTitle("");
21804     hYAbDiffNQ->GetYaxis()->CenterTitle();
21805     //hYAbDiffNQ->SetBit(TH1::kCanRebin);
21806 
21807 
21808 
21809     hMuYDiffMCPQ=new TH1F("hMuYDiffMCPQ","hMuYDiffMCPQ",
21810                           4*160,-1.6,1.6);
21811     hMuYDiffMCPQ->GetXaxis()->SetTitle("Energy muY-mu/mu");
21812     hMuYDiffMCPQ->GetXaxis()->CenterTitle();
21813     hMuYDiffMCPQ->GetYaxis()->SetTitle("");
21814     hMuYDiffMCPQ->GetYaxis()->CenterTitle();
21815     //hMuYDiffMCPQ->SetBit(TH1::kCanRebin);
21816 
21817     hMuYDiffMCNQ=new TH1F("hMuYDiffMCNQ","hMuYDiffMCNQ",
21818                           4*160,-1.6,1.6);
21819     hMuYDiffMCNQ->GetXaxis()->SetTitle("Energy muY-mu/mu");
21820     hMuYDiffMCNQ->GetXaxis()->CenterTitle();
21821     hMuYDiffMCNQ->GetYaxis()->SetTitle("");
21822     hMuYDiffMCNQ->GetYaxis()->CenterTitle();
21823     //hMuYDiffMCNQ->SetBit(TH1::kCanRebin);
21824 
21825 
21826     hShwYDiffMCPQ=new TH1F("hShwYDiffMCPQ","hShwYDiffMCPQ",
21827                            4*160,-1.6,1.6);
21828     hShwYDiffMCPQ->GetXaxis()->SetTitle("Energy shwY-shw/shw");
21829     hShwYDiffMCPQ->GetXaxis()->CenterTitle();
21830     hShwYDiffMCPQ->GetYaxis()->SetTitle("");
21831     hShwYDiffMCPQ->GetYaxis()->CenterTitle();
21832     //hShwYDiffMCPQ->SetBit(TH1::kCanRebin);
21833 
21834     hShwYDiffMCNQ=new TH1F("hShwYDiffMCNQ","hShwYDiffMCNQ",
21835                            4*160,-1.6,1.6);
21836     hShwYDiffMCNQ->GetXaxis()->SetTitle("Energy shwY-shw/shw");
21837     hShwYDiffMCNQ->GetXaxis()->CenterTitle();
21838     hShwYDiffMCNQ->GetYaxis()->SetTitle("");
21839     hShwYDiffMCNQ->GetYaxis()->CenterTitle();
21840     //hShwYDiffMCNQ->SetBit(TH1::kCanRebin);
21841 
21842 
21843     hMuYAbDiffMCPQ=new TH1F("hMuYAbDiffMCPQ","hMuYAbDiffMCPQ",
21844                             2000,-5,5);
21845     hMuYAbDiffMCPQ->GetXaxis()->SetTitle("Energy muY-mu");
21846     hMuYAbDiffMCPQ->GetXaxis()->CenterTitle();
21847     hMuYAbDiffMCPQ->GetYaxis()->SetTitle("");
21848     hMuYAbDiffMCPQ->GetYaxis()->CenterTitle();
21849     //hMuYAbDiffMCPQ->SetBit(TH1::kCanRebin);
21850 
21851     hMuYAbDiffMCNQ=new TH1F("hMuYAbDiffMCNQ","hMuYAbDiffMCNQ",
21852                             2000,-5,5);
21853     hMuYAbDiffMCNQ->GetXaxis()->SetTitle("Energy muY-mu");
21854     hMuYAbDiffMCNQ->GetXaxis()->CenterTitle();
21855     hMuYAbDiffMCNQ->GetYaxis()->SetTitle("");
21856     hMuYAbDiffMCNQ->GetYaxis()->CenterTitle();
21857     //hMuYAbDiffMCNQ->SetBit(TH1::kCanRebin);
21858 
21859 
21860     hShwYAbDiffMCPQ=new TH1F("hShwYAbDiffMCPQ","hShwYAbDiffMCPQ",
21861                              2000,-5,5);
21862     hShwYAbDiffMCPQ->GetXaxis()->SetTitle("Energy shwY-shw");
21863     hShwYAbDiffMCPQ->GetXaxis()->CenterTitle();
21864     hShwYAbDiffMCPQ->GetYaxis()->SetTitle("");
21865     hShwYAbDiffMCPQ->GetYaxis()->CenterTitle();
21866     //hShwYAbDiffMCPQ->SetBit(TH1::kCanRebin);
21867 
21868     hShwYAbDiffMCNQ=new TH1F("hShwYAbDiffMCNQ","hShwYAbDiffMCNQ",
21869                              2000,-5,5);
21870     hShwYAbDiffMCNQ->GetXaxis()->SetTitle("Energy shwY-shw");
21871     hShwYAbDiffMCNQ->GetXaxis()->CenterTitle();
21872     hShwYAbDiffMCNQ->GetYaxis()->SetTitle("");
21873     hShwYAbDiffMCNQ->GetYaxis()->CenterTitle();
21874     //hShwYAbDiffMCNQ->SetBit(TH1::kCanRebin);
21875 
21876 
21877 
21878     //profile the response
21879     pNuEnDiff20PQ=new TProfile("pNuEnDiff20PQ","pNuEnDiff20PQ",
21880                                51,-2,100);
21881     pNuEnDiff20PQ->GetXaxis()->SetTitle("True Energy (GeV)");
21882     pNuEnDiff20PQ->GetXaxis()->CenterTitle();
21883     pNuEnDiff20PQ->GetYaxis()->SetTitle("(reco-true)/true");
21884     pNuEnDiff20PQ->GetYaxis()->CenterTitle();
21885 
21886     pNuEnDiff10PQ=new TProfile("pNuEnDiff10PQ","pNuEnDiff10PQ",
21887                                102,-2,100);
21888     pNuEnDiff10PQ->GetXaxis()->SetTitle("True Energy (GeV)");
21889     pNuEnDiff10PQ->GetXaxis()->CenterTitle();
21890     pNuEnDiff10PQ->GetYaxis()->SetTitle("(reco-true)/true");
21891     pNuEnDiff10PQ->GetYaxis()->CenterTitle();
21892 
21893     pNuEnDiff05PQ=new TProfile("pNuEnDiff05PQ","pNuEnDiff05PQ",
21894                                204,-2,100);
21895     pNuEnDiff05PQ->GetXaxis()->SetTitle("True Energy (GeV)");
21896     pNuEnDiff05PQ->GetXaxis()->CenterTitle();
21897     pNuEnDiff05PQ->GetYaxis()->SetTitle("(reco-true)/true");
21898     pNuEnDiff05PQ->GetYaxis()->CenterTitle();
21899 
21900 
21901     pMuEnDiff20PQ=new TProfile("pMuEnDiff20PQ","pMuEnDiff20PQ",
21902                                51,-2,100);
21903     pMuEnDiff20PQ->GetXaxis()->SetTitle("True Energy (GeV)");
21904     pMuEnDiff20PQ->GetXaxis()->CenterTitle();
21905     pMuEnDiff20PQ->GetYaxis()->SetTitle("(reco-true)/true");
21906     pMuEnDiff20PQ->GetYaxis()->CenterTitle();
21907 
21908     pMuEnDiff10PQ=new TProfile("pMuEnDiff10PQ","pMuEnDiff10PQ",
21909                                102,-2,100);
21910     pMuEnDiff10PQ->GetXaxis()->SetTitle("True Energy (GeV)");
21911     pMuEnDiff10PQ->GetXaxis()->CenterTitle();
21912     pMuEnDiff10PQ->GetYaxis()->SetTitle("(reco-true)/true");
21913     pMuEnDiff10PQ->GetYaxis()->CenterTitle();
21914 
21915     pMuEnDiff05PQ=new TProfile("pMuEnDiff05PQ","pMuEnDiff05PQ",
21916                                204,-2,100);
21917     pMuEnDiff05PQ->GetXaxis()->SetTitle("True Energy (GeV)");
21918     pMuEnDiff05PQ->GetXaxis()->CenterTitle();
21919     pMuEnDiff05PQ->GetYaxis()->SetTitle("(reco-true)/true");
21920     pMuEnDiff05PQ->GetYaxis()->CenterTitle();
21921 
21922 
21923     pShwEnDiff20PQ=new TProfile("pShwEnDiff20PQ","pShwEnDiff20PQ",
21924                                 51,-2,100);
21925     pShwEnDiff20PQ->GetXaxis()->SetTitle("True Energy (GeV)");
21926     pShwEnDiff20PQ->GetXaxis()->CenterTitle();
21927     pShwEnDiff20PQ->GetYaxis()->SetTitle("(reco-true)/true");
21928     pShwEnDiff20PQ->GetYaxis()->CenterTitle();
21929 
21930     pShwEnDiff10PQ=new TProfile("pShwEnDiff10PQ","pShwEnDiff10PQ",
21931                                 102,-2,100);
21932     pShwEnDiff10PQ->GetXaxis()->SetTitle("True Energy (GeV)");
21933     pShwEnDiff10PQ->GetXaxis()->CenterTitle();
21934     pShwEnDiff10PQ->GetYaxis()->SetTitle("(reco-true)/true");
21935     pShwEnDiff10PQ->GetYaxis()->CenterTitle();
21936 
21937     pShwEnDiff05PQ=new TProfile("pShwEnDiff05PQ","pShwEnDiff05PQ",
21938                                 204,-2,100);
21939     pShwEnDiff05PQ->GetXaxis()->SetTitle("True Energy (GeV)");
21940     pShwEnDiff05PQ->GetXaxis()->CenterTitle();
21941     pShwEnDiff05PQ->GetYaxis()->SetTitle("(reco-true)/true");
21942     pShwEnDiff05PQ->GetYaxis()->CenterTitle();
21943 
21944 
21945 
21946 
21947 
21948 
21949     //profile the response
21950     pNuEnDiff20NQ=new TProfile("pNuEnDiff20NQ","pNuEnDiff20NQ",
21951                                51,-2,100);
21952     pNuEnDiff20NQ->GetXaxis()->SetTitle("True Energy (GeV)");
21953     pNuEnDiff20NQ->GetXaxis()->CenterTitle();
21954     pNuEnDiff20NQ->GetYaxis()->SetTitle("(reco-true)/true");
21955     pNuEnDiff20NQ->GetYaxis()->CenterTitle();
21956 
21957     pNuEnDiff10NQ=new TProfile("pNuEnDiff10NQ","pNuEnDiff10NQ",
21958                                102,-2,100);
21959     pNuEnDiff10NQ->GetXaxis()->SetTitle("True Energy (GeV)");
21960     pNuEnDiff10NQ->GetXaxis()->CenterTitle();
21961     pNuEnDiff10NQ->GetYaxis()->SetTitle("(reco-true)/true");
21962     pNuEnDiff10NQ->GetYaxis()->CenterTitle();
21963 
21964     pNuEnDiff05NQ=new TProfile("pNuEnDiff05NQ","pNuEnDiff05NQ",
21965                                204,-2,100);
21966     pNuEnDiff05NQ->GetXaxis()->SetTitle("True Energy (GeV)");
21967     pNuEnDiff05NQ->GetXaxis()->CenterTitle();
21968     pNuEnDiff05NQ->GetYaxis()->SetTitle("(reco-true)/true");
21969     pNuEnDiff05NQ->GetYaxis()->CenterTitle();
21970 
21971 
21972     pMuEnDiff20NQ=new TProfile("pMuEnDiff20NQ","pMuEnDiff20NQ",
21973                                51,-2,100);
21974     pMuEnDiff20NQ->GetXaxis()->SetTitle("True Energy (GeV)");
21975     pMuEnDiff20NQ->GetXaxis()->CenterTitle();
21976     pMuEnDiff20NQ->GetYaxis()->SetTitle("(reco-true)/true");
21977     pMuEnDiff20NQ->GetYaxis()->CenterTitle();
21978 
21979     pMuEnDiff10NQ=new TProfile("pMuEnDiff10NQ","pMuEnDiff10NQ",
21980                                102,-2,100);
21981     pMuEnDiff10NQ->GetXaxis()->SetTitle("True Energy (GeV)");
21982     pMuEnDiff10NQ->GetXaxis()->CenterTitle();
21983     pMuEnDiff10NQ->GetYaxis()->SetTitle("(reco-true)/true");
21984     pMuEnDiff10NQ->GetYaxis()->CenterTitle();
21985 
21986     pMuEnDiff05NQ=new TProfile("pMuEnDiff05NQ","pMuEnDiff05NQ",
21987                                204,-2,100);
21988     pMuEnDiff05NQ->GetXaxis()->SetTitle("True Energy (GeV)");
21989     pMuEnDiff05NQ->GetXaxis()->CenterTitle();
21990     pMuEnDiff05NQ->GetYaxis()->SetTitle("(reco-true)/true");
21991     pMuEnDiff05NQ->GetYaxis()->CenterTitle();
21992 
21993 
21994     pShwEnDiff20NQ=new TProfile("pShwEnDiff20NQ","pShwEnDiff20NQ",
21995                                 51,-2,100);
21996     pShwEnDiff20NQ->GetXaxis()->SetTitle("True Energy (GeV)");
21997     pShwEnDiff20NQ->GetXaxis()->CenterTitle();
21998     pShwEnDiff20NQ->GetYaxis()->SetTitle("(reco-true)/true");
21999     pShwEnDiff20NQ->GetYaxis()->CenterTitle();
22000 
22001     pShwEnDiff10NQ=new TProfile("pShwEnDiff10NQ","pShwEnDiff10NQ",
22002                                 102,-2,100);
22003     pShwEnDiff10NQ->GetXaxis()->SetTitle("True Energy (GeV)");
22004     pShwEnDiff10NQ->GetXaxis()->CenterTitle();
22005     pShwEnDiff10NQ->GetYaxis()->SetTitle("(reco-true)/true");
22006     pShwEnDiff10NQ->GetYaxis()->CenterTitle();
22007 
22008     pShwEnDiff05NQ=new TProfile("pShwEnDiff05NQ","pShwEnDiff05NQ",
22009                                 204,-2,100);
22010     pShwEnDiff05NQ->GetXaxis()->SetTitle("True Energy (GeV)");
22011     pShwEnDiff05NQ->GetXaxis()->CenterTitle();
22012     pShwEnDiff05NQ->GetYaxis()->SetTitle("(reco-true)/true");
22013     pShwEnDiff05NQ->GetYaxis()->CenterTitle();
22014 
22015 
22016 
22017 
22018     hShwVsNuEnNQ=new TH2F("hShwVsNuEnNQ","hShwVsNuEnNQ",
22019                           200,0,10,200,0,10);
22020     hShwVsNuEnNQ->GetXaxis()->SetTitle("#nu Energy (GeV)");
22021     hShwVsNuEnNQ->GetXaxis()->CenterTitle();
22022     hShwVsNuEnNQ->GetYaxis()->SetTitle("Shower Energy (GeV)");
22023     hShwVsNuEnNQ->GetYaxis()->CenterTitle();
22024     //hShwVsNuEnNQ->SetBit(TH1::kCanRebin);
22025 
22026     hShwVsNuEnPQ=new TH2F("hShwVsNuEnPQ","hShwVsNuEnPQ",
22027                           200,0,10,200,0,10);
22028     hShwVsNuEnPQ->GetXaxis()->SetTitle("#nu Energy (GeV)");
22029     hShwVsNuEnPQ->GetXaxis()->CenterTitle();
22030     hShwVsNuEnPQ->GetYaxis()->SetTitle("Shower Energy (GeV)");
22031     hShwVsNuEnPQ->GetYaxis()->CenterTitle();
22032     //hShwVsNuEnPQ->SetBit(TH1::kCanRebin);
22033 
22034     hShwVsNuEnAllNQ=new TH2F("hShwVsNuEnAllNQ","hShwVsNuEnAllNQ",
22035                              200,0,10,200,0,10);
22036     hShwVsNuEnAllNQ->GetXaxis()->SetTitle("#nu Energy (GeV)");
22037     hShwVsNuEnAllNQ->GetXaxis()->CenterTitle();
22038     hShwVsNuEnAllNQ->GetYaxis()->SetTitle("Shower Energy (GeV)");
22039     hShwVsNuEnAllNQ->GetYaxis()->CenterTitle();
22040     //hShwVsNuEnAllNQ->SetBit(TH1::kCanRebin);
22041 
22042     hShwVsNuEnAllPQ=new TH2F("hShwVsNuEnAllPQ","hShwVsNuEnAllPQ",
22043                              200,0,10,200,0,10);
22044     hShwVsNuEnAllPQ->GetXaxis()->SetTitle("#nu Energy (GeV)");
22045     hShwVsNuEnAllPQ->GetXaxis()->CenterTitle();
22046     hShwVsNuEnAllPQ->GetYaxis()->SetTitle("Shower Energy (GeV)");
22047     hShwVsNuEnAllPQ->GetYaxis()->CenterTitle();
22048     //hShwVsNuEnAllPQ->SetBit(TH1::kCanRebin);
22049 
22050 
22051 
22052 
22053 
22054     pShwEnDiffVsDistAllPQ=new TProfile
22055       ("pShwEnDiffVsDistAllPQ","pShwEnDiffVsDistAllPQ",60,-3,3);
22056     pShwEnDiffVsDistAllPQ->GetXaxis()->SetTitle("Distance to Edge (m)");
22057     pShwEnDiffVsDistAllPQ->GetXaxis()->CenterTitle();
22058     pShwEnDiffVsDistAllPQ->GetYaxis()->SetTitle("(reco-true)/true");
22059     pShwEnDiffVsDistAllPQ->GetYaxis()->CenterTitle();
22060 
22061     pShwEnDiffVsDistl05PQ=new TProfile
22062       ("pShwEnDiffVsDistl05PQ","pShwEnDiffVsDistl05PQ",60,-3,3);
22063     pShwEnDiffVsDistl05PQ->GetXaxis()->SetTitle("Distance to Edge (m)");
22064     pShwEnDiffVsDistl05PQ->GetXaxis()->CenterTitle();
22065     pShwEnDiffVsDistl05PQ->GetYaxis()->SetTitle("(reco-true)/true");
22066     pShwEnDiffVsDistl05PQ->GetYaxis()->CenterTitle();
22067 
22068     pShwEnDiffVsDistg05l10PQ=new TProfile
22069       ("pShwEnDiffVsDistg05l10PQ","pShwEnDiffVsDistg05l10PQ",60,-3,3);
22070     pShwEnDiffVsDistg05l10PQ->GetXaxis()->SetTitle("Distance to Edge (m)");
22071     pShwEnDiffVsDistg05l10PQ->GetXaxis()->CenterTitle();
22072     pShwEnDiffVsDistg05l10PQ->GetYaxis()->SetTitle("(reco-true)/true");
22073     pShwEnDiffVsDistg05l10PQ->GetYaxis()->CenterTitle();
22074 
22075     pShwEnDiffVsDistg10l20PQ=new TProfile
22076       ("pShwEnDiffVsDistg10l20PQ","pShwEnDiffVsDistg10l20PQ",60,-3,3);
22077     pShwEnDiffVsDistg10l20PQ->GetXaxis()->SetTitle("Distance to Edge (m)");
22078     pShwEnDiffVsDistg10l20PQ->GetXaxis()->CenterTitle();
22079     pShwEnDiffVsDistg10l20PQ->GetYaxis()->SetTitle("(reco-true)/true");
22080     pShwEnDiffVsDistg10l20PQ->GetYaxis()->CenterTitle();
22081 
22082     pShwEnDiffVsDistg20PQ=new TProfile
22083       ("pShwEnDiffVsDistg20PQ","pShwEnDiffVsDistg20PQ",60,-3,3);
22084     pShwEnDiffVsDistg20PQ->GetXaxis()->SetTitle("Distance to Edge (m)");
22085     pShwEnDiffVsDistg20PQ->GetXaxis()->CenterTitle();
22086     pShwEnDiffVsDistg20PQ->GetYaxis()->SetTitle("(reco-true)/true");
22087     pShwEnDiffVsDistg20PQ->GetYaxis()->CenterTitle();
22088 
22089     pShwEnVsDistPQ=new TProfile("pShwEnVsDistPQ","pShwEnVsDistPQ",
22090                                 60,-3,3);
22091     pShwEnVsDistPQ->GetXaxis()->SetTitle("Distance to Edge (m)");
22092     pShwEnVsDistPQ->GetXaxis()->CenterTitle();
22093     pShwEnVsDistPQ->GetYaxis()->SetTitle("Av. Shower Energy (GeV)");
22094     pShwEnVsDistPQ->GetYaxis()->CenterTitle();
22095 
22096 
22097     hEvtsVsDistAllRl75PQ=new TH1F("hEvtsVsDistAllRl75PQ",
22098                                   "hEvtsVsDistAllRl75PQ",60,-3,3);
22099     hEvtsVsDistAllRl75PQ->SetTitle("Evts vs. Dist. to Edge");
22100     hEvtsVsDistAllRl75PQ->GetXaxis()->SetTitle("Distance to Edge (m)");
22101     hEvtsVsDistAllRl75PQ->GetXaxis()->CenterTitle();
22102     hEvtsVsDistAllRl75PQ->GetYaxis()->SetTitle("");
22103     hEvtsVsDistAllRl75PQ->GetYaxis()->CenterTitle();
22104     //hEvtsVsDistAllRl75PQ->SetBit(TH1::kCanRebin);
22105 
22106     hEvtsVsDistAllRl50PQ=new TH1F("hEvtsVsDistAllRl50PQ",
22107                                   "hEvtsVsDistAllRl50PQ",60,-3,3);
22108     hEvtsVsDistAllRl50PQ->SetTitle("Evts vs. Dist. to Edge");
22109     hEvtsVsDistAllRl50PQ->GetXaxis()->SetTitle("Distance to Edge (m)");
22110     hEvtsVsDistAllRl50PQ->GetXaxis()->CenterTitle();
22111     hEvtsVsDistAllRl50PQ->GetYaxis()->SetTitle("");
22112     hEvtsVsDistAllRl50PQ->GetYaxis()->CenterTitle();
22113     //hEvtsVsDistAllRl50PQ->SetBit(TH1::kCanRebin);
22114 
22115     hEvtsVsDistAllPQ=new TH1F("hEvtsVsDistAllPQ",
22116                               "hEvtsVsDistAllPQ",60,-3,3);
22117     hEvtsVsDistAllPQ->SetTitle("Evts vs. Dist. to Edge");
22118     hEvtsVsDistAllPQ->GetXaxis()->SetTitle("Distance to Edge (m)");
22119     hEvtsVsDistAllPQ->GetXaxis()->CenterTitle();
22120     hEvtsVsDistAllPQ->GetYaxis()->SetTitle("");
22121     hEvtsVsDistAllPQ->GetYaxis()->CenterTitle();
22122     //hEvtsVsDistAllPQ->SetBit(TH1::kCanRebin);
22123 
22124     hEvtsVsDistl05PQ=new TH1F("hEvtsVsDistl05PQ",
22125                               "hEvtsVsDistl05PQ",60,-3,3);
22126     hEvtsVsDistl05PQ->SetTitle("Evts vs. Dist. to Edge");
22127     hEvtsVsDistl05PQ->GetXaxis()->SetTitle("Distance to Edge (m)");
22128     hEvtsVsDistl05PQ->GetXaxis()->CenterTitle();
22129     hEvtsVsDistl05PQ->GetYaxis()->SetTitle("");
22130     hEvtsVsDistl05PQ->GetYaxis()->CenterTitle();
22131     //hEvtsVsDistl05PQ->SetBit(TH1::kCanRebin);
22132 
22133     hEvtsVsDistg05l10PQ=new TH1F("hEvtsVsDistg05l10PQ",
22134                                  "hEvtsVsDistg05l10PQ",60,-3,3);
22135     hEvtsVsDistg05l10PQ->SetTitle("Evts vs. Dist. to Edge");
22136     hEvtsVsDistg05l10PQ->GetXaxis()->SetTitle("Distance to Edge (m)");
22137     hEvtsVsDistg05l10PQ->GetXaxis()->CenterTitle();
22138     hEvtsVsDistg05l10PQ->GetYaxis()->SetTitle("");
22139     hEvtsVsDistg05l10PQ->GetYaxis()->CenterTitle();
22140     //hEvtsVsDistg05l10PQ->SetBit(TH1::kCanRebin);
22141 
22142     hEvtsVsDistg10l20PQ=new TH1F("hEvtsVsDistg10l20PQ",
22143                                  "hEvtsVsDistg10l20PQ",60,-3,3);
22144     hEvtsVsDistg10l20PQ->SetTitle("Evts vs. Dist. to Edge");
22145     hEvtsVsDistg10l20PQ->GetXaxis()->SetTitle("Distance to Edge (m)");
22146     hEvtsVsDistg10l20PQ->GetXaxis()->CenterTitle();
22147     hEvtsVsDistg10l20PQ->GetYaxis()->SetTitle("");
22148     hEvtsVsDistg10l20PQ->GetYaxis()->CenterTitle();
22149     //hEvtsVsDistg10l20PQ->SetBit(TH1::kCanRebin);
22150 
22151     hEvtsVsDistg20PQ=new TH1F("hEvtsVsDistg20PQ",
22152                               "hEvtsVsDistg20PQ",60,-3,3);
22153     hEvtsVsDistg20PQ->SetTitle("Evts vs. Dist. to Edge");
22154     hEvtsVsDistg20PQ->GetXaxis()->SetTitle("Distance to Edge (m)");
22155     hEvtsVsDistg20PQ->GetXaxis()->CenterTitle();
22156     hEvtsVsDistg20PQ->GetYaxis()->SetTitle("");
22157     hEvtsVsDistg20PQ->GetYaxis()->CenterTitle();
22158     //hEvtsVsDistg20PQ->SetBit(TH1::kCanRebin);
22159 
22160 
22161 
22162     pShwEnDiffVsDistAllNQ=new TProfile
22163       ("pShwEnDiffVsDistAllNQ","pShwEnDiffVsDistAllNQ",60,-3,3);
22164     pShwEnDiffVsDistAllNQ->GetXaxis()->SetTitle("Distance to Edge (m)");
22165     pShwEnDiffVsDistAllNQ->GetXaxis()->CenterTitle();
22166     pShwEnDiffVsDistAllNQ->GetYaxis()->SetTitle("(reco-true)/true");
22167     pShwEnDiffVsDistAllNQ->GetYaxis()->CenterTitle();
22168 
22169     pShwEnDiffVsDistl05NQ=new TProfile
22170       ("pShwEnDiffVsDistl05NQ","pShwEnDiffVsDistl05NQ",60,-3,3);
22171     pShwEnDiffVsDistl05NQ->GetXaxis()->SetTitle("Distance to Edge (m)");
22172     pShwEnDiffVsDistl05NQ->GetXaxis()->CenterTitle();
22173     pShwEnDiffVsDistl05NQ->GetYaxis()->SetTitle("(reco-true)/true");
22174     pShwEnDiffVsDistl05NQ->GetYaxis()->CenterTitle();
22175 
22176     pShwEnDiffVsDistg05l10NQ=new TProfile
22177       ("pShwEnDiffVsDistg05l10NQ","pShwEnDiffVsDistg05l10NQ",60,-3,3);
22178     pShwEnDiffVsDistg05l10NQ->GetXaxis()->SetTitle("Distance to Edge (m)");
22179     pShwEnDiffVsDistg05l10NQ->GetXaxis()->CenterTitle();
22180     pShwEnDiffVsDistg05l10NQ->GetYaxis()->SetTitle("(reco-true)/true");
22181     pShwEnDiffVsDistg05l10NQ->GetYaxis()->CenterTitle();
22182 
22183     pShwEnDiffVsDistg10l20NQ=new TProfile
22184       ("pShwEnDiffVsDistg10l20NQ","pShwEnDiffVsDistg10l20NQ",60,-3,3);
22185     pShwEnDiffVsDistg10l20NQ->GetXaxis()->SetTitle("Distance to Edge (m)");
22186     pShwEnDiffVsDistg10l20NQ->GetXaxis()->CenterTitle();
22187     pShwEnDiffVsDistg10l20NQ->GetYaxis()->SetTitle("(reco-true)/true");
22188     pShwEnDiffVsDistg10l20NQ->GetYaxis()->CenterTitle();
22189 
22190     pShwEnDiffVsDistg20NQ=new TProfile
22191       ("pShwEnDiffVsDistg20NQ","pShwEnDiffVsDistg20NQ",60,-3,3);
22192     pShwEnDiffVsDistg20NQ->GetXaxis()->SetTitle("Distance to Edge (m)");
22193     pShwEnDiffVsDistg20NQ->GetXaxis()->CenterTitle();
22194     pShwEnDiffVsDistg20NQ->GetYaxis()->SetTitle("(reco-true)/true");
22195     pShwEnDiffVsDistg20NQ->GetYaxis()->CenterTitle();
22196 
22197     pShwEnVsDistNQ=new TProfile("pShwEnVsDistNQ","pShwEnVsDistNQ",
22198                                 60,-3,3);
22199     pShwEnVsDistNQ->GetXaxis()->SetTitle("Distance to Edge (m)");
22200     pShwEnVsDistNQ->GetXaxis()->CenterTitle();
22201     pShwEnVsDistNQ->GetYaxis()->SetTitle("Av. Shower Energy (GeV)");
22202     pShwEnVsDistNQ->GetYaxis()->CenterTitle();
22203 
22204 
22205 
22206 
22207     hEvtsVsDistAllRl75NQ=new TH1F("hEvtsVsDistAllRl75NQ",
22208                                   "hEvtsVsDistAllRl75NQ",60,-3,3);
22209     hEvtsVsDistAllRl75NQ->SetTitle("Evts vs. Dist. to Edge");
22210     hEvtsVsDistAllRl75NQ->GetXaxis()->SetTitle("Distance to Edge (m)");
22211     hEvtsVsDistAllRl75NQ->GetXaxis()->CenterTitle();
22212     hEvtsVsDistAllRl75NQ->GetYaxis()->SetTitle("");
22213     hEvtsVsDistAllRl75NQ->GetYaxis()->CenterTitle();
22214     //hEvtsVsDistAllRl75NQ->SetBit(TH1::kCanRebin);
22215 
22216     hEvtsVsDistAllRl50NQ=new TH1F("hEvtsVsDistAllRl50NQ",
22217                                   "hEvtsVsDistAllRl50NQ",60,-3,3);
22218     hEvtsVsDistAllRl50NQ->SetTitle("Evts vs. Dist. to Edge");
22219     hEvtsVsDistAllRl50NQ->GetXaxis()->SetTitle("Distance to Edge (m)");
22220     hEvtsVsDistAllRl50NQ->GetXaxis()->CenterTitle();
22221     hEvtsVsDistAllRl50NQ->GetYaxis()->SetTitle("");
22222     hEvtsVsDistAllRl50NQ->GetYaxis()->CenterTitle();
22223     //hEvtsVsDistAllRl50NQ->SetBit(TH1::kCanRebin);
22224 
22225     hEvtsVsDistAllNQ=new TH1F("hEvtsVsDistAllNQ",
22226                               "hEvtsVsDistAllNQ",60,-3,3);
22227     hEvtsVsDistAllNQ->SetTitle("Evts vs. Dist. to Edge");
22228     hEvtsVsDistAllNQ->GetXaxis()->SetTitle("Distance to Edge (m)");
22229     hEvtsVsDistAllNQ->GetXaxis()->CenterTitle();
22230     hEvtsVsDistAllNQ->GetYaxis()->SetTitle("");
22231     hEvtsVsDistAllNQ->GetYaxis()->CenterTitle();
22232     //hEvtsVsDistAllNQ->SetBit(TH1::kCanRebin);
22233 
22234     hEvtsVsDistl05NQ=new TH1F("hEvtsVsDistl05NQ",
22235                               "hEvtsVsDistl05NQ",60,-3,3);
22236     hEvtsVsDistl05NQ->SetTitle("Evts vs. Dist. to Edge");
22237     hEvtsVsDistl05NQ->GetXaxis()->SetTitle("Distance to Edge (m)");
22238     hEvtsVsDistl05NQ->GetXaxis()->CenterTitle();
22239     hEvtsVsDistl05NQ->GetYaxis()->SetTitle("");
22240     hEvtsVsDistl05NQ->GetYaxis()->CenterTitle();
22241     //hEvtsVsDistl05NQ->SetBit(TH1::kCanRebin);
22242 
22243     hEvtsVsDistg05l10NQ=new TH1F("hEvtsVsDistg05l10NQ",
22244                                  "hEvtsVsDistg05l10NQ",60,-3,3);
22245     hEvtsVsDistg05l10NQ->SetTitle("Evts vs. Dist. to Edge");
22246     hEvtsVsDistg05l10NQ->GetXaxis()->SetTitle("Distance to Edge (m)");
22247     hEvtsVsDistg05l10NQ->GetXaxis()->CenterTitle();
22248     hEvtsVsDistg05l10NQ->GetYaxis()->SetTitle("");
22249     hEvtsVsDistg05l10NQ->GetYaxis()->CenterTitle();
22250     //hEvtsVsDistg05l10NQ->SetBit(TH1::kCanRebin);
22251 
22252     hEvtsVsDistg10l20NQ=new TH1F("hEvtsVsDistg10l20NQ",
22253                                  "hEvtsVsDistg10l20NQ",60,-3,3);
22254     hEvtsVsDistg10l20NQ->SetTitle("Evts vs. Dist. to Edge");
22255     hEvtsVsDistg10l20NQ->GetXaxis()->SetTitle("Distance to Edge (m)");
22256     hEvtsVsDistg10l20NQ->GetXaxis()->CenterTitle();
22257     hEvtsVsDistg10l20NQ->GetYaxis()->SetTitle("");
22258     hEvtsVsDistg10l20NQ->GetYaxis()->CenterTitle();
22259     //hEvtsVsDistg10l20NQ->SetBit(TH1::kCanRebin);
22260 
22261     hEvtsVsDistg20NQ=new TH1F("hEvtsVsDistg20NQ",
22262                               "hEvtsVsDistg20NQ",60,-3,3);
22263     hEvtsVsDistg20NQ->SetTitle("Evts vs. Dist. to Edge");
22264     hEvtsVsDistg20NQ->GetXaxis()->SetTitle("Distance to Edge (m)");
22265     hEvtsVsDistg20NQ->GetXaxis()->CenterTitle();
22266     hEvtsVsDistg20NQ->GetYaxis()->SetTitle("");
22267     hEvtsVsDistg20NQ->GetYaxis()->CenterTitle();
22268     //hEvtsVsDistg20NQ->SetBit(TH1::kCanRebin);
22269 
22270   }
22271 
22272   //get an instance of the code library
22273   NuLibrary& lib=NuLibrary::Instance();
22274   Float_t radius=lib.reco.GetRadiusFromBeamCentre(nu.xTrkVtx,nu.yTrkVtx,nu);
22275 
22276   //fill these for data too
22277   if (nu.charge==+1) {
22278     if (nu.shwEn>0) {//only fill if there is a shower
22279       pShwEnVsDistPQ->Fill(nu.distToEdgeEvtVtx,nu.shwEn,nu.rw);
22280       hEvtsVsDistAllPQ->Fill(nu.distToEdgeEvtVtx,nu.rw);
22281 
22282       if(radius<0.50) {
22283         hEvtsVsDistAllRl50PQ->Fill(nu.distToEdgeEvtVtx,nu.rw);
22284       }
22285       if(radius<0.75) {
22286         hEvtsVsDistAllRl75PQ->Fill(nu.distToEdgeEvtVtx,nu.rw);
22287       }
22288     }
22289   }
22290   if (nu.charge==-1) {
22291     if (nu.shwEn>0) {//only fill if there is a shower
22292       pShwEnVsDistNQ->Fill(nu.distToEdgeEvtVtx,nu.shwEn,nu.rw);
22293       hEvtsVsDistAllNQ->Fill(nu.distToEdgeEvtVtx,nu.rw);
22294 
22295       if(radius<0.50) {
22296         hEvtsVsDistAllRl50NQ->Fill(nu.distToEdgeEvtVtx,nu.rw);
22297       }
22298       if(radius<0.75) {
22299         hEvtsVsDistAllRl75NQ->Fill(nu.distToEdgeEvtVtx,nu.rw);
22300       }
22301     }
22302   }
22303 
22304   //return if not MC
22305   if (nu.simFlag!=SimFlag::kMC) return;
22306 
22307   Float_t diffRange=nu.trkEnMC==0 ? 0:
22308     (nu.trkEnRange-fabs(nu.trkEnMC))/fabs(nu.trkEnMC);
22309   Float_t diffCurv=nu.trkEnMC==0 ? 0:
22310     (nu.trkEnCurv-fabs(nu.trkEnMC))/fabs(nu.trkEnMC);
22311   Float_t diffMu=nu.trkEnMC==0 ? 0:
22312     (nu.trkEn-fabs(nu.trkEnMC))/fabs(nu.trkEnMC);
22313   Float_t diffShw=nu.shwEnMC==0 ? 0:
22314     (nu.shwEn-nu.shwEnMC)/nu.shwEnMC;
22315   Float_t diffShw2=nu.shwEn2MC==0 ? 0:
22316     (nu.shwEn-nu.shwEn2MC)/nu.shwEn2MC;
22317   Float_t diffNu=(nu.energy-nu.energyMC)/nu.energyMC;
22318   Float_t diffY=nu.yMC==0 ? 0:
22319     (nu.y-nu.yMC)/nu.yMC;
22320   const Float_t diffAbY=nu.y-nu.yMC;
22321   Float_t diffMuYMC=nu.trkEnMC==0 ? 0:
22322     (fabs(nu.trkEn2MC)-fabs(nu.trkEnMC))/fabs(nu.trkEnMC);
22323   Float_t diffShwYMC=nu.shwEnMC==0 ? 0:
22324     (fabs(nu.shwEn2MC)-fabs(nu.shwEnMC))/fabs(nu.shwEnMC);
22325   const Float_t diffAbMuYMC=(fabs(nu.trkEn2MC)-fabs(nu.trkEnMC));
22326   const Float_t diffAbShwYMC=(fabs(nu.shwEn2MC)-fabs(nu.shwEnMC));
22327 
22328   Float_t radiusVtx=pow(nu.xEvtVtx,2)+pow(nu.yEvtVtx,2);
22329   if (radiusVtx>=0) radiusVtx=sqrt(radiusVtx);
22330   else radiusVtx=-1;
22331   Float_t radiusEnd=pow(nu.xEvtEnd,2)+pow(nu.yEvtEnd,2);
22332   if (radiusEnd>=0) radiusEnd=sqrt(radiusEnd);
22333   else radiusEnd=-1;
22334 
22335   //limit the maximum difference to +100%
22336   //it's limited to -100% anyway
22337   //so this makes the distribution symmetric
22338   if (true){
22339     if (diffRange>1) diffRange=1;
22340     if (diffCurv>1) diffCurv=1;
22341     if (diffMu>1) diffMu=1;
22342     if (diffShw>1) diffShw=1;
22343     if (diffShw2>1) diffShw2=1;
22344     if (diffNu>1) diffNu=1;
22345     if (diffY>1) diffY=1;
22346     if (diffMuYMC>1) diffMuYMC=1;
22347     if (diffShwYMC>1) diffShwYMC=1;
22348   }
22349 
22350   //if (fabs(diffAbMuYMC)>5){
22351   if (diffShw<-1){
22352     MAXMSG("NuPlots",Msg::kInfo,300)
22353       <<endl<<endl
22354       <<"pittFlag="<<nu.containmentFlag
22355       <<", dr="<<diffRange
22356       <<", dc="<<diffCurv
22357       <<", dNu="<<diffNu
22358       <<", dY="<<diffY
22359       <<endl
22360       <<", diffAbMuY="<<diffAbMuYMC
22361       <<" ("<<diffMuYMC<<")"
22362       <<", diffAbShwY="<<diffAbShwYMC
22363       <<" ("<<diffShwYMC<<")"
22364       <<endl
22365       <<"MC: energy="<<nu.energyMC
22366       <<", y="<<nu.yMC
22367       <<", trk="<<nu.trkEnMC
22368       <<", trk2="<<nu.trkEn2MC
22369       <<", shw="<<nu.shwEnMC
22370       <<", shw2="<<nu.shwEn2MC
22371       <<endl
22372       <<"Reco: shw="<<nu.shwEn<<", diffShw="<<diffShw
22373       <<endl;
22374   }
22375 
22376   if (true){
22377     if (diffRange<-1) diffRange=-1;
22378     if (diffCurv<-1) diffCurv=-1;
22379     if (diffMu<-1) diffMu=-1;
22380     if (diffShw<-1) diffShw=-1;
22381     if (diffShw2<-1) diffShw2=-1;
22382     if (diffNu<-1) diffNu=-1;
22383     if (diffY<-1) diffY=-1;
22384     if (diffMuYMC<-1) diffMuYMC=-1;
22385     if (diffShwYMC<-1) diffShwYMC=-1;
22386   }
22387 
22388   //evt vtx reco-true differences
22389   Float_t vtxTDiff=pow(nu.xEvtVtx-nu.vtxxMC,2)+
22390     pow(nu.yEvtVtx-nu.vtxyMC,2);
22391   Float_t vtxZDiff=nu.zEvtVtx-nu.vtxzMC;
22392   Float_t vtxSDiff=pow(nu.xEvtVtx-nu.vtxxMC,2)+
22393     pow(nu.yEvtVtx-nu.vtxyMC,2)+pow(nu.zEvtVtx-nu.vtxzMC,2);
22394   if (vtxTDiff>0) vtxTDiff=sqrt(vtxTDiff);
22395   else {
22396     cout<<"Setting vtxTDiff to zero"<<endl;
22397     vtxTDiff=0;
22398   }
22399   if (vtxSDiff>0) vtxSDiff=sqrt(vtxSDiff);
22400   else {
22401     cout<<"Setting vtxSDiff to zero"<<endl;
22402     vtxSDiff=0;
22403   }
22404 
22405   if (nu.charge==-1) {
22406     hEvtVtxTDiffNQ->Fill(vtxTDiff,nu.rw);
22407     hEvtVtxZDiffNQ->Fill(vtxZDiff,nu.rw);
22408     hEvtVtxSDiffNQ->Fill(vtxSDiff,nu.rw);
22409     pEvtVtxTDiffVsDistNQ->Fill(nu.distToEdgeEvtVtx,vtxTDiff,nu.rw);
22410     pEvtVtxZDiffVsDistNQ->Fill(nu.distToEdgeEvtVtx,vtxZDiff,nu.rw);
22411     pEvtVtxSDiffVsDistNQ->Fill(nu.distToEdgeEvtVtx,vtxSDiff,nu.rw);
22412   }
22413   else if (nu.charge==+1) {
22414     hEvtVtxTDiffPQ->Fill(vtxTDiff,nu.rw);
22415     hEvtVtxZDiffPQ->Fill(vtxZDiff,nu.rw);
22416     hEvtVtxSDiffPQ->Fill(vtxSDiff,nu.rw);
22417     pEvtVtxTDiffVsDistPQ->Fill(nu.distToEdgeEvtVtx,vtxTDiff,nu.rw);
22418     pEvtVtxZDiffVsDistPQ->Fill(nu.distToEdgeEvtVtx,vtxZDiff,nu.rw);
22419     pEvtVtxSDiffVsDistPQ->Fill(nu.distToEdgeEvtVtx,vtxSDiff,nu.rw);
22420   }
22421 
22422   //make plots for NC and CC separately
22423   if (nu.charge==-1) {
22424     if (nu.iaction==1) {
22425       hNuEnDiffCCNQ->Fill(diffNu,nu.rw);
22426     }
22427     else if (nu.iaction==0) {
22428       hNuEnDiffNCNQ->Fill(diffNu,nu.rw);
22429     }
22430     else MSG("NuPlots",Msg::kWarning)<<"Ahh, bad iaction"<<endl;
22431   }
22432   else if (nu.charge==+1) {
22433     if (nu.iaction==1){
22434       hNuEnDiffCCPQ->Fill(diffNu,nu.rw);
22435     }
22436     else if (nu.iaction==0) {
22437       hNuEnDiffNCPQ->Fill(diffNu,nu.rw);
22438     }
22439     else MSG("NuPlots",Msg::kWarning)<<"Ahh, bad iaction"<<endl;
22440   }
22441 
22442   //only make plots for CC
22443   //the muon plots particularly are distorted since trueEn=0 for NC
22444   //return if not CC
22445   if (nu.iaction!=1) return;
22446 
22447 
22448   //if (nu.charge==+1) {//used up until 07/Aug/07
22449   if (nu.charge==+1 && nu.inu==-14) {//nubars
22450     hMuEnDiffPQ->Fill(diffMu,nu.rw);
22451     if (radiusEnd<=0.7) {
22452       hMuEnDiffRangeR07PQ->Fill(diffRange,nu.rw);
22453       hMuEnDiffCurvR07PQ->Fill(diffCurv,nu.rw);
22454     }
22455     hMuEnDiffRangePQ->Fill(diffRange,nu.rw);
22456     hMuEnDiffCurvPQ->Fill(diffCurv,nu.rw);
22457     hShwEnDiffPQ->Fill(diffShw,nu.rw);
22458     hShwEn2DiffPQ->Fill(diffShw2,nu.rw);
22459     hNuEnDiffPQ->Fill(diffNu,nu.rw);
22460     pNuEnDiff20PQ->Fill(nu.energyMC,diffNu,nu.rw);
22461     pNuEnDiff10PQ->Fill(nu.energyMC,diffNu,nu.rw);
22462     pNuEnDiff05PQ->Fill(nu.energyMC,diffNu,nu.rw);
22463     pMuEnDiff20PQ->Fill(nu.energyMC,diffMu,nu.rw);
22464     pMuEnDiff10PQ->Fill(nu.energyMC,diffMu,nu.rw);
22465     pMuEnDiff05PQ->Fill(nu.energyMC,diffMu,nu.rw);
22466     pShwEnDiff20PQ->Fill(nu.energyMC,diffShw,nu.rw);
22467     pShwEnDiff10PQ->Fill(nu.energyMC,diffShw,nu.rw);
22468     pShwEnDiff05PQ->Fill(nu.energyMC,diffShw,nu.rw);
22469 
22470     hYDiffPQ->Fill(diffY,nu.rw);
22471     hYAbDiffPQ->Fill(diffAbY,nu.rw);
22472     hMuYDiffMCPQ->Fill(diffMuYMC,nu.rw);
22473     hShwYDiffMCPQ->Fill(diffShwYMC,nu.rw);
22474     hMuYAbDiffMCPQ->Fill(diffAbMuYMC,nu.rw);
22475     hShwYAbDiffMCPQ->Fill(diffAbShwYMC,nu.rw);
22476 
22477     hShwVsNuEnAllPQ->Fill(nu.energyMC,nu.shwEnMC,nu.rw);
22478     if (diffShw>=1) {
22479       hShwVsNuEnPQ->Fill(nu.energyMC,nu.shwEnMC,nu.rw);
22480     }
22481 
22482     //fiducial volume study plots
22483     if (nu.shwEn>0) {//only fill if there is a shower
22484       pShwEnDiffVsDistAllPQ->Fill(nu.distToEdgeEvtVtx,diffShw,nu.rw);
22485       //hEvtsVsDistAllPQ->Fill(nu.distToEdgeEvtVtx,nu.rw);//fill above
22486       if (nu.shwEnMC<5) {
22487         pShwEnDiffVsDistl05PQ->Fill(nu.distToEdgeEvtVtx,diffShw,nu.rw);
22488         hEvtsVsDistl05PQ->Fill(nu.distToEdgeEvtVtx,nu.rw);
22489       }
22490       else if (nu.shwEnMC<10) {
22491         pShwEnDiffVsDistg05l10PQ->Fill(nu.distToEdgeEvtVtx,diffShw,
22492                                        nu.rw);
22493         hEvtsVsDistg05l10PQ->Fill(nu.distToEdgeEvtVtx,nu.rw);
22494       }
22495       else if (nu.shwEnMC<20) {
22496         pShwEnDiffVsDistg10l20PQ->Fill(nu.distToEdgeEvtVtx,diffShw,
22497                                        nu.rw);
22498         hEvtsVsDistg10l20PQ->Fill(nu.distToEdgeEvtVtx,nu.rw);
22499       }
22500       else {
22501         pShwEnDiffVsDistg20PQ->Fill(nu.distToEdgeEvtVtx,diffShw,nu.rw);
22502         hEvtsVsDistg20PQ->Fill(nu.distToEdgeEvtVtx,nu.rw);
22503       }
22504     }
22505 
22506     //fill the histos for particular containments
22507     if (nu.containmentFlag==1) {
22508       //if (fabs(diffRange)>0.2) nu.PrintRangeEnergy();
22509       if (radiusEnd<=0.7) {
22510         hMuEnDiffRangeR07PQ1->Fill(diffRange,nu.rw);
22511         hMuEnDiffCurvR07PQ1->Fill(diffCurv,nu.rw);
22512       }
22513       hMuEnDiffRangePQ1->Fill(diffRange,nu.rw);
22514       hMuEnDiffCurvPQ1->Fill(diffCurv,nu.rw);
22515       hShwEnDiffPQ1->Fill(diffShw,nu.rw);
22516       hNuEnDiffPQ1->Fill(diffNu,nu.rw);
22517     }
22518     else if (nu.containmentFlag==2) {
22519       if (radiusEnd<=0.7) {
22520         hMuEnDiffRangeR07PQ2->Fill(diffRange,nu.rw);
22521         hMuEnDiffCurvR07PQ2->Fill(diffCurv,nu.rw);
22522       }
22523       hMuEnDiffRangePQ2->Fill(diffRange,nu.rw);
22524       hMuEnDiffCurvPQ2->Fill(diffCurv,nu.rw);
22525       hShwEnDiffPQ2->Fill(diffShw,nu.rw);
22526       hNuEnDiffPQ2->Fill(diffNu,nu.rw);
22527     }
22528     else if (nu.containmentFlag==3) {
22529       if (radiusEnd<=0.7) {
22530         hMuEnDiffRangeR07PQ3->Fill(diffRange,nu.rw);
22531         hMuEnDiffCurvR07PQ3->Fill(diffCurv,nu.rw);
22532       }
22533       //if (fabs(diffRange)>0.2) nu.PrintRangeEnergy();
22534       hMuEnDiffRangePQ3->Fill(diffRange,nu.rw);
22535       hMuEnDiffCurvPQ3->Fill(diffCurv,nu.rw);
22536       hShwEnDiffPQ3->Fill(diffShw,nu.rw);
22537       hNuEnDiffPQ3->Fill(diffNu,nu.rw);
22538     }
22539     else if (nu.containmentFlag==4) {
22540       if (radiusEnd<=0.7) {
22541         hMuEnDiffRangeR07PQ4->Fill(diffRange,nu.rw);
22542         hMuEnDiffCurvR07PQ4->Fill(diffCurv,nu.rw);
22543       }
22544       hMuEnDiffRangePQ4->Fill(diffRange,nu.rw);
22545       hMuEnDiffCurvPQ4->Fill(diffCurv,nu.rw);
22546       hShwEnDiffPQ4->Fill(diffShw,nu.rw);
22547       hNuEnDiffPQ4->Fill(diffNu,nu.rw);
22548     }
22549     else MSG("NuPlots",Msg::kWarning)<<"Ahhh containmentFlag="<<nu.containmentFlag<<endl;
22550   }
22551   else if (nu.charge==+1) {
22552     //background event, so do nothing
22553   }
22554   //else if (nu.charge==-1){//used up until 07/Aug/07
22555   else if (nu.charge==-1 && nu.inu==+14) {//neutrinos
22556     hMuEnDiffNQ->Fill(diffMu,nu.rw);
22557     if (radiusEnd<=0.7) {
22558       hMuEnDiffRangeR07NQ->Fill(diffRange,nu.rw);
22559       hMuEnDiffCurvR07NQ->Fill(diffCurv,nu.rw);
22560     }
22561     hMuEnDiffRangeNQ->Fill(diffRange,nu.rw);
22562     hMuEnDiffCurvNQ->Fill(diffCurv,nu.rw);
22563     hShwEnDiffNQ->Fill(diffShw,nu.rw);
22564     hShwEn2DiffNQ->Fill(diffShw2,nu.rw);
22565     hNuEnDiffNQ->Fill(diffNu,nu.rw);
22566     pNuEnDiff20NQ->Fill(nu.energyMC,diffNu,nu.rw);
22567     pNuEnDiff10NQ->Fill(nu.energyMC,diffNu,nu.rw);
22568     pNuEnDiff05NQ->Fill(nu.energyMC,diffNu,nu.rw);
22569     pMuEnDiff20NQ->Fill(nu.energyMC,diffMu,nu.rw);
22570     pMuEnDiff10NQ->Fill(nu.energyMC,diffMu,nu.rw);
22571     pMuEnDiff05NQ->Fill(nu.energyMC,diffMu,nu.rw);
22572     pShwEnDiff20NQ->Fill(nu.energyMC,diffShw,nu.rw);
22573     pShwEnDiff10NQ->Fill(nu.energyMC,diffShw,nu.rw);
22574     pShwEnDiff05NQ->Fill(nu.energyMC,diffShw,nu.rw);
22575 
22576     hYDiffNQ->Fill(diffY,nu.rw);
22577     hYAbDiffNQ->Fill(diffAbY,nu.rw);
22578     hMuYDiffMCNQ->Fill(diffMuYMC,nu.rw);
22579     hShwYDiffMCNQ->Fill(diffShwYMC,nu.rw);
22580     hMuYAbDiffMCNQ->Fill(diffAbMuYMC,nu.rw);
22581     hShwYAbDiffMCNQ->Fill(diffAbShwYMC,nu.rw);
22582 
22583     hShwVsNuEnAllNQ->Fill(nu.energyMC,nu.shwEnMC,nu.rw);
22584     if (diffShw>=1) {
22585       hShwVsNuEnNQ->Fill(nu.energyMC,nu.shwEnMC,nu.rw);
22586     }
22587 
22588     //fiducial volume study plots
22589     if (nu.shwEn>0) {//only fill if there is a shower
22590       pShwEnDiffVsDistAllNQ->Fill(nu.distToEdgeEvtVtx,diffShw,nu.rw);
22591       //hEvtsVsDistAllNQ->Fill(nu.distToEdgeEvtVtx,nu.rw);//fill above
22592       if (nu.shwEnMC<5) {
22593         pShwEnDiffVsDistl05NQ->Fill(nu.distToEdgeEvtVtx,diffShw,nu.rw);
22594         hEvtsVsDistl05NQ->Fill(nu.distToEdgeEvtVtx,nu.rw);
22595       }
22596       else if (nu.shwEnMC<10) {
22597         pShwEnDiffVsDistg05l10NQ->Fill(nu.distToEdgeEvtVtx,diffShw,
22598                                        nu.rw);
22599         hEvtsVsDistg05l10NQ->Fill(nu.distToEdgeEvtVtx,nu.rw);
22600       }
22601       else if (nu.shwEnMC<20) {
22602         pShwEnDiffVsDistg10l20NQ->Fill(nu.distToEdgeEvtVtx,diffShw,
22603                                        nu.rw);
22604         hEvtsVsDistg10l20NQ->Fill(nu.distToEdgeEvtVtx,nu.rw);
22605       }
22606       else {
22607         pShwEnDiffVsDistg20NQ->Fill(nu.distToEdgeEvtVtx,diffShw,nu.rw);
22608         hEvtsVsDistg20NQ->Fill(nu.distToEdgeEvtVtx,nu.rw);
22609       }
22610     }
22611 
22612     //fill the histos for specific energy ranges
22613     if (nu.energyMC<1) {
22614       //do nothing
22615     }
22616     else if (nu.energyMC<2) {
22617       hShwEnDiffNQGeV1->Fill(diffShw,nu.rw);
22618       MAXMSG("NuPlots",Msg::kDebug,300)
22619         <<endl
22620         <<"shwMC="<<nu.shwEnMC
22621         <<", shw="<<nu.shwEn
22622         <<", diffShw="<<diffShw
22623         <<endl<<endl;
22624     }
22625     else if (nu.energyMC<3) {
22626       hShwEnDiffNQGeV2->Fill(diffShw,nu.rw);
22627     }
22628     else if (nu.energyMC<4) {
22629       hShwEnDiffNQGeV3->Fill(diffShw,nu.rw);
22630     }
22631     else if (nu.energyMC<5) {
22632       hShwEnDiffNQGeV4->Fill(diffShw,nu.rw);
22633     }
22634     else if (nu.energyMC<6) {
22635       hShwEnDiffNQGeV5->Fill(diffShw,nu.rw);
22636     }
22637     else if (nu.energyMC<7) {
22638       hShwEnDiffNQGeV6->Fill(diffShw,nu.rw);
22639     }
22640 
22641     //fill histos for particular containments
22642     if (nu.containmentFlag==1) {
22643       if (radiusEnd<=0.7) {
22644         hMuEnDiffRangeR07NQ1->Fill(diffRange,nu.rw);
22645         hMuEnDiffCurvR07NQ1->Fill(diffCurv,nu.rw);
22646       }
22647       //if (fabs(diffRange)>0.2) nu.PrintRangeEnergy();
22648       hMuEnDiffRangeNQ1->Fill(diffRange,nu.rw);
22649       hMuEnDiffCurvNQ1->Fill(diffCurv,nu.rw);
22650       hShwEnDiffNQ1->Fill(diffShw,nu.rw);
22651       hNuEnDiffNQ1->Fill(diffNu,nu.rw);
22652     }
22653     else if (nu.containmentFlag==2) {
22654       if (radiusEnd<=0.7) {
22655         hMuEnDiffRangeR07NQ2->Fill(diffRange,nu.rw);
22656         hMuEnDiffCurvR07NQ2->Fill(diffCurv,nu.rw);
22657       }
22658       hMuEnDiffRangeNQ2->Fill(diffRange,nu.rw);
22659       hMuEnDiffCurvNQ2->Fill(diffCurv,nu.rw);
22660       hShwEnDiffNQ2->Fill(diffShw,nu.rw);
22661       hNuEnDiffNQ2->Fill(diffNu,nu.rw);
22662     }
22663     else if (nu.containmentFlag==3) {
22664       if (radiusEnd<=0.7) {
22665         hMuEnDiffRangeR07NQ3->Fill(diffRange,nu.rw);
22666         hMuEnDiffCurvR07NQ3->Fill(diffCurv,nu.rw);
22667       }
22668       //if (fabs(diffRange)>0.2) nu.PrintRangeEnergy();
22669       hMuEnDiffRangeNQ3->Fill(diffRange,nu.rw);
22670       hMuEnDiffCurvNQ3->Fill(diffCurv,nu.rw);
22671       hShwEnDiffNQ3->Fill(diffShw,nu.rw);
22672       hNuEnDiffNQ3->Fill(diffNu,nu.rw);
22673     }
22674     else if (nu.containmentFlag==4) {
22675       if (radiusEnd<=0.7) {
22676         hMuEnDiffRangeR07NQ4->Fill(diffRange,nu.rw);
22677         hMuEnDiffCurvR07NQ4->Fill(diffCurv,nu.rw);
22678       }
22679       hMuEnDiffRangeNQ4->Fill(diffRange,nu.rw);
22680       hMuEnDiffCurvNQ4->Fill(diffCurv,nu.rw);
22681       hShwEnDiffNQ4->Fill(diffShw,nu.rw);
22682       hNuEnDiffNQ4->Fill(diffNu,nu.rw);
22683     }
22684     else MSG("NuPlots",Msg::kWarning)<<"Ahhh containmentFlag="<<nu.containmentFlag<<endl;
22685   }
22686   else if (nu.charge==-1) {
22687     //background event, so do nothing
22688   }
22689   else MSG("NuPlots",Msg::kWarning)<<"Ahh bad charge="<<nu.charge<<endl;
22690 }

void NuPlots::FillCounts ( const NuEvent nu,
TString  post,
TString  cut 
) const

Definition at line 47089 of file NuPlots.cxx.

References NuEvent::beamWeight, NuEvent::charge, NuEvent::energy, Msg::kError, and MSG.

47091 {
47092   MSG("NuPlots", Msg::kError) << "Can't use RunII weight which no longer exists" << endl;
47093   double rw = nu.beamWeight;
47094 
47095   static vector<TH1F*> counts;
47096   static vector<TH1F*> countsPQ;
47097   static vector<TH1F*> countsNQ;
47098   static map<TString, int> index;
47099 
47100   map<TString,int>::iterator iter = index.find(post);
47101   if( iter == index.end() ) {
47102     index[post] = counts.size();
47103 
47104     TString pre = "h";
47105     TString sCounts   = pre + "counts_" + post + "_";
47106     TString sCountsPQ = pre + "counts_" + post + "_PQ";
47107     TString sCountsNQ = pre + "counts_" + post + "_NQ";
47108 
47109     counts.push_back
47110       (new TH1F(sCounts,
47111                 "Number of events after selection",10,0,10));
47112     countsPQ.push_back
47113       (new TH1F(sCountsPQ,
47114                 "Number positive of events after selection",10,0,10));
47115     countsNQ.push_back
47116       (new TH1F(sCountsNQ,
47117                 "Number negative events after selection",10,0,10));
47118   }
47119 
47120   int pnum = index[post];
47121   if (nu.energy < 30) {
47122     counts[pnum]->Fill(cut,rw);
47123     if (nu.charge == 1)
47124       countsPQ[pnum]->Fill(cut, rw);
47125     else if (nu.charge == -1)
47126       countsNQ[pnum]->Fill(cut, rw);
47127   }
47128 }

void NuPlots::FillDetectorEdge ( const NuEvent nu,
TString  post 
) const

Definition at line 46839 of file NuPlots.cxx.

References NuEvent::charge, NuEvent::containmentFlagPitt, FormatPlot(), NuReco::GetVldContext(), NuLibrary::Instance(), Msg::kInfo, Msg::kWarning, MSG, NuEvent::planeTrkEnd, NuLibrary::reco, NuEvent::rw, NuEvent::uTrkEnd, NuReco::uvz2xyz(), NuEvent::vTrkEnd, NuEvent::xTrkEnd, NuEvent::yTrkEnd, and NuEvent::zTrkEnd.

46840 {
46841   static const int Nplots = 2;
46842   static const TString names[2] = {"PQEx", "NQEx"};
46843 
46844   static vector<TH1F*> TrkEndX; // with Y cut -0.82 to 0.82
46845   static vector<TH1F*> TrkEndU; // with V Cut -1.5  to 0
46846   static vector<TH1F*> TrkEndV; // with U cut  0.0 to 1.5
46847   static vector<TH1F*> TrkEndUFV; // with V Cut -1.5  to 0
46848   static vector<TH1F*> TrkEndUFU; // with V Cut -1.5  to 0
46849   static vector<TH1F*> TrkEndVFV; // with U cut  0.0 to 1.5
46850   static vector<TH1F*> TrkEndVFU; // with U cut  0.0 to 1.5
46851   static vector<TH1F*> TrkEndUFVCal; // with V Cut -1.5  to 0
46852   static vector<TH1F*> TrkEndUFVSpec; // with V Cut -1.5  to 0
46853   static vector<TH1F*> TrkEndVFUCal; // with U cut  0.0 to 1.5
46854   static vector<TH1F*> TrkEndVFUSpec; // with U cut  0.0 to 1.5
46855   static vector<TH1F*> TrkEndXPU; // with Y cut -0.82 to 0.82
46856   static vector<TH1F*> TrkEndXPV; // with Y cut -0.82 to 0.82
46857   static vector<TH1F*> TrkEndXFU; // with Y cut -0.82 to 0.82
46858   static vector<TH1F*> TrkEndXFV; // with Y cut -0.82 to 0.82
46859   static vector<TH1F*> TrkEndYFUTop; // with X cut 0.1 to 1.9 and 1.3<Y<2.3
46860   static vector<TH1F*> TrkEndYFVTop; // with X cut 0.1 to 1.9 and 1.3<Y<2.3
46861   static vector<TH1F*> TrkEndYFUBot; // with X cut 0.1 to 1.9 and -2<Y<-1
46862   static vector<TH1F*> TrkEndYFVBot; // with X cut 0.1 to 1.9 and -2<Y<-1
46863 
46864   static vector<TH2F*> TrkEndYCut;
46865   static vector<TH2F*> TrkEndXCut;
46866   static vector<TH2F*> TrkEndUCut;
46867   static vector<TH2F*> TrkEndVCut;
46868   static map<TString, int> index;
46869 
46870   if (nu.containmentFlagPitt==1 || nu.containmentFlagPitt==3) {
46871     return; // No Contained Events
46872   }
46873 
46874   map<TString,int>::iterator iter = index.find(post);
46875   if( iter == index.end() ) {
46876     index[post] = TrkEndX.size();
46877     MSG("NuPlots",Msg::kInfo)
46878       <<"Creating DetectorEdge " << post << " plots.  index[post]="
46879       << index[post] << endl;
46880 
46881     TString pre = "h";
46882     TString sTrkEndX = pre + "TrkEndX_" + post + "_";
46883     TString sTrkEndU = pre + "TrkEndU_" + post + "_";
46884     TString sTrkEndV = pre + "TrkEndV_" + post + "_";
46885     TString sTrkEndUFV = pre + "TrkEndUFV_" + post + "_";
46886     TString sTrkEndUFU = pre + "TrkEndUFU_" + post + "_";
46887     TString sTrkEndVFV = pre + "TrkEndVFV_" + post + "_";
46888     TString sTrkEndVFU = pre + "TrkEndVFU_" + post + "_";
46889     TString sTrkEndUFVCal = pre + "TrkEndUFVCal_" + post + "_";
46890     TString sTrkEndUFVSpec = pre + "TrkEndUFVSpec_" + post + "_";
46891     TString sTrkEndVFUCal = pre + "TrkEndVFUCal_" + post + "_";
46892     TString sTrkEndVFUSpec = pre + "TrkEndVFUSpec_" + post + "_";
46893     TString sTrkEndXPU = pre + "TrkEndXPU_" + post + "_";
46894     TString sTrkEndXPV = pre + "TrkEndXPV_" + post + "_";
46895     TString sTrkEndXFU = pre + "TrkEndXFU_" + post + "_";
46896     TString sTrkEndXFV = pre + "TrkEndXFV_" + post + "_";
46897     TString sTrkEndYFUTop = pre + "TrkEndYFUTop_" + post + "_";
46898     TString sTrkEndYFVTop = pre + "TrkEndYFVTop_" + post + "_";
46899     TString sTrkEndYFUBot = pre + "TrkEndYFUBot_" + post + "_";
46900     TString sTrkEndYFVBot = pre + "TrkEndYFVBot_" + post + "_";
46901     TString sTrkEndYCut = pre + "TrkEndYCut_" + post + "_";
46902     TString sTrkEndXCut = pre + "TrkEndXCut_" + post + "_";
46903     TString sTrkEndUCut = pre + "TrkEndUCut_" + post + "_";
46904     TString sTrkEndVCut = pre + "TrkEndVCut_" + post + "_";
46905 
46906     for (int i = 0; i < Nplots; ++i) {
46907       TrkEndX.push_back(new TH1F(sTrkEndX+names[i],sTrkEndX+names[i],5000,-4,4));
46908       FormatPlot(TrkEndX.back(), "Trk End X");
46909 
46910       TrkEndU.push_back(new TH1F(sTrkEndU+names[i],sTrkEndU+names[i],5000,-4,4));
46911       FormatPlot(TrkEndU.back(), "Trk End U");
46912 
46913       TrkEndV.push_back(new TH1F(sTrkEndV+names[i],sTrkEndV+names[i],5000,-4,4));
46914       FormatPlot(TrkEndV.back(), "Trk End V");
46915 
46916       TrkEndUFV.push_back(new TH1F(sTrkEndUFV+names[i],sTrkEndUFV+names[i],5000,-4,4));
46917       FormatPlot(TrkEndUFV.back(), "Trk End U, Full V");
46918 
46919       TrkEndUFU.push_back(new TH1F(sTrkEndUFU+names[i],sTrkEndUFU+names[i],5000,-4,4));
46920       FormatPlot(TrkEndUFU.back(), "Trk End U, Full U");
46921 
46922       TrkEndVFV.push_back(new TH1F(sTrkEndVFV+names[i],sTrkEndVFV+names[i],5000,-4,4));
46923       FormatPlot(TrkEndVFV.back(), "Trk End V, Full V");
46924 
46925       TrkEndVFU.push_back(new TH1F(sTrkEndVFU+names[i],sTrkEndVFU+names[i],5000,-4,4));
46926       FormatPlot(TrkEndVFU.back(), "Trk End V, Full U");
46927 
46928       TrkEndUFVCal.push_back(new TH1F(sTrkEndUFVCal+names[i],sTrkEndUFVCal+names[i],5000,-4,4));
46929       FormatPlot(TrkEndUFVCal.back(), "Trk End U, Full V");
46930 
46931       TrkEndUFVSpec.push_back(new TH1F(sTrkEndUFVSpec+names[i],sTrkEndUFVSpec+names[i],5000,-4,4));
46932       FormatPlot(TrkEndUFVSpec.back(), "Trk End U, Full V");
46933 
46934       TrkEndVFUCal.push_back(new TH1F(sTrkEndVFUCal+names[i],sTrkEndVFUCal+names[i],5000,-4,4));
46935       FormatPlot(TrkEndVFUCal.back(), "Trk End V, Full U");
46936 
46937       TrkEndVFUSpec.push_back(new TH1F(sTrkEndVFUSpec+names[i],sTrkEndVFUSpec+names[i],5000,-4,4));
46938       FormatPlot(TrkEndVFUSpec.back(), "Trk End V, Full U");
46939 
46940       TrkEndXPU.push_back(new TH1F(sTrkEndXPU+names[i],sTrkEndXPU+names[i],5000,-4,4));
46941       FormatPlot(TrkEndXPU.back(), "Trk End X, Partial U");
46942 
46943       TrkEndXPV.push_back(new TH1F(sTrkEndXPV+names[i],sTrkEndXPV+names[i],5000,-4,4));
46944       FormatPlot(TrkEndXPV.back(), "Trk End X, Partial V");
46945 
46946       TrkEndXFU.push_back(new TH1F(sTrkEndXFU+names[i],sTrkEndXFU+names[i],5000,-4,4));
46947       FormatPlot(TrkEndXFU.back(), "Trk End X, Full U");
46948 
46949       TrkEndXFV.push_back(new TH1F(sTrkEndXFV+names[i],sTrkEndXFV+names[i],5000,-4,4));
46950       FormatPlot(TrkEndXFV.back(), "Trk End X, Full V");
46951 
46952       TrkEndYFUTop.push_back(new TH1F(sTrkEndYFUTop+names[i],sTrkEndYFUTop+names[i],5000,-4,4));
46953       FormatPlot(TrkEndYFUTop.back(), "Trk End Y, Full U Top");
46954 
46955       TrkEndYFVTop.push_back(new TH1F(sTrkEndYFVTop+names[i],sTrkEndYFVTop+names[i],5000,-4,4));
46956       FormatPlot(TrkEndYFVTop.back(), "Trk End Y, Full V Top");
46957 
46958       TrkEndYFUBot.push_back(new TH1F(sTrkEndYFUBot+names[i],sTrkEndYFUBot+names[i],5000,-4,4));
46959       FormatPlot(TrkEndYFUBot.back(), "Trk End Y, Full U Bot");
46960 
46961       TrkEndYFVBot.push_back(new TH1F(sTrkEndYFVBot+names[i],sTrkEndYFVBot+names[i],5000,-4,4));
46962       FormatPlot(TrkEndYFVBot.back(), "Trk End Y, Full V Bot");
46963 
46964       TrkEndXCut.push_back(new TH2F(sTrkEndXCut+names[i],sTrkEndXCut+names[i],60,-1.7,3.3,60,-2.5,2.5));
46965       FormatPlot(TrkEndXCut.back(), "X", "Y");
46966 
46967       TrkEndYCut.push_back(new TH2F(sTrkEndYCut+names[i],sTrkEndYCut+names[i],60,-1.7,3.3,60,-2.5,2.5));
46968       FormatPlot(TrkEndYCut.back(),  "X", "Y");
46969 
46970       TrkEndUCut.push_back(new TH2F(sTrkEndUCut+names[i],sTrkEndUCut+names[i],60,-1.7,3.3,60,-2.5,2.5));
46971       FormatPlot(TrkEndUCut.back(),  "X", "Y");
46972 
46973       TrkEndVCut.push_back(new TH2F(sTrkEndVCut+names[i],sTrkEndVCut+names[i],60,-2,3,60,-2.5,2.5));
46974       FormatPlot(TrkEndVCut.back(),  "X", "Y");
46975 
46976     }
46977   }
46978 
46979   int pnum=index[post];
46980   int ptype = 0;
46981   int pl = nu.planeTrkEnd;
46982 
46983   if (nu.charge < 0)  {  // +    => 0,1
46984     pnum ++;      // -    => 2,3
46985   }
46986 
46987 
46988 
46989   // Plane Numbering Conventions (from NueConventions.cxx)
46990   // make a lookup ptype to hold the type of each plane
46991   // 1 = v partial   2 = u partial
46992   // 3 = v full   4 = u full
46993   // 0 = uninstrumented
46994   if(pl%2==0)      // a v plane
46995     ptype=1;
46996   else             // a u plane
46997     ptype=2;
46998   if((pl-1)%5 == 0)// fully instrumented
46999     ptype+=2;
47000   else if(pl > 120)// not instrumented
47001     ptype=0;
47002   if (pl > 281)    // plane does not exist
47003     ptype=0;
47004 
47005 
47006   // X with a Y Cut, Full & Partial U & V
47007   if (nu.yTrkEnd > -0.82 && nu.yTrkEnd < 0.82) {
47008     TrkEndX[pnum]->Fill(nu.xTrkEnd, nu.rw);
47009     if (nu.xTrkEnd > 2.5 && nu.xTrkEnd < 3.1)
47010       TrkEndYCut[pnum]->Fill(nu.xTrkEnd, nu.yTrkEnd, nu.rw);
47011     switch (ptype) {
47012     case 1:
47013       TrkEndXPV[pnum]->Fill(nu.xTrkEnd, nu.rw);
47014       break;
47015     case 2:
47016       TrkEndXPU[pnum]->Fill(nu.xTrkEnd, nu.rw);
47017       break;
47018     case 3:
47019       TrkEndXFV[pnum]->Fill(nu.xTrkEnd, nu.rw);
47020       break;
47021     case 4:
47022       TrkEndXFU[pnum]->Fill(nu.xTrkEnd, nu.rw);
47023       break;
47024     default:
47025       MSG("NuPlots",Msg::kWarning)
47026         <<"Uninstrumented planeTrkEnd=" << nu.planeTrkEnd <<endl;
47027     }
47028   }
47029 
47030   const NuLibrary& lib=NuLibrary::Instance();
47031   float recou, recov;
47032   const VldContext& vc=lib.reco.GetVldContext(nu);
47033   TVector3 v1 = lib.reco.uvz2xyz(nu.xTrkEnd,nu.yTrkEnd,nu.zTrkEnd,vc);
47034   recou = v1.X();
47035   recov = v1.Y();
47036 
47037   // U with a V Cut, All, Full U & V
47038   if (nu.vTrkEnd > -1.5  && nu.vTrkEnd < 0) {
47039     TrkEndU[pnum]->Fill(nu.uTrkEnd, nu.rw);
47040     if (ptype == 3) {
47041       TrkEndUFV[pnum]->Fill(nu.uTrkEnd, nu.rw);
47042       if (pl < 120) TrkEndUFVCal[pnum]->Fill(nu.uTrkEnd, nu.rw);
47043       else          TrkEndUFVSpec[pnum]->Fill(nu.uTrkEnd, nu.rw);
47044     }
47045     if (ptype == 4)
47046       TrkEndUFU[pnum]->Fill(nu.uTrkEnd, nu.rw);
47047     if (nu.uTrkEnd > 2.2 && nu.uTrkEnd < 2.8)
47048       TrkEndVCut[pnum]->Fill(nu.xTrkEnd, nu.yTrkEnd, nu.rw);
47049   }
47050 
47051   // V with a U Cut, All, Full U & V
47052   if (nu.uTrkEnd > 0.0   && nu.uTrkEnd < 1.5) {
47053     TrkEndV[pnum]->Fill(nu.vTrkEnd, nu.rw);
47054     if (ptype == 3)
47055       TrkEndVFV[pnum]->Fill(nu.vTrkEnd, nu.rw);
47056     if (ptype == 4) {
47057       TrkEndVFU[pnum]->Fill(nu.vTrkEnd, nu.rw);
47058       if (pl < 120) TrkEndVFUCal[pnum]->Fill(nu.vTrkEnd, nu.rw);
47059       else          TrkEndVFUSpec[pnum]->Fill(nu.vTrkEnd, nu.rw);
47060     }
47061     if (nu.vTrkEnd > -2.8 && nu.vTrkEnd < -2.2)
47062       TrkEndUCut[pnum]->Fill(nu.xTrkEnd, nu.yTrkEnd, nu.rw);
47063   }
47064 
47065   // Y with an X cut, in Full U & V
47066   if (nu.xTrkEnd > 0.1 && nu.xTrkEnd < 1.9) {
47067     if (nu.yTrkEnd > 0) {
47068       if (ptype == 3)
47069         TrkEndYFVTop[pnum]->Fill(nu.yTrkEnd, nu.rw);
47070       if (ptype == 4){
47071         TrkEndYFUTop[pnum]->Fill(nu.yTrkEnd, nu.rw);
47072       }
47073       if (nu.yTrkEnd > 1.4 && nu.yTrkEnd < 2)
47074         TrkEndXCut[pnum]->Fill(nu.xTrkEnd, nu.yTrkEnd, nu.rw);
47075     }
47076     else {
47077       if (ptype == 3)
47078         TrkEndYFVBot[pnum]->Fill(nu.yTrkEnd, nu.rw);
47079       else if (ptype == 4)
47080         TrkEndYFUBot[pnum]->Fill(nu.yTrkEnd, nu.rw);
47081       if (nu.yTrkEnd > -2 && nu.yTrkEnd < -1.4)
47082         TrkEndXCut[pnum]->Fill(nu.xTrkEnd, nu.yTrkEnd, nu.rw);
47083     }
47084   }
47085 }

void NuPlots::FillDPIdSigmaQPFailDpIDCutPlots ( const NuEvent nu  )  const

Definition at line 33154 of file NuPlots.cxx.

References NuEvent::charge, NuEvent::chi2PerNdof, NuEvent::dpID, NuEvent::energy, Msg::kDebug, Msg::kWarning, MAXMSG, MSG, NuEvent::prob, NuEvent::rw, NuEvent::sigqp_qp, and NuEvent::y.

Referenced by NuAnalysis::ChargeSeparationOneSnarl(), NuCutImps::NuCutsSelection::IsGoodStdCuts(), NuDSTAna::JeffsTestAna(), NuAnalysis::LIRejectionTest(), NuDSTAna::NMBAna(), and NuAnalysis::NMBSummaryTreeAna().

33155 {
33156   //PQ
33157   static TH1F* hSigqp_qpFailDpIDCutPQN=0;
33158   static TH1F* hChi2FailDpIDCutPQN=0;
33159   static TH1F* hProbFailDpIDCutPQN=0;
33160   static TH1F* hDpIDFailDpIDCutPQN=0;
33161   static TH1F* hRecoEnFailDpIDCutPQ=0;
33162   static TH1F* hRecoYFailDpIDCutPQ=0;
33163 
33164   //NQ
33165   static TH1F* hSigqp_qpFailDpIDCutNQN=0;
33166   static TH1F* hChi2FailDpIDCutNQN=0;
33167   static TH1F* hProbFailDpIDCutNQN=0;
33168   static TH1F* hDpIDFailDpIDCutNQN=0;
33169   static TH1F* hRecoEnFailDpIDCutNQ=0;
33170   static TH1F* hRecoYFailDpIDCutNQ=0;
33171 
33172   if (!hChi2FailDpIDCutNQN){
33173     MAXMSG("NuPlots",Msg::kDebug,1)
33174       <<"Creating DPIdSigmaQPFailDpIDCutPlots plots..."<<endl;
33175 
33176     //PQ
33177     hSigqp_qpFailDpIDCutPQN=new TH1F("hSigqp_qpFailDpIDCutPQN","hSigqp_qpFailDpIDCutPQN",800*160,-160,160);
33178     hSigqp_qpFailDpIDCutPQN->GetXaxis()->SetTitle("#sigma(Q/P)/(Q/P)");
33179     hSigqp_qpFailDpIDCutPQN->GetXaxis()->CenterTitle();
33180     hSigqp_qpFailDpIDCutPQN->GetYaxis()->SetTitle("");
33181     hSigqp_qpFailDpIDCutPQN->GetYaxis()->CenterTitle();
33182     hSigqp_qpFailDpIDCutPQN->SetFillColor(0);
33183     hSigqp_qpFailDpIDCutPQN->SetLineColor(1);
33184     hSigqp_qpFailDpIDCutPQN->SetLineWidth(2);
33185     hSigqp_qpFailDpIDCutPQN->SetLineStyle(2);
33186     //hSigqp_qpFailDpIDCutPQN->SetBit(TH1::kCanRebin);
33187 
33188     hChi2FailDpIDCutPQN=new TH1F("hChi2FailDpIDCutPQN","hChi2FailDpIDCutPQN",10*176,-16,160);
33189     hChi2FailDpIDCutPQN->GetXaxis()->SetTitle("#chi^{2}/ndof");
33190     hChi2FailDpIDCutPQN->GetXaxis()->CenterTitle();
33191     hChi2FailDpIDCutPQN->GetYaxis()->SetTitle("");
33192     hChi2FailDpIDCutPQN->GetYaxis()->CenterTitle();
33193     hChi2FailDpIDCutPQN->SetFillColor(0);
33194     hChi2FailDpIDCutPQN->SetLineColor(1);
33195     hChi2FailDpIDCutPQN->SetLineWidth(2);
33196     hChi2FailDpIDCutPQN->SetLineStyle(2);
33197     //hChi2FailDpIDCutPQN->SetBit(TH1::kCanRebin);
33198 
33199     hProbFailDpIDCutPQN=new TH1F("hProbFailDpIDCutPQN","hProbFailDpIDCutPQN",14000,-0.2,1.2);
33200     hProbFailDpIDCutPQN->GetXaxis()->SetTitle("Fit Probability");
33201     hProbFailDpIDCutPQN->GetXaxis()->CenterTitle();
33202     hProbFailDpIDCutPQN->GetYaxis()->SetTitle("");
33203     hProbFailDpIDCutPQN->GetYaxis()->CenterTitle();
33204     hProbFailDpIDCutPQN->SetFillColor(0);
33205     hProbFailDpIDCutPQN->SetLineColor(1);
33206     hProbFailDpIDCutPQN->SetLineWidth(2);
33207     hProbFailDpIDCutPQN->SetLineStyle(2);
33208     //hProbFailDpIDCutPQN->SetBit(TH1::kCanRebin);
33209 
33210     hDpIDFailDpIDCutPQN=new TH1F("hDpIDFailDpIDCutPQN","hDpIDFailDpIDCutPQN",4*160,-1.6,1.6);
33211     hDpIDFailDpIDCutPQN->GetXaxis()->SetTitle("PID (from MadDpID)");
33212     hDpIDFailDpIDCutPQN->GetXaxis()->CenterTitle();
33213     hDpIDFailDpIDCutPQN->GetYaxis()->SetTitle("");
33214     hDpIDFailDpIDCutPQN->GetYaxis()->CenterTitle();
33215     hDpIDFailDpIDCutPQN->SetFillColor(0);
33216     hDpIDFailDpIDCutPQN->SetLineColor(1);
33217     hDpIDFailDpIDCutPQN->SetLineWidth(2);
33218     //hDpIDFailDpIDCutPQN->SetBit(TH1::kCanRebin);
33219 
33220     hRecoEnFailDpIDCutPQ=new TH1F("hRecoEnFailDpIDCutPQ","hRecoEnFailDpIDCutPQ",
33221                                   4*352,-32,320);
33222     hRecoEnFailDpIDCutPQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
33223     hRecoEnFailDpIDCutPQ->GetXaxis()->CenterTitle();
33224     hRecoEnFailDpIDCutPQ->GetYaxis()->SetTitle("");
33225     hRecoEnFailDpIDCutPQ->GetYaxis()->CenterTitle();
33226     hRecoEnFailDpIDCutPQ->SetFillColor(0);
33227     hRecoEnFailDpIDCutPQ->SetLineColor(1);
33228     //hRecoEnFailDpIDCutPQ->SetBit(TH1::kCanRebin);
33229 
33230     hRecoYFailDpIDCutPQ=new TH1F("hRecoYFailDpIDCutPQ","hRecoYFailDpIDCutPQ",
33231                                  1400,-0.2,1.2);
33232     hRecoYFailDpIDCutPQ->GetXaxis()->SetTitle("Reconstructed y");
33233     hRecoYFailDpIDCutPQ->GetXaxis()->CenterTitle();
33234     hRecoYFailDpIDCutPQ->GetYaxis()->SetTitle("");
33235     hRecoYFailDpIDCutPQ->GetYaxis()->CenterTitle();
33236     hRecoYFailDpIDCutPQ->SetFillColor(0);
33237     hRecoYFailDpIDCutPQ->SetLineColor(1);
33238     //hRecoYFailDpIDCutPQ->SetBit(TH1::kCanRebin);
33239 
33240 
33241 
33242     //NQ
33243     hSigqp_qpFailDpIDCutNQN=new TH1F("hSigqp_qpFailDpIDCutNQN","hSigqp_qpFailDpIDCutNQN",800*160,-160,160);
33244     hSigqp_qpFailDpIDCutNQN->GetXaxis()->SetTitle("#sigma(Q/P)/(Q/P)");
33245     hSigqp_qpFailDpIDCutNQN->GetXaxis()->CenterTitle();
33246     hSigqp_qpFailDpIDCutNQN->GetYaxis()->SetTitle("");
33247     hSigqp_qpFailDpIDCutNQN->GetYaxis()->CenterTitle();
33248     hSigqp_qpFailDpIDCutNQN->SetFillColor(0);
33249     hSigqp_qpFailDpIDCutNQN->SetLineColor(1);
33250     hSigqp_qpFailDpIDCutNQN->SetLineWidth(2);
33251     hSigqp_qpFailDpIDCutNQN->SetLineStyle(2);
33252     //hSigqp_qpFailDpIDCutNQN->SetBit(TH1::kCanRebin);
33253 
33254     hChi2FailDpIDCutNQN=new TH1F("hChi2FailDpIDCutNQN","hChi2FailDpIDCutNQN",10*176,-16,160);
33255     hChi2FailDpIDCutNQN->GetXaxis()->SetTitle("#chi^{2}/ndof");
33256     hChi2FailDpIDCutNQN->GetXaxis()->CenterTitle();
33257     hChi2FailDpIDCutNQN->GetYaxis()->SetTitle("");
33258     hChi2FailDpIDCutNQN->GetYaxis()->CenterTitle();
33259     hChi2FailDpIDCutNQN->SetFillColor(0);
33260     hChi2FailDpIDCutNQN->SetLineColor(1);
33261     hChi2FailDpIDCutNQN->SetLineWidth(2);
33262     hChi2FailDpIDCutNQN->SetLineStyle(2);
33263     //hChi2FailDpIDCutNQN->SetBit(TH1::kCanRebin);
33264 
33265     hProbFailDpIDCutNQN=new TH1F("hProbFailDpIDCutNQN","hProbFailDpIDCutNQN",14000,-0.2,1.2);
33266     hProbFailDpIDCutNQN->GetXaxis()->SetTitle("Fit Probability");
33267     hProbFailDpIDCutNQN->GetXaxis()->CenterTitle();
33268     hProbFailDpIDCutNQN->GetYaxis()->SetTitle("");
33269     hProbFailDpIDCutNQN->GetYaxis()->CenterTitle();
33270     hProbFailDpIDCutNQN->SetFillColor(0);
33271     hProbFailDpIDCutNQN->SetLineColor(1);
33272     hProbFailDpIDCutNQN->SetLineWidth(2);
33273     hProbFailDpIDCutNQN->SetLineStyle(2);
33274     //hProbFailDpIDCutNQN->SetBit(TH1::kCanRebin);
33275 
33276     hDpIDFailDpIDCutNQN=new TH1F("hDpIDFailDpIDCutNQN","hDpIDFailDpIDCutNQN",4*160,-1.6,1.6);
33277     hDpIDFailDpIDCutNQN->GetXaxis()->SetTitle("PID (from MadDpID)");
33278     hDpIDFailDpIDCutNQN->GetXaxis()->CenterTitle();
33279     hDpIDFailDpIDCutNQN->GetYaxis()->SetTitle("");
33280     hDpIDFailDpIDCutNQN->GetYaxis()->CenterTitle();
33281     hDpIDFailDpIDCutNQN->SetFillColor(0);
33282     hDpIDFailDpIDCutNQN->SetLineColor(1);
33283     hDpIDFailDpIDCutNQN->SetLineWidth(2);
33284     //hDpIDFailDpIDCutNQN->SetBit(TH1::kCanRebin);
33285 
33286     hRecoEnFailDpIDCutNQ=new TH1F("hRecoEnFailDpIDCutNQ","hRecoEnFailDpIDCutNQ",
33287                                   4*352,-32,320);
33288     hRecoEnFailDpIDCutNQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
33289     hRecoEnFailDpIDCutNQ->GetXaxis()->CenterTitle();
33290     hRecoEnFailDpIDCutNQ->GetYaxis()->SetTitle("");
33291     hRecoEnFailDpIDCutNQ->GetYaxis()->CenterTitle();
33292     hRecoEnFailDpIDCutNQ->SetFillColor(0);
33293     hRecoEnFailDpIDCutNQ->SetLineColor(1);
33294     //hRecoEnFailDpIDCutNQ->SetBit(TH1::kCanRebin);
33295 
33296     hRecoYFailDpIDCutNQ=new TH1F("hRecoYFailDpIDCutNQ","hRecoYFailDpIDCutNQ",
33297                                  1400,-0.2,1.2);
33298     hRecoYFailDpIDCutNQ->GetXaxis()->SetTitle("Reconstructed y");
33299     hRecoYFailDpIDCutNQ->GetXaxis()->CenterTitle();
33300     hRecoYFailDpIDCutNQ->GetYaxis()->SetTitle("");
33301     hRecoYFailDpIDCutNQ->GetYaxis()->CenterTitle();
33302     hRecoYFailDpIDCutNQ->SetFillColor(0);
33303     hRecoYFailDpIDCutNQ->SetLineColor(1);
33304     //hRecoYFailDpIDCutNQ->SetBit(TH1::kCanRebin);
33305   }
33306 
33307   //PQ
33308   if (nu.charge==+1){
33309     hSigqp_qpFailDpIDCutPQN->Fill(nu.sigqp_qp,nu.rw);
33310     hChi2FailDpIDCutPQN->Fill(nu.chi2PerNdof,nu.rw);
33311     hProbFailDpIDCutPQN->Fill(nu.prob,nu.rw);
33312     hDpIDFailDpIDCutPQN->Fill(nu.dpID,nu.rw);
33313 
33314     hRecoEnFailDpIDCutPQ->Fill(nu.energy,nu.rw);
33315     hRecoYFailDpIDCutPQ->Fill(nu.y,nu.rw);
33316   }
33317   //NQ
33318   else if (nu.charge==-1){
33319     hSigqp_qpFailDpIDCutNQN->Fill(nu.sigqp_qp,nu.rw);
33320     hChi2FailDpIDCutNQN->Fill(nu.chi2PerNdof,nu.rw);
33321     hProbFailDpIDCutNQN->Fill(nu.prob,nu.rw);
33322     hDpIDFailDpIDCutNQN->Fill(nu.dpID,nu.rw);
33323 
33324     hRecoEnFailDpIDCutNQ->Fill(nu.energy,nu.rw);
33325     hRecoYFailDpIDCutNQ->Fill(nu.y,nu.rw);
33326   }
33327   else MSG("NuPlots",Msg::kWarning)<<"Ahh, bad charge"<<endl;
33328 }

void NuPlots::FillDPIdSigmaQPFailProbCutPlots ( const NuEvent nu  )  const

Definition at line 36276 of file NuPlots.cxx.

References NuEvent::charge, NuEvent::chi2PerNdof, NuEvent::dpID, NuEvent::energy, NuEvent::iaction, NuEvent::inu, Msg::kDebug, Msg::kWarning, MAXMSG, MSG, NuEvent::prob, NuEvent::rw, NuEvent::sigqp_qp, and NuEvent::y.

Referenced by NuAnalysis::ChargeSeparationOneSnarl(), NuCutImps::NuCutsSelection::IsGoodStdCuts(), NuDSTAna::JeffsTestAna(), NuAnalysis::LIRejectionTest(), NuDSTAna::NMBAna(), and NuAnalysis::NMBSummaryTreeAna().

36277 {
36278   //PQ
36279   static TH1F* hSigqp_qpFailProbCutPQN=0;
36280   static TH1F* hChi2FailProbCutPQN=0;
36281   static TH1F* hProbFailProbCutPQN=0;
36282   static TH1F* hDpIDFailProbCutPQN=0;
36283   static TH1F* hRecoEnFailProbCutPQ=0;
36284   static TH1F* hRecoYFailProbCutPQ=0;
36285 
36286   static TH1F* hNMProbFailProbCutPQ=0;
36287   static TH1F* hNMBProbFailProbCutPQ=0;
36288   static TH1F* hAllShwProbFailProbCutPQ=0;
36289 
36290   //NQ
36291   static TH1F* hSigqp_qpFailProbCutNQN=0;
36292   static TH1F* hChi2FailProbCutNQN=0;
36293   static TH1F* hProbFailProbCutNQN=0;
36294   static TH1F* hDpIDFailProbCutNQN=0;
36295   static TH1F* hRecoEnFailProbCutNQ=0;
36296   static TH1F* hRecoYFailProbCutNQ=0;
36297 
36298   static TH1F* hNMProbFailProbCutNQ=0;
36299   static TH1F* hNMBProbFailProbCutNQ=0;
36300   static TH1F* hAllShwProbFailProbCutNQ=0;
36301 
36302   if (!hChi2FailProbCutNQN){
36303     MAXMSG("NuPlots",Msg::kDebug,1)
36304       <<"Creating DPIdSigmaQPFailProbCutPlots plots..."<<endl;
36305 
36306     //PQ
36307     hSigqp_qpFailProbCutPQN=new TH1F("hSigqp_qpFailProbCutPQN","hSigqp_qpFailProbCutPQN",800*160,-160,160);
36308     hSigqp_qpFailProbCutPQN->GetXaxis()->SetTitle("#sigma(Q/P)/(Q/P)");
36309     hSigqp_qpFailProbCutPQN->GetXaxis()->CenterTitle();
36310     hSigqp_qpFailProbCutPQN->GetYaxis()->SetTitle("");
36311     hSigqp_qpFailProbCutPQN->GetYaxis()->CenterTitle();
36312     hSigqp_qpFailProbCutPQN->SetFillColor(0);
36313     hSigqp_qpFailProbCutPQN->SetLineColor(1);
36314     hSigqp_qpFailProbCutPQN->SetLineWidth(2);
36315     hSigqp_qpFailProbCutPQN->SetLineStyle(2);
36316     //hSigqp_qpFailProbCutPQN->SetBit(TH1::kCanRebin);
36317 
36318     hChi2FailProbCutPQN=new TH1F("hChi2FailProbCutPQN","hChi2FailProbCutPQN",10*176,-16,160);
36319     hChi2FailProbCutPQN->GetXaxis()->SetTitle("#chi^{2}/ndof");
36320     hChi2FailProbCutPQN->GetXaxis()->CenterTitle();
36321     hChi2FailProbCutPQN->GetYaxis()->SetTitle("");
36322     hChi2FailProbCutPQN->GetYaxis()->CenterTitle();
36323     hChi2FailProbCutPQN->SetFillColor(0);
36324     hChi2FailProbCutPQN->SetLineColor(1);
36325     hChi2FailProbCutPQN->SetLineWidth(2);
36326     hChi2FailProbCutPQN->SetLineStyle(2);
36327     //hChi2FailProbCutPQN->SetBit(TH1::kCanRebin);
36328 
36329     hProbFailProbCutPQN=new TH1F("hProbFailProbCutPQN","hProbFailProbCutPQN",14000,-0.2,1.2);
36330     hProbFailProbCutPQN->GetXaxis()->SetTitle("Fit Probability");
36331     hProbFailProbCutPQN->GetXaxis()->CenterTitle();
36332     hProbFailProbCutPQN->GetYaxis()->SetTitle("");
36333     hProbFailProbCutPQN->GetYaxis()->CenterTitle();
36334     hProbFailProbCutPQN->SetFillColor(0);
36335     hProbFailProbCutPQN->SetLineColor(1);
36336     hProbFailProbCutPQN->SetLineWidth(2);
36337     hProbFailProbCutPQN->SetLineStyle(2);
36338     //hProbFailProbCutPQN->SetBit(TH1::kCanRebin);
36339 
36340     hDpIDFailProbCutPQN=new TH1F("hDpIDFailProbCutPQN","hDpIDFailProbCutPQN",4*160,-1.6,1.6);
36341     hDpIDFailProbCutPQN->GetXaxis()->SetTitle("PID (from MadDpID)");
36342     hDpIDFailProbCutPQN->GetXaxis()->CenterTitle();
36343     hDpIDFailProbCutPQN->GetYaxis()->SetTitle("");
36344     hDpIDFailProbCutPQN->GetYaxis()->CenterTitle();
36345     hDpIDFailProbCutPQN->SetFillColor(0);
36346     hDpIDFailProbCutPQN->SetLineColor(1);
36347     hDpIDFailProbCutPQN->SetLineWidth(2);
36348     //hDpIDFailProbCutPQN->SetBit(TH1::kCanRebin);
36349 
36350     hRecoEnFailProbCutPQ=new TH1F("hRecoEnFailProbCutPQ","hRecoEnFailProbCutPQ",
36351                                   4*352,-32,320);
36352     hRecoEnFailProbCutPQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
36353     hRecoEnFailProbCutPQ->GetXaxis()->CenterTitle();
36354     hRecoEnFailProbCutPQ->GetYaxis()->SetTitle("");
36355     hRecoEnFailProbCutPQ->GetYaxis()->CenterTitle();
36356     hRecoEnFailProbCutPQ->SetFillColor(0);
36357     hRecoEnFailProbCutPQ->SetLineColor(1);
36358     //hRecoEnFailProbCutPQ->SetBit(TH1::kCanRebin);
36359 
36360     hRecoYFailProbCutPQ=new TH1F("hRecoYFailProbCutPQ","hRecoYFailProbCutPQ",
36361                                  1400,-0.2,1.2);
36362     hRecoYFailProbCutPQ->GetXaxis()->SetTitle("Reconstructed y");
36363     hRecoYFailProbCutPQ->GetXaxis()->CenterTitle();
36364     hRecoYFailProbCutPQ->GetYaxis()->SetTitle("");
36365     hRecoYFailProbCutPQ->GetYaxis()->CenterTitle();
36366     hRecoYFailProbCutPQ->SetFillColor(0);
36367     hRecoYFailProbCutPQ->SetLineColor(1);
36368     //hRecoYFailProbCutPQ->SetBit(TH1::kCanRebin);
36369 
36370 
36371     hNMProbFailProbCutPQ=new TH1F
36372       ("hNMProbFailProbCutPQ","hNMProbFailProbCutPQ",14000,-0.2,1.2);
36373     hNMProbFailProbCutPQ->GetXaxis()->SetTitle("Fit Probability");
36374     hNMProbFailProbCutPQ->GetXaxis()->CenterTitle();
36375     hNMProbFailProbCutPQ->GetYaxis()->SetTitle("");
36376     hNMProbFailProbCutPQ->GetYaxis()->CenterTitle();
36377     hNMProbFailProbCutPQ->SetFillColor(0);
36378     hNMProbFailProbCutPQ->SetLineColor(1);
36379     hNMProbFailProbCutPQ->SetLineWidth(2);
36380     hNMProbFailProbCutPQ->SetLineStyle(2);
36381     //hNMProbFailProbCutPQ->SetBit(TH1::kCanRebin);
36382 
36383     hNMBProbFailProbCutPQ=new TH1F
36384       ("hNMBProbFailProbCutPQ","hNMBProbFailProbCutPQ",14000,-0.2,1.2);
36385     hNMBProbFailProbCutPQ->GetXaxis()->SetTitle("Fit Probability");
36386     hNMBProbFailProbCutPQ->GetXaxis()->CenterTitle();
36387     hNMBProbFailProbCutPQ->GetYaxis()->SetTitle("");
36388     hNMBProbFailProbCutPQ->GetYaxis()->CenterTitle();
36389     hNMBProbFailProbCutPQ->SetFillColor(0);
36390     hNMBProbFailProbCutPQ->SetLineColor(1);
36391     hNMBProbFailProbCutPQ->SetLineWidth(2);
36392     hNMBProbFailProbCutPQ->SetLineStyle(2);
36393     //hNMBProbFailProbCutPQ->SetBit(TH1::kCanRebin);
36394 
36395     hAllShwProbFailProbCutPQ=new TH1F
36396       ("hAllShwProbFailProbCutPQ",
36397        "hAllShwProbFailProbCutPQ",14000,-0.2,1.2);
36398     hAllShwProbFailProbCutPQ->GetXaxis()->SetTitle("Fit Probability");
36399     hAllShwProbFailProbCutPQ->GetXaxis()->CenterTitle();
36400     hAllShwProbFailProbCutPQ->GetYaxis()->SetTitle("");
36401     hAllShwProbFailProbCutPQ->GetYaxis()->CenterTitle();
36402     hAllShwProbFailProbCutPQ->SetFillColor(0);
36403     hAllShwProbFailProbCutPQ->SetLineColor(1);
36404     hAllShwProbFailProbCutPQ->SetLineWidth(2);
36405     hAllShwProbFailProbCutPQ->SetLineStyle(2);
36406     //hAllShwProbFailProbCutPQ->SetBit(TH1::kCanRebin);
36407 
36408 
36409 
36410     //NQ
36411     hSigqp_qpFailProbCutNQN=new TH1F("hSigqp_qpFailProbCutNQN","hSigqp_qpFailProbCutNQN",800*160,-160,160);
36412     hSigqp_qpFailProbCutNQN->GetXaxis()->SetTitle("#sigma(Q/P)/(Q/P)");
36413     hSigqp_qpFailProbCutNQN->GetXaxis()->CenterTitle();
36414     hSigqp_qpFailProbCutNQN->GetYaxis()->SetTitle("");
36415     hSigqp_qpFailProbCutNQN->GetYaxis()->CenterTitle();
36416     hSigqp_qpFailProbCutNQN->SetFillColor(0);
36417     hSigqp_qpFailProbCutNQN->SetLineColor(1);
36418     hSigqp_qpFailProbCutNQN->SetLineWidth(2);
36419     hSigqp_qpFailProbCutNQN->SetLineStyle(2);
36420     //hSigqp_qpFailProbCutNQN->SetBit(TH1::kCanRebin);
36421 
36422     hChi2FailProbCutNQN=new TH1F("hChi2FailProbCutNQN","hChi2FailProbCutNQN",10*176,-16,160);
36423     hChi2FailProbCutNQN->GetXaxis()->SetTitle("#chi^{2}/ndof");
36424     hChi2FailProbCutNQN->GetXaxis()->CenterTitle();
36425     hChi2FailProbCutNQN->GetYaxis()->SetTitle("");
36426     hChi2FailProbCutNQN->GetYaxis()->CenterTitle();
36427     hChi2FailProbCutNQN->SetFillColor(0);
36428     hChi2FailProbCutNQN->SetLineColor(1);
36429     hChi2FailProbCutNQN->SetLineWidth(2);
36430     hChi2FailProbCutNQN->SetLineStyle(2);
36431     //hChi2FailProbCutNQN->SetBit(TH1::kCanRebin);
36432 
36433     hProbFailProbCutNQN=new TH1F("hProbFailProbCutNQN","hProbFailProbCutNQN",14000,-0.2,1.2);
36434     hProbFailProbCutNQN->GetXaxis()->SetTitle("Fit Probability");
36435     hProbFailProbCutNQN->GetXaxis()->CenterTitle();
36436     hProbFailProbCutNQN->GetYaxis()->SetTitle("");
36437     hProbFailProbCutNQN->GetYaxis()->CenterTitle();
36438     hProbFailProbCutNQN->SetFillColor(0);
36439     hProbFailProbCutNQN->SetLineColor(1);
36440     hProbFailProbCutNQN->SetLineWidth(2);
36441     hProbFailProbCutNQN->SetLineStyle(2);
36442     //hProbFailProbCutNQN->SetBit(TH1::kCanRebin);
36443 
36444     hDpIDFailProbCutNQN=new TH1F("hDpIDFailProbCutNQN","hDpIDFailProbCutNQN",4*160,-1.6,1.6);
36445     hDpIDFailProbCutNQN->GetXaxis()->SetTitle("PID (from MadDpID)");
36446     hDpIDFailProbCutNQN->GetXaxis()->CenterTitle();
36447     hDpIDFailProbCutNQN->GetYaxis()->SetTitle("");
36448     hDpIDFailProbCutNQN->GetYaxis()->CenterTitle();
36449     hDpIDFailProbCutNQN->SetFillColor(0);
36450     hDpIDFailProbCutNQN->SetLineColor(1);
36451     hDpIDFailProbCutNQN->SetLineWidth(2);
36452     //hDpIDFailProbCutNQN->SetBit(TH1::kCanRebin);
36453 
36454     hRecoEnFailProbCutNQ=new TH1F("hRecoEnFailProbCutNQ","hRecoEnFailProbCutNQ",
36455                                   4*352,-32,320);
36456     hRecoEnFailProbCutNQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
36457     hRecoEnFailProbCutNQ->GetXaxis()->CenterTitle();
36458     hRecoEnFailProbCutNQ->GetYaxis()->SetTitle("");
36459     hRecoEnFailProbCutNQ->GetYaxis()->CenterTitle();
36460     hRecoEnFailProbCutNQ->SetFillColor(0);
36461     hRecoEnFailProbCutNQ->SetLineColor(1);
36462     //hRecoEnFailProbCutNQ->SetBit(TH1::kCanRebin);
36463 
36464     hRecoYFailProbCutNQ=new TH1F("hRecoYFailProbCutNQ","hRecoYFailProbCutNQ",
36465                                  1400,-0.2,1.2);
36466     hRecoYFailProbCutNQ->GetXaxis()->SetTitle("Reconstructed y");
36467     hRecoYFailProbCutNQ->GetXaxis()->CenterTitle();
36468     hRecoYFailProbCutNQ->GetYaxis()->SetTitle("");
36469     hRecoYFailProbCutNQ->GetYaxis()->CenterTitle();
36470     hRecoYFailProbCutNQ->SetFillColor(0);
36471     hRecoYFailProbCutNQ->SetLineColor(1);
36472     //hRecoYFailProbCutNQ->SetBit(TH1::kCanRebin);
36473 
36474 
36475     hNMProbFailProbCutNQ=new TH1F
36476       ("hNMProbFailProbCutNQ","hNMProbFailProbCutNQ",14000,-0.2,1.2);
36477     hNMProbFailProbCutNQ->GetXaxis()->SetTitle("Fit Probability");
36478     hNMProbFailProbCutNQ->GetXaxis()->CenterTitle();
36479     hNMProbFailProbCutNQ->GetYaxis()->SetTitle("");
36480     hNMProbFailProbCutNQ->GetYaxis()->CenterTitle();
36481     hNMProbFailProbCutNQ->SetFillColor(0);
36482     hNMProbFailProbCutNQ->SetLineColor(1);
36483     hNMProbFailProbCutNQ->SetLineWidth(2);
36484     hNMProbFailProbCutNQ->SetLineStyle(2);
36485     //hNMProbFailProbCutNQ->SetBit(TH1::kCanRebin);
36486 
36487     hNMBProbFailProbCutNQ=new TH1F
36488       ("hNMBProbFailProbCutNQ","hNMBProbFailProbCutNQ",14000,-0.2,1.2);
36489     hNMBProbFailProbCutNQ->GetXaxis()->SetTitle("Fit Probability");
36490     hNMBProbFailProbCutNQ->GetXaxis()->CenterTitle();
36491     hNMBProbFailProbCutNQ->GetYaxis()->SetTitle("");
36492     hNMBProbFailProbCutNQ->GetYaxis()->CenterTitle();
36493     hNMBProbFailProbCutNQ->SetFillColor(0);
36494     hNMBProbFailProbCutNQ->SetLineColor(1);
36495     hNMBProbFailProbCutNQ->SetLineWidth(2);
36496     hNMBProbFailProbCutNQ->SetLineStyle(2);
36497     //hNMBProbFailProbCutNQ->SetBit(TH1::kCanRebin);
36498 
36499     hAllShwProbFailProbCutNQ=new TH1F
36500       ("hAllShwProbFailProbCutNQ",
36501        "hAllShwProbFailProbCutNQ",14000,-0.2,1.2);
36502     hAllShwProbFailProbCutNQ->GetXaxis()->SetTitle("Fit Probability");
36503     hAllShwProbFailProbCutNQ->GetXaxis()->CenterTitle();
36504     hAllShwProbFailProbCutNQ->GetYaxis()->SetTitle("");
36505     hAllShwProbFailProbCutNQ->GetYaxis()->CenterTitle();
36506     hAllShwProbFailProbCutNQ->SetFillColor(0);
36507     hAllShwProbFailProbCutNQ->SetLineColor(1);
36508     hAllShwProbFailProbCutNQ->SetLineWidth(2);
36509     hAllShwProbFailProbCutNQ->SetLineStyle(2);
36510     //hAllShwProbFailProbCutNQ->SetBit(TH1::kCanRebin);
36511 
36512   }
36513 
36514   //PQ
36515   if (nu.charge==+1){
36516     hSigqp_qpFailProbCutPQN->Fill(nu.sigqp_qp,nu.rw);
36517     hChi2FailProbCutPQN->Fill(nu.chi2PerNdof,nu.rw);
36518     hProbFailProbCutPQN->Fill(nu.prob,nu.rw);
36519     hDpIDFailProbCutPQN->Fill(nu.dpID,nu.rw);
36520 
36521     hRecoEnFailProbCutPQ->Fill(nu.energy,nu.rw);
36522     hRecoYFailProbCutPQ->Fill(nu.y,nu.rw);
36523   }
36524   //NQ
36525   else if (nu.charge==-1){
36526     hSigqp_qpFailProbCutNQN->Fill(nu.sigqp_qp,nu.rw);
36527     hChi2FailProbCutNQN->Fill(nu.chi2PerNdof,nu.rw);
36528     hProbFailProbCutNQN->Fill(nu.prob,nu.rw);
36529     hDpIDFailProbCutNQN->Fill(nu.dpID,nu.rw);
36530 
36531     hRecoEnFailProbCutNQ->Fill(nu.energy,nu.rw);
36532     hRecoYFailProbCutNQ->Fill(nu.y,nu.rw);
36533   }
36534   else MSG("NuPlots",Msg::kWarning)<<"Ahh, bad charge"<<endl;
36535 
36536 
36537   //now fill the truth plots
36538   if (nu.iaction==1){//CC
36539     if (nu.inu==14){//NuMu
36540       if (nu.charge==+1) {
36541         hNMProbFailProbCutPQ->Fill(nu.prob,nu.rw);
36542       }
36543       else if (nu.charge==-1){
36544         hNMProbFailProbCutNQ->Fill(nu.prob,nu.rw);
36545       }
36546     }
36547     else if (nu.inu==-14){//NuMuBar
36548       if (nu.charge==+1) {
36549         hNMBProbFailProbCutPQ->Fill(nu.prob,nu.rw);
36550       }
36551       else if (nu.charge==-1){
36552         hNMBProbFailProbCutNQ->Fill(nu.prob,nu.rw);
36553       }
36554     }
36555   }
36556 
36557 
36558   //all but NuMu/NuMuBar CC
36559   if (!(nu.iaction==1 && (nu.inu==14 || nu.inu==-14))) {
36560     if (nu.charge==+1) {
36561       hAllShwProbFailProbCutPQ->Fill(nu.prob,nu.rw);
36562     }
36563     else if (nu.charge==-1){
36564       hAllShwProbFailProbCutNQ->Fill(nu.prob,nu.rw);
36565     }
36566   }
36567 
36568 }

void NuPlots::FillDPIdSigmaQPFailSigQPCutPlots ( const NuEvent nu  )  const

Definition at line 34372 of file NuPlots.cxx.

References NuEvent::charge, NuEvent::chi2PerNdof, NuEvent::dpID, NuEvent::energy, Msg::kDebug, Msg::kWarning, MAXMSG, MSG, NuEvent::prob, NuEvent::rw, NuEvent::sigqp_qp, and NuEvent::y.

Referenced by NuAnalysis::ChargeSeparationOneSnarl(), NuCutImps::NuCutsSelection::IsGoodStdCuts(), NuDSTAna::JeffsTestAna(), NuAnalysis::LIRejectionTest(), NuDSTAna::NMBAna(), and NuAnalysis::NMBSummaryTreeAna().

34373 {
34374   //PQ
34375   static TH1F* hSigqp_qpFailSigQPCutPQN=0;
34376   static TH1F* hChi2FailSigQPCutPQN=0;
34377   static TH1F* hProbFailSigQPCutPQN=0;
34378   static TH1F* hDpIDFailSigQPCutPQN=0;
34379   static TH1F* hRecoEnFailSigQPCutPQ=0;
34380   static TH1F* hRecoYFailSigQPCutPQ=0;
34381 
34382   //NQ
34383   static TH1F* hSigqp_qpFailSigQPCutNQN=0;
34384   static TH1F* hChi2FailSigQPCutNQN=0;
34385   static TH1F* hProbFailSigQPCutNQN=0;
34386   static TH1F* hDpIDFailSigQPCutNQN=0;
34387   static TH1F* hRecoEnFailSigQPCutNQ=0;
34388   static TH1F* hRecoYFailSigQPCutNQ=0;
34389 
34390   if (!hChi2FailSigQPCutNQN){
34391     MAXMSG("NuPlots",Msg::kDebug,1)
34392       <<"Creating DPIdSigmaQPFailSigQPCutPlots plots..."<<endl;
34393 
34394     //PQ
34395     hSigqp_qpFailSigQPCutPQN=new TH1F("hSigqp_qpFailSigQPCutPQN","hSigqp_qpFailSigQPCutPQN",800*160,-160,160);
34396     hSigqp_qpFailSigQPCutPQN->GetXaxis()->SetTitle("#sigma(Q/P)/(Q/P)");
34397     hSigqp_qpFailSigQPCutPQN->GetXaxis()->CenterTitle();
34398     hSigqp_qpFailSigQPCutPQN->GetYaxis()->SetTitle("");
34399     hSigqp_qpFailSigQPCutPQN->GetYaxis()->CenterTitle();
34400     hSigqp_qpFailSigQPCutPQN->SetFillColor(0);
34401     hSigqp_qpFailSigQPCutPQN->SetLineColor(1);
34402     hSigqp_qpFailSigQPCutPQN->SetLineWidth(2);
34403     hSigqp_qpFailSigQPCutPQN->SetLineStyle(2);
34404     //hSigqp_qpFailSigQPCutPQN->SetBit(TH1::kCanRebin);
34405 
34406     hChi2FailSigQPCutPQN=new TH1F("hChi2FailSigQPCutPQN","hChi2FailSigQPCutPQN",10*176,-16,160);
34407     hChi2FailSigQPCutPQN->GetXaxis()->SetTitle("#chi^{2}/ndof");
34408     hChi2FailSigQPCutPQN->GetXaxis()->CenterTitle();
34409     hChi2FailSigQPCutPQN->GetYaxis()->SetTitle("");
34410     hChi2FailSigQPCutPQN->GetYaxis()->CenterTitle();
34411     hChi2FailSigQPCutPQN->SetFillColor(0);
34412     hChi2FailSigQPCutPQN->SetLineColor(1);
34413     hChi2FailSigQPCutPQN->SetLineWidth(2);
34414     hChi2FailSigQPCutPQN->SetLineStyle(2);
34415     //hChi2FailSigQPCutPQN->SetBit(TH1::kCanRebin);
34416 
34417     hProbFailSigQPCutPQN=new TH1F("hProbFailSigQPCutPQN","hProbFailSigQPCutPQN",14000,-0.2,1.2);
34418     hProbFailSigQPCutPQN->GetXaxis()->SetTitle("Fit Probability");
34419     hProbFailSigQPCutPQN->GetXaxis()->CenterTitle();
34420     hProbFailSigQPCutPQN->GetYaxis()->SetTitle("");
34421     hProbFailSigQPCutPQN->GetYaxis()->CenterTitle();
34422     hProbFailSigQPCutPQN->SetFillColor(0);
34423     hProbFailSigQPCutPQN->SetLineColor(1);
34424     hProbFailSigQPCutPQN->SetLineWidth(2);
34425     hProbFailSigQPCutPQN->SetLineStyle(2);
34426     //hProbFailSigQPCutPQN->SetBit(TH1::kCanRebin);
34427 
34428     hDpIDFailSigQPCutPQN=new TH1F("hDpIDFailSigQPCutPQN","hDpIDFailSigQPCutPQN",4*160,-1.6,1.6);
34429     hDpIDFailSigQPCutPQN->GetXaxis()->SetTitle("PID (from MadDpID)");
34430     hDpIDFailSigQPCutPQN->GetXaxis()->CenterTitle();
34431     hDpIDFailSigQPCutPQN->GetYaxis()->SetTitle("");
34432     hDpIDFailSigQPCutPQN->GetYaxis()->CenterTitle();
34433     hDpIDFailSigQPCutPQN->SetFillColor(0);
34434     hDpIDFailSigQPCutPQN->SetLineColor(1);
34435     hDpIDFailSigQPCutPQN->SetLineWidth(2);
34436     //hDpIDFailSigQPCutPQN->SetBit(TH1::kCanRebin);
34437 
34438     hRecoEnFailSigQPCutPQ=new TH1F("hRecoEnFailSigQPCutPQ","hRecoEnFailSigQPCutPQ",
34439                                    4*352,-32,320);
34440     hRecoEnFailSigQPCutPQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
34441     hRecoEnFailSigQPCutPQ->GetXaxis()->CenterTitle();
34442     hRecoEnFailSigQPCutPQ->GetYaxis()->SetTitle("");
34443     hRecoEnFailSigQPCutPQ->GetYaxis()->CenterTitle();
34444     hRecoEnFailSigQPCutPQ->SetFillColor(0);
34445     hRecoEnFailSigQPCutPQ->SetLineColor(1);
34446     //hRecoEnFailSigQPCutPQ->SetBit(TH1::kCanRebin);
34447 
34448     hRecoYFailSigQPCutPQ=new TH1F("hRecoYFailSigQPCutPQ","hRecoYFailSigQPCutPQ",
34449                                   1400,-0.2,1.2);
34450     hRecoYFailSigQPCutPQ->GetXaxis()->SetTitle("Reconstructed y");
34451     hRecoYFailSigQPCutPQ->GetXaxis()->CenterTitle();
34452     hRecoYFailSigQPCutPQ->GetYaxis()->SetTitle("");
34453     hRecoYFailSigQPCutPQ->GetYaxis()->CenterTitle();
34454     hRecoYFailSigQPCutPQ->SetFillColor(0);
34455     hRecoYFailSigQPCutPQ->SetLineColor(1);
34456     //hRecoYFailSigQPCutPQ->SetBit(TH1::kCanRebin);
34457 
34458 
34459 
34460     //NQ
34461     hSigqp_qpFailSigQPCutNQN=new TH1F("hSigqp_qpFailSigQPCutNQN","hSigqp_qpFailSigQPCutNQN",800*160,-160,160);
34462     hSigqp_qpFailSigQPCutNQN->GetXaxis()->SetTitle("#sigma(Q/P)/(Q/P)");
34463     hSigqp_qpFailSigQPCutNQN->GetXaxis()->CenterTitle();
34464     hSigqp_qpFailSigQPCutNQN->GetYaxis()->SetTitle("");
34465     hSigqp_qpFailSigQPCutNQN->GetYaxis()->CenterTitle();
34466     hSigqp_qpFailSigQPCutNQN->SetFillColor(0);
34467     hSigqp_qpFailSigQPCutNQN->SetLineColor(1);
34468     hSigqp_qpFailSigQPCutNQN->SetLineWidth(2);
34469     hSigqp_qpFailSigQPCutNQN->SetLineStyle(2);
34470     //hSigqp_qpFailSigQPCutNQN->SetBit(TH1::kCanRebin);
34471 
34472     hChi2FailSigQPCutNQN=new TH1F("hChi2FailSigQPCutNQN","hChi2FailSigQPCutNQN",10*176,-16,160);
34473     hChi2FailSigQPCutNQN->GetXaxis()->SetTitle("#chi^{2}/ndof");
34474     hChi2FailSigQPCutNQN->GetXaxis()->CenterTitle();
34475     hChi2FailSigQPCutNQN->GetYaxis()->SetTitle("");
34476     hChi2FailSigQPCutNQN->GetYaxis()->CenterTitle();
34477     hChi2FailSigQPCutNQN->SetFillColor(0);
34478     hChi2FailSigQPCutNQN->SetLineColor(1);
34479     hChi2FailSigQPCutNQN->SetLineWidth(2);
34480     hChi2FailSigQPCutNQN->SetLineStyle(2);
34481     //hChi2FailSigQPCutNQN->SetBit(TH1::kCanRebin);
34482 
34483     hProbFailSigQPCutNQN=new TH1F("hProbFailSigQPCutNQN","hProbFailSigQPCutNQN",14000,-0.2,1.2);
34484     hProbFailSigQPCutNQN->GetXaxis()->SetTitle("Fit Probability");
34485     hProbFailSigQPCutNQN->GetXaxis()->CenterTitle();
34486     hProbFailSigQPCutNQN->GetYaxis()->SetTitle("");
34487     hProbFailSigQPCutNQN->GetYaxis()->CenterTitle();
34488     hProbFailSigQPCutNQN->SetFillColor(0);
34489     hProbFailSigQPCutNQN->SetLineColor(1);
34490     hProbFailSigQPCutNQN->SetLineWidth(2);
34491     hProbFailSigQPCutNQN->SetLineStyle(2);
34492     //hProbFailSigQPCutNQN->SetBit(TH1::kCanRebin);
34493 
34494     hDpIDFailSigQPCutNQN=new TH1F("hDpIDFailSigQPCutNQN","hDpIDFailSigQPCutNQN",4*160,-1.6,1.6);
34495     hDpIDFailSigQPCutNQN->GetXaxis()->SetTitle("PID (from MadDpID)");
34496     hDpIDFailSigQPCutNQN->GetXaxis()->CenterTitle();
34497     hDpIDFailSigQPCutNQN->GetYaxis()->SetTitle("");
34498     hDpIDFailSigQPCutNQN->GetYaxis()->CenterTitle();
34499     hDpIDFailSigQPCutNQN->SetFillColor(0);
34500     hDpIDFailSigQPCutNQN->SetLineColor(1);
34501     hDpIDFailSigQPCutNQN->SetLineWidth(2);
34502     //hDpIDFailSigQPCutNQN->SetBit(TH1::kCanRebin);
34503 
34504     hRecoEnFailSigQPCutNQ=new TH1F("hRecoEnFailSigQPCutNQ","hRecoEnFailSigQPCutNQ",
34505                                    4*352,-32,320);
34506     hRecoEnFailSigQPCutNQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
34507     hRecoEnFailSigQPCutNQ->GetXaxis()->CenterTitle();
34508     hRecoEnFailSigQPCutNQ->GetYaxis()->SetTitle("");
34509     hRecoEnFailSigQPCutNQ->GetYaxis()->CenterTitle();
34510     hRecoEnFailSigQPCutNQ->SetFillColor(0);
34511     hRecoEnFailSigQPCutNQ->SetLineColor(1);
34512     //hRecoEnFailSigQPCutNQ->SetBit(TH1::kCanRebin);
34513 
34514     hRecoYFailSigQPCutNQ=new TH1F
34515       //("hRecoYFailSigQPCutNQ","hRecoYFailSigQPCutNQ",4*144,-0.16,1.28)
34516       ("hRecoYFailSigQPCutNQ","hRecoYFailSigQPCutNQ",
34517        1400,-0.2,1.2);
34518     hRecoYFailSigQPCutNQ->GetXaxis()->SetTitle("Reconstructed y");
34519     hRecoYFailSigQPCutNQ->GetXaxis()->CenterTitle();
34520     hRecoYFailSigQPCutNQ->GetYaxis()->SetTitle("");
34521     hRecoYFailSigQPCutNQ->GetYaxis()->CenterTitle();
34522     hRecoYFailSigQPCutNQ->SetFillColor(0);
34523     hRecoYFailSigQPCutNQ->SetLineColor(1);
34524     //hRecoYFailSigQPCutNQ->SetBit(TH1::kCanRebin);
34525   }
34526 
34527   //PQ
34528   if (nu.charge==+1){
34529     hSigqp_qpFailSigQPCutPQN->Fill(nu.sigqp_qp,nu.rw);
34530     hChi2FailSigQPCutPQN->Fill(nu.chi2PerNdof,nu.rw);
34531     hProbFailSigQPCutPQN->Fill(nu.prob,nu.rw);
34532     hDpIDFailSigQPCutPQN->Fill(nu.dpID,nu.rw);
34533 
34534     hRecoEnFailSigQPCutPQ->Fill(nu.energy,nu.rw);
34535     hRecoYFailSigQPCutPQ->Fill(nu.y,nu.rw);
34536   }
34537   //NQ
34538   else if (nu.charge==-1){
34539     hSigqp_qpFailSigQPCutNQN->Fill(nu.sigqp_qp,nu.rw);
34540     hChi2FailSigQPCutNQN->Fill(nu.chi2PerNdof,nu.rw);
34541     hProbFailSigQPCutNQN->Fill(nu.prob,nu.rw);
34542     hDpIDFailSigQPCutNQN->Fill(nu.dpID,nu.rw);
34543 
34544     hRecoEnFailSigQPCutNQ->Fill(nu.energy,nu.rw);
34545     hRecoYFailSigQPCutNQ->Fill(nu.y,nu.rw);
34546   }
34547   else MSG("NuPlots",Msg::kWarning)<<"Ahh, bad charge"<<endl;
34548 }

void NuPlots::FillDPIdSigmaQPPassDpIDCutPlots ( const NuEvent nu  )  const

Definition at line 33332 of file NuPlots.cxx.

References NuEvent::charge, NuEvent::chi2PerNdof, NuEvent::dpID, NuEvent::energy, NuEvent::energyMC, NuEvent::iaction, NuEvent::inu, Msg::kDebug, Msg::kWarning, MAXMSG, MSG, NuEvent::prob, NuEvent::rw, NuEvent::sigqp_qp, and NuEvent::y.

Referenced by NuAnalysis::ChargeSeparationOneSnarl(), NuCutImps::NuCutsSelection::IsGoodStdCuts(), NuDSTAna::JeffsTestAna(), NuAnalysis::LIRejectionTest(), NuDSTAna::NMBAna(), and NuAnalysis::NMBSummaryTreeAna().

33333 {
33334   //PQ
33335   static TH1F* hSigqp_qpPassDpIDCutPQN=0;
33336   static TH1F* hChi2PassDpIDCutPQN=0;
33337   static TH1F* hProbPassDpIDCutPQN=0;
33338   static TH1F* hDpIDPassDpIDCutPQN=0;
33339   static TH1F* hRecoEnPassDpIDCutPQ=0;
33340   static TH1F* hRecoYPassDpIDCutPQ=0;
33341 
33342   static TH1F* hNMProbPassDpIDCutPQ=0;
33343   static TH1F* hNMBProbPassDpIDCutPQ=0;
33344   static TH1F* hAllShwProbPassDpIDCutPQ=0;
33345 
33346   static TH1F* hNMRecoEnPassDpIDCutPQ=0;
33347   static TH1F* hNMTrueEnPassDpIDCutPQ=0;
33348   static TH1F* hNMBRecoEnPassDpIDCutPQ=0;
33349   static TH1F* hNMBTrueEnPassDpIDCutPQ=0;
33350   static TH1F* hAllNCRecoEnPassDpIDCutPQ=0;
33351   static TH1F* hAllNCTrueEnPassDpIDCutPQ=0;
33352   static TH1F* hAllShwRecoEnPassDpIDCutPQ=0;
33353   static TH1F* hAllShwTrueEnPassDpIDCutPQ=0;
33354   static TH1F* hNotNMBRecoEnPassDpIDCutPQ=0;
33355   static TH1F* hNotNMBTrueEnPassDpIDCutPQ=0;
33356   static TH1F* hNotNMRecoEnPassDpIDCutPQ=0;
33357   static TH1F* hNotNMTrueEnPassDpIDCutPQ=0;
33358 
33359   //NQ
33360   static TH1F* hSigqp_qpPassDpIDCutNQN=0;
33361   static TH1F* hChi2PassDpIDCutNQN=0;
33362   static TH1F* hProbPassDpIDCutNQN=0;
33363   static TH1F* hDpIDPassDpIDCutNQN=0;
33364   static TH1F* hRecoEnPassDpIDCutNQ=0;
33365   static TH1F* hRecoYPassDpIDCutNQ=0;
33366 
33367   static TH1F* hNMProbPassDpIDCutNQ=0;
33368   static TH1F* hNMBProbPassDpIDCutNQ=0;
33369   static TH1F* hAllShwProbPassDpIDCutNQ=0;
33370 
33371   static TH1F* hNMBRecoEnPassDpIDCutNQ=0;
33372   static TH1F* hNMBTrueEnPassDpIDCutNQ=0;
33373   static TH1F* hNMRecoEnPassDpIDCutNQ=0;
33374   static TH1F* hNMTrueEnPassDpIDCutNQ=0;
33375   static TH1F* hAllNCRecoEnPassDpIDCutNQ=0;
33376   static TH1F* hAllNCTrueEnPassDpIDCutNQ=0;
33377   static TH1F* hAllShwRecoEnPassDpIDCutNQ=0;
33378   static TH1F* hAllShwTrueEnPassDpIDCutNQ=0;
33379   static TH1F* hNotNMBRecoEnPassDpIDCutNQ=0;
33380   static TH1F* hNotNMBTrueEnPassDpIDCutNQ=0;
33381   static TH1F* hNotNMRecoEnPassDpIDCutNQ=0;
33382   static TH1F* hNotNMTrueEnPassDpIDCutNQ=0;
33383 
33384 
33385   if (!hChi2PassDpIDCutNQN){
33386     MAXMSG("NuPlots",Msg::kDebug,1)
33387       <<"Creating DPIdSigmaQPPassDpIDCutPlots plots..."<<endl;
33388 
33389     //PQ
33390     hSigqp_qpPassDpIDCutPQN=new TH1F("hSigqp_qpPassDpIDCutPQN","hSigqp_qpPassDpIDCutPQN",800*160,-160,160);
33391     hSigqp_qpPassDpIDCutPQN->GetXaxis()->SetTitle("#sigma(Q/P)/(Q/P)");
33392     hSigqp_qpPassDpIDCutPQN->GetXaxis()->CenterTitle();
33393     hSigqp_qpPassDpIDCutPQN->GetYaxis()->SetTitle("");
33394     hSigqp_qpPassDpIDCutPQN->GetYaxis()->CenterTitle();
33395     hSigqp_qpPassDpIDCutPQN->SetFillColor(0);
33396     hSigqp_qpPassDpIDCutPQN->SetLineColor(1);
33397     hSigqp_qpPassDpIDCutPQN->SetLineWidth(2);
33398     hSigqp_qpPassDpIDCutPQN->SetLineStyle(2);
33399     //hSigqp_qpPassDpIDCutPQN->SetBit(TH1::kCanRebin);
33400 
33401     hChi2PassDpIDCutPQN=new TH1F("hChi2PassDpIDCutPQN","hChi2PassDpIDCutPQN",10*176,-16,160);
33402     hChi2PassDpIDCutPQN->GetXaxis()->SetTitle("#chi^{2}/ndof");
33403     hChi2PassDpIDCutPQN->GetXaxis()->CenterTitle();
33404     hChi2PassDpIDCutPQN->GetYaxis()->SetTitle("");
33405     hChi2PassDpIDCutPQN->GetYaxis()->CenterTitle();
33406     hChi2PassDpIDCutPQN->SetFillColor(0);
33407     hChi2PassDpIDCutPQN->SetLineColor(1);
33408     hChi2PassDpIDCutPQN->SetLineWidth(2);
33409     hChi2PassDpIDCutPQN->SetLineStyle(2);
33410     //hChi2PassDpIDCutPQN->SetBit(TH1::kCanRebin);
33411 
33412     hProbPassDpIDCutPQN=new TH1F("hProbPassDpIDCutPQN","hProbPassDpIDCutPQN",14000,-0.2,1.2);
33413     hProbPassDpIDCutPQN->GetXaxis()->SetTitle("Fit Probability");
33414     hProbPassDpIDCutPQN->GetXaxis()->CenterTitle();
33415     hProbPassDpIDCutPQN->GetYaxis()->SetTitle("");
33416     hProbPassDpIDCutPQN->GetYaxis()->CenterTitle();
33417     hProbPassDpIDCutPQN->SetFillColor(0);
33418     hProbPassDpIDCutPQN->SetLineColor(1);
33419     hProbPassDpIDCutPQN->SetLineWidth(2);
33420     hProbPassDpIDCutPQN->SetLineStyle(2);
33421     //hProbPassDpIDCutPQN->SetBit(TH1::kCanRebin);
33422 
33423     hDpIDPassDpIDCutPQN=new TH1F("hDpIDPassDpIDCutPQN","hDpIDPassDpIDCutPQN",4*160,-1.6,1.6);
33424     hDpIDPassDpIDCutPQN->GetXaxis()->SetTitle("PID (from MadDpID)");
33425     hDpIDPassDpIDCutPQN->GetXaxis()->CenterTitle();
33426     hDpIDPassDpIDCutPQN->GetYaxis()->SetTitle("");
33427     hDpIDPassDpIDCutPQN->GetYaxis()->CenterTitle();
33428     hDpIDPassDpIDCutPQN->SetFillColor(0);
33429     hDpIDPassDpIDCutPQN->SetLineColor(1);
33430     hDpIDPassDpIDCutPQN->SetLineWidth(2);
33431     //hDpIDPassDpIDCutPQN->SetBit(TH1::kCanRebin);
33432 
33433     hRecoEnPassDpIDCutPQ=new TH1F("hRecoEnPassDpIDCutPQ","hRecoEnPassDpIDCutPQ",
33434                                   4*352,-32,320);
33435     hRecoEnPassDpIDCutPQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
33436     hRecoEnPassDpIDCutPQ->GetXaxis()->CenterTitle();
33437     hRecoEnPassDpIDCutPQ->GetYaxis()->SetTitle("");
33438     hRecoEnPassDpIDCutPQ->GetYaxis()->CenterTitle();
33439     hRecoEnPassDpIDCutPQ->SetFillColor(0);
33440     hRecoEnPassDpIDCutPQ->SetLineColor(1);
33441     //hRecoEnPassDpIDCutPQ->SetBit(TH1::kCanRebin);
33442 
33443     hRecoYPassDpIDCutPQ=new TH1F("hRecoYPassDpIDCutPQ","hRecoYPassDpIDCutPQ",
33444                                  1400,-0.2,1.2);
33445     hRecoYPassDpIDCutPQ->GetXaxis()->SetTitle("Reconstructed y");
33446     hRecoYPassDpIDCutPQ->GetXaxis()->CenterTitle();
33447     hRecoYPassDpIDCutPQ->GetYaxis()->SetTitle("");
33448     hRecoYPassDpIDCutPQ->GetYaxis()->CenterTitle();
33449     hRecoYPassDpIDCutPQ->SetFillColor(0);
33450     hRecoYPassDpIDCutPQ->SetLineColor(1);
33451     //hRecoYPassDpIDCutPQ->SetBit(TH1::kCanRebin);
33452 
33453 
33454     hNMProbPassDpIDCutPQ=new TH1F
33455       ("hNMProbPassDpIDCutPQ","hNMProbPassDpIDCutPQ",14000,-0.2,1.2);
33456     hNMProbPassDpIDCutPQ->GetXaxis()->SetTitle("Fit Probability");
33457     hNMProbPassDpIDCutPQ->GetXaxis()->CenterTitle();
33458     hNMProbPassDpIDCutPQ->GetYaxis()->SetTitle("");
33459     hNMProbPassDpIDCutPQ->GetYaxis()->CenterTitle();
33460     hNMProbPassDpIDCutPQ->SetFillColor(0);
33461     hNMProbPassDpIDCutPQ->SetLineColor(1);
33462     hNMProbPassDpIDCutPQ->SetLineWidth(2);
33463     hNMProbPassDpIDCutPQ->SetLineStyle(2);
33464     //hNMProbPassDpIDCutPQ->SetBit(TH1::kCanRebin);
33465 
33466     hNMBProbPassDpIDCutPQ=new TH1F
33467       ("hNMBProbPassDpIDCutPQ","hNMBProbPassDpIDCutPQ",14000,-0.2,1.2);
33468     hNMBProbPassDpIDCutPQ->GetXaxis()->SetTitle("Fit Probability");
33469     hNMBProbPassDpIDCutPQ->GetXaxis()->CenterTitle();
33470     hNMBProbPassDpIDCutPQ->GetYaxis()->SetTitle("");
33471     hNMBProbPassDpIDCutPQ->GetYaxis()->CenterTitle();
33472     hNMBProbPassDpIDCutPQ->SetFillColor(0);
33473     hNMBProbPassDpIDCutPQ->SetLineColor(1);
33474     hNMBProbPassDpIDCutPQ->SetLineWidth(2);
33475     hNMBProbPassDpIDCutPQ->SetLineStyle(2);
33476     //hNMBProbPassDpIDCutPQ->SetBit(TH1::kCanRebin);
33477 
33478     hAllShwProbPassDpIDCutPQ=new TH1F
33479       ("hAllShwProbPassDpIDCutPQ",
33480        "hAllShwProbPassDpIDCutPQ",14000,-0.2,1.2);
33481     hAllShwProbPassDpIDCutPQ->GetXaxis()->SetTitle("Fit Probability");
33482     hAllShwProbPassDpIDCutPQ->GetXaxis()->CenterTitle();
33483     hAllShwProbPassDpIDCutPQ->GetYaxis()->SetTitle("");
33484     hAllShwProbPassDpIDCutPQ->GetYaxis()->CenterTitle();
33485     hAllShwProbPassDpIDCutPQ->SetFillColor(0);
33486     hAllShwProbPassDpIDCutPQ->SetLineColor(1);
33487     hAllShwProbPassDpIDCutPQ->SetLineWidth(2);
33488     hAllShwProbPassDpIDCutPQ->SetLineStyle(2);
33489     //hAllShwProbPassDpIDCutPQ->SetBit(TH1::kCanRebin);
33490 
33491 
33492 
33493     hNMRecoEnPassDpIDCutPQ=new TH1F
33494       ("hNMRecoEnPassDpIDCutPQ","hNMRecoEnPassDpIDCutPQ",
33495        4*352,-32,320);
33496     hNMRecoEnPassDpIDCutPQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
33497     hNMRecoEnPassDpIDCutPQ->GetXaxis()->CenterTitle();
33498     hNMRecoEnPassDpIDCutPQ->GetYaxis()->SetTitle("");
33499     hNMRecoEnPassDpIDCutPQ->GetYaxis()->CenterTitle();
33500     hNMRecoEnPassDpIDCutPQ->SetFillColor(0);
33501     hNMRecoEnPassDpIDCutPQ->SetLineColor(1);
33502     //hNMRecoEnPassDpIDCutPQ->SetBit(TH1::kCanRebin);
33503 
33504     hNMTrueEnPassDpIDCutPQ=new TH1F
33505       ("hNMTrueEnPassDpIDCutPQ","hNMTrueEnPassDpIDCutPQ",
33506        4*352,-32,320);
33507     hNMTrueEnPassDpIDCutPQ->GetXaxis()->SetTitle("True Energy (GeV)");
33508     hNMTrueEnPassDpIDCutPQ->GetXaxis()->CenterTitle();
33509     hNMTrueEnPassDpIDCutPQ->GetYaxis()->SetTitle("");
33510     hNMTrueEnPassDpIDCutPQ->GetYaxis()->CenterTitle();
33511     hNMTrueEnPassDpIDCutPQ->SetFillColor(0);
33512     hNMTrueEnPassDpIDCutPQ->SetLineColor(1);
33513     //hNMTrueEnPassDpIDCutPQ->SetBit(TH1::kCanRebin);
33514 
33515     hNMBRecoEnPassDpIDCutPQ=new TH1F("hNMBRecoEnPassDpIDCutPQ",
33516                                      "hNMBRecoEnPassDpIDCutPQ",
33517                                      4*352,-32,320);
33518     hNMBRecoEnPassDpIDCutPQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
33519     hNMBRecoEnPassDpIDCutPQ->GetXaxis()->CenterTitle();
33520     hNMBRecoEnPassDpIDCutPQ->GetYaxis()->SetTitle("");
33521     hNMBRecoEnPassDpIDCutPQ->GetYaxis()->CenterTitle();
33522     hNMBRecoEnPassDpIDCutPQ->SetFillColor(0);
33523     hNMBRecoEnPassDpIDCutPQ->SetLineColor(1);
33524     //hNMBRecoEnPassDpIDCutPQ->SetBit(TH1::kCanRebin);
33525 
33526     hNMBTrueEnPassDpIDCutPQ=new TH1F
33527       ("hNMBTrueEnPassDpIDCutPQ","hNMBTrueEnPassDpIDCutPQ",
33528        4*352,-32,320);
33529     hNMBTrueEnPassDpIDCutPQ->GetXaxis()->SetTitle("True Energy (GeV)");
33530     hNMBTrueEnPassDpIDCutPQ->GetXaxis()->CenterTitle();
33531     hNMBTrueEnPassDpIDCutPQ->GetYaxis()->SetTitle("");
33532     hNMBTrueEnPassDpIDCutPQ->GetYaxis()->CenterTitle();
33533     hNMBTrueEnPassDpIDCutPQ->SetFillColor(0);
33534     hNMBTrueEnPassDpIDCutPQ->SetLineColor(1);
33535     //hNMBTrueEnPassDpIDCutPQ->SetBit(TH1::kCanRebin);
33536 
33537     hAllNCRecoEnPassDpIDCutPQ=new TH1F("hAllNCRecoEnPassDpIDCutPQ",
33538                                        "hAllNCRecoEnPassDpIDCutPQ",
33539                                        4*352,-32,320);
33540     hAllNCRecoEnPassDpIDCutPQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
33541     hAllNCRecoEnPassDpIDCutPQ->GetXaxis()->CenterTitle();
33542     hAllNCRecoEnPassDpIDCutPQ->GetYaxis()->SetTitle("");
33543     hAllNCRecoEnPassDpIDCutPQ->GetYaxis()->CenterTitle();
33544     hAllNCRecoEnPassDpIDCutPQ->SetFillColor(0);
33545     hAllNCRecoEnPassDpIDCutPQ->SetLineColor(1);
33546     //hAllNCRecoEnPassDpIDCutPQ->SetBit(TH1::kCanRebin);
33547 
33548     hAllNCTrueEnPassDpIDCutPQ=new TH1F
33549       ("hAllNCTrueEnPassDpIDCutPQ","hAllNCTrueEnPassDpIDCutPQ",
33550        4*352,-32,320);
33551     hAllNCTrueEnPassDpIDCutPQ->GetXaxis()->SetTitle("True Energy (GeV)");
33552     hAllNCTrueEnPassDpIDCutPQ->GetXaxis()->CenterTitle();
33553     hAllNCTrueEnPassDpIDCutPQ->GetYaxis()->SetTitle("");
33554     hAllNCTrueEnPassDpIDCutPQ->GetYaxis()->CenterTitle();
33555     hAllNCTrueEnPassDpIDCutPQ->SetFillColor(0);
33556     hAllNCTrueEnPassDpIDCutPQ->SetLineColor(1);
33557     //hAllNCTrueEnPassDpIDCutPQ->SetBit(TH1::kCanRebin);
33558 
33559     hAllShwRecoEnPassDpIDCutPQ=new TH1F("hAllShwRecoEnPassDpIDCutPQ",
33560                                         "hAllShwRecoEnPassDpIDCutPQ",
33561                                         4*352,-32,320);
33562     hAllShwRecoEnPassDpIDCutPQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
33563     hAllShwRecoEnPassDpIDCutPQ->GetXaxis()->CenterTitle();
33564     hAllShwRecoEnPassDpIDCutPQ->GetYaxis()->SetTitle("");
33565     hAllShwRecoEnPassDpIDCutPQ->GetYaxis()->CenterTitle();
33566     hAllShwRecoEnPassDpIDCutPQ->SetFillColor(0);
33567     hAllShwRecoEnPassDpIDCutPQ->SetLineColor(1);
33568     //hAllShwRecoEnPassDpIDCutPQ->SetBit(TH1::kCanRebin);
33569 
33570     hAllShwTrueEnPassDpIDCutPQ=new TH1F
33571       ("hAllShwTrueEnPassDpIDCutPQ","hAllShwTrueEnPassDpIDCutPQ",
33572        4*352,-32,320);
33573     hAllShwTrueEnPassDpIDCutPQ->GetXaxis()->SetTitle("True Energy (GeV)");
33574     hAllShwTrueEnPassDpIDCutPQ->GetXaxis()->CenterTitle();
33575     hAllShwTrueEnPassDpIDCutPQ->GetYaxis()->SetTitle("");
33576     hAllShwTrueEnPassDpIDCutPQ->GetYaxis()->CenterTitle();
33577     hAllShwTrueEnPassDpIDCutPQ->SetFillColor(0);
33578     hAllShwTrueEnPassDpIDCutPQ->SetLineColor(1);
33579     //hAllShwTrueEnPassDpIDCutPQ->SetBit(TH1::kCanRebin);
33580 
33581     hNotNMRecoEnPassDpIDCutPQ=new TH1F
33582       ("hNotNMRecoEnPassDpIDCutPQ","hNotNMRecoEnPassDpIDCutPQ",
33583        4*352,-32,320);
33584     hNotNMRecoEnPassDpIDCutPQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
33585     hNotNMRecoEnPassDpIDCutPQ->GetXaxis()->CenterTitle();
33586     hNotNMRecoEnPassDpIDCutPQ->GetYaxis()->SetTitle("");
33587     hNotNMRecoEnPassDpIDCutPQ->GetYaxis()->CenterTitle();
33588     hNotNMRecoEnPassDpIDCutPQ->SetFillColor(0);
33589     hNotNMRecoEnPassDpIDCutPQ->SetLineColor(1);
33590     //hNotNMRecoEnPassDpIDCutPQ->SetBit(TH1::kCanRebin);
33591 
33592     hNotNMTrueEnPassDpIDCutPQ=new TH1F
33593       ("hNotNMTrueEnPassDpIDCutPQ","hNotNMTrueEnPassDpIDCutPQ",
33594        4*352,-32,320);
33595     hNotNMTrueEnPassDpIDCutPQ->GetXaxis()->SetTitle("True Energy (GeV)");
33596     hNotNMTrueEnPassDpIDCutPQ->GetXaxis()->CenterTitle();
33597     hNotNMTrueEnPassDpIDCutPQ->GetYaxis()->SetTitle("");
33598     hNotNMTrueEnPassDpIDCutPQ->GetYaxis()->CenterTitle();
33599     hNotNMTrueEnPassDpIDCutPQ->SetFillColor(0);
33600     hNotNMTrueEnPassDpIDCutPQ->SetLineColor(1);
33601     //hNotNMTrueEnPassDpIDCutPQ->SetBit(TH1::kCanRebin);
33602 
33603     hNotNMBRecoEnPassDpIDCutPQ=new TH1F("hNotNMBRecoEnPassDpIDCutPQ",
33604                                         "hNotNMBRecoEnPassDpIDCutPQ",
33605                                         4*352,-32,320);
33606     hNotNMBRecoEnPassDpIDCutPQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
33607     hNotNMBRecoEnPassDpIDCutPQ->GetXaxis()->CenterTitle();
33608     hNotNMBRecoEnPassDpIDCutPQ->GetYaxis()->SetTitle("");
33609     hNotNMBRecoEnPassDpIDCutPQ->GetYaxis()->CenterTitle();
33610     hNotNMBRecoEnPassDpIDCutPQ->SetFillColor(0);
33611     hNotNMBRecoEnPassDpIDCutPQ->SetLineColor(1);
33612     //hNotNMBRecoEnPassDpIDCutPQ->SetBit(TH1::kCanRebin);
33613 
33614     hNotNMBTrueEnPassDpIDCutPQ=new TH1F
33615       ("hNotNMBTrueEnPassDpIDCutPQ","hNotNMBTrueEnPassDpIDCutPQ",
33616        4*352,-32,320);
33617     hNotNMBTrueEnPassDpIDCutPQ->GetXaxis()->SetTitle("True Energy (GeV)");
33618     hNotNMBTrueEnPassDpIDCutPQ->GetXaxis()->CenterTitle();
33619     hNotNMBTrueEnPassDpIDCutPQ->GetYaxis()->SetTitle("");
33620     hNotNMBTrueEnPassDpIDCutPQ->GetYaxis()->CenterTitle();
33621     hNotNMBTrueEnPassDpIDCutPQ->SetFillColor(0);
33622     hNotNMBTrueEnPassDpIDCutPQ->SetLineColor(1);
33623     //hNotNMBTrueEnPassDpIDCutPQ->SetBit(TH1::kCanRebin);
33624 
33625 
33626 
33627 
33628     //NQ
33629     hSigqp_qpPassDpIDCutNQN=new TH1F("hSigqp_qpPassDpIDCutNQN","hSigqp_qpPassDpIDCutNQN",800*160,-160,160);
33630     hSigqp_qpPassDpIDCutNQN->GetXaxis()->SetTitle("#sigma(Q/P)/(Q/P)");
33631     hSigqp_qpPassDpIDCutNQN->GetXaxis()->CenterTitle();
33632     hSigqp_qpPassDpIDCutNQN->GetYaxis()->SetTitle("");
33633     hSigqp_qpPassDpIDCutNQN->GetYaxis()->CenterTitle();
33634     hSigqp_qpPassDpIDCutNQN->SetFillColor(0);
33635     hSigqp_qpPassDpIDCutNQN->SetLineColor(1);
33636     hSigqp_qpPassDpIDCutNQN->SetLineWidth(2);
33637     hSigqp_qpPassDpIDCutNQN->SetLineStyle(2);
33638     //hSigqp_qpPassDpIDCutNQN->SetBit(TH1::kCanRebin);
33639 
33640     hChi2PassDpIDCutNQN=new TH1F("hChi2PassDpIDCutNQN","hChi2PassDpIDCutNQN",10*176,-16,160);
33641     hChi2PassDpIDCutNQN->GetXaxis()->SetTitle("#chi^{2}/ndof");
33642     hChi2PassDpIDCutNQN->GetXaxis()->CenterTitle();
33643     hChi2PassDpIDCutNQN->GetYaxis()->SetTitle("");
33644     hChi2PassDpIDCutNQN->GetYaxis()->CenterTitle();
33645     hChi2PassDpIDCutNQN->SetFillColor(0);
33646     hChi2PassDpIDCutNQN->SetLineColor(1);
33647     hChi2PassDpIDCutNQN->SetLineWidth(2);
33648     hChi2PassDpIDCutNQN->SetLineStyle(2);
33649     //hChi2PassDpIDCutNQN->SetBit(TH1::kCanRebin);
33650 
33651     hProbPassDpIDCutNQN=new TH1F("hProbPassDpIDCutNQN","hProbPassDpIDCutNQN",14000,-0.2,1.2);
33652     hProbPassDpIDCutNQN->GetXaxis()->SetTitle("Fit Probability");
33653     hProbPassDpIDCutNQN->GetXaxis()->CenterTitle();
33654     hProbPassDpIDCutNQN->GetYaxis()->SetTitle("");
33655     hProbPassDpIDCutNQN->GetYaxis()->CenterTitle();
33656     hProbPassDpIDCutNQN->SetFillColor(0);
33657     hProbPassDpIDCutNQN->SetLineColor(1);
33658     hProbPassDpIDCutNQN->SetLineWidth(2);
33659     hProbPassDpIDCutNQN->SetLineStyle(2);
33660     //hProbPassDpIDCutNQN->SetBit(TH1::kCanRebin);
33661 
33662     hDpIDPassDpIDCutNQN=new TH1F("hDpIDPassDpIDCutNQN","hDpIDPassDpIDCutNQN",4*160,-1.6,1.6);
33663     hDpIDPassDpIDCutNQN->GetXaxis()->SetTitle("PID (from MadDpID)");
33664     hDpIDPassDpIDCutNQN->GetXaxis()->CenterTitle();
33665     hDpIDPassDpIDCutNQN->GetYaxis()->SetTitle("");
33666     hDpIDPassDpIDCutNQN->GetYaxis()->CenterTitle();
33667     hDpIDPassDpIDCutNQN->SetFillColor(0);
33668     hDpIDPassDpIDCutNQN->SetLineColor(1);
33669     hDpIDPassDpIDCutNQN->SetLineWidth(2);
33670     //hDpIDPassDpIDCutNQN->SetBit(TH1::kCanRebin);
33671 
33672     hRecoEnPassDpIDCutNQ=new TH1F("hRecoEnPassDpIDCutNQ","hRecoEnPassDpIDCutNQ",
33673                                   4*352,-32,320);
33674     hRecoEnPassDpIDCutNQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
33675     hRecoEnPassDpIDCutNQ->GetXaxis()->CenterTitle();
33676     hRecoEnPassDpIDCutNQ->GetYaxis()->SetTitle("");
33677     hRecoEnPassDpIDCutNQ->GetYaxis()->CenterTitle();
33678     hRecoEnPassDpIDCutNQ->SetFillColor(0);
33679     hRecoEnPassDpIDCutNQ->SetLineColor(1);
33680     //hRecoEnPassDpIDCutNQ->SetBit(TH1::kCanRebin);
33681 
33682     hRecoYPassDpIDCutNQ=new TH1F("hRecoYPassDpIDCutNQ","hRecoYPassDpIDCutNQ",
33683                                  1400,-0.2,1.2);
33684     hRecoYPassDpIDCutNQ->GetXaxis()->SetTitle("Reconstructed y");
33685     hRecoYPassDpIDCutNQ->GetXaxis()->CenterTitle();
33686     hRecoYPassDpIDCutNQ->GetYaxis()->SetTitle("");
33687     hRecoYPassDpIDCutNQ->GetYaxis()->CenterTitle();
33688     hRecoYPassDpIDCutNQ->SetFillColor(0);
33689     hRecoYPassDpIDCutNQ->SetLineColor(1);
33690     //hRecoYPassDpIDCutNQ->SetBit(TH1::kCanRebin);
33691 
33692 
33693     hNMProbPassDpIDCutNQ=new TH1F
33694       ("hNMProbPassDpIDCutNQ","hNMProbPassDpIDCutNQ",14000,-0.2,1.2);
33695     hNMProbPassDpIDCutNQ->GetXaxis()->SetTitle("Fit Probability");
33696     hNMProbPassDpIDCutNQ->GetXaxis()->CenterTitle();
33697     hNMProbPassDpIDCutNQ->GetYaxis()->SetTitle("");
33698     hNMProbPassDpIDCutNQ->GetYaxis()->CenterTitle();
33699     hNMProbPassDpIDCutNQ->SetFillColor(0);
33700     hNMProbPassDpIDCutNQ->SetLineColor(1);
33701     hNMProbPassDpIDCutNQ->SetLineWidth(2);
33702     hNMProbPassDpIDCutNQ->SetLineStyle(2);
33703     //hNMProbPassDpIDCutNQ->SetBit(TH1::kCanRebin);
33704 
33705     hNMBProbPassDpIDCutNQ=new TH1F
33706       ("hNMBProbPassDpIDCutNQ","hNMBProbPassDpIDCutNQ",14000,-0.2,1.2);
33707     hNMBProbPassDpIDCutNQ->GetXaxis()->SetTitle("Fit Probability");
33708     hNMBProbPassDpIDCutNQ->GetXaxis()->CenterTitle();
33709     hNMBProbPassDpIDCutNQ->GetYaxis()->SetTitle("");
33710     hNMBProbPassDpIDCutNQ->GetYaxis()->CenterTitle();
33711     hNMBProbPassDpIDCutNQ->SetFillColor(0);
33712     hNMBProbPassDpIDCutNQ->SetLineColor(1);
33713     hNMBProbPassDpIDCutNQ->SetLineWidth(2);
33714     hNMBProbPassDpIDCutNQ->SetLineStyle(2);
33715     //hNMBProbPassDpIDCutNQ->SetBit(TH1::kCanRebin);
33716 
33717     hAllShwProbPassDpIDCutNQ=new TH1F
33718       ("hAllShwProbPassDpIDCutNQ",
33719        "hAllShwProbPassDpIDCutNQ",14000,-0.2,1.2);
33720     hAllShwProbPassDpIDCutNQ->GetXaxis()->SetTitle("Fit Probability");
33721     hAllShwProbPassDpIDCutNQ->GetXaxis()->CenterTitle();
33722     hAllShwProbPassDpIDCutNQ->GetYaxis()->SetTitle("");
33723     hAllShwProbPassDpIDCutNQ->GetYaxis()->CenterTitle();
33724     hAllShwProbPassDpIDCutNQ->SetFillColor(0);
33725     hAllShwProbPassDpIDCutNQ->SetLineColor(1);
33726     hAllShwProbPassDpIDCutNQ->SetLineWidth(2);
33727     hAllShwProbPassDpIDCutNQ->SetLineStyle(2);
33728     //hAllShwProbPassDpIDCutNQ->SetBit(TH1::kCanRebin);
33729 
33730 
33731     hNMRecoEnPassDpIDCutNQ=new TH1F
33732       ("hNMRecoEnPassDpIDCutNQ","hNMRecoEnPassDpIDCutNQ",4*352,-32,320);
33733     hNMRecoEnPassDpIDCutNQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
33734     hNMRecoEnPassDpIDCutNQ->GetXaxis()->CenterTitle();
33735     hNMRecoEnPassDpIDCutNQ->GetYaxis()->SetTitle("");
33736     hNMRecoEnPassDpIDCutNQ->GetYaxis()->CenterTitle();
33737     hNMRecoEnPassDpIDCutNQ->SetFillColor(0);
33738     hNMRecoEnPassDpIDCutNQ->SetLineColor(1);
33739     //hNMRecoEnPassDpIDCutNQ->SetBit(TH1::kCanRebin);
33740 
33741     hNMTrueEnPassDpIDCutNQ=new TH1F
33742       ("hNMTrueEnPassDpIDCutNQ","hNMTrueEnPassDpIDCutNQ",4*352,-32,320);
33743     hNMTrueEnPassDpIDCutNQ->GetXaxis()->SetTitle("True Energy (GeV)");
33744     hNMTrueEnPassDpIDCutNQ->GetXaxis()->CenterTitle();
33745     hNMTrueEnPassDpIDCutNQ->GetYaxis()->SetTitle("");
33746     hNMTrueEnPassDpIDCutNQ->GetYaxis()->CenterTitle();
33747     hNMTrueEnPassDpIDCutNQ->SetFillColor(0);
33748     hNMTrueEnPassDpIDCutNQ->SetLineColor(1);
33749     //hNMTrueEnPassDpIDCutNQ->SetBit(TH1::kCanRebin);
33750 
33751     hNMBRecoEnPassDpIDCutNQ=new TH1F("hNMBRecoEnPassDpIDCutNQ",
33752                                      "hNMBRecoEnPassDpIDCutNQ",
33753                                      4*352,-32,320);
33754     hNMBRecoEnPassDpIDCutNQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
33755     hNMBRecoEnPassDpIDCutNQ->GetXaxis()->CenterTitle();
33756     hNMBRecoEnPassDpIDCutNQ->GetYaxis()->SetTitle("");
33757     hNMBRecoEnPassDpIDCutNQ->GetYaxis()->CenterTitle();
33758     hNMBRecoEnPassDpIDCutNQ->SetFillColor(0);
33759     hNMBRecoEnPassDpIDCutNQ->SetLineColor(1);
33760     //hNMBRecoEnPassDpIDCutNQ->SetBit(TH1::kCanRebin);
33761 
33762     hNMBTrueEnPassDpIDCutNQ=new TH1F
33763       ("hNMBTrueEnPassDpIDCutNQ","hNMBTrueEnPassDpIDCutNQ",
33764        4*352,-32,320);
33765     hNMBTrueEnPassDpIDCutNQ->GetXaxis()->SetTitle("True Energy (GeV)");
33766     hNMBTrueEnPassDpIDCutNQ->GetXaxis()->CenterTitle();
33767     hNMBTrueEnPassDpIDCutNQ->GetYaxis()->SetTitle("");
33768     hNMBTrueEnPassDpIDCutNQ->GetYaxis()->CenterTitle();
33769     hNMBTrueEnPassDpIDCutNQ->SetFillColor(0);
33770     hNMBTrueEnPassDpIDCutNQ->SetLineColor(1);
33771     //hNMBTrueEnPassDpIDCutNQ->SetBit(TH1::kCanRebin);
33772 
33773 
33774 
33775     hAllNCRecoEnPassDpIDCutNQ=new TH1F("hAllNCRecoEnPassDpIDCutNQ",
33776                                        "hAllNCRecoEnPassDpIDCutNQ",
33777                                        4*352,-32,320);
33778     hAllNCRecoEnPassDpIDCutNQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
33779     hAllNCRecoEnPassDpIDCutNQ->GetXaxis()->CenterTitle();
33780     hAllNCRecoEnPassDpIDCutNQ->GetYaxis()->SetTitle("");
33781     hAllNCRecoEnPassDpIDCutNQ->GetYaxis()->CenterTitle();
33782     hAllNCRecoEnPassDpIDCutNQ->SetFillColor(0);
33783     hAllNCRecoEnPassDpIDCutNQ->SetLineColor(1);
33784     //hAllNCRecoEnPassDpIDCutNQ->SetBit(TH1::kCanRebin);
33785 
33786     hAllNCTrueEnPassDpIDCutNQ=new TH1F
33787       ("hAllNCTrueEnPassDpIDCutNQ","hAllNCTrueEnPassDpIDCutNQ",
33788        4*352,-32,320);
33789     hAllNCTrueEnPassDpIDCutNQ->GetXaxis()->SetTitle("True Energy (GeV)");
33790     hAllNCTrueEnPassDpIDCutNQ->GetXaxis()->CenterTitle();
33791     hAllNCTrueEnPassDpIDCutNQ->GetYaxis()->SetTitle("");
33792     hAllNCTrueEnPassDpIDCutNQ->GetYaxis()->CenterTitle();
33793     hAllNCTrueEnPassDpIDCutNQ->SetFillColor(0);
33794     hAllNCTrueEnPassDpIDCutNQ->SetLineColor(1);
33795     //hAllNCTrueEnPassDpIDCutNQ->SetBit(TH1::kCanRebin);
33796 
33797     hAllShwRecoEnPassDpIDCutNQ=new TH1F("hAllShwRecoEnPassDpIDCutNQ",
33798                                         "hAllShwRecoEnPassDpIDCutNQ",
33799                                         4*352,-32,320);
33800     hAllShwRecoEnPassDpIDCutNQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
33801     hAllShwRecoEnPassDpIDCutNQ->GetXaxis()->CenterTitle();
33802     hAllShwRecoEnPassDpIDCutNQ->GetYaxis()->SetTitle("");
33803     hAllShwRecoEnPassDpIDCutNQ->GetYaxis()->CenterTitle();
33804     hAllShwRecoEnPassDpIDCutNQ->SetFillColor(0);
33805     hAllShwRecoEnPassDpIDCutNQ->SetLineColor(1);
33806     //hAllShwRecoEnPassDpIDCutNQ->SetBit(TH1::kCanRebin);
33807 
33808     hAllShwTrueEnPassDpIDCutNQ=new TH1F
33809       ("hAllShwTrueEnPassDpIDCutNQ","hAllShwTrueEnPassDpIDCutNQ",
33810        4*352,-32,320);
33811     hAllShwTrueEnPassDpIDCutNQ->GetXaxis()->SetTitle("True Energy (GeV)");
33812     hAllShwTrueEnPassDpIDCutNQ->GetXaxis()->CenterTitle();
33813     hAllShwTrueEnPassDpIDCutNQ->GetYaxis()->SetTitle("");
33814     hAllShwTrueEnPassDpIDCutNQ->GetYaxis()->CenterTitle();
33815     hAllShwTrueEnPassDpIDCutNQ->SetFillColor(0);
33816     hAllShwTrueEnPassDpIDCutNQ->SetLineColor(1);
33817     //hAllShwTrueEnPassDpIDCutNQ->SetBit(TH1::kCanRebin);
33818 
33819     hNotNMRecoEnPassDpIDCutNQ=new TH1F
33820       ("hNotNMRecoEnPassDpIDCutNQ","hNotNMRecoEnPassDpIDCutNQ",
33821        4*352,-32,320);
33822     hNotNMRecoEnPassDpIDCutNQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
33823     hNotNMRecoEnPassDpIDCutNQ->GetXaxis()->CenterTitle();
33824     hNotNMRecoEnPassDpIDCutNQ->GetYaxis()->SetTitle("");
33825     hNotNMRecoEnPassDpIDCutNQ->GetYaxis()->CenterTitle();
33826     hNotNMRecoEnPassDpIDCutNQ->SetFillColor(0);
33827     hNotNMRecoEnPassDpIDCutNQ->SetLineColor(1);
33828     //hNotNMRecoEnPassDpIDCutNQ->SetBit(TH1::kCanRebin);
33829 
33830     hNotNMTrueEnPassDpIDCutNQ=new TH1F
33831       ("hNotNMTrueEnPassDpIDCutNQ","hNotNMTrueEnPassDpIDCutNQ",
33832        4*352,-32,320);
33833     hNotNMTrueEnPassDpIDCutNQ->GetXaxis()->SetTitle("True Energy (GeV)");
33834     hNotNMTrueEnPassDpIDCutNQ->GetXaxis()->CenterTitle();
33835     hNotNMTrueEnPassDpIDCutNQ->GetYaxis()->SetTitle("");
33836     hNotNMTrueEnPassDpIDCutNQ->GetYaxis()->CenterTitle();
33837     hNotNMTrueEnPassDpIDCutNQ->SetFillColor(0);
33838     hNotNMTrueEnPassDpIDCutNQ->SetLineColor(1);
33839     //hNotNMTrueEnPassDpIDCutNQ->SetBit(TH1::kCanRebin);
33840 
33841     hNotNMBRecoEnPassDpIDCutNQ=new TH1F("hNotNMBRecoEnPassDpIDCutNQ",
33842                                         "hNotNMBRecoEnPassDpIDCutNQ",
33843                                         4*352,-32,320);
33844     hNotNMBRecoEnPassDpIDCutNQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
33845     hNotNMBRecoEnPassDpIDCutNQ->GetXaxis()->CenterTitle();
33846     hNotNMBRecoEnPassDpIDCutNQ->GetYaxis()->SetTitle("");
33847     hNotNMBRecoEnPassDpIDCutNQ->GetYaxis()->CenterTitle();
33848     hNotNMBRecoEnPassDpIDCutNQ->SetFillColor(0);
33849     hNotNMBRecoEnPassDpIDCutNQ->SetLineColor(1);
33850     //hNotNMBRecoEnPassDpIDCutNQ->SetBit(TH1::kCanRebin);
33851 
33852     hNotNMBTrueEnPassDpIDCutNQ=new TH1F
33853       ("hNotNMBTrueEnPassDpIDCutNQ","hNotNMBTrueEnPassDpIDCutNQ",
33854        4*352,-32,320);
33855     hNotNMBTrueEnPassDpIDCutNQ->GetXaxis()->SetTitle("True Energy (GeV)");
33856     hNotNMBTrueEnPassDpIDCutNQ->GetXaxis()->CenterTitle();
33857     hNotNMBTrueEnPassDpIDCutNQ->GetYaxis()->SetTitle("");
33858     hNotNMBTrueEnPassDpIDCutNQ->GetYaxis()->CenterTitle();
33859     hNotNMBTrueEnPassDpIDCutNQ->SetFillColor(0);
33860     hNotNMBTrueEnPassDpIDCutNQ->SetLineColor(1);
33861     //hNotNMBTrueEnPassDpIDCutNQ->SetBit(TH1::kCanRebin);
33862   }
33863 
33864 
33865   //PQ
33866   if (nu.charge==+1){
33867     hSigqp_qpPassDpIDCutPQN->Fill(nu.sigqp_qp,nu.rw);
33868     hChi2PassDpIDCutPQN->Fill(nu.chi2PerNdof,nu.rw);
33869     hProbPassDpIDCutPQN->Fill(nu.prob,nu.rw);
33870     hDpIDPassDpIDCutPQN->Fill(nu.dpID,nu.rw);
33871 
33872     hRecoEnPassDpIDCutPQ->Fill(nu.energy,nu.rw);
33873     hRecoYPassDpIDCutPQ->Fill(nu.y,nu.rw);
33874   }
33875   //NQ
33876   else if (nu.charge==-1){
33877     hSigqp_qpPassDpIDCutNQN->Fill(nu.sigqp_qp,nu.rw);
33878     hChi2PassDpIDCutNQN->Fill(nu.chi2PerNdof,nu.rw);
33879     hProbPassDpIDCutNQN->Fill(nu.prob,nu.rw);
33880     hDpIDPassDpIDCutNQN->Fill(nu.dpID,nu.rw);
33881 
33882     hRecoEnPassDpIDCutNQ->Fill(nu.energy,nu.rw);
33883     hRecoYPassDpIDCutNQ->Fill(nu.y,nu.rw);
33884   }
33885   else MSG("NuPlots",Msg::kWarning)<<"Ahh, bad charge"<<endl;
33886 
33887 
33888   //now fill the truth plots
33889   if (nu.iaction==1){//CC
33890     if (nu.inu==14){//NuMu
33891       if (nu.charge==+1) {
33892         hNMProbPassDpIDCutPQ->Fill(nu.prob,nu.rw);
33893         hNMRecoEnPassDpIDCutPQ->Fill(nu.energy,nu.rw);
33894         hNMTrueEnPassDpIDCutPQ->Fill(nu.energyMC,nu.rw);
33895       }
33896       else if (nu.charge==-1){
33897         hNMProbPassDpIDCutNQ->Fill(nu.prob,nu.rw);
33898         hNMRecoEnPassDpIDCutNQ->Fill(nu.energy,nu.rw);
33899         hNMTrueEnPassDpIDCutNQ->Fill(nu.energyMC,nu.rw);
33900       }
33901     }
33902     else if (nu.inu==-14){//NuMuBar
33903       if (nu.charge==+1) {
33904         hNMBProbPassDpIDCutPQ->Fill(nu.prob,nu.rw);
33905         hNMBRecoEnPassDpIDCutPQ->Fill(nu.energy,nu.rw);
33906         hNMBTrueEnPassDpIDCutPQ->Fill(nu.energyMC,nu.rw);
33907       }
33908       else if (nu.charge==-1){
33909         hNMBProbPassDpIDCutNQ->Fill(nu.prob,nu.rw);
33910         hNMBRecoEnPassDpIDCutNQ->Fill(nu.energy,nu.rw);
33911         hNMBTrueEnPassDpIDCutNQ->Fill(nu.energyMC,nu.rw);
33912       }
33913     }
33914   }
33915   else if (nu.iaction==0){//NC
33916     if (nu.charge==+1) {
33917       hAllNCRecoEnPassDpIDCutPQ->Fill(nu.energy,nu.rw);
33918       hAllNCTrueEnPassDpIDCutPQ->Fill(nu.energyMC,nu.rw);
33919     }
33920     else if (nu.charge==-1){
33921       hAllNCRecoEnPassDpIDCutNQ->Fill(nu.energy,nu.rw);
33922       hAllNCTrueEnPassDpIDCutNQ->Fill(nu.energyMC,nu.rw);
33923     }
33924   }
33925 
33926   //all but NuMu/NuMuBar CC
33927   if (!(nu.iaction==1 && (nu.inu==14 || nu.inu==-14))) {
33928     if (nu.charge==+1) {
33929       hAllShwProbPassDpIDCutPQ->Fill(nu.prob,nu.rw);
33930       hAllShwRecoEnPassDpIDCutPQ->Fill(nu.energy,nu.rw);
33931       hAllShwTrueEnPassDpIDCutPQ->Fill(nu.energyMC,nu.rw);
33932     }
33933     else if (nu.charge==-1){
33934       hAllShwProbPassDpIDCutNQ->Fill(nu.prob,nu.rw);
33935       hAllShwRecoEnPassDpIDCutNQ->Fill(nu.energy,nu.rw);
33936       hAllShwTrueEnPassDpIDCutNQ->Fill(nu.energyMC,nu.rw);
33937     }
33938   }
33939 
33940   //fill all-but-numubar-cc histos
33941   if (!(nu.inu==-14 && nu.iaction==1)) {// !numubarCC
33942     if (nu.charge==+1) {
33943       hNotNMBRecoEnPassDpIDCutPQ->Fill(nu.energy,nu.rw);
33944       hNotNMBTrueEnPassDpIDCutPQ->Fill(nu.energyMC,nu.rw);
33945     }
33946     else if (nu.charge==-1){
33947       hNotNMBRecoEnPassDpIDCutNQ->Fill(nu.energy,nu.rw);
33948       hNotNMBTrueEnPassDpIDCutNQ->Fill(nu.energyMC,nu.rw);
33949     }
33950   }
33951 
33952   //fill all-but-numu-cc histos
33953   if (!(nu.inu==14 && nu.iaction==1)) {// !numuCC
33954     if (nu.charge==+1) {
33955       hNotNMRecoEnPassDpIDCutPQ->Fill(nu.energy,nu.rw);
33956       hNotNMTrueEnPassDpIDCutPQ->Fill(nu.energyMC,nu.rw);
33957     }
33958     else if (nu.charge==-1){
33959       hNotNMRecoEnPassDpIDCutNQ->Fill(nu.energy,nu.rw);
33960       hNotNMTrueEnPassDpIDCutNQ->Fill(nu.energyMC,nu.rw);
33961     }
33962   }
33963 
33964 
33965 
33966 
33967 
33968 
33969 
33970 
33971 
33972 
33973 
33974   /*
33975 
33976 
33977   //PQ
33978   static TH1F* hSigqp_qpPassDpIDCutPQN=0;
33979   static TH1F* hChi2PassDpIDCutPQN=0;
33980   static TH1F* hProbPassDpIDCutPQN=0;
33981   static TH1F* hDpIDPassDpIDCutPQN=0;
33982   static TH1F* hRecoEnPassDpIDCutPQ=0;
33983   static TH1F* hRecoYPassDpIDCutPQ=0;
33984 
33985   static TH1F* hNMProbPassDpIDCutPQ=0;
33986   static TH1F* hNMBProbPassDpIDCutPQ=0;
33987   static TH1F* hAllShwProbPassDpIDCutPQ=0;
33988 
33989   static TH1F* hNMRecoEnPassDpIDCutPQ=0;
33990   static TH1F* hNMTrueEnPassDpIDCutPQ=0;
33991   static TH1F* hNMBRecoEnPassDpIDCutPQ=0;
33992   static TH1F* hNMBTrueEnPassDpIDCutPQ=0;
33993 
33994   //NQ
33995   static TH1F* hSigqp_qpPassDpIDCutNQN=0;
33996   static TH1F* hChi2PassDpIDCutNQN=0;
33997   static TH1F* hProbPassDpIDCutNQN=0;
33998   static TH1F* hDpIDPassDpIDCutNQN=0;
33999   static TH1F* hRecoEnPassDpIDCutNQ=0;
34000   static TH1F* hRecoYPassDpIDCutNQ=0;
34001 
34002   static TH1F* hNMProbPassDpIDCutNQ=0;
34003   static TH1F* hNMBProbPassDpIDCutNQ=0;
34004   static TH1F* hAllShwProbPassDpIDCutNQ=0;
34005 
34006   static TH1F* hNMBRecoEnPassDpIDCutNQ=0;
34007   static TH1F* hNMBTrueEnPassDpIDCutNQ=0;
34008   static TH1F* hNMRecoEnPassDpIDCutNQ=0;
34009   static TH1F* hNMTrueEnPassDpIDCutNQ=0;
34010 
34011   if (!hChi2PassDpIDCutNQN){
34012   MAXMSG("NuPlots",Msg::kDebug,1)
34013   <<"Creating DPIdSigmaQPPassDpIDCutPlots plots..."<<endl;
34014 
34015   //PQ
34016   hSigqp_qpPassDpIDCutPQN=new TH1F("hSigqp_qpPassDpIDCutPQN","hSigqp_qpPassDpIDCutPQN",800*160,-160,160);
34017   hSigqp_qpPassDpIDCutPQN->GetXaxis()->SetTitle("#sigma(Q/P)/(Q/P)");
34018   hSigqp_qpPassDpIDCutPQN->GetXaxis()->CenterTitle();
34019   hSigqp_qpPassDpIDCutPQN->GetYaxis()->SetTitle("");
34020   hSigqp_qpPassDpIDCutPQN->GetYaxis()->CenterTitle();
34021   hSigqp_qpPassDpIDCutPQN->SetFillColor(0);
34022   hSigqp_qpPassDpIDCutPQN->SetLineColor(1);
34023   hSigqp_qpPassDpIDCutPQN->SetLineWidth(2);
34024   hSigqp_qpPassDpIDCutPQN->SetLineStyle(2);
34025   //hSigqp_qpPassDpIDCutPQN->SetBit(TH1::kCanRebin);
34026 
34027   hChi2PassDpIDCutPQN=new TH1F("hChi2PassDpIDCutPQN","hChi2PassDpIDCutPQN",10*176,-16,160);
34028   hChi2PassDpIDCutPQN->GetXaxis()->SetTitle("#chi^{2}/ndof");
34029   hChi2PassDpIDCutPQN->GetXaxis()->CenterTitle();
34030   hChi2PassDpIDCutPQN->GetYaxis()->SetTitle("");
34031   hChi2PassDpIDCutPQN->GetYaxis()->CenterTitle();
34032   hChi2PassDpIDCutPQN->SetFillColor(0);
34033   hChi2PassDpIDCutPQN->SetLineColor(1);
34034   hChi2PassDpIDCutPQN->SetLineWidth(2);
34035   hChi2PassDpIDCutPQN->SetLineStyle(2);
34036   //hChi2PassDpIDCutPQN->SetBit(TH1::kCanRebin);
34037 
34038   hProbPassDpIDCutPQN=new TH1F("hProbPassDpIDCutPQN","hProbPassDpIDCutPQN",14000,-0.2,1.2);
34039   hProbPassDpIDCutPQN->GetXaxis()->SetTitle("Fit Probability");
34040   hProbPassDpIDCutPQN->GetXaxis()->CenterTitle();
34041   hProbPassDpIDCutPQN->GetYaxis()->SetTitle("");
34042   hProbPassDpIDCutPQN->GetYaxis()->CenterTitle();
34043   hProbPassDpIDCutPQN->SetFillColor(0);
34044   hProbPassDpIDCutPQN->SetLineColor(1);
34045   hProbPassDpIDCutPQN->SetLineWidth(2);
34046   hProbPassDpIDCutPQN->SetLineStyle(2);
34047   //hProbPassDpIDCutPQN->SetBit(TH1::kCanRebin);
34048 
34049   hDpIDPassDpIDCutPQN=new TH1F("hDpIDPassDpIDCutPQN","hDpIDPassDpIDCutPQN",4*160,-1.6,1.6);
34050   hDpIDPassDpIDCutPQN->GetXaxis()->SetTitle("PID (from MadDpID)");
34051   hDpIDPassDpIDCutPQN->GetXaxis()->CenterTitle();
34052   hDpIDPassDpIDCutPQN->GetYaxis()->SetTitle("");
34053   hDpIDPassDpIDCutPQN->GetYaxis()->CenterTitle();
34054   hDpIDPassDpIDCutPQN->SetFillColor(0);
34055   hDpIDPassDpIDCutPQN->SetLineColor(1);
34056   hDpIDPassDpIDCutPQN->SetLineWidth(2);
34057   //hDpIDPassDpIDCutPQN->SetBit(TH1::kCanRebin);
34058 
34059   hRecoEnPassDpIDCutPQ=new TH1F("hRecoEnPassDpIDCutPQ","hRecoEnPassDpIDCutPQ",
34060   4*352,-32,320);
34061   hRecoEnPassDpIDCutPQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
34062   hRecoEnPassDpIDCutPQ->GetXaxis()->CenterTitle();
34063   hRecoEnPassDpIDCutPQ->GetYaxis()->SetTitle("");
34064   hRecoEnPassDpIDCutPQ->GetYaxis()->CenterTitle();
34065   hRecoEnPassDpIDCutPQ->SetFillColor(0);
34066   hRecoEnPassDpIDCutPQ->SetLineColor(1);
34067   //hRecoEnPassDpIDCutPQ->SetBit(TH1::kCanRebin);
34068 
34069   hRecoYPassDpIDCutPQ=new TH1F("hRecoYPassDpIDCutPQ","hRecoYPassDpIDCutPQ",
34070   1400,-0.2,1.2);
34071   hRecoYPassDpIDCutPQ->GetXaxis()->SetTitle("Reconstructed y");
34072   hRecoYPassDpIDCutPQ->GetXaxis()->CenterTitle();
34073   hRecoYPassDpIDCutPQ->GetYaxis()->SetTitle("");
34074   hRecoYPassDpIDCutPQ->GetYaxis()->CenterTitle();
34075   hRecoYPassDpIDCutPQ->SetFillColor(0);
34076   hRecoYPassDpIDCutPQ->SetLineColor(1);
34077   //hRecoYPassDpIDCutPQ->SetBit(TH1::kCanRebin);
34078 
34079 
34080   hNMProbPassDpIDCutPQ=new TH1F
34081   ("hNMProbPassDpIDCutPQ","hNMProbPassDpIDCutPQ",14000,-0.2,1.2);
34082   hNMProbPassDpIDCutPQ->GetXaxis()->SetTitle("Fit Probability");
34083   hNMProbPassDpIDCutPQ->GetXaxis()->CenterTitle();
34084   hNMProbPassDpIDCutPQ->GetYaxis()->SetTitle("");
34085   hNMProbPassDpIDCutPQ->GetYaxis()->CenterTitle();
34086   hNMProbPassDpIDCutPQ->SetFillColor(0);
34087   hNMProbPassDpIDCutPQ->SetLineColor(1);
34088   hNMProbPassDpIDCutPQ->SetLineWidth(2);
34089   hNMProbPassDpIDCutPQ->SetLineStyle(2);
34090   //hNMProbPassDpIDCutPQ->SetBit(TH1::kCanRebin);
34091 
34092   hNMBProbPassDpIDCutPQ=new TH1F
34093   ("hNMBProbPassDpIDCutPQ","hNMBProbPassDpIDCutPQ",14000,-0.2,1.2);
34094   hNMBProbPassDpIDCutPQ->GetXaxis()->SetTitle("Fit Probability");
34095   hNMBProbPassDpIDCutPQ->GetXaxis()->CenterTitle();
34096   hNMBProbPassDpIDCutPQ->GetYaxis()->SetTitle("");
34097   hNMBProbPassDpIDCutPQ->GetYaxis()->CenterTitle();
34098   hNMBProbPassDpIDCutPQ->SetFillColor(0);
34099   hNMBProbPassDpIDCutPQ->SetLineColor(1);
34100   hNMBProbPassDpIDCutPQ->SetLineWidth(2);
34101   hNMBProbPassDpIDCutPQ->SetLineStyle(2);
34102   //hNMBProbPassDpIDCutPQ->SetBit(TH1::kCanRebin);
34103 
34104   hAllShwProbPassDpIDCutPQ=new TH1F
34105   ("hAllShwProbPassDpIDCutPQ",
34106   "hAllShwProbPassDpIDCutPQ",14000,-0.2,1.2);
34107   hAllShwProbPassDpIDCutPQ->GetXaxis()->SetTitle("Fit Probability");
34108   hAllShwProbPassDpIDCutPQ->GetXaxis()->CenterTitle();
34109   hAllShwProbPassDpIDCutPQ->GetYaxis()->SetTitle("");
34110   hAllShwProbPassDpIDCutPQ->GetYaxis()->CenterTitle();
34111   hAllShwProbPassDpIDCutPQ->SetFillColor(0);
34112   hAllShwProbPassDpIDCutPQ->SetLineColor(1);
34113   hAllShwProbPassDpIDCutPQ->SetLineWidth(2);
34114   hAllShwProbPassDpIDCutPQ->SetLineStyle(2);
34115   //hAllShwProbPassDpIDCutPQ->SetBit(TH1::kCanRebin);
34116 
34117   hNMRecoEnPassDpIDCutPQ=new TH1F
34118   ("hNMRecoEnPassDpIDCutPQ","hNMRecoEnPassDpIDCutPQ",4*352,-32,320);
34119   hNMRecoEnPassDpIDCutPQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
34120   hNMRecoEnPassDpIDCutPQ->GetXaxis()->CenterTitle();
34121   hNMRecoEnPassDpIDCutPQ->GetYaxis()->SetTitle("");
34122   hNMRecoEnPassDpIDCutPQ->GetYaxis()->CenterTitle();
34123   hNMRecoEnPassDpIDCutPQ->SetFillColor(0);
34124   hNMRecoEnPassDpIDCutPQ->SetLineColor(1);
34125   //hNMRecoEnPassDpIDCutPQ->SetBit(TH1::kCanRebin);
34126 
34127   hNMTrueEnPassDpIDCutPQ=new TH1F
34128   ("hNMTrueEnPassDpIDCutPQ","hNMTrueEnPassDpIDCutPQ",4*352,-32,320);
34129   hNMTrueEnPassDpIDCutPQ->GetXaxis()->SetTitle("True Energy (GeV)");
34130   hNMTrueEnPassDpIDCutPQ->GetXaxis()->CenterTitle();
34131   hNMTrueEnPassDpIDCutPQ->GetYaxis()->SetTitle("");
34132   hNMTrueEnPassDpIDCutPQ->GetYaxis()->CenterTitle();
34133   hNMTrueEnPassDpIDCutPQ->SetFillColor(0);
34134   hNMTrueEnPassDpIDCutPQ->SetLineColor(1);
34135   //hNMTrueEnPassDpIDCutPQ->SetBit(TH1::kCanRebin);
34136 
34137   hNMBRecoEnPassDpIDCutPQ=new TH1F("hNMBRecoEnPassDpIDCutPQ",
34138   "hNMBRecoEnPassDpIDCutPQ",
34139   4*352,-32,320);
34140   hNMBRecoEnPassDpIDCutPQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
34141   hNMBRecoEnPassDpIDCutPQ->GetXaxis()->CenterTitle();
34142   hNMBRecoEnPassDpIDCutPQ->GetYaxis()->SetTitle("");
34143   hNMBRecoEnPassDpIDCutPQ->GetYaxis()->CenterTitle();
34144   hNMBRecoEnPassDpIDCutPQ->SetFillColor(0);
34145   hNMBRecoEnPassDpIDCutPQ->SetLineColor(1);
34146   //hNMBRecoEnPassDpIDCutPQ->SetBit(TH1::kCanRebin);
34147 
34148   hNMBTrueEnPassDpIDCutPQ=new TH1F
34149   ("hNMBTrueEnPassDpIDCutPQ","hNMBTrueEnPassDpIDCutPQ",
34150   4*352,-32,320);
34151   hNMBTrueEnPassDpIDCutPQ->GetXaxis()->SetTitle("True Energy (GeV)");
34152   hNMBTrueEnPassDpIDCutPQ->GetXaxis()->CenterTitle();
34153   hNMBTrueEnPassDpIDCutPQ->GetYaxis()->SetTitle("");
34154   hNMBTrueEnPassDpIDCutPQ->GetYaxis()->CenterTitle();
34155   hNMBTrueEnPassDpIDCutPQ->SetFillColor(0);
34156   hNMBTrueEnPassDpIDCutPQ->SetLineColor(1);
34157   //hNMBTrueEnPassDpIDCutPQ->SetBit(TH1::kCanRebin);
34158 
34159 
34160 
34161   //NQ
34162   hSigqp_qpPassDpIDCutNQN=new TH1F("hSigqp_qpPassDpIDCutNQN","hSigqp_qpPassDpIDCutNQN",800*160,-160,160);
34163   hSigqp_qpPassDpIDCutNQN->GetXaxis()->SetTitle("#sigma(Q/P)/(Q/P)");
34164   hSigqp_qpPassDpIDCutNQN->GetXaxis()->CenterTitle();
34165   hSigqp_qpPassDpIDCutNQN->GetYaxis()->SetTitle("");
34166   hSigqp_qpPassDpIDCutNQN->GetYaxis()->CenterTitle();
34167   hSigqp_qpPassDpIDCutNQN->SetFillColor(0);
34168   hSigqp_qpPassDpIDCutNQN->SetLineColor(1);
34169   hSigqp_qpPassDpIDCutNQN->SetLineWidth(2);
34170   hSigqp_qpPassDpIDCutNQN->SetLineStyle(2);
34171   //hSigqp_qpPassDpIDCutNQN->SetBit(TH1::kCanRebin);
34172 
34173   hChi2PassDpIDCutNQN=new TH1F("hChi2PassDpIDCutNQN","hChi2PassDpIDCutNQN",10*176,-16,160);
34174   hChi2PassDpIDCutNQN->GetXaxis()->SetTitle("#chi^{2}/ndof");
34175   hChi2PassDpIDCutNQN->GetXaxis()->CenterTitle();
34176   hChi2PassDpIDCutNQN->GetYaxis()->SetTitle("");
34177   hChi2PassDpIDCutNQN->GetYaxis()->CenterTitle();
34178   hChi2PassDpIDCutNQN->SetFillColor(0);
34179   hChi2PassDpIDCutNQN->SetLineColor(1);
34180   hChi2PassDpIDCutNQN->SetLineWidth(2);
34181   hChi2PassDpIDCutNQN->SetLineStyle(2);
34182   //hChi2PassDpIDCutNQN->SetBit(TH1::kCanRebin);
34183 
34184   hProbPassDpIDCutNQN=new TH1F("hProbPassDpIDCutNQN","hProbPassDpIDCutNQN",14000,-0.2,1.2);
34185   hProbPassDpIDCutNQN->GetXaxis()->SetTitle("Fit Probability");
34186   hProbPassDpIDCutNQN->GetXaxis()->CenterTitle();
34187   hProbPassDpIDCutNQN->GetYaxis()->SetTitle("");
34188   hProbPassDpIDCutNQN->GetYaxis()->CenterTitle();
34189   hProbPassDpIDCutNQN->SetFillColor(0);
34190   hProbPassDpIDCutNQN->SetLineColor(1);
34191   hProbPassDpIDCutNQN->SetLineWidth(2);
34192   hProbPassDpIDCutNQN->SetLineStyle(2);
34193   //hProbPassDpIDCutNQN->SetBit(TH1::kCanRebin);
34194 
34195   hDpIDPassDpIDCutNQN=new TH1F("hDpIDPassDpIDCutNQN","hDpIDPassDpIDCutNQN",4*160,-1.6,1.6);
34196   hDpIDPassDpIDCutNQN->GetXaxis()->SetTitle("PID (from MadDpID)");
34197   hDpIDPassDpIDCutNQN->GetXaxis()->CenterTitle();
34198   hDpIDPassDpIDCutNQN->GetYaxis()->SetTitle("");
34199   hDpIDPassDpIDCutNQN->GetYaxis()->CenterTitle();
34200   hDpIDPassDpIDCutNQN->SetFillColor(0);
34201   hDpIDPassDpIDCutNQN->SetLineColor(1);
34202   hDpIDPassDpIDCutNQN->SetLineWidth(2);
34203   //hDpIDPassDpIDCutNQN->SetBit(TH1::kCanRebin);
34204 
34205   hRecoEnPassDpIDCutNQ=new TH1F("hRecoEnPassDpIDCutNQ","hRecoEnPassDpIDCutNQ",
34206   4*352,-32,320);
34207   hRecoEnPassDpIDCutNQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
34208   hRecoEnPassDpIDCutNQ->GetXaxis()->CenterTitle();
34209   hRecoEnPassDpIDCutNQ->GetYaxis()->SetTitle("");
34210   hRecoEnPassDpIDCutNQ->GetYaxis()->CenterTitle();
34211   hRecoEnPassDpIDCutNQ->SetFillColor(0);
34212   hRecoEnPassDpIDCutNQ->SetLineColor(1);
34213   //hRecoEnPassDpIDCutNQ->SetBit(TH1::kCanRebin);
34214 
34215   hRecoYPassDpIDCutNQ=new TH1F("hRecoYPassDpIDCutNQ","hRecoYPassDpIDCutNQ",
34216   1400,-0.2,1.2);
34217   hRecoYPassDpIDCutNQ->GetXaxis()->SetTitle("Reconstructed y");
34218   hRecoYPassDpIDCutNQ->GetXaxis()->CenterTitle();
34219   hRecoYPassDpIDCutNQ->GetYaxis()->SetTitle("");
34220   hRecoYPassDpIDCutNQ->GetYaxis()->CenterTitle();
34221   hRecoYPassDpIDCutNQ->SetFillColor(0);
34222   hRecoYPassDpIDCutNQ->SetLineColor(1);
34223   //hRecoYPassDpIDCutNQ->SetBit(TH1::kCanRebin);
34224 
34225 
34226   hNMProbPassDpIDCutNQ=new TH1F
34227   ("hNMProbPassDpIDCutNQ","hNMProbPassDpIDCutNQ",14000,-0.2,1.2);
34228   hNMProbPassDpIDCutNQ->GetXaxis()->SetTitle("Fit Probability");
34229   hNMProbPassDpIDCutNQ->GetXaxis()->CenterTitle();
34230   hNMProbPassDpIDCutNQ->GetYaxis()->SetTitle("");
34231   hNMProbPassDpIDCutNQ->GetYaxis()->CenterTitle();
34232   hNMProbPassDpIDCutNQ->SetFillColor(0);
34233   hNMProbPassDpIDCutNQ->SetLineColor(1);
34234   hNMProbPassDpIDCutNQ->SetLineWidth(2);
34235   hNMProbPassDpIDCutNQ->SetLineStyle(2);
34236   //hNMProbPassDpIDCutNQ->SetBit(TH1::kCanRebin);
34237 
34238   hNMBProbPassDpIDCutNQ=new TH1F
34239   ("hNMBProbPassDpIDCutNQ","hNMBProbPassDpIDCutNQ",14000,-0.2,1.2);
34240   hNMBProbPassDpIDCutNQ->GetXaxis()->SetTitle("Fit Probability");
34241   hNMBProbPassDpIDCutNQ->GetXaxis()->CenterTitle();
34242   hNMBProbPassDpIDCutNQ->GetYaxis()->SetTitle("");
34243   hNMBProbPassDpIDCutNQ->GetYaxis()->CenterTitle();
34244   hNMBProbPassDpIDCutNQ->SetFillColor(0);
34245   hNMBProbPassDpIDCutNQ->SetLineColor(1);
34246   hNMBProbPassDpIDCutNQ->SetLineWidth(2);
34247   hNMBProbPassDpIDCutNQ->SetLineStyle(2);
34248   //hNMBProbPassDpIDCutNQ->SetBit(TH1::kCanRebin);
34249 
34250   hAllShwProbPassDpIDCutNQ=new TH1F
34251   ("hAllShwProbPassDpIDCutNQ",
34252   "hAllShwProbPassDpIDCutNQ",14000,-0.2,1.2);
34253   hAllShwProbPassDpIDCutNQ->GetXaxis()->SetTitle("Fit Probability");
34254   hAllShwProbPassDpIDCutNQ->GetXaxis()->CenterTitle();
34255   hAllShwProbPassDpIDCutNQ->GetYaxis()->SetTitle("");
34256   hAllShwProbPassDpIDCutNQ->GetYaxis()->CenterTitle();
34257   hAllShwProbPassDpIDCutNQ->SetFillColor(0);
34258   hAllShwProbPassDpIDCutNQ->SetLineColor(1);
34259   hAllShwProbPassDpIDCutNQ->SetLineWidth(2);
34260   hAllShwProbPassDpIDCutNQ->SetLineStyle(2);
34261   //hAllShwProbPassDpIDCutNQ->SetBit(TH1::kCanRebin);
34262 
34263 
34264   hNMRecoEnPassDpIDCutNQ=new TH1F
34265   ("hNMRecoEnPassDpIDCutNQ","hNMRecoEnPassDpIDCutNQ",4*352,-32,320);
34266   hNMRecoEnPassDpIDCutNQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
34267   hNMRecoEnPassDpIDCutNQ->GetXaxis()->CenterTitle();
34268   hNMRecoEnPassDpIDCutNQ->GetYaxis()->SetTitle("");
34269   hNMRecoEnPassDpIDCutNQ->GetYaxis()->CenterTitle();
34270   hNMRecoEnPassDpIDCutNQ->SetFillColor(0);
34271   hNMRecoEnPassDpIDCutNQ->SetLineColor(1);
34272   //hNMRecoEnPassDpIDCutNQ->SetBit(TH1::kCanRebin);
34273 
34274   hNMTrueEnPassDpIDCutNQ=new TH1F
34275   ("hNMTrueEnPassDpIDCutNQ","hNMTrueEnPassDpIDCutNQ",4*352,-32,320);
34276   hNMTrueEnPassDpIDCutNQ->GetXaxis()->SetTitle("True Energy (GeV)");
34277   hNMTrueEnPassDpIDCutNQ->GetXaxis()->CenterTitle();
34278   hNMTrueEnPassDpIDCutNQ->GetYaxis()->SetTitle("");
34279   hNMTrueEnPassDpIDCutNQ->GetYaxis()->CenterTitle();
34280   hNMTrueEnPassDpIDCutNQ->SetFillColor(0);
34281   hNMTrueEnPassDpIDCutNQ->SetLineColor(1);
34282   //hNMTrueEnPassDpIDCutNQ->SetBit(TH1::kCanRebin);
34283 
34284   hNMBRecoEnPassDpIDCutNQ=new TH1F("hNMBRecoEnPassDpIDCutNQ",
34285   "hNMBRecoEnPassDpIDCutNQ",
34286   4*352,-32,320);
34287   hNMBRecoEnPassDpIDCutNQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
34288   hNMBRecoEnPassDpIDCutNQ->GetXaxis()->CenterTitle();
34289   hNMBRecoEnPassDpIDCutNQ->GetYaxis()->SetTitle("");
34290   hNMBRecoEnPassDpIDCutNQ->GetYaxis()->CenterTitle();
34291   hNMBRecoEnPassDpIDCutNQ->SetFillColor(0);
34292   hNMBRecoEnPassDpIDCutNQ->SetLineColor(1);
34293   //hNMBRecoEnPassDpIDCutNQ->SetBit(TH1::kCanRebin);
34294 
34295   hNMBTrueEnPassDpIDCutNQ=new TH1F
34296   ("hNMBTrueEnPassDpIDCutNQ","hNMBTrueEnPassDpIDCutNQ",
34297   4*352,-32,320);
34298   hNMBTrueEnPassDpIDCutNQ->GetXaxis()->SetTitle("True Energy (GeV)");
34299   hNMBTrueEnPassDpIDCutNQ->GetXaxis()->CenterTitle();
34300   hNMBTrueEnPassDpIDCutNQ->GetYaxis()->SetTitle("");
34301   hNMBTrueEnPassDpIDCutNQ->GetYaxis()->CenterTitle();
34302   hNMBTrueEnPassDpIDCutNQ->SetFillColor(0);
34303   hNMBTrueEnPassDpIDCutNQ->SetLineColor(1);
34304   //hNMBTrueEnPassDpIDCutNQ->SetBit(TH1::kCanRebin);
34305   }
34306 
34307   //PQ
34308   if (nu.charge==+1){
34309   hSigqp_qpPassDpIDCutPQN->Fill(nu.sigqp_qp,nu.rw);
34310   hChi2PassDpIDCutPQN->Fill(nu.chi2PerNdof,nu.rw);
34311   hProbPassDpIDCutPQN->Fill(nu.prob,nu.rw);
34312   hDpIDPassDpIDCutPQN->Fill(nu.dpID,nu.rw);
34313 
34314   hRecoEnPassDpIDCutPQ->Fill(nu.energy,nu.rw);
34315   hRecoYPassDpIDCutPQ->Fill(nu.y,nu.rw);
34316   }
34317   //NQ
34318   else if (nu.charge==-1){
34319   hSigqp_qpPassDpIDCutNQN->Fill(nu.sigqp_qp,nu.rw);
34320   hChi2PassDpIDCutNQN->Fill(nu.chi2PerNdof,nu.rw);
34321   hProbPassDpIDCutNQN->Fill(nu.prob,nu.rw);
34322   hDpIDPassDpIDCutNQN->Fill(nu.dpID,nu.rw);
34323 
34324   hRecoEnPassDpIDCutNQ->Fill(nu.energy,nu.rw);
34325   hRecoYPassDpIDCutNQ->Fill(nu.y,nu.rw);
34326   }
34327   else MSG("NuPlots",Msg::kWarning)<<"Ahh, bad charge"<<endl;
34328 
34329 
34330   //now fill the truth plots
34331   if (nu.iaction==1){//CC
34332   if (nu.inu==14){//NuMu
34333   if (nu.charge==+1) {
34334   hNMProbPassDpIDCutPQ->Fill(nu.prob,nu.rw);
34335   hNMRecoEnPassDpIDCutPQ->Fill(nu.energy,nu.rw);
34336   hNMTrueEnPassDpIDCutPQ->Fill(nu.energyMC,nu.rw);
34337   }
34338   else if (nu.charge==-1){
34339   hNMProbPassDpIDCutNQ->Fill(nu.prob,nu.rw);
34340   hNMRecoEnPassDpIDCutNQ->Fill(nu.energy,nu.rw);
34341   hNMTrueEnPassDpIDCutNQ->Fill(nu.energyMC,nu.rw);
34342   }
34343   }
34344   else if (nu.inu==-14){//NuMuBar
34345   if (nu.charge==+1) {
34346   hNMBProbPassDpIDCutPQ->Fill(nu.prob,nu.rw);
34347   hNMBRecoEnPassDpIDCutPQ->Fill(nu.energy,nu.rw);
34348   hNMBTrueEnPassDpIDCutPQ->Fill(nu.energyMC,nu.rw);
34349   }
34350   else if (nu.charge==-1){
34351   hNMBProbPassDpIDCutNQ->Fill(nu.prob,nu.rw);
34352   hNMBRecoEnPassDpIDCutNQ->Fill(nu.energy,nu.rw);
34353   hNMBTrueEnPassDpIDCutNQ->Fill(nu.energyMC,nu.rw);
34354   }
34355   }
34356   }
34357 
34358   //all but NuMu/NuMuBar CC
34359   if (!(nu.iaction==1 && (nu.inu==14 || nu.inu==-14))) {
34360   if (nu.charge==+1) {
34361   hAllShwProbPassDpIDCutPQ->Fill(nu.prob,nu.rw);
34362   }
34363   else if (nu.charge==-1){
34364   hAllShwProbPassDpIDCutNQ->Fill(nu.prob,nu.rw);
34365   }
34366   }
34367   */
34368 }

void NuPlots::FillDPIdSigmaQPPassPreSelCutPlots ( const NuEvent nu  )  const

Definition at line 36572 of file NuPlots.cxx.

References NuEvent::charge, NuEvent::chi2PerNdof, NuEvent::dpID, NuEvent::energy, NuEvent::energyMC, NuEvent::iaction, NuEvent::inu, Msg::kDebug, Msg::kWarning, MAXMSG, MSG, NuEvent::prob, NuEvent::rw, NuEvent::sigqp_qp, and NuEvent::y.

Referenced by NuAnalysis::ChargeSeparationOneSnarl(), NuCutImps::NuCutsSelection::MakePostPreSelectionPlots(), and NuAnalysis::NMBSummaryTreeAna().

36573 {
36574   //PQ
36575   static TH1F* hSigqp_qpPassPreSelCutPQN=0;
36576   static TH1F* hChi2PassPreSelCutPQN=0;
36577   static TH1F* hProbPassPreSelCutPQN=0;
36578   static TH1F* hDpIDPassPreSelCutPQN=0;
36579   static TH1F* hRecoEnPassPreSelCutPQ=0;
36580   static TH1F* hRecoYPassPreSelCutPQ=0;
36581 
36582   static TH1F* hNMProbPassPreSelCutPQ=0;
36583   static TH1F* hNMBProbPassPreSelCutPQ=0;
36584   static TH1F* hAllShwProbPassPreSelCutPQ=0;
36585 
36586   static TH1F* hNMRecoEnPassPreSelCutPQ=0;
36587   static TH1F* hNMTrueEnPassPreSelCutPQ=0;
36588   static TH1F* hNMBRecoEnPassPreSelCutPQ=0;
36589   static TH1F* hNMBTrueEnPassPreSelCutPQ=0;
36590   static TH1F* hAllNCRecoEnPassPreSelCutPQ=0;
36591   static TH1F* hAllNCTrueEnPassPreSelCutPQ=0;
36592   static TH1F* hAllShwRecoEnPassPreSelCutPQ=0;
36593   static TH1F* hAllShwTrueEnPassPreSelCutPQ=0;
36594   static TH1F* hNotNMBRecoEnPassPreSelCutPQ=0;
36595   static TH1F* hNotNMBTrueEnPassPreSelCutPQ=0;
36596   static TH1F* hNotNMRecoEnPassPreSelCutPQ=0;
36597   static TH1F* hNotNMTrueEnPassPreSelCutPQ=0;
36598 
36599   //NQ
36600   static TH1F* hSigqp_qpPassPreSelCutNQN=0;
36601   static TH1F* hChi2PassPreSelCutNQN=0;
36602   static TH1F* hProbPassPreSelCutNQN=0;
36603   static TH1F* hDpIDPassPreSelCutNQN=0;
36604   static TH1F* hRecoEnPassPreSelCutNQ=0;
36605   static TH1F* hRecoYPassPreSelCutNQ=0;
36606 
36607   static TH1F* hNMProbPassPreSelCutNQ=0;
36608   static TH1F* hNMBProbPassPreSelCutNQ=0;
36609   static TH1F* hAllShwProbPassPreSelCutNQ=0;
36610 
36611   static TH1F* hNMBRecoEnPassPreSelCutNQ=0;
36612   static TH1F* hNMBTrueEnPassPreSelCutNQ=0;
36613   static TH1F* hNMRecoEnPassPreSelCutNQ=0;
36614   static TH1F* hNMTrueEnPassPreSelCutNQ=0;
36615   static TH1F* hAllNCRecoEnPassPreSelCutNQ=0;
36616   static TH1F* hAllNCTrueEnPassPreSelCutNQ=0;
36617   static TH1F* hAllShwRecoEnPassPreSelCutNQ=0;
36618   static TH1F* hAllShwTrueEnPassPreSelCutNQ=0;
36619   static TH1F* hNotNMBRecoEnPassPreSelCutNQ=0;
36620   static TH1F* hNotNMBTrueEnPassPreSelCutNQ=0;
36621   static TH1F* hNotNMRecoEnPassPreSelCutNQ=0;
36622   static TH1F* hNotNMTrueEnPassPreSelCutNQ=0;
36623 
36624 
36625   if (!hChi2PassPreSelCutNQN){
36626     MAXMSG("NuPlots",Msg::kDebug,1)
36627       <<"Creating DPIdSigmaQPPassPreSelCutPlots plots..."<<endl;
36628 
36629     //PQ
36630     hSigqp_qpPassPreSelCutPQN=new TH1F("hSigqp_qpPassPreSelCutPQN","hSigqp_qpPassPreSelCutPQN",800*160,-160,160);
36631     hSigqp_qpPassPreSelCutPQN->GetXaxis()->SetTitle("#sigma(Q/P)/(Q/P)");
36632     hSigqp_qpPassPreSelCutPQN->GetXaxis()->CenterTitle();
36633     hSigqp_qpPassPreSelCutPQN->GetYaxis()->SetTitle("");
36634     hSigqp_qpPassPreSelCutPQN->GetYaxis()->CenterTitle();
36635     hSigqp_qpPassPreSelCutPQN->SetFillColor(0);
36636     hSigqp_qpPassPreSelCutPQN->SetLineColor(1);
36637     hSigqp_qpPassPreSelCutPQN->SetLineWidth(2);
36638     hSigqp_qpPassPreSelCutPQN->SetLineStyle(2);
36639     //hSigqp_qpPassPreSelCutPQN->SetBit(TH1::kCanRebin);
36640 
36641     hChi2PassPreSelCutPQN=new TH1F("hChi2PassPreSelCutPQN","hChi2PassPreSelCutPQN",10*176,-16,160);
36642     hChi2PassPreSelCutPQN->GetXaxis()->SetTitle("#chi^{2}/ndof");
36643     hChi2PassPreSelCutPQN->GetXaxis()->CenterTitle();
36644     hChi2PassPreSelCutPQN->GetYaxis()->SetTitle("");
36645     hChi2PassPreSelCutPQN->GetYaxis()->CenterTitle();
36646     hChi2PassPreSelCutPQN->SetFillColor(0);
36647     hChi2PassPreSelCutPQN->SetLineColor(1);
36648     hChi2PassPreSelCutPQN->SetLineWidth(2);
36649     hChi2PassPreSelCutPQN->SetLineStyle(2);
36650     //hChi2PassPreSelCutPQN->SetBit(TH1::kCanRebin);
36651 
36652     hProbPassPreSelCutPQN=new TH1F("hProbPassPreSelCutPQN","hProbPassPreSelCutPQN",14000,-0.2,1.2);
36653     hProbPassPreSelCutPQN->GetXaxis()->SetTitle("Fit Probability");
36654     hProbPassPreSelCutPQN->GetXaxis()->CenterTitle();
36655     hProbPassPreSelCutPQN->GetYaxis()->SetTitle("");
36656     hProbPassPreSelCutPQN->GetYaxis()->CenterTitle();
36657     hProbPassPreSelCutPQN->SetFillColor(0);
36658     hProbPassPreSelCutPQN->SetLineColor(1);
36659     hProbPassPreSelCutPQN->SetLineWidth(2);
36660     hProbPassPreSelCutPQN->SetLineStyle(2);
36661     //hProbPassPreSelCutPQN->SetBit(TH1::kCanRebin);
36662 
36663     hDpIDPassPreSelCutPQN=new TH1F("hDpIDPassPreSelCutPQN","hDpIDPassPreSelCutPQN",4*160,-1.6,1.6);
36664     hDpIDPassPreSelCutPQN->GetXaxis()->SetTitle("PID (from MadDpID)");
36665     hDpIDPassPreSelCutPQN->GetXaxis()->CenterTitle();
36666     hDpIDPassPreSelCutPQN->GetYaxis()->SetTitle("");
36667     hDpIDPassPreSelCutPQN->GetYaxis()->CenterTitle();
36668     hDpIDPassPreSelCutPQN->SetFillColor(0);
36669     hDpIDPassPreSelCutPQN->SetLineColor(1);
36670     hDpIDPassPreSelCutPQN->SetLineWidth(2);
36671     //hDpIDPassPreSelCutPQN->SetBit(TH1::kCanRebin);
36672 
36673     hRecoEnPassPreSelCutPQ=new TH1F("hRecoEnPassPreSelCutPQ","hRecoEnPassPreSelCutPQ",
36674                                     4*352,-32,320);
36675     hRecoEnPassPreSelCutPQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
36676     hRecoEnPassPreSelCutPQ->GetXaxis()->CenterTitle();
36677     hRecoEnPassPreSelCutPQ->GetYaxis()->SetTitle("");
36678     hRecoEnPassPreSelCutPQ->GetYaxis()->CenterTitle();
36679     hRecoEnPassPreSelCutPQ->SetFillColor(0);
36680     hRecoEnPassPreSelCutPQ->SetLineColor(1);
36681     //hRecoEnPassPreSelCutPQ->SetBit(TH1::kCanRebin);
36682 
36683     hRecoYPassPreSelCutPQ=new TH1F("hRecoYPassPreSelCutPQ","hRecoYPassPreSelCutPQ",
36684                                    1400,-0.2,1.2);
36685     hRecoYPassPreSelCutPQ->GetXaxis()->SetTitle("Reconstructed y");
36686     hRecoYPassPreSelCutPQ->GetXaxis()->CenterTitle();
36687     hRecoYPassPreSelCutPQ->GetYaxis()->SetTitle("");
36688     hRecoYPassPreSelCutPQ->GetYaxis()->CenterTitle();
36689     hRecoYPassPreSelCutPQ->SetFillColor(0);
36690     hRecoYPassPreSelCutPQ->SetLineColor(1);
36691     //hRecoYPassPreSelCutPQ->SetBit(TH1::kCanRebin);
36692 
36693 
36694     hNMProbPassPreSelCutPQ=new TH1F
36695       ("hNMProbPassPreSelCutPQ","hNMProbPassPreSelCutPQ",14000,-0.2,1.2);
36696     hNMProbPassPreSelCutPQ->GetXaxis()->SetTitle("Fit Probability");
36697     hNMProbPassPreSelCutPQ->GetXaxis()->CenterTitle();
36698     hNMProbPassPreSelCutPQ->GetYaxis()->SetTitle("");
36699     hNMProbPassPreSelCutPQ->GetYaxis()->CenterTitle();
36700     hNMProbPassPreSelCutPQ->SetFillColor(0);
36701     hNMProbPassPreSelCutPQ->SetLineColor(1);
36702     hNMProbPassPreSelCutPQ->SetLineWidth(2);
36703     hNMProbPassPreSelCutPQ->SetLineStyle(2);
36704     //hNMProbPassPreSelCutPQ->SetBit(TH1::kCanRebin);
36705 
36706     hNMBProbPassPreSelCutPQ=new TH1F
36707       ("hNMBProbPassPreSelCutPQ","hNMBProbPassPreSelCutPQ",14000,-0.2,1.2);
36708     hNMBProbPassPreSelCutPQ->GetXaxis()->SetTitle("Fit Probability");
36709     hNMBProbPassPreSelCutPQ->GetXaxis()->CenterTitle();
36710     hNMBProbPassPreSelCutPQ->GetYaxis()->SetTitle("");
36711     hNMBProbPassPreSelCutPQ->GetYaxis()->CenterTitle();
36712     hNMBProbPassPreSelCutPQ->SetFillColor(0);
36713     hNMBProbPassPreSelCutPQ->SetLineColor(1);
36714     hNMBProbPassPreSelCutPQ->SetLineWidth(2);
36715     hNMBProbPassPreSelCutPQ->SetLineStyle(2);
36716     //hNMBProbPassPreSelCutPQ->SetBit(TH1::kCanRebin);
36717 
36718     hAllShwProbPassPreSelCutPQ=new TH1F
36719       ("hAllShwProbPassPreSelCutPQ",
36720        "hAllShwProbPassPreSelCutPQ",14000,-0.2,1.2);
36721     hAllShwProbPassPreSelCutPQ->GetXaxis()->SetTitle("Fit Probability");
36722     hAllShwProbPassPreSelCutPQ->GetXaxis()->CenterTitle();
36723     hAllShwProbPassPreSelCutPQ->GetYaxis()->SetTitle("");
36724     hAllShwProbPassPreSelCutPQ->GetYaxis()->CenterTitle();
36725     hAllShwProbPassPreSelCutPQ->SetFillColor(0);
36726     hAllShwProbPassPreSelCutPQ->SetLineColor(1);
36727     hAllShwProbPassPreSelCutPQ->SetLineWidth(2);
36728     hAllShwProbPassPreSelCutPQ->SetLineStyle(2);
36729     //hAllShwProbPassPreSelCutPQ->SetBit(TH1::kCanRebin);
36730 
36731 
36732 
36733     hNMRecoEnPassPreSelCutPQ=new TH1F
36734       ("hNMRecoEnPassPreSelCutPQ","hNMRecoEnPassPreSelCutPQ",
36735        4*352,-32,320);
36736     hNMRecoEnPassPreSelCutPQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
36737     hNMRecoEnPassPreSelCutPQ->GetXaxis()->CenterTitle();
36738     hNMRecoEnPassPreSelCutPQ->GetYaxis()->SetTitle("");
36739     hNMRecoEnPassPreSelCutPQ->GetYaxis()->CenterTitle();
36740     hNMRecoEnPassPreSelCutPQ->SetFillColor(0);
36741     hNMRecoEnPassPreSelCutPQ->SetLineColor(1);
36742     //hNMRecoEnPassPreSelCutPQ->SetBit(TH1::kCanRebin);
36743 
36744     hNMTrueEnPassPreSelCutPQ=new TH1F
36745       ("hNMTrueEnPassPreSelCutPQ","hNMTrueEnPassPreSelCutPQ",
36746        4*352,-32,320);
36747     hNMTrueEnPassPreSelCutPQ->GetXaxis()->SetTitle("True Energy (GeV)");
36748     hNMTrueEnPassPreSelCutPQ->GetXaxis()->CenterTitle();
36749     hNMTrueEnPassPreSelCutPQ->GetYaxis()->SetTitle("");
36750     hNMTrueEnPassPreSelCutPQ->GetYaxis()->CenterTitle();
36751     hNMTrueEnPassPreSelCutPQ->SetFillColor(0);
36752     hNMTrueEnPassPreSelCutPQ->SetLineColor(1);
36753     //hNMTrueEnPassPreSelCutPQ->SetBit(TH1::kCanRebin);
36754 
36755     hNMBRecoEnPassPreSelCutPQ=new TH1F("hNMBRecoEnPassPreSelCutPQ",
36756                                        "hNMBRecoEnPassPreSelCutPQ",
36757                                        4*352,-32,320);
36758     hNMBRecoEnPassPreSelCutPQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
36759     hNMBRecoEnPassPreSelCutPQ->GetXaxis()->CenterTitle();
36760     hNMBRecoEnPassPreSelCutPQ->GetYaxis()->SetTitle("");
36761     hNMBRecoEnPassPreSelCutPQ->GetYaxis()->CenterTitle();
36762     hNMBRecoEnPassPreSelCutPQ->SetFillColor(0);
36763     hNMBRecoEnPassPreSelCutPQ->SetLineColor(1);
36764     //hNMBRecoEnPassPreSelCutPQ->SetBit(TH1::kCanRebin);
36765 
36766     hNMBTrueEnPassPreSelCutPQ=new TH1F
36767       ("hNMBTrueEnPassPreSelCutPQ","hNMBTrueEnPassPreSelCutPQ",
36768        4*352,-32,320);
36769     hNMBTrueEnPassPreSelCutPQ->GetXaxis()->SetTitle("True Energy (GeV)");
36770     hNMBTrueEnPassPreSelCutPQ->GetXaxis()->CenterTitle();
36771     hNMBTrueEnPassPreSelCutPQ->GetYaxis()->SetTitle("");
36772     hNMBTrueEnPassPreSelCutPQ->GetYaxis()->CenterTitle();
36773     hNMBTrueEnPassPreSelCutPQ->SetFillColor(0);
36774     hNMBTrueEnPassPreSelCutPQ->SetLineColor(1);
36775     //hNMBTrueEnPassPreSelCutPQ->SetBit(TH1::kCanRebin);
36776 
36777     hAllNCRecoEnPassPreSelCutPQ=new TH1F("hAllNCRecoEnPassPreSelCutPQ",
36778                                          "hAllNCRecoEnPassPreSelCutPQ",
36779                                          4*352,-32,320);
36780     hAllNCRecoEnPassPreSelCutPQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
36781     hAllNCRecoEnPassPreSelCutPQ->GetXaxis()->CenterTitle();
36782     hAllNCRecoEnPassPreSelCutPQ->GetYaxis()->SetTitle("");
36783     hAllNCRecoEnPassPreSelCutPQ->GetYaxis()->CenterTitle();
36784     hAllNCRecoEnPassPreSelCutPQ->SetFillColor(0);
36785     hAllNCRecoEnPassPreSelCutPQ->SetLineColor(1);
36786     //hAllNCRecoEnPassPreSelCutPQ->SetBit(TH1::kCanRebin);
36787 
36788     hAllNCTrueEnPassPreSelCutPQ=new TH1F
36789       ("hAllNCTrueEnPassPreSelCutPQ","hAllNCTrueEnPassPreSelCutPQ",
36790        4*352,-32,320);
36791     hAllNCTrueEnPassPreSelCutPQ->GetXaxis()->SetTitle("True Energy (GeV)");
36792     hAllNCTrueEnPassPreSelCutPQ->GetXaxis()->CenterTitle();
36793     hAllNCTrueEnPassPreSelCutPQ->GetYaxis()->SetTitle("");
36794     hAllNCTrueEnPassPreSelCutPQ->GetYaxis()->CenterTitle();
36795     hAllNCTrueEnPassPreSelCutPQ->SetFillColor(0);
36796     hAllNCTrueEnPassPreSelCutPQ->SetLineColor(1);
36797     //hAllNCTrueEnPassPreSelCutPQ->SetBit(TH1::kCanRebin);
36798 
36799     hAllShwRecoEnPassPreSelCutPQ=new TH1F("hAllShwRecoEnPassPreSelCutPQ",
36800                                           "hAllShwRecoEnPassPreSelCutPQ",
36801                                           4*352,-32,320);
36802     hAllShwRecoEnPassPreSelCutPQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
36803     hAllShwRecoEnPassPreSelCutPQ->GetXaxis()->CenterTitle();
36804     hAllShwRecoEnPassPreSelCutPQ->GetYaxis()->SetTitle("");
36805     hAllShwRecoEnPassPreSelCutPQ->GetYaxis()->CenterTitle();
36806     hAllShwRecoEnPassPreSelCutPQ->SetFillColor(0);
36807     hAllShwRecoEnPassPreSelCutPQ->SetLineColor(1);
36808     //hAllShwRecoEnPassPreSelCutPQ->SetBit(TH1::kCanRebin);
36809 
36810     hAllShwTrueEnPassPreSelCutPQ=new TH1F
36811       ("hAllShwTrueEnPassPreSelCutPQ","hAllShwTrueEnPassPreSelCutPQ",
36812        4*352,-32,320);
36813     hAllShwTrueEnPassPreSelCutPQ->GetXaxis()->SetTitle("True Energy (GeV)");
36814     hAllShwTrueEnPassPreSelCutPQ->GetXaxis()->CenterTitle();
36815     hAllShwTrueEnPassPreSelCutPQ->GetYaxis()->SetTitle("");
36816     hAllShwTrueEnPassPreSelCutPQ->GetYaxis()->CenterTitle();
36817     hAllShwTrueEnPassPreSelCutPQ->SetFillColor(0);
36818     hAllShwTrueEnPassPreSelCutPQ->SetLineColor(1);
36819     //hAllShwTrueEnPassPreSelCutPQ->SetBit(TH1::kCanRebin);
36820 
36821     hNotNMRecoEnPassPreSelCutPQ=new TH1F
36822       ("hNotNMRecoEnPassPreSelCutPQ","hNotNMRecoEnPassPreSelCutPQ",
36823        4*352,-32,320);
36824     hNotNMRecoEnPassPreSelCutPQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
36825     hNotNMRecoEnPassPreSelCutPQ->GetXaxis()->CenterTitle();
36826     hNotNMRecoEnPassPreSelCutPQ->GetYaxis()->SetTitle("");
36827     hNotNMRecoEnPassPreSelCutPQ->GetYaxis()->CenterTitle();
36828     hNotNMRecoEnPassPreSelCutPQ->SetFillColor(0);
36829     hNotNMRecoEnPassPreSelCutPQ->SetLineColor(1);
36830     //hNotNMRecoEnPassPreSelCutPQ->SetBit(TH1::kCanRebin);
36831 
36832     hNotNMTrueEnPassPreSelCutPQ=new TH1F
36833       ("hNotNMTrueEnPassPreSelCutPQ","hNotNMTrueEnPassPreSelCutPQ",
36834        4*352,-32,320);
36835     hNotNMTrueEnPassPreSelCutPQ->GetXaxis()->SetTitle("True Energy (GeV)");
36836     hNotNMTrueEnPassPreSelCutPQ->GetXaxis()->CenterTitle();
36837     hNotNMTrueEnPassPreSelCutPQ->GetYaxis()->SetTitle("");
36838     hNotNMTrueEnPassPreSelCutPQ->GetYaxis()->CenterTitle();
36839     hNotNMTrueEnPassPreSelCutPQ->SetFillColor(0);
36840     hNotNMTrueEnPassPreSelCutPQ->SetLineColor(1);
36841     //hNotNMTrueEnPassPreSelCutPQ->SetBit(TH1::kCanRebin);
36842 
36843     hNotNMBRecoEnPassPreSelCutPQ=new TH1F("hNotNMBRecoEnPassPreSelCutPQ",
36844                                           "hNotNMBRecoEnPassPreSelCutPQ",
36845                                           4*352,-32,320);
36846     hNotNMBRecoEnPassPreSelCutPQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
36847     hNotNMBRecoEnPassPreSelCutPQ->GetXaxis()->CenterTitle();
36848     hNotNMBRecoEnPassPreSelCutPQ->GetYaxis()->SetTitle("");
36849     hNotNMBRecoEnPassPreSelCutPQ->GetYaxis()->CenterTitle();
36850     hNotNMBRecoEnPassPreSelCutPQ->SetFillColor(0);
36851     hNotNMBRecoEnPassPreSelCutPQ->SetLineColor(1);
36852     //hNotNMBRecoEnPassPreSelCutPQ->SetBit(TH1::kCanRebin);
36853 
36854     hNotNMBTrueEnPassPreSelCutPQ=new TH1F
36855       ("hNotNMBTrueEnPassPreSelCutPQ","hNotNMBTrueEnPassPreSelCutPQ",
36856        4*352,-32,320);
36857     hNotNMBTrueEnPassPreSelCutPQ->GetXaxis()->SetTitle("True Energy (GeV)");
36858     hNotNMBTrueEnPassPreSelCutPQ->GetXaxis()->CenterTitle();
36859     hNotNMBTrueEnPassPreSelCutPQ->GetYaxis()->SetTitle("");
36860     hNotNMBTrueEnPassPreSelCutPQ->GetYaxis()->CenterTitle();
36861     hNotNMBTrueEnPassPreSelCutPQ->SetFillColor(0);
36862     hNotNMBTrueEnPassPreSelCutPQ->SetLineColor(1);
36863     //hNotNMBTrueEnPassPreSelCutPQ->SetBit(TH1::kCanRebin);
36864 
36865 
36866 
36867 
36868     //NQ
36869     hSigqp_qpPassPreSelCutNQN=new TH1F("hSigqp_qpPassPreSelCutNQN","hSigqp_qpPassPreSelCutNQN",800*160,-160,160);
36870     hSigqp_qpPassPreSelCutNQN->GetXaxis()->SetTitle("#sigma(Q/P)/(Q/P)");
36871     hSigqp_qpPassPreSelCutNQN->GetXaxis()->CenterTitle();
36872     hSigqp_qpPassPreSelCutNQN->GetYaxis()->SetTitle("");
36873     hSigqp_qpPassPreSelCutNQN->GetYaxis()->CenterTitle();
36874     hSigqp_qpPassPreSelCutNQN->SetFillColor(0);
36875     hSigqp_qpPassPreSelCutNQN->SetLineColor(1);
36876     hSigqp_qpPassPreSelCutNQN->SetLineWidth(2);
36877     hSigqp_qpPassPreSelCutNQN->SetLineStyle(2);
36878     //hSigqp_qpPassPreSelCutNQN->SetBit(TH1::kCanRebin);
36879 
36880     hChi2PassPreSelCutNQN=new TH1F("hChi2PassPreSelCutNQN","hChi2PassPreSelCutNQN",10*176,-16,160);
36881     hChi2PassPreSelCutNQN->GetXaxis()->SetTitle("#chi^{2}/ndof");
36882     hChi2PassPreSelCutNQN->GetXaxis()->CenterTitle();
36883     hChi2PassPreSelCutNQN->GetYaxis()->SetTitle("");
36884     hChi2PassPreSelCutNQN->GetYaxis()->CenterTitle();
36885     hChi2PassPreSelCutNQN->SetFillColor(0);
36886     hChi2PassPreSelCutNQN->SetLineColor(1);
36887     hChi2PassPreSelCutNQN->SetLineWidth(2);
36888     hChi2PassPreSelCutNQN->SetLineStyle(2);
36889     //hChi2PassPreSelCutNQN->SetBit(TH1::kCanRebin);
36890 
36891     hProbPassPreSelCutNQN=new TH1F("hProbPassPreSelCutNQN","hProbPassPreSelCutNQN",14000,-0.2,1.2);
36892     hProbPassPreSelCutNQN->GetXaxis()->SetTitle("Fit Probability");
36893     hProbPassPreSelCutNQN->GetXaxis()->CenterTitle();
36894     hProbPassPreSelCutNQN->GetYaxis()->SetTitle("");
36895     hProbPassPreSelCutNQN->GetYaxis()->CenterTitle();
36896     hProbPassPreSelCutNQN->SetFillColor(0);
36897     hProbPassPreSelCutNQN->SetLineColor(1);
36898     hProbPassPreSelCutNQN->SetLineWidth(2);
36899     hProbPassPreSelCutNQN->SetLineStyle(2);
36900     //hProbPassPreSelCutNQN->SetBit(TH1::kCanRebin);
36901 
36902     hDpIDPassPreSelCutNQN=new TH1F("hDpIDPassPreSelCutNQN","hDpIDPassPreSelCutNQN",4*160,-1.6,1.6);
36903     hDpIDPassPreSelCutNQN->GetXaxis()->SetTitle("PID (from MadDpID)");
36904     hDpIDPassPreSelCutNQN->GetXaxis()->CenterTitle();
36905     hDpIDPassPreSelCutNQN->GetYaxis()->SetTitle("");
36906     hDpIDPassPreSelCutNQN->GetYaxis()->CenterTitle();
36907     hDpIDPassPreSelCutNQN->SetFillColor(0);
36908     hDpIDPassPreSelCutNQN->SetLineColor(1);
36909     hDpIDPassPreSelCutNQN->SetLineWidth(2);
36910     //hDpIDPassPreSelCutNQN->SetBit(TH1::kCanRebin);
36911 
36912     hRecoEnPassPreSelCutNQ=new TH1F("hRecoEnPassPreSelCutNQ","hRecoEnPassPreSelCutNQ",
36913                                     4*352,-32,320);
36914     hRecoEnPassPreSelCutNQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
36915     hRecoEnPassPreSelCutNQ->GetXaxis()->CenterTitle();
36916     hRecoEnPassPreSelCutNQ->GetYaxis()->SetTitle("");
36917     hRecoEnPassPreSelCutNQ->GetYaxis()->CenterTitle();
36918     hRecoEnPassPreSelCutNQ->SetFillColor(0);
36919     hRecoEnPassPreSelCutNQ->SetLineColor(1);
36920     //hRecoEnPassPreSelCutNQ->SetBit(TH1::kCanRebin);
36921 
36922     hRecoYPassPreSelCutNQ=new TH1F("hRecoYPassPreSelCutNQ","hRecoYPassPreSelCutNQ",
36923                                    1400,-0.2,1.2);
36924     hRecoYPassPreSelCutNQ->GetXaxis()->SetTitle("Reconstructed y");
36925     hRecoYPassPreSelCutNQ->GetXaxis()->CenterTitle();
36926     hRecoYPassPreSelCutNQ->GetYaxis()->SetTitle("");
36927     hRecoYPassPreSelCutNQ->GetYaxis()->CenterTitle();
36928     hRecoYPassPreSelCutNQ->SetFillColor(0);
36929     hRecoYPassPreSelCutNQ->SetLineColor(1);
36930     //hRecoYPassPreSelCutNQ->SetBit(TH1::kCanRebin);
36931 
36932 
36933     hNMProbPassPreSelCutNQ=new TH1F
36934       ("hNMProbPassPreSelCutNQ","hNMProbPassPreSelCutNQ",14000,-0.2,1.2);
36935     hNMProbPassPreSelCutNQ->GetXaxis()->SetTitle("Fit Probability");
36936     hNMProbPassPreSelCutNQ->GetXaxis()->CenterTitle();
36937     hNMProbPassPreSelCutNQ->GetYaxis()->SetTitle("");
36938     hNMProbPassPreSelCutNQ->GetYaxis()->CenterTitle();
36939     hNMProbPassPreSelCutNQ->SetFillColor(0);
36940     hNMProbPassPreSelCutNQ->SetLineColor(1);
36941     hNMProbPassPreSelCutNQ->SetLineWidth(2);
36942     hNMProbPassPreSelCutNQ->SetLineStyle(2);
36943     //hNMProbPassPreSelCutNQ->SetBit(TH1::kCanRebin);
36944 
36945     hNMBProbPassPreSelCutNQ=new TH1F
36946       ("hNMBProbPassPreSelCutNQ","hNMBProbPassPreSelCutNQ",14000,-0.2,1.2);
36947     hNMBProbPassPreSelCutNQ->GetXaxis()->SetTitle("Fit Probability");
36948     hNMBProbPassPreSelCutNQ->GetXaxis()->CenterTitle();
36949     hNMBProbPassPreSelCutNQ->GetYaxis()->SetTitle("");
36950     hNMBProbPassPreSelCutNQ->GetYaxis()->CenterTitle();
36951     hNMBProbPassPreSelCutNQ->SetFillColor(0);
36952     hNMBProbPassPreSelCutNQ->SetLineColor(1);
36953     hNMBProbPassPreSelCutNQ->SetLineWidth(2);
36954     hNMBProbPassPreSelCutNQ->SetLineStyle(2);
36955     //hNMBProbPassPreSelCutNQ->SetBit(TH1::kCanRebin);
36956 
36957     hAllShwProbPassPreSelCutNQ=new TH1F
36958       ("hAllShwProbPassPreSelCutNQ",
36959        "hAllShwProbPassPreSelCutNQ",14000,-0.2,1.2);
36960     hAllShwProbPassPreSelCutNQ->GetXaxis()->SetTitle("Fit Probability");
36961     hAllShwProbPassPreSelCutNQ->GetXaxis()->CenterTitle();
36962     hAllShwProbPassPreSelCutNQ->GetYaxis()->SetTitle("");
36963     hAllShwProbPassPreSelCutNQ->GetYaxis()->CenterTitle();
36964     hAllShwProbPassPreSelCutNQ->SetFillColor(0);
36965     hAllShwProbPassPreSelCutNQ->SetLineColor(1);
36966     hAllShwProbPassPreSelCutNQ->SetLineWidth(2);
36967     hAllShwProbPassPreSelCutNQ->SetLineStyle(2);
36968     //hAllShwProbPassPreSelCutNQ->SetBit(TH1::kCanRebin);
36969 
36970 
36971     hNMRecoEnPassPreSelCutNQ=new TH1F
36972       ("hNMRecoEnPassPreSelCutNQ","hNMRecoEnPassPreSelCutNQ",4*352,-32,320);
36973     hNMRecoEnPassPreSelCutNQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
36974     hNMRecoEnPassPreSelCutNQ->GetXaxis()->CenterTitle();
36975     hNMRecoEnPassPreSelCutNQ->GetYaxis()->SetTitle("");
36976     hNMRecoEnPassPreSelCutNQ->GetYaxis()->CenterTitle();
36977     hNMRecoEnPassPreSelCutNQ->SetFillColor(0);
36978     hNMRecoEnPassPreSelCutNQ->SetLineColor(1);
36979     //hNMRecoEnPassPreSelCutNQ->SetBit(TH1::kCanRebin);
36980 
36981     hNMTrueEnPassPreSelCutNQ=new TH1F
36982       ("hNMTrueEnPassPreSelCutNQ","hNMTrueEnPassPreSelCutNQ",4*352,-32,320);
36983     hNMTrueEnPassPreSelCutNQ->GetXaxis()->SetTitle("True Energy (GeV)");
36984     hNMTrueEnPassPreSelCutNQ->GetXaxis()->CenterTitle();
36985     hNMTrueEnPassPreSelCutNQ->GetYaxis()->SetTitle("");
36986     hNMTrueEnPassPreSelCutNQ->GetYaxis()->CenterTitle();
36987     hNMTrueEnPassPreSelCutNQ->SetFillColor(0);
36988     hNMTrueEnPassPreSelCutNQ->SetLineColor(1);
36989     //hNMTrueEnPassPreSelCutNQ->SetBit(TH1::kCanRebin);
36990 
36991     hNMBRecoEnPassPreSelCutNQ=new TH1F("hNMBRecoEnPassPreSelCutNQ",
36992                                        "hNMBRecoEnPassPreSelCutNQ",
36993                                        4*352,-32,320);
36994     hNMBRecoEnPassPreSelCutNQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
36995     hNMBRecoEnPassPreSelCutNQ->GetXaxis()->CenterTitle();
36996     hNMBRecoEnPassPreSelCutNQ->GetYaxis()->SetTitle("");
36997     hNMBRecoEnPassPreSelCutNQ->GetYaxis()->CenterTitle();
36998     hNMBRecoEnPassPreSelCutNQ->SetFillColor(0);
36999     hNMBRecoEnPassPreSelCutNQ->SetLineColor(1);
37000     //hNMBRecoEnPassPreSelCutNQ->SetBit(TH1::kCanRebin);
37001 
37002     hNMBTrueEnPassPreSelCutNQ=new TH1F
37003       ("hNMBTrueEnPassPreSelCutNQ","hNMBTrueEnPassPreSelCutNQ",
37004        4*352,-32,320);
37005     hNMBTrueEnPassPreSelCutNQ->GetXaxis()->SetTitle("True Energy (GeV)");
37006     hNMBTrueEnPassPreSelCutNQ->GetXaxis()->CenterTitle();
37007     hNMBTrueEnPassPreSelCutNQ->GetYaxis()->SetTitle("");
37008     hNMBTrueEnPassPreSelCutNQ->GetYaxis()->CenterTitle();
37009     hNMBTrueEnPassPreSelCutNQ->SetFillColor(0);
37010     hNMBTrueEnPassPreSelCutNQ->SetLineColor(1);
37011     //hNMBTrueEnPassPreSelCutNQ->SetBit(TH1::kCanRebin);
37012 
37013 
37014 
37015     hAllNCRecoEnPassPreSelCutNQ=new TH1F("hAllNCRecoEnPassPreSelCutNQ",
37016                                          "hAllNCRecoEnPassPreSelCutNQ",
37017                                          4*352,-32,320);
37018     hAllNCRecoEnPassPreSelCutNQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
37019     hAllNCRecoEnPassPreSelCutNQ->GetXaxis()->CenterTitle();
37020     hAllNCRecoEnPassPreSelCutNQ->GetYaxis()->SetTitle("");
37021     hAllNCRecoEnPassPreSelCutNQ->GetYaxis()->CenterTitle();
37022     hAllNCRecoEnPassPreSelCutNQ->SetFillColor(0);
37023     hAllNCRecoEnPassPreSelCutNQ->SetLineColor(1);
37024     //hAllNCRecoEnPassPreSelCutNQ->SetBit(TH1::kCanRebin);
37025 
37026     hAllNCTrueEnPassPreSelCutNQ=new TH1F
37027       ("hAllNCTrueEnPassPreSelCutNQ","hAllNCTrueEnPassPreSelCutNQ",
37028        4*352,-32,320);
37029     hAllNCTrueEnPassPreSelCutNQ->GetXaxis()->SetTitle("True Energy (GeV)");
37030     hAllNCTrueEnPassPreSelCutNQ->GetXaxis()->CenterTitle();
37031     hAllNCTrueEnPassPreSelCutNQ->GetYaxis()->SetTitle("");
37032     hAllNCTrueEnPassPreSelCutNQ->GetYaxis()->CenterTitle();
37033     hAllNCTrueEnPassPreSelCutNQ->SetFillColor(0);
37034     hAllNCTrueEnPassPreSelCutNQ->SetLineColor(1);
37035     //hAllNCTrueEnPassPreSelCutNQ->SetBit(TH1::kCanRebin);
37036 
37037     hAllShwRecoEnPassPreSelCutNQ=new TH1F("hAllShwRecoEnPassPreSelCutNQ",
37038                                           "hAllShwRecoEnPassPreSelCutNQ",
37039                                           4*352,-32,320);
37040     hAllShwRecoEnPassPreSelCutNQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
37041     hAllShwRecoEnPassPreSelCutNQ->GetXaxis()->CenterTitle();
37042     hAllShwRecoEnPassPreSelCutNQ->GetYaxis()->SetTitle("");
37043     hAllShwRecoEnPassPreSelCutNQ->GetYaxis()->CenterTitle();
37044     hAllShwRecoEnPassPreSelCutNQ->SetFillColor(0);
37045     hAllShwRecoEnPassPreSelCutNQ->SetLineColor(1);
37046     //hAllShwRecoEnPassPreSelCutNQ->SetBit(TH1::kCanRebin);
37047 
37048     hAllShwTrueEnPassPreSelCutNQ=new TH1F
37049       ("hAllShwTrueEnPassPreSelCutNQ","hAllShwTrueEnPassPreSelCutNQ",
37050        4*352,-32,320);
37051     hAllShwTrueEnPassPreSelCutNQ->GetXaxis()->SetTitle("True Energy (GeV)");
37052     hAllShwTrueEnPassPreSelCutNQ->GetXaxis()->CenterTitle();
37053     hAllShwTrueEnPassPreSelCutNQ->GetYaxis()->SetTitle("");
37054     hAllShwTrueEnPassPreSelCutNQ->GetYaxis()->CenterTitle();
37055     hAllShwTrueEnPassPreSelCutNQ->SetFillColor(0);
37056     hAllShwTrueEnPassPreSelCutNQ->SetLineColor(1);
37057     //hAllShwTrueEnPassPreSelCutNQ->SetBit(TH1::kCanRebin);
37058 
37059     hNotNMRecoEnPassPreSelCutNQ=new TH1F
37060       ("hNotNMRecoEnPassPreSelCutNQ","hNotNMRecoEnPassPreSelCutNQ",
37061        4*352,-32,320);
37062     hNotNMRecoEnPassPreSelCutNQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
37063     hNotNMRecoEnPassPreSelCutNQ->GetXaxis()->CenterTitle();
37064     hNotNMRecoEnPassPreSelCutNQ->GetYaxis()->SetTitle("");
37065     hNotNMRecoEnPassPreSelCutNQ->GetYaxis()->CenterTitle();
37066     hNotNMRecoEnPassPreSelCutNQ->SetFillColor(0);
37067     hNotNMRecoEnPassPreSelCutNQ->SetLineColor(1);
37068     //hNotNMRecoEnPassPreSelCutNQ->SetBit(TH1::kCanRebin);
37069 
37070     hNotNMTrueEnPassPreSelCutNQ=new TH1F
37071       ("hNotNMTrueEnPassPreSelCutNQ","hNotNMTrueEnPassPreSelCutNQ",
37072        4*352,-32,320);
37073     hNotNMTrueEnPassPreSelCutNQ->GetXaxis()->SetTitle("True Energy (GeV)");
37074     hNotNMTrueEnPassPreSelCutNQ->GetXaxis()->CenterTitle();
37075     hNotNMTrueEnPassPreSelCutNQ->GetYaxis()->SetTitle("");
37076     hNotNMTrueEnPassPreSelCutNQ->GetYaxis()->CenterTitle();
37077     hNotNMTrueEnPassPreSelCutNQ->SetFillColor(0);
37078     hNotNMTrueEnPassPreSelCutNQ->SetLineColor(1);
37079     //hNotNMTrueEnPassPreSelCutNQ->SetBit(TH1::kCanRebin);
37080 
37081     hNotNMBRecoEnPassPreSelCutNQ=new TH1F("hNotNMBRecoEnPassPreSelCutNQ",
37082                                           "hNotNMBRecoEnPassPreSelCutNQ",
37083                                           4*352,-32,320);
37084     hNotNMBRecoEnPassPreSelCutNQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
37085     hNotNMBRecoEnPassPreSelCutNQ->GetXaxis()->CenterTitle();
37086     hNotNMBRecoEnPassPreSelCutNQ->GetYaxis()->SetTitle("");
37087     hNotNMBRecoEnPassPreSelCutNQ->GetYaxis()->CenterTitle();
37088     hNotNMBRecoEnPassPreSelCutNQ->SetFillColor(0);
37089     hNotNMBRecoEnPassPreSelCutNQ->SetLineColor(1);
37090     //hNotNMBRecoEnPassPreSelCutNQ->SetBit(TH1::kCanRebin);
37091 
37092     hNotNMBTrueEnPassPreSelCutNQ=new TH1F
37093       ("hNotNMBTrueEnPassPreSelCutNQ","hNotNMBTrueEnPassPreSelCutNQ",
37094        4*352,-32,320);
37095     hNotNMBTrueEnPassPreSelCutNQ->GetXaxis()->SetTitle("True Energy (GeV)");
37096     hNotNMBTrueEnPassPreSelCutNQ->GetXaxis()->CenterTitle();
37097     hNotNMBTrueEnPassPreSelCutNQ->GetYaxis()->SetTitle("");
37098     hNotNMBTrueEnPassPreSelCutNQ->GetYaxis()->CenterTitle();
37099     hNotNMBTrueEnPassPreSelCutNQ->SetFillColor(0);
37100     hNotNMBTrueEnPassPreSelCutNQ->SetLineColor(1);
37101     //hNotNMBTrueEnPassPreSelCutNQ->SetBit(TH1::kCanRebin);
37102   }
37103 
37104 
37105   //PQ
37106   if (nu.charge==+1){
37107     hSigqp_qpPassPreSelCutPQN->Fill(nu.sigqp_qp,nu.rw);
37108     hChi2PassPreSelCutPQN->Fill(nu.chi2PerNdof,nu.rw);
37109     hProbPassPreSelCutPQN->Fill(nu.prob,nu.rw);
37110     hDpIDPassPreSelCutPQN->Fill(nu.dpID,nu.rw);
37111 
37112     hRecoEnPassPreSelCutPQ->Fill(nu.energy,nu.rw);
37113     hRecoYPassPreSelCutPQ->Fill(nu.y,nu.rw);
37114   }
37115   //NQ
37116   else if (nu.charge==-1){
37117     hSigqp_qpPassPreSelCutNQN->Fill(nu.sigqp_qp,nu.rw);
37118     hChi2PassPreSelCutNQN->Fill(nu.chi2PerNdof,nu.rw);
37119     hProbPassPreSelCutNQN->Fill(nu.prob,nu.rw);
37120     hDpIDPassPreSelCutNQN->Fill(nu.dpID,nu.rw);
37121 
37122     hRecoEnPassPreSelCutNQ->Fill(nu.energy,nu.rw);
37123     hRecoYPassPreSelCutNQ->Fill(nu.y,nu.rw);
37124   }
37125   else MSG("NuPlots",Msg::kWarning)<<"Ahh, bad charge"<<endl;
37126 
37127 
37128   //now fill the truth plots
37129   if (nu.iaction==1){//CC
37130     if (nu.inu==14){//NuMu
37131       if (nu.charge==+1) {
37132         hNMProbPassPreSelCutPQ->Fill(nu.prob,nu.rw);
37133         hNMRecoEnPassPreSelCutPQ->Fill(nu.energy,nu.rw);
37134         hNMTrueEnPassPreSelCutPQ->Fill(nu.energyMC,nu.rw);
37135       }
37136       else if (nu.charge==-1){
37137         hNMProbPassPreSelCutNQ->Fill(nu.prob,nu.rw);
37138         hNMRecoEnPassPreSelCutNQ->Fill(nu.energy,nu.rw);
37139         hNMTrueEnPassPreSelCutNQ->Fill(nu.energyMC,nu.rw);
37140       }
37141     }
37142     else if (nu.inu==-14){//NuMuBar
37143       if (nu.charge==+1) {
37144         hNMBProbPassPreSelCutPQ->Fill(nu.prob,nu.rw);
37145         hNMBRecoEnPassPreSelCutPQ->Fill(nu.energy,nu.rw);
37146         hNMBTrueEnPassPreSelCutPQ->Fill(nu.energyMC,nu.rw);
37147       }
37148       else if (nu.charge==-1){
37149         hNMBProbPassPreSelCutNQ->Fill(nu.prob,nu.rw);
37150         hNMBRecoEnPassPreSelCutNQ->Fill(nu.energy,nu.rw);
37151         hNMBTrueEnPassPreSelCutNQ->Fill(nu.energyMC,nu.rw);
37152       }
37153     }
37154   }
37155   else if (nu.iaction==0){//NC
37156     if (nu.charge==+1) {
37157       hAllNCRecoEnPassPreSelCutPQ->Fill(nu.energy,nu.rw);
37158       hAllNCTrueEnPassPreSelCutPQ->Fill(nu.energyMC,nu.rw);
37159     }
37160     else if (nu.charge==-1){
37161       hAllNCRecoEnPassPreSelCutNQ->Fill(nu.energy,nu.rw);
37162       hAllNCTrueEnPassPreSelCutNQ->Fill(nu.energyMC,nu.rw);
37163     }
37164   }
37165 
37166   //all but NuMu/NuMuBar CC
37167   if (!(nu.iaction==1 && (nu.inu==14 || nu.inu==-14))) {
37168     if (nu.charge==+1) {
37169       hAllShwProbPassPreSelCutPQ->Fill(nu.prob,nu.rw);
37170       hAllShwRecoEnPassPreSelCutPQ->Fill(nu.energy,nu.rw);
37171       hAllShwTrueEnPassPreSelCutPQ->Fill(nu.energyMC,nu.rw);
37172     }
37173     else if (nu.charge==-1){
37174       hAllShwProbPassPreSelCutNQ->Fill(nu.prob,nu.rw);
37175       hAllShwRecoEnPassPreSelCutNQ->Fill(nu.energy,nu.rw);
37176       hAllShwTrueEnPassPreSelCutNQ->Fill(nu.energyMC,nu.rw);
37177     }
37178   }
37179 
37180   //fill all-but-numubar-cc histos
37181   if (!(nu.inu==-14 && nu.iaction==1)) {// !numubarCC
37182     if (nu.charge==+1) {
37183       hNotNMBRecoEnPassPreSelCutPQ->Fill(nu.energy,nu.rw);
37184       hNotNMBTrueEnPassPreSelCutPQ->Fill(nu.energyMC,nu.rw);
37185     }
37186     else if (nu.charge==-1){
37187       hNotNMBRecoEnPassPreSelCutNQ->Fill(nu.energy,nu.rw);
37188       hNotNMBTrueEnPassPreSelCutNQ->Fill(nu.energyMC,nu.rw);
37189     }
37190   }
37191 
37192   //fill all-but-numu-cc histos
37193   if (!(nu.inu==14 && nu.iaction==1)) {// !numuCC
37194     if (nu.charge==+1) {
37195       hNotNMRecoEnPassPreSelCutPQ->Fill(nu.energy,nu.rw);
37196       hNotNMTrueEnPassPreSelCutPQ->Fill(nu.energyMC,nu.rw);
37197     }
37198     else if (nu.charge==-1){
37199       hNotNMRecoEnPassPreSelCutNQ->Fill(nu.energy,nu.rw);
37200       hNotNMTrueEnPassPreSelCutNQ->Fill(nu.energyMC,nu.rw);
37201     }
37202   }
37203 }

void NuPlots::FillDPIdSigmaQPPassSigQPCutPlots ( const NuEvent nu  )  const

Definition at line 34552 of file NuPlots.cxx.

References NuEvent::charge, NuEvent::chi2PerNdof, NuEvent::dpID, NuEvent::energy, NuEvent::energyMC, NuEvent::iaction, NuEvent::inu, Msg::kDebug, Msg::kWarning, MAXMSG, MSG, NuEvent::prob, NuEvent::rw, NuEvent::sigqp_qp, and NuEvent::y.

Referenced by NuAnalysis::ChargeSeparationOneSnarl(), NuCutImps::NuCutsSelection::IsGoodStdCuts(), NuDSTAna::JeffsTestAna(), NuAnalysis::LIRejectionTest(), NuDSTAna::NMBAna(), and NuAnalysis::NMBSummaryTreeAna().

34553 {
34554   //PQ
34555   static TH1F* hSigqp_qpPassSigQPCutPQN=0;
34556   static TH1F* hChi2PassSigQPCutPQN=0;
34557   static TH1F* hProbPassSigQPCutPQN=0;
34558   static TH1F* hDpIDPassSigQPCutPQN=0;
34559   static TH1F* hRecoEnPassSigQPCutPQ=0;
34560   static TH1F* hRecoYPassSigQPCutPQ=0;
34561 
34562   static TH1F* hNMProbPassSigQPCutPQ=0;
34563   static TH1F* hNMBProbPassSigQPCutPQ=0;
34564   static TH1F* hAllShwProbPassSigQPCutPQ=0;
34565 
34566   static TH1F* hNMRecoEnPassSigQPCutPQ=0;
34567   static TH1F* hNMTrueEnPassSigQPCutPQ=0;
34568   static TH1F* hNMBRecoEnPassSigQPCutPQ=0;
34569   static TH1F* hNMBTrueEnPassSigQPCutPQ=0;
34570   static TH1F* hAllNCRecoEnPassSigQPCutPQ=0;
34571   static TH1F* hAllNCTrueEnPassSigQPCutPQ=0;
34572   static TH1F* hAllShwRecoEnPassSigQPCutPQ=0;
34573   static TH1F* hAllShwTrueEnPassSigQPCutPQ=0;
34574   static TH1F* hNotNMBRecoEnPassSigQPCutPQ=0;
34575   static TH1F* hNotNMBTrueEnPassSigQPCutPQ=0;
34576   static TH1F* hNotNMRecoEnPassSigQPCutPQ=0;
34577   static TH1F* hNotNMTrueEnPassSigQPCutPQ=0;
34578 
34579   //NQ
34580   static TH1F* hSigqp_qpPassSigQPCutNQN=0;
34581   static TH1F* hChi2PassSigQPCutNQN=0;
34582   static TH1F* hProbPassSigQPCutNQN=0;
34583   static TH1F* hDpIDPassSigQPCutNQN=0;
34584   static TH1F* hRecoEnPassSigQPCutNQ=0;
34585   static TH1F* hRecoYPassSigQPCutNQ=0;
34586 
34587   static TH1F* hNMProbPassSigQPCutNQ=0;
34588   static TH1F* hNMBProbPassSigQPCutNQ=0;
34589   static TH1F* hAllShwProbPassSigQPCutNQ=0;
34590 
34591   static TH1F* hNMBRecoEnPassSigQPCutNQ=0;
34592   static TH1F* hNMBTrueEnPassSigQPCutNQ=0;
34593   static TH1F* hNMRecoEnPassSigQPCutNQ=0;
34594   static TH1F* hNMTrueEnPassSigQPCutNQ=0;
34595   static TH1F* hAllNCRecoEnPassSigQPCutNQ=0;
34596   static TH1F* hAllNCTrueEnPassSigQPCutNQ=0;
34597   static TH1F* hAllShwRecoEnPassSigQPCutNQ=0;
34598   static TH1F* hAllShwTrueEnPassSigQPCutNQ=0;
34599   static TH1F* hNotNMBRecoEnPassSigQPCutNQ=0;
34600   static TH1F* hNotNMBTrueEnPassSigQPCutNQ=0;
34601   static TH1F* hNotNMRecoEnPassSigQPCutNQ=0;
34602   static TH1F* hNotNMTrueEnPassSigQPCutNQ=0;
34603 
34604 
34605   if (!hChi2PassSigQPCutNQN){
34606     MAXMSG("NuPlots",Msg::kDebug,1)
34607       <<"Creating DPIdSigmaQPPassSigQPCutPlots plots..."<<endl;
34608 
34609     //PQ
34610     hSigqp_qpPassSigQPCutPQN=new TH1F("hSigqp_qpPassSigQPCutPQN","hSigqp_qpPassSigQPCutPQN",800*160,-160,160);
34611     hSigqp_qpPassSigQPCutPQN->GetXaxis()->SetTitle("#sigma(Q/P)/(Q/P)");
34612     hSigqp_qpPassSigQPCutPQN->GetXaxis()->CenterTitle();
34613     hSigqp_qpPassSigQPCutPQN->GetYaxis()->SetTitle("");
34614     hSigqp_qpPassSigQPCutPQN->GetYaxis()->CenterTitle();
34615     hSigqp_qpPassSigQPCutPQN->SetFillColor(0);
34616     hSigqp_qpPassSigQPCutPQN->SetLineColor(1);
34617     hSigqp_qpPassSigQPCutPQN->SetLineWidth(2);
34618     hSigqp_qpPassSigQPCutPQN->SetLineStyle(2);
34619     //hSigqp_qpPassSigQPCutPQN->SetBit(TH1::kCanRebin);
34620 
34621     hChi2PassSigQPCutPQN=new TH1F("hChi2PassSigQPCutPQN","hChi2PassSigQPCutPQN",10*176,-16,160);
34622     hChi2PassSigQPCutPQN->GetXaxis()->SetTitle("#chi^{2}/ndof");
34623     hChi2PassSigQPCutPQN->GetXaxis()->CenterTitle();
34624     hChi2PassSigQPCutPQN->GetYaxis()->SetTitle("");
34625     hChi2PassSigQPCutPQN->GetYaxis()->CenterTitle();
34626     hChi2PassSigQPCutPQN->SetFillColor(0);
34627     hChi2PassSigQPCutPQN->SetLineColor(1);
34628     hChi2PassSigQPCutPQN->SetLineWidth(2);
34629     hChi2PassSigQPCutPQN->SetLineStyle(2);
34630     //hChi2PassSigQPCutPQN->SetBit(TH1::kCanRebin);
34631 
34632     hProbPassSigQPCutPQN=new TH1F("hProbPassSigQPCutPQN","hProbPassSigQPCutPQN",14000,-0.2,1.2);
34633     hProbPassSigQPCutPQN->GetXaxis()->SetTitle("Fit Probability");
34634     hProbPassSigQPCutPQN->GetXaxis()->CenterTitle();
34635     hProbPassSigQPCutPQN->GetYaxis()->SetTitle("");
34636     hProbPassSigQPCutPQN->GetYaxis()->CenterTitle();
34637     hProbPassSigQPCutPQN->SetFillColor(0);
34638     hProbPassSigQPCutPQN->SetLineColor(1);
34639     hProbPassSigQPCutPQN->SetLineWidth(2);
34640     hProbPassSigQPCutPQN->SetLineStyle(2);
34641     //hProbPassSigQPCutPQN->SetBit(TH1::kCanRebin);
34642 
34643     hDpIDPassSigQPCutPQN=new TH1F("hDpIDPassSigQPCutPQN","hDpIDPassSigQPCutPQN",4*160,-1.6,1.6);
34644     hDpIDPassSigQPCutPQN->GetXaxis()->SetTitle("PID (from MadDpID)");
34645     hDpIDPassSigQPCutPQN->GetXaxis()->CenterTitle();
34646     hDpIDPassSigQPCutPQN->GetYaxis()->SetTitle("");
34647     hDpIDPassSigQPCutPQN->GetYaxis()->CenterTitle();
34648     hDpIDPassSigQPCutPQN->SetFillColor(0);
34649     hDpIDPassSigQPCutPQN->SetLineColor(1);
34650     hDpIDPassSigQPCutPQN->SetLineWidth(2);
34651     //hDpIDPassSigQPCutPQN->SetBit(TH1::kCanRebin);
34652 
34653     hRecoEnPassSigQPCutPQ=new TH1F("hRecoEnPassSigQPCutPQ","hRecoEnPassSigQPCutPQ",
34654                                    4*352,-32,320);
34655     hRecoEnPassSigQPCutPQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
34656     hRecoEnPassSigQPCutPQ->GetXaxis()->CenterTitle();
34657     hRecoEnPassSigQPCutPQ->GetYaxis()->SetTitle("");
34658     hRecoEnPassSigQPCutPQ->GetYaxis()->CenterTitle();
34659     hRecoEnPassSigQPCutPQ->SetFillColor(0);
34660     hRecoEnPassSigQPCutPQ->SetLineColor(1);
34661     //hRecoEnPassSigQPCutPQ->SetBit(TH1::kCanRebin);
34662 
34663     hRecoYPassSigQPCutPQ=new TH1F("hRecoYPassSigQPCutPQ","hRecoYPassSigQPCutPQ",
34664                                   1400,-0.2,1.2);
34665     hRecoYPassSigQPCutPQ->GetXaxis()->SetTitle("Reconstructed y");
34666     hRecoYPassSigQPCutPQ->GetXaxis()->CenterTitle();
34667     hRecoYPassSigQPCutPQ->GetYaxis()->SetTitle("");
34668     hRecoYPassSigQPCutPQ->GetYaxis()->CenterTitle();
34669     hRecoYPassSigQPCutPQ->SetFillColor(0);
34670     hRecoYPassSigQPCutPQ->SetLineColor(1);
34671     //hRecoYPassSigQPCutPQ->SetBit(TH1::kCanRebin);
34672 
34673 
34674     hNMProbPassSigQPCutPQ=new TH1F
34675       ("hNMProbPassSigQPCutPQ","hNMProbPassSigQPCutPQ",14000,-0.2,1.2);
34676     hNMProbPassSigQPCutPQ->GetXaxis()->SetTitle("Fit Probability");
34677     hNMProbPassSigQPCutPQ->GetXaxis()->CenterTitle();
34678     hNMProbPassSigQPCutPQ->GetYaxis()->SetTitle("");
34679     hNMProbPassSigQPCutPQ->GetYaxis()->CenterTitle();
34680     hNMProbPassSigQPCutPQ->SetFillColor(0);
34681     hNMProbPassSigQPCutPQ->SetLineColor(1);
34682     hNMProbPassSigQPCutPQ->SetLineWidth(2);
34683     hNMProbPassSigQPCutPQ->SetLineStyle(2);
34684     //hNMProbPassSigQPCutPQ->SetBit(TH1::kCanRebin);
34685 
34686     hNMBProbPassSigQPCutPQ=new TH1F
34687       ("hNMBProbPassSigQPCutPQ","hNMBProbPassSigQPCutPQ",14000,-0.2,1.2);
34688     hNMBProbPassSigQPCutPQ->GetXaxis()->SetTitle("Fit Probability");
34689     hNMBProbPassSigQPCutPQ->GetXaxis()->CenterTitle();
34690     hNMBProbPassSigQPCutPQ->GetYaxis()->SetTitle("");
34691     hNMBProbPassSigQPCutPQ->GetYaxis()->CenterTitle();
34692     hNMBProbPassSigQPCutPQ->SetFillColor(0);
34693     hNMBProbPassSigQPCutPQ->SetLineColor(1);
34694     hNMBProbPassSigQPCutPQ->SetLineWidth(2);
34695     hNMBProbPassSigQPCutPQ->SetLineStyle(2);
34696     //hNMBProbPassSigQPCutPQ->SetBit(TH1::kCanRebin);
34697 
34698     hAllShwProbPassSigQPCutPQ=new TH1F
34699       ("hAllShwProbPassSigQPCutPQ",
34700        "hAllShwProbPassSigQPCutPQ",14000,-0.2,1.2);
34701     hAllShwProbPassSigQPCutPQ->GetXaxis()->SetTitle("Fit Probability");
34702     hAllShwProbPassSigQPCutPQ->GetXaxis()->CenterTitle();
34703     hAllShwProbPassSigQPCutPQ->GetYaxis()->SetTitle("");
34704     hAllShwProbPassSigQPCutPQ->GetYaxis()->CenterTitle();
34705     hAllShwProbPassSigQPCutPQ->SetFillColor(0);
34706     hAllShwProbPassSigQPCutPQ->SetLineColor(1);
34707     hAllShwProbPassSigQPCutPQ->SetLineWidth(2);
34708     hAllShwProbPassSigQPCutPQ->SetLineStyle(2);
34709     //hAllShwProbPassSigQPCutPQ->SetBit(TH1::kCanRebin);
34710 
34711 
34712 
34713     hNMRecoEnPassSigQPCutPQ=new TH1F
34714       ("hNMRecoEnPassSigQPCutPQ","hNMRecoEnPassSigQPCutPQ",
34715        4*352,-32,320);
34716     hNMRecoEnPassSigQPCutPQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
34717     hNMRecoEnPassSigQPCutPQ->GetXaxis()->CenterTitle();
34718     hNMRecoEnPassSigQPCutPQ->GetYaxis()->SetTitle("");
34719     hNMRecoEnPassSigQPCutPQ->GetYaxis()->CenterTitle();
34720     hNMRecoEnPassSigQPCutPQ->SetFillColor(0);
34721     hNMRecoEnPassSigQPCutPQ->SetLineColor(1);
34722     //hNMRecoEnPassSigQPCutPQ->SetBit(TH1::kCanRebin);
34723 
34724     hNMTrueEnPassSigQPCutPQ=new TH1F
34725       ("hNMTrueEnPassSigQPCutPQ","hNMTrueEnPassSigQPCutPQ",
34726        4*352,-32,320);
34727     hNMTrueEnPassSigQPCutPQ->GetXaxis()->SetTitle("True Energy (GeV)");
34728     hNMTrueEnPassSigQPCutPQ->GetXaxis()->CenterTitle();
34729     hNMTrueEnPassSigQPCutPQ->GetYaxis()->SetTitle("");
34730     hNMTrueEnPassSigQPCutPQ->GetYaxis()->CenterTitle();
34731     hNMTrueEnPassSigQPCutPQ->SetFillColor(0);
34732     hNMTrueEnPassSigQPCutPQ->SetLineColor(1);
34733     //hNMTrueEnPassSigQPCutPQ->SetBit(TH1::kCanRebin);
34734 
34735     hNMBRecoEnPassSigQPCutPQ=new TH1F("hNMBRecoEnPassSigQPCutPQ",
34736                                       "hNMBRecoEnPassSigQPCutPQ",
34737                                       4*352,-32,320);
34738     hNMBRecoEnPassSigQPCutPQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
34739     hNMBRecoEnPassSigQPCutPQ->GetXaxis()->CenterTitle();
34740     hNMBRecoEnPassSigQPCutPQ->GetYaxis()->SetTitle("");
34741     hNMBRecoEnPassSigQPCutPQ->GetYaxis()->CenterTitle();
34742     hNMBRecoEnPassSigQPCutPQ->SetFillColor(0);
34743     hNMBRecoEnPassSigQPCutPQ->SetLineColor(1);
34744     //hNMBRecoEnPassSigQPCutPQ->SetBit(TH1::kCanRebin);
34745 
34746     hNMBTrueEnPassSigQPCutPQ=new TH1F
34747       ("hNMBTrueEnPassSigQPCutPQ","hNMBTrueEnPassSigQPCutPQ",
34748        4*352,-32,320);
34749     hNMBTrueEnPassSigQPCutPQ->GetXaxis()->SetTitle("True Energy (GeV)");
34750     hNMBTrueEnPassSigQPCutPQ->GetXaxis()->CenterTitle();
34751     hNMBTrueEnPassSigQPCutPQ->GetYaxis()->SetTitle("");
34752     hNMBTrueEnPassSigQPCutPQ->GetYaxis()->CenterTitle();
34753     hNMBTrueEnPassSigQPCutPQ->SetFillColor(0);
34754     hNMBTrueEnPassSigQPCutPQ->SetLineColor(1);
34755     //hNMBTrueEnPassSigQPCutPQ->SetBit(TH1::kCanRebin);
34756 
34757     hAllNCRecoEnPassSigQPCutPQ=new TH1F("hAllNCRecoEnPassSigQPCutPQ",
34758                                         "hAllNCRecoEnPassSigQPCutPQ",
34759                                         4*352,-32,320);
34760     hAllNCRecoEnPassSigQPCutPQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
34761     hAllNCRecoEnPassSigQPCutPQ->GetXaxis()->CenterTitle();
34762     hAllNCRecoEnPassSigQPCutPQ->GetYaxis()->SetTitle("");
34763     hAllNCRecoEnPassSigQPCutPQ->GetYaxis()->CenterTitle();
34764     hAllNCRecoEnPassSigQPCutPQ->SetFillColor(0);
34765     hAllNCRecoEnPassSigQPCutPQ->SetLineColor(1);
34766     //hAllNCRecoEnPassSigQPCutPQ->SetBit(TH1::kCanRebin);
34767 
34768     hAllNCTrueEnPassSigQPCutPQ=new TH1F
34769       ("hAllNCTrueEnPassSigQPCutPQ","hAllNCTrueEnPassSigQPCutPQ",
34770        4*352,-32,320);
34771     hAllNCTrueEnPassSigQPCutPQ->GetXaxis()->SetTitle("True Energy (GeV)");
34772     hAllNCTrueEnPassSigQPCutPQ->GetXaxis()->CenterTitle();
34773     hAllNCTrueEnPassSigQPCutPQ->GetYaxis()->SetTitle("");
34774     hAllNCTrueEnPassSigQPCutPQ->GetYaxis()->CenterTitle();
34775     hAllNCTrueEnPassSigQPCutPQ->SetFillColor(0);
34776     hAllNCTrueEnPassSigQPCutPQ->SetLineColor(1);
34777     //hAllNCTrueEnPassSigQPCutPQ->SetBit(TH1::kCanRebin);
34778 
34779     hAllShwRecoEnPassSigQPCutPQ=new TH1F("hAllShwRecoEnPassSigQPCutPQ",
34780                                          "hAllShwRecoEnPassSigQPCutPQ",
34781                                          4*352,-32,320);
34782     hAllShwRecoEnPassSigQPCutPQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
34783     hAllShwRecoEnPassSigQPCutPQ->GetXaxis()->CenterTitle();
34784     hAllShwRecoEnPassSigQPCutPQ->GetYaxis()->SetTitle("");
34785     hAllShwRecoEnPassSigQPCutPQ->GetYaxis()->CenterTitle();
34786     hAllShwRecoEnPassSigQPCutPQ->SetFillColor(0);
34787     hAllShwRecoEnPassSigQPCutPQ->SetLineColor(1);
34788     //hAllShwRecoEnPassSigQPCutPQ->SetBit(TH1::kCanRebin);
34789 
34790     hAllShwTrueEnPassSigQPCutPQ=new TH1F
34791       ("hAllShwTrueEnPassSigQPCutPQ","hAllShwTrueEnPassSigQPCutPQ",
34792        4*352,-32,320);
34793     hAllShwTrueEnPassSigQPCutPQ->GetXaxis()->SetTitle("True Energy (GeV)");
34794     hAllShwTrueEnPassSigQPCutPQ->GetXaxis()->CenterTitle();
34795     hAllShwTrueEnPassSigQPCutPQ->GetYaxis()->SetTitle("");
34796     hAllShwTrueEnPassSigQPCutPQ->GetYaxis()->CenterTitle();
34797     hAllShwTrueEnPassSigQPCutPQ->SetFillColor(0);
34798     hAllShwTrueEnPassSigQPCutPQ->SetLineColor(1);
34799     //hAllShwTrueEnPassSigQPCutPQ->SetBit(TH1::kCanRebin);
34800 
34801     hNotNMRecoEnPassSigQPCutPQ=new TH1F
34802       ("hNotNMRecoEnPassSigQPCutPQ","hNotNMRecoEnPassSigQPCutPQ",
34803        4*352,-32,320);
34804     hNotNMRecoEnPassSigQPCutPQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
34805     hNotNMRecoEnPassSigQPCutPQ->GetXaxis()->CenterTitle();
34806     hNotNMRecoEnPassSigQPCutPQ->GetYaxis()->SetTitle("");
34807     hNotNMRecoEnPassSigQPCutPQ->GetYaxis()->CenterTitle();
34808     hNotNMRecoEnPassSigQPCutPQ->SetFillColor(0);
34809     hNotNMRecoEnPassSigQPCutPQ->SetLineColor(1);
34810     //hNotNMRecoEnPassSigQPCutPQ->SetBit(TH1::kCanRebin);
34811 
34812     hNotNMTrueEnPassSigQPCutPQ=new TH1F
34813       ("hNotNMTrueEnPassSigQPCutPQ","hNotNMTrueEnPassSigQPCutPQ",
34814        4*352,-32,320);
34815     hNotNMTrueEnPassSigQPCutPQ->GetXaxis()->SetTitle("True Energy (GeV)");
34816     hNotNMTrueEnPassSigQPCutPQ->GetXaxis()->CenterTitle();
34817     hNotNMTrueEnPassSigQPCutPQ->GetYaxis()->SetTitle("");
34818     hNotNMTrueEnPassSigQPCutPQ->GetYaxis()->CenterTitle();
34819     hNotNMTrueEnPassSigQPCutPQ->SetFillColor(0);
34820     hNotNMTrueEnPassSigQPCutPQ->SetLineColor(1);
34821     //hNotNMTrueEnPassSigQPCutPQ->SetBit(TH1::kCanRebin);
34822 
34823     hNotNMBRecoEnPassSigQPCutPQ=new TH1F("hNotNMBRecoEnPassSigQPCutPQ",
34824                                          "hNotNMBRecoEnPassSigQPCutPQ",
34825                                          4*352,-32,320);
34826     hNotNMBRecoEnPassSigQPCutPQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
34827     hNotNMBRecoEnPassSigQPCutPQ->GetXaxis()->CenterTitle();
34828     hNotNMBRecoEnPassSigQPCutPQ->GetYaxis()->SetTitle("");
34829     hNotNMBRecoEnPassSigQPCutPQ->GetYaxis()->CenterTitle();
34830     hNotNMBRecoEnPassSigQPCutPQ->SetFillColor(0);
34831     hNotNMBRecoEnPassSigQPCutPQ->SetLineColor(1);
34832     //hNotNMBRecoEnPassSigQPCutPQ->SetBit(TH1::kCanRebin);
34833 
34834     hNotNMBTrueEnPassSigQPCutPQ=new TH1F
34835       ("hNotNMBTrueEnPassSigQPCutPQ","hNotNMBTrueEnPassSigQPCutPQ",
34836        4*352,-32,320);
34837     hNotNMBTrueEnPassSigQPCutPQ->GetXaxis()->SetTitle("True Energy (GeV)");
34838     hNotNMBTrueEnPassSigQPCutPQ->GetXaxis()->CenterTitle();
34839     hNotNMBTrueEnPassSigQPCutPQ->GetYaxis()->SetTitle("");
34840     hNotNMBTrueEnPassSigQPCutPQ->GetYaxis()->CenterTitle();
34841     hNotNMBTrueEnPassSigQPCutPQ->SetFillColor(0);
34842     hNotNMBTrueEnPassSigQPCutPQ->SetLineColor(1);
34843     //hNotNMBTrueEnPassSigQPCutPQ->SetBit(TH1::kCanRebin);
34844 
34845 
34846 
34847 
34848     //NQ
34849     hSigqp_qpPassSigQPCutNQN=new TH1F("hSigqp_qpPassSigQPCutNQN","hSigqp_qpPassSigQPCutNQN",800*160,-160,160);
34850     hSigqp_qpPassSigQPCutNQN->GetXaxis()->SetTitle("#sigma(Q/P)/(Q/P)");
34851     hSigqp_qpPassSigQPCutNQN->GetXaxis()->CenterTitle();
34852     hSigqp_qpPassSigQPCutNQN->GetYaxis()->SetTitle("");
34853     hSigqp_qpPassSigQPCutNQN->GetYaxis()->CenterTitle();
34854     hSigqp_qpPassSigQPCutNQN->SetFillColor(0);
34855     hSigqp_qpPassSigQPCutNQN->SetLineColor(1);
34856     hSigqp_qpPassSigQPCutNQN->SetLineWidth(2);
34857     hSigqp_qpPassSigQPCutNQN->SetLineStyle(2);
34858     //hSigqp_qpPassSigQPCutNQN->SetBit(TH1::kCanRebin);
34859 
34860     hChi2PassSigQPCutNQN=new TH1F("hChi2PassSigQPCutNQN","hChi2PassSigQPCutNQN",10*176,-16,160);
34861     hChi2PassSigQPCutNQN->GetXaxis()->SetTitle("#chi^{2}/ndof");
34862     hChi2PassSigQPCutNQN->GetXaxis()->CenterTitle();
34863     hChi2PassSigQPCutNQN->GetYaxis()->SetTitle("");
34864     hChi2PassSigQPCutNQN->GetYaxis()->CenterTitle();
34865     hChi2PassSigQPCutNQN->SetFillColor(0);
34866     hChi2PassSigQPCutNQN->SetLineColor(1);
34867     hChi2PassSigQPCutNQN->SetLineWidth(2);
34868     hChi2PassSigQPCutNQN->SetLineStyle(2);
34869     //hChi2PassSigQPCutNQN->SetBit(TH1::kCanRebin);
34870 
34871     hProbPassSigQPCutNQN=new TH1F("hProbPassSigQPCutNQN","hProbPassSigQPCutNQN",14000,-0.2,1.2);
34872     hProbPassSigQPCutNQN->GetXaxis()->SetTitle("Fit Probability");
34873     hProbPassSigQPCutNQN->GetXaxis()->CenterTitle();
34874     hProbPassSigQPCutNQN->GetYaxis()->SetTitle("");
34875     hProbPassSigQPCutNQN->GetYaxis()->CenterTitle();
34876     hProbPassSigQPCutNQN->SetFillColor(0);
34877     hProbPassSigQPCutNQN->SetLineColor(1);
34878     hProbPassSigQPCutNQN->SetLineWidth(2);
34879     hProbPassSigQPCutNQN->SetLineStyle(2);
34880     //hProbPassSigQPCutNQN->SetBit(TH1::kCanRebin);
34881 
34882     hDpIDPassSigQPCutNQN=new TH1F("hDpIDPassSigQPCutNQN","hDpIDPassSigQPCutNQN",4*160,-1.6,1.6);
34883     hDpIDPassSigQPCutNQN->GetXaxis()->SetTitle("PID (from MadDpID)");
34884     hDpIDPassSigQPCutNQN->GetXaxis()->CenterTitle();
34885     hDpIDPassSigQPCutNQN->GetYaxis()->SetTitle("");
34886     hDpIDPassSigQPCutNQN->GetYaxis()->CenterTitle();
34887     hDpIDPassSigQPCutNQN->SetFillColor(0);
34888     hDpIDPassSigQPCutNQN->SetLineColor(1);
34889     hDpIDPassSigQPCutNQN->SetLineWidth(2);
34890     //hDpIDPassSigQPCutNQN->SetBit(TH1::kCanRebin);
34891 
34892     hRecoEnPassSigQPCutNQ=new TH1F("hRecoEnPassSigQPCutNQ","hRecoEnPassSigQPCutNQ",
34893                                    4*352,-32,320);
34894     hRecoEnPassSigQPCutNQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
34895     hRecoEnPassSigQPCutNQ->GetXaxis()->CenterTitle();
34896     hRecoEnPassSigQPCutNQ->GetYaxis()->SetTitle("");
34897     hRecoEnPassSigQPCutNQ->GetYaxis()->CenterTitle();
34898     hRecoEnPassSigQPCutNQ->SetFillColor(0);
34899     hRecoEnPassSigQPCutNQ->SetLineColor(1);
34900     //hRecoEnPassSigQPCutNQ->SetBit(TH1::kCanRebin);
34901 
34902     hRecoYPassSigQPCutNQ=new TH1F("hRecoYPassSigQPCutNQ","hRecoYPassSigQPCutNQ",
34903                                   1400,-0.2,1.2);
34904     hRecoYPassSigQPCutNQ->GetXaxis()->SetTitle("Reconstructed y");
34905     hRecoYPassSigQPCutNQ->GetXaxis()->CenterTitle();
34906     hRecoYPassSigQPCutNQ->GetYaxis()->SetTitle("");
34907     hRecoYPassSigQPCutNQ->GetYaxis()->CenterTitle();
34908     hRecoYPassSigQPCutNQ->SetFillColor(0);
34909     hRecoYPassSigQPCutNQ->SetLineColor(1);
34910     //hRecoYPassSigQPCutNQ->SetBit(TH1::kCanRebin);
34911 
34912 
34913     hNMProbPassSigQPCutNQ=new TH1F
34914       ("hNMProbPassSigQPCutNQ","hNMProbPassSigQPCutNQ",14000,-0.2,1.2);
34915     hNMProbPassSigQPCutNQ->GetXaxis()->SetTitle("Fit Probability");
34916     hNMProbPassSigQPCutNQ->GetXaxis()->CenterTitle();
34917     hNMProbPassSigQPCutNQ->GetYaxis()->SetTitle("");
34918     hNMProbPassSigQPCutNQ->GetYaxis()->CenterTitle();
34919     hNMProbPassSigQPCutNQ->SetFillColor(0);
34920     hNMProbPassSigQPCutNQ->SetLineColor(1);
34921     hNMProbPassSigQPCutNQ->SetLineWidth(2);
34922     hNMProbPassSigQPCutNQ->SetLineStyle(2);
34923     //hNMProbPassSigQPCutNQ->SetBit(TH1::kCanRebin);
34924 
34925     hNMBProbPassSigQPCutNQ=new TH1F
34926       ("hNMBProbPassSigQPCutNQ","hNMBProbPassSigQPCutNQ",14000,-0.2,1.2);
34927     hNMBProbPassSigQPCutNQ->GetXaxis()->SetTitle("Fit Probability");
34928     hNMBProbPassSigQPCutNQ->GetXaxis()->CenterTitle();
34929     hNMBProbPassSigQPCutNQ->GetYaxis()->SetTitle("");
34930     hNMBProbPassSigQPCutNQ->GetYaxis()->CenterTitle();
34931     hNMBProbPassSigQPCutNQ->SetFillColor(0);
34932     hNMBProbPassSigQPCutNQ->SetLineColor(1);
34933     hNMBProbPassSigQPCutNQ->SetLineWidth(2);
34934     hNMBProbPassSigQPCutNQ->SetLineStyle(2);
34935     //hNMBProbPassSigQPCutNQ->SetBit(TH1::kCanRebin);
34936 
34937     hAllShwProbPassSigQPCutNQ=new TH1F
34938       ("hAllShwProbPassSigQPCutNQ",
34939        "hAllShwProbPassSigQPCutNQ",14000,-0.2,1.2);
34940     hAllShwProbPassSigQPCutNQ->GetXaxis()->SetTitle("Fit Probability");
34941     hAllShwProbPassSigQPCutNQ->GetXaxis()->CenterTitle();
34942     hAllShwProbPassSigQPCutNQ->GetYaxis()->SetTitle("");
34943     hAllShwProbPassSigQPCutNQ->GetYaxis()->CenterTitle();
34944     hAllShwProbPassSigQPCutNQ->SetFillColor(0);
34945     hAllShwProbPassSigQPCutNQ->SetLineColor(1);
34946     hAllShwProbPassSigQPCutNQ->SetLineWidth(2);
34947     hAllShwProbPassSigQPCutNQ->SetLineStyle(2);
34948     //hAllShwProbPassSigQPCutNQ->SetBit(TH1::kCanRebin);
34949 
34950 
34951     hNMRecoEnPassSigQPCutNQ=new TH1F
34952       ("hNMRecoEnPassSigQPCutNQ","hNMRecoEnPassSigQPCutNQ",4*352,-32,320);
34953     hNMRecoEnPassSigQPCutNQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
34954     hNMRecoEnPassSigQPCutNQ->GetXaxis()->CenterTitle();
34955     hNMRecoEnPassSigQPCutNQ->GetYaxis()->SetTitle("");
34956     hNMRecoEnPassSigQPCutNQ->GetYaxis()->CenterTitle();
34957     hNMRecoEnPassSigQPCutNQ->SetFillColor(0);
34958     hNMRecoEnPassSigQPCutNQ->SetLineColor(1);
34959     //hNMRecoEnPassSigQPCutNQ->SetBit(TH1::kCanRebin);
34960 
34961     hNMTrueEnPassSigQPCutNQ=new TH1F
34962       ("hNMTrueEnPassSigQPCutNQ","hNMTrueEnPassSigQPCutNQ",4*352,-32,320);
34963     hNMTrueEnPassSigQPCutNQ->GetXaxis()->SetTitle("True Energy (GeV)");
34964     hNMTrueEnPassSigQPCutNQ->GetXaxis()->CenterTitle();
34965     hNMTrueEnPassSigQPCutNQ->GetYaxis()->SetTitle("");
34966     hNMTrueEnPassSigQPCutNQ->GetYaxis()->CenterTitle();
34967     hNMTrueEnPassSigQPCutNQ->SetFillColor(0);
34968     hNMTrueEnPassSigQPCutNQ->SetLineColor(1);
34969     //hNMTrueEnPassSigQPCutNQ->SetBit(TH1::kCanRebin);
34970 
34971     hNMBRecoEnPassSigQPCutNQ=new TH1F("hNMBRecoEnPassSigQPCutNQ",
34972                                       "hNMBRecoEnPassSigQPCutNQ",
34973                                       4*352,-32,320);
34974     hNMBRecoEnPassSigQPCutNQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
34975     hNMBRecoEnPassSigQPCutNQ->GetXaxis()->CenterTitle();
34976     hNMBRecoEnPassSigQPCutNQ->GetYaxis()->SetTitle("");
34977     hNMBRecoEnPassSigQPCutNQ->GetYaxis()->CenterTitle();
34978     hNMBRecoEnPassSigQPCutNQ->SetFillColor(0);
34979     hNMBRecoEnPassSigQPCutNQ->SetLineColor(1);
34980     //hNMBRecoEnPassSigQPCutNQ->SetBit(TH1::kCanRebin);
34981 
34982     hNMBTrueEnPassSigQPCutNQ=new TH1F
34983       ("hNMBTrueEnPassSigQPCutNQ","hNMBTrueEnPassSigQPCutNQ",
34984        4*352,-32,320);
34985     hNMBTrueEnPassSigQPCutNQ->GetXaxis()->SetTitle("True Energy (GeV)");
34986     hNMBTrueEnPassSigQPCutNQ->GetXaxis()->CenterTitle();
34987     hNMBTrueEnPassSigQPCutNQ->GetYaxis()->SetTitle("");
34988     hNMBTrueEnPassSigQPCutNQ->GetYaxis()->CenterTitle();
34989     hNMBTrueEnPassSigQPCutNQ->SetFillColor(0);
34990     hNMBTrueEnPassSigQPCutNQ->SetLineColor(1);
34991     //hNMBTrueEnPassSigQPCutNQ->SetBit(TH1::kCanRebin);
34992 
34993 
34994 
34995     hAllNCRecoEnPassSigQPCutNQ=new TH1F("hAllNCRecoEnPassSigQPCutNQ",
34996                                         "hAllNCRecoEnPassSigQPCutNQ",
34997                                         4*352,-32,320);
34998     hAllNCRecoEnPassSigQPCutNQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
34999     hAllNCRecoEnPassSigQPCutNQ->GetXaxis()->CenterTitle();
35000     hAllNCRecoEnPassSigQPCutNQ->GetYaxis()->SetTitle("");
35001     hAllNCRecoEnPassSigQPCutNQ->GetYaxis()->CenterTitle();
35002     hAllNCRecoEnPassSigQPCutNQ->SetFillColor(0);
35003     hAllNCRecoEnPassSigQPCutNQ->SetLineColor(1);
35004     //hAllNCRecoEnPassSigQPCutNQ->SetBit(TH1::kCanRebin);
35005 
35006     hAllNCTrueEnPassSigQPCutNQ=new TH1F
35007       ("hAllNCTrueEnPassSigQPCutNQ","hAllNCTrueEnPassSigQPCutNQ",
35008        4*352,-32,320);
35009     hAllNCTrueEnPassSigQPCutNQ->GetXaxis()->SetTitle("True Energy (GeV)");
35010     hAllNCTrueEnPassSigQPCutNQ->GetXaxis()->CenterTitle();
35011     hAllNCTrueEnPassSigQPCutNQ->GetYaxis()->SetTitle("");
35012     hAllNCTrueEnPassSigQPCutNQ->GetYaxis()->CenterTitle();
35013     hAllNCTrueEnPassSigQPCutNQ->SetFillColor(0);
35014     hAllNCTrueEnPassSigQPCutNQ->SetLineColor(1);
35015     //hAllNCTrueEnPassSigQPCutNQ->SetBit(TH1::kCanRebin);
35016 
35017     hAllShwRecoEnPassSigQPCutNQ=new TH1F("hAllShwRecoEnPassSigQPCutNQ",
35018                                          "hAllShwRecoEnPassSigQPCutNQ",
35019                                          4*352,-32,320);
35020     hAllShwRecoEnPassSigQPCutNQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
35021     hAllShwRecoEnPassSigQPCutNQ->GetXaxis()->CenterTitle();
35022     hAllShwRecoEnPassSigQPCutNQ->GetYaxis()->SetTitle("");
35023     hAllShwRecoEnPassSigQPCutNQ->GetYaxis()->CenterTitle();
35024     hAllShwRecoEnPassSigQPCutNQ->SetFillColor(0);
35025     hAllShwRecoEnPassSigQPCutNQ->SetLineColor(1);
35026     //hAllShwRecoEnPassSigQPCutNQ->SetBit(TH1::kCanRebin);
35027 
35028     hAllShwTrueEnPassSigQPCutNQ=new TH1F
35029       ("hAllShwTrueEnPassSigQPCutNQ","hAllShwTrueEnPassSigQPCutNQ",
35030        4*352,-32,320);
35031     hAllShwTrueEnPassSigQPCutNQ->GetXaxis()->SetTitle("True Energy (GeV)");
35032     hAllShwTrueEnPassSigQPCutNQ->GetXaxis()->CenterTitle();
35033     hAllShwTrueEnPassSigQPCutNQ->GetYaxis()->SetTitle("");
35034     hAllShwTrueEnPassSigQPCutNQ->GetYaxis()->CenterTitle();
35035     hAllShwTrueEnPassSigQPCutNQ->SetFillColor(0);
35036     hAllShwTrueEnPassSigQPCutNQ->SetLineColor(1);
35037     //hAllShwTrueEnPassSigQPCutNQ->SetBit(TH1::kCanRebin);
35038 
35039     hNotNMRecoEnPassSigQPCutNQ=new TH1F
35040       ("hNotNMRecoEnPassSigQPCutNQ","hNotNMRecoEnPassSigQPCutNQ",
35041        4*352,-32,320);
35042     hNotNMRecoEnPassSigQPCutNQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
35043     hNotNMRecoEnPassSigQPCutNQ->GetXaxis()->CenterTitle();
35044     hNotNMRecoEnPassSigQPCutNQ->GetYaxis()->SetTitle("");
35045     hNotNMRecoEnPassSigQPCutNQ->GetYaxis()->CenterTitle();
35046     hNotNMRecoEnPassSigQPCutNQ->SetFillColor(0);
35047     hNotNMRecoEnPassSigQPCutNQ->SetLineColor(1);
35048     //hNotNMRecoEnPassSigQPCutNQ->SetBit(TH1::kCanRebin);
35049 
35050     hNotNMTrueEnPassSigQPCutNQ=new TH1F
35051       ("hNotNMTrueEnPassSigQPCutNQ","hNotNMTrueEnPassSigQPCutNQ",
35052        4*352,-32,320);
35053     hNotNMTrueEnPassSigQPCutNQ->GetXaxis()->SetTitle("True Energy (GeV)");
35054     hNotNMTrueEnPassSigQPCutNQ->GetXaxis()->CenterTitle();
35055     hNotNMTrueEnPassSigQPCutNQ->GetYaxis()->SetTitle("");
35056     hNotNMTrueEnPassSigQPCutNQ->GetYaxis()->CenterTitle();
35057     hNotNMTrueEnPassSigQPCutNQ->SetFillColor(0);
35058     hNotNMTrueEnPassSigQPCutNQ->SetLineColor(1);
35059     //hNotNMTrueEnPassSigQPCutNQ->SetBit(TH1::kCanRebin);
35060 
35061     hNotNMBRecoEnPassSigQPCutNQ=new TH1F("hNotNMBRecoEnPassSigQPCutNQ",
35062                                          "hNotNMBRecoEnPassSigQPCutNQ",
35063                                          4*352,-32,320);
35064     hNotNMBRecoEnPassSigQPCutNQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
35065     hNotNMBRecoEnPassSigQPCutNQ->GetXaxis()->CenterTitle();
35066     hNotNMBRecoEnPassSigQPCutNQ->GetYaxis()->SetTitle("");
35067     hNotNMBRecoEnPassSigQPCutNQ->GetYaxis()->CenterTitle();
35068     hNotNMBRecoEnPassSigQPCutNQ->SetFillColor(0);
35069     hNotNMBRecoEnPassSigQPCutNQ->SetLineColor(1);
35070     //hNotNMBRecoEnPassSigQPCutNQ->SetBit(TH1::kCanRebin);
35071 
35072     hNotNMBTrueEnPassSigQPCutNQ=new TH1F
35073       ("hNotNMBTrueEnPassSigQPCutNQ","hNotNMBTrueEnPassSigQPCutNQ",
35074        4*352,-32,320);
35075     hNotNMBTrueEnPassSigQPCutNQ->GetXaxis()->SetTitle("True Energy (GeV)");
35076     hNotNMBTrueEnPassSigQPCutNQ->GetXaxis()->CenterTitle();
35077     hNotNMBTrueEnPassSigQPCutNQ->GetYaxis()->SetTitle("");
35078     hNotNMBTrueEnPassSigQPCutNQ->GetYaxis()->CenterTitle();
35079     hNotNMBTrueEnPassSigQPCutNQ->SetFillColor(0);
35080     hNotNMBTrueEnPassSigQPCutNQ->SetLineColor(1);
35081     //hNotNMBTrueEnPassSigQPCutNQ->SetBit(TH1::kCanRebin);
35082   }
35083 
35084 
35085   //PQ
35086   if (nu.charge==+1){
35087     hSigqp_qpPassSigQPCutPQN->Fill(nu.sigqp_qp,nu.rw);
35088     hChi2PassSigQPCutPQN->Fill(nu.chi2PerNdof,nu.rw);
35089     hProbPassSigQPCutPQN->Fill(nu.prob,nu.rw);
35090     hDpIDPassSigQPCutPQN->Fill(nu.dpID,nu.rw);
35091 
35092     hRecoEnPassSigQPCutPQ->Fill(nu.energy,nu.rw);
35093     hRecoYPassSigQPCutPQ->Fill(nu.y,nu.rw);
35094   }
35095   //NQ
35096   else if (nu.charge==-1){
35097     hSigqp_qpPassSigQPCutNQN->Fill(nu.sigqp_qp,nu.rw);
35098     hChi2PassSigQPCutNQN->Fill(nu.chi2PerNdof,nu.rw);
35099     hProbPassSigQPCutNQN->Fill(nu.prob,nu.rw);
35100     hDpIDPassSigQPCutNQN->Fill(nu.dpID,nu.rw);
35101 
35102     hRecoEnPassSigQPCutNQ->Fill(nu.energy,nu.rw);
35103     hRecoYPassSigQPCutNQ->Fill(nu.y,nu.rw);
35104   }
35105   else MSG("NuPlots",Msg::kWarning)<<"Ahh, bad charge"<<endl;
35106 
35107 
35108   //now fill the truth plots
35109   if (nu.iaction==1){//CC
35110     if (nu.inu==14){//NuMu
35111       if (nu.charge==+1) {
35112         hNMProbPassSigQPCutPQ->Fill(nu.prob,nu.rw);
35113         hNMRecoEnPassSigQPCutPQ->Fill(nu.energy,nu.rw);
35114         hNMTrueEnPassSigQPCutPQ->Fill(nu.energyMC,nu.rw);
35115       }
35116       else if (nu.charge==-1){
35117         hNMProbPassSigQPCutNQ->Fill(nu.prob,nu.rw);
35118         hNMRecoEnPassSigQPCutNQ->Fill(nu.energy,nu.rw);
35119         hNMTrueEnPassSigQPCutNQ->Fill(nu.energyMC,nu.rw);
35120       }
35121     }
35122     else if (nu.inu==-14){//NuMuBar
35123       if (nu.charge==+1) {
35124         hNMBProbPassSigQPCutPQ->Fill(nu.prob,nu.rw);
35125         hNMBRecoEnPassSigQPCutPQ->Fill(nu.energy,nu.rw);
35126         hNMBTrueEnPassSigQPCutPQ->Fill(nu.energyMC,nu.rw);
35127       }
35128       else if (nu.charge==-1){
35129         hNMBProbPassSigQPCutNQ->Fill(nu.prob,nu.rw);
35130         hNMBRecoEnPassSigQPCutNQ->Fill(nu.energy,nu.rw);
35131         hNMBTrueEnPassSigQPCutNQ->Fill(nu.energyMC,nu.rw);
35132       }
35133     }
35134   }
35135   else if (nu.iaction==0){//NC
35136     if (nu.charge==+1) {
35137       hAllNCRecoEnPassSigQPCutPQ->Fill(nu.energy,nu.rw);
35138       hAllNCTrueEnPassSigQPCutPQ->Fill(nu.energyMC,nu.rw);
35139     }
35140     else if (nu.charge==-1){
35141       hAllNCRecoEnPassSigQPCutNQ->Fill(nu.energy,nu.rw);
35142       hAllNCTrueEnPassSigQPCutNQ->Fill(nu.energyMC,nu.rw);
35143     }
35144   }
35145 
35146   //all but NuMu/NuMuBar CC
35147   if (!(nu.iaction==1 && (nu.inu==14 || nu.inu==-14))) {
35148     if (nu.charge==+1) {
35149       hAllShwProbPassSigQPCutPQ->Fill(nu.prob,nu.rw);
35150       hAllShwRecoEnPassSigQPCutPQ->Fill(nu.energy,nu.rw);
35151       hAllShwTrueEnPassSigQPCutPQ->Fill(nu.energyMC,nu.rw);
35152     }
35153     else if (nu.charge==-1){
35154       hAllShwProbPassSigQPCutNQ->Fill(nu.prob,nu.rw);
35155       hAllShwRecoEnPassSigQPCutNQ->Fill(nu.energy,nu.rw);
35156       hAllShwTrueEnPassSigQPCutNQ->Fill(nu.energyMC,nu.rw);
35157     }
35158   }
35159 
35160   //fill all-but-numubar-cc histos
35161   if (!(nu.inu==-14 && nu.iaction==1)) {// !numubarCC
35162     if (nu.charge==+1) {
35163       hNotNMBRecoEnPassSigQPCutPQ->Fill(nu.energy,nu.rw);
35164       hNotNMBTrueEnPassSigQPCutPQ->Fill(nu.energyMC,nu.rw);
35165     }
35166     else if (nu.charge==-1){
35167       hNotNMBRecoEnPassSigQPCutNQ->Fill(nu.energy,nu.rw);
35168       hNotNMBTrueEnPassSigQPCutNQ->Fill(nu.energyMC,nu.rw);
35169     }
35170   }
35171 
35172   //fill all-but-numu-cc histos
35173   if (!(nu.inu==14 && nu.iaction==1)) {// !numuCC
35174     if (nu.charge==+1) {
35175       hNotNMRecoEnPassSigQPCutPQ->Fill(nu.energy,nu.rw);
35176       hNotNMTrueEnPassSigQPCutPQ->Fill(nu.energyMC,nu.rw);
35177     }
35178     else if (nu.charge==-1){
35179       hNotNMRecoEnPassSigQPCutNQ->Fill(nu.energy,nu.rw);
35180       hNotNMTrueEnPassSigQPCutNQ->Fill(nu.energyMC,nu.rw);
35181     }
35182   }
35183 }

void NuPlots::FillDPIdSigmaQPPassUVVtxCutPlots ( const NuEvent nu  )  const

Definition at line 35187 of file NuPlots.cxx.

References NuEvent::charge, NuEvent::chi2PerNdof, NuEvent::dpID, NuEvent::energy, NuEvent::energyMC, NuEvent::iaction, NuEvent::inu, Msg::kDebug, Msg::kWarning, MAXMSG, MSG, NuEvent::prob, NuEvent::rw, NuEvent::sigqp_qp, and NuEvent::y.

Referenced by NuAnalysis::ChargeSeparationOneSnarl(), and NuCutImps::NuCutsSelection::MakePostPreSelectionPlots().

35188 {
35189   //PQ
35190   static TH1F* hSigqp_qpPassUVVtxCutPQN=0;
35191   static TH1F* hChi2PassUVVtxCutPQN=0;
35192   static TH1F* hProbPassUVVtxCutPQN=0;
35193   static TH1F* hDpIDPassUVVtxCutPQN=0;
35194   static TH1F* hRecoEnPassUVVtxCutPQ=0;
35195   static TH1F* hRecoYPassUVVtxCutPQ=0;
35196 
35197   static TH1F* hNMProbPassUVVtxCutPQ=0;
35198   static TH1F* hNMBProbPassUVVtxCutPQ=0;
35199   static TH1F* hAllShwProbPassUVVtxCutPQ=0;
35200 
35201   static TH1F* hNMRecoEnPassUVVtxCutPQ=0;
35202   static TH1F* hNMTrueEnPassUVVtxCutPQ=0;
35203   static TH1F* hNMBRecoEnPassUVVtxCutPQ=0;
35204   static TH1F* hNMBTrueEnPassUVVtxCutPQ=0;
35205   static TH1F* hAllNCRecoEnPassUVVtxCutPQ=0;
35206   static TH1F* hAllNCTrueEnPassUVVtxCutPQ=0;
35207   static TH1F* hAllShwRecoEnPassUVVtxCutPQ=0;
35208   static TH1F* hAllShwTrueEnPassUVVtxCutPQ=0;
35209   static TH1F* hNotNMBRecoEnPassUVVtxCutPQ=0;
35210   static TH1F* hNotNMBTrueEnPassUVVtxCutPQ=0;
35211   static TH1F* hNotNMRecoEnPassUVVtxCutPQ=0;
35212   static TH1F* hNotNMTrueEnPassUVVtxCutPQ=0;
35213 
35214   //NQ
35215   static TH1F* hSigqp_qpPassUVVtxCutNQN=0;
35216   static TH1F* hChi2PassUVVtxCutNQN=0;
35217   static TH1F* hProbPassUVVtxCutNQN=0;
35218   static TH1F* hDpIDPassUVVtxCutNQN=0;
35219   static TH1F* hRecoEnPassUVVtxCutNQ=0;
35220   static TH1F* hRecoYPassUVVtxCutNQ=0;
35221 
35222   static TH1F* hNMProbPassUVVtxCutNQ=0;
35223   static TH1F* hNMBProbPassUVVtxCutNQ=0;
35224   static TH1F* hAllShwProbPassUVVtxCutNQ=0;
35225 
35226   static TH1F* hNMBRecoEnPassUVVtxCutNQ=0;
35227   static TH1F* hNMBTrueEnPassUVVtxCutNQ=0;
35228   static TH1F* hNMRecoEnPassUVVtxCutNQ=0;
35229   static TH1F* hNMTrueEnPassUVVtxCutNQ=0;
35230   static TH1F* hAllNCRecoEnPassUVVtxCutNQ=0;
35231   static TH1F* hAllNCTrueEnPassUVVtxCutNQ=0;
35232   static TH1F* hAllShwRecoEnPassUVVtxCutNQ=0;
35233   static TH1F* hAllShwTrueEnPassUVVtxCutNQ=0;
35234   static TH1F* hNotNMBRecoEnPassUVVtxCutNQ=0;
35235   static TH1F* hNotNMBTrueEnPassUVVtxCutNQ=0;
35236   static TH1F* hNotNMRecoEnPassUVVtxCutNQ=0;
35237   static TH1F* hNotNMTrueEnPassUVVtxCutNQ=0;
35238 
35239 
35240   if (!hChi2PassUVVtxCutNQN){
35241     MAXMSG("NuPlots",Msg::kDebug,1)
35242       <<"Creating DPIdSigmaQPPassUVVtxCutPlots plots..."<<endl;
35243 
35244     //PQ
35245     hSigqp_qpPassUVVtxCutPQN=new TH1F("hSigqp_qpPassUVVtxCutPQN","hSigqp_qpPassUVVtxCutPQN",800*160,-160,160);
35246     hSigqp_qpPassUVVtxCutPQN->GetXaxis()->SetTitle("#sigma(Q/P)/(Q/P)");
35247     hSigqp_qpPassUVVtxCutPQN->GetXaxis()->CenterTitle();
35248     hSigqp_qpPassUVVtxCutPQN->GetYaxis()->SetTitle("");
35249     hSigqp_qpPassUVVtxCutPQN->GetYaxis()->CenterTitle();
35250     hSigqp_qpPassUVVtxCutPQN->SetFillColor(0);
35251     hSigqp_qpPassUVVtxCutPQN->SetLineColor(1);
35252     hSigqp_qpPassUVVtxCutPQN->SetLineWidth(2);
35253     hSigqp_qpPassUVVtxCutPQN->SetLineStyle(2);
35254     //hSigqp_qpPassUVVtxCutPQN->SetBit(TH1::kCanRebin);
35255 
35256     hChi2PassUVVtxCutPQN=new TH1F("hChi2PassUVVtxCutPQN","hChi2PassUVVtxCutPQN",10*176,-16,160);
35257     hChi2PassUVVtxCutPQN->GetXaxis()->SetTitle("#chi^{2}/ndof");
35258     hChi2PassUVVtxCutPQN->GetXaxis()->CenterTitle();
35259     hChi2PassUVVtxCutPQN->GetYaxis()->SetTitle("");
35260     hChi2PassUVVtxCutPQN->GetYaxis()->CenterTitle();
35261     hChi2PassUVVtxCutPQN->SetFillColor(0);
35262     hChi2PassUVVtxCutPQN->SetLineColor(1);
35263     hChi2PassUVVtxCutPQN->SetLineWidth(2);
35264     hChi2PassUVVtxCutPQN->SetLineStyle(2);
35265     //hChi2PassUVVtxCutPQN->SetBit(TH1::kCanRebin);
35266 
35267     hProbPassUVVtxCutPQN=new TH1F("hProbPassUVVtxCutPQN","hProbPassUVVtxCutPQN",14000,-0.2,1.2);
35268     hProbPassUVVtxCutPQN->GetXaxis()->SetTitle("Fit Probability");
35269     hProbPassUVVtxCutPQN->GetXaxis()->CenterTitle();
35270     hProbPassUVVtxCutPQN->GetYaxis()->SetTitle("");
35271     hProbPassUVVtxCutPQN->GetYaxis()->CenterTitle();
35272     hProbPassUVVtxCutPQN->SetFillColor(0);
35273     hProbPassUVVtxCutPQN->SetLineColor(1);
35274     hProbPassUVVtxCutPQN->SetLineWidth(2);
35275     hProbPassUVVtxCutPQN->SetLineStyle(2);
35276     //hProbPassUVVtxCutPQN->SetBit(TH1::kCanRebin);
35277 
35278     hDpIDPassUVVtxCutPQN=new TH1F("hDpIDPassUVVtxCutPQN","hDpIDPassUVVtxCutPQN",4*160,-1.6,1.6);
35279     hDpIDPassUVVtxCutPQN->GetXaxis()->SetTitle("PID (from MadDpID)");
35280     hDpIDPassUVVtxCutPQN->GetXaxis()->CenterTitle();
35281     hDpIDPassUVVtxCutPQN->GetYaxis()->SetTitle("");
35282     hDpIDPassUVVtxCutPQN->GetYaxis()->CenterTitle();
35283     hDpIDPassUVVtxCutPQN->SetFillColor(0);
35284     hDpIDPassUVVtxCutPQN->SetLineColor(1);
35285     hDpIDPassUVVtxCutPQN->SetLineWidth(2);
35286     //hDpIDPassUVVtxCutPQN->SetBit(TH1::kCanRebin);
35287 
35288     hRecoEnPassUVVtxCutPQ=new TH1F("hRecoEnPassUVVtxCutPQ","hRecoEnPassUVVtxCutPQ",
35289                                    4*352,-32,320);
35290     hRecoEnPassUVVtxCutPQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
35291     hRecoEnPassUVVtxCutPQ->GetXaxis()->CenterTitle();
35292     hRecoEnPassUVVtxCutPQ->GetYaxis()->SetTitle("");
35293     hRecoEnPassUVVtxCutPQ->GetYaxis()->CenterTitle();
35294     hRecoEnPassUVVtxCutPQ->SetFillColor(0);
35295     hRecoEnPassUVVtxCutPQ->SetLineColor(1);
35296     //hRecoEnPassUVVtxCutPQ->SetBit(TH1::kCanRebin);
35297 
35298     hRecoYPassUVVtxCutPQ=new TH1F("hRecoYPassUVVtxCutPQ","hRecoYPassUVVtxCutPQ",
35299                                   1400,-0.2,1.2);
35300     hRecoYPassUVVtxCutPQ->GetXaxis()->SetTitle("Reconstructed y");
35301     hRecoYPassUVVtxCutPQ->GetXaxis()->CenterTitle();
35302     hRecoYPassUVVtxCutPQ->GetYaxis()->SetTitle("");
35303     hRecoYPassUVVtxCutPQ->GetYaxis()->CenterTitle();
35304     hRecoYPassUVVtxCutPQ->SetFillColor(0);
35305     hRecoYPassUVVtxCutPQ->SetLineColor(1);
35306     //hRecoYPassUVVtxCutPQ->SetBit(TH1::kCanRebin);
35307 
35308 
35309     hNMProbPassUVVtxCutPQ=new TH1F
35310       ("hNMProbPassUVVtxCutPQ","hNMProbPassUVVtxCutPQ",14000,-0.2,1.2);
35311     hNMProbPassUVVtxCutPQ->GetXaxis()->SetTitle("Fit Probability");
35312     hNMProbPassUVVtxCutPQ->GetXaxis()->CenterTitle();
35313     hNMProbPassUVVtxCutPQ->GetYaxis()->SetTitle("");
35314     hNMProbPassUVVtxCutPQ->GetYaxis()->CenterTitle();
35315     hNMProbPassUVVtxCutPQ->SetFillColor(0);
35316     hNMProbPassUVVtxCutPQ->SetLineColor(1);
35317     hNMProbPassUVVtxCutPQ->SetLineWidth(2);
35318     hNMProbPassUVVtxCutPQ->SetLineStyle(2);
35319     //hNMProbPassUVVtxCutPQ->SetBit(TH1::kCanRebin);
35320 
35321     hNMBProbPassUVVtxCutPQ=new TH1F
35322       ("hNMBProbPassUVVtxCutPQ","hNMBProbPassUVVtxCutPQ",14000,-0.2,1.2);
35323     hNMBProbPassUVVtxCutPQ->GetXaxis()->SetTitle("Fit Probability");
35324     hNMBProbPassUVVtxCutPQ->GetXaxis()->CenterTitle();
35325     hNMBProbPassUVVtxCutPQ->GetYaxis()->SetTitle("");
35326     hNMBProbPassUVVtxCutPQ->GetYaxis()->CenterTitle();
35327     hNMBProbPassUVVtxCutPQ->SetFillColor(0);
35328     hNMBProbPassUVVtxCutPQ->SetLineColor(1);
35329     hNMBProbPassUVVtxCutPQ->SetLineWidth(2);
35330     hNMBProbPassUVVtxCutPQ->SetLineStyle(2);
35331     //hNMBProbPassUVVtxCutPQ->SetBit(TH1::kCanRebin);
35332 
35333     hAllShwProbPassUVVtxCutPQ=new TH1F
35334       ("hAllShwProbPassUVVtxCutPQ",
35335        "hAllShwProbPassUVVtxCutPQ",14000,-0.2,1.2);
35336     hAllShwProbPassUVVtxCutPQ->GetXaxis()->SetTitle("Fit Probability");
35337     hAllShwProbPassUVVtxCutPQ->GetXaxis()->CenterTitle();
35338     hAllShwProbPassUVVtxCutPQ->GetYaxis()->SetTitle("");
35339     hAllShwProbPassUVVtxCutPQ->GetYaxis()->CenterTitle();
35340     hAllShwProbPassUVVtxCutPQ->SetFillColor(0);
35341     hAllShwProbPassUVVtxCutPQ->SetLineColor(1);
35342     hAllShwProbPassUVVtxCutPQ->SetLineWidth(2);
35343     hAllShwProbPassUVVtxCutPQ->SetLineStyle(2);
35344     //hAllShwProbPassUVVtxCutPQ->SetBit(TH1::kCanRebin);
35345 
35346 
35347 
35348     hNMRecoEnPassUVVtxCutPQ=new TH1F
35349       ("hNMRecoEnPassUVVtxCutPQ","hNMRecoEnPassUVVtxCutPQ",
35350        4*352,-32,320);
35351     hNMRecoEnPassUVVtxCutPQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
35352     hNMRecoEnPassUVVtxCutPQ->GetXaxis()->CenterTitle();
35353     hNMRecoEnPassUVVtxCutPQ->GetYaxis()->SetTitle("");
35354     hNMRecoEnPassUVVtxCutPQ->GetYaxis()->CenterTitle();
35355     hNMRecoEnPassUVVtxCutPQ->SetFillColor(0);
35356     hNMRecoEnPassUVVtxCutPQ->SetLineColor(1);
35357     //hNMRecoEnPassUVVtxCutPQ->SetBit(TH1::kCanRebin);
35358 
35359     hNMTrueEnPassUVVtxCutPQ=new TH1F
35360       ("hNMTrueEnPassUVVtxCutPQ","hNMTrueEnPassUVVtxCutPQ",
35361        4*352,-32,320);
35362     hNMTrueEnPassUVVtxCutPQ->GetXaxis()->SetTitle("True Energy (GeV)");
35363     hNMTrueEnPassUVVtxCutPQ->GetXaxis()->CenterTitle();
35364     hNMTrueEnPassUVVtxCutPQ->GetYaxis()->SetTitle("");
35365     hNMTrueEnPassUVVtxCutPQ->GetYaxis()->CenterTitle();
35366     hNMTrueEnPassUVVtxCutPQ->SetFillColor(0);
35367     hNMTrueEnPassUVVtxCutPQ->SetLineColor(1);
35368     //hNMTrueEnPassUVVtxCutPQ->SetBit(TH1::kCanRebin);
35369 
35370     hNMBRecoEnPassUVVtxCutPQ=new TH1F("hNMBRecoEnPassUVVtxCutPQ",
35371                                       "hNMBRecoEnPassUVVtxCutPQ",
35372                                       4*352,-32,320);
35373     hNMBRecoEnPassUVVtxCutPQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
35374     hNMBRecoEnPassUVVtxCutPQ->GetXaxis()->CenterTitle();
35375     hNMBRecoEnPassUVVtxCutPQ->GetYaxis()->SetTitle("");
35376     hNMBRecoEnPassUVVtxCutPQ->GetYaxis()->CenterTitle();
35377     hNMBRecoEnPassUVVtxCutPQ->SetFillColor(0);
35378     hNMBRecoEnPassUVVtxCutPQ->SetLineColor(1);
35379     //hNMBRecoEnPassUVVtxCutPQ->SetBit(TH1::kCanRebin);
35380 
35381     hNMBTrueEnPassUVVtxCutPQ=new TH1F
35382       ("hNMBTrueEnPassUVVtxCutPQ","hNMBTrueEnPassUVVtxCutPQ",
35383        4*352,-32,320);
35384     hNMBTrueEnPassUVVtxCutPQ->GetXaxis()->SetTitle("True Energy (GeV)");
35385     hNMBTrueEnPassUVVtxCutPQ->GetXaxis()->CenterTitle();
35386     hNMBTrueEnPassUVVtxCutPQ->GetYaxis()->SetTitle("");
35387     hNMBTrueEnPassUVVtxCutPQ->GetYaxis()->CenterTitle();
35388     hNMBTrueEnPassUVVtxCutPQ->SetFillColor(0);
35389     hNMBTrueEnPassUVVtxCutPQ->SetLineColor(1);
35390     //hNMBTrueEnPassUVVtxCutPQ->SetBit(TH1::kCanRebin);
35391 
35392     hAllNCRecoEnPassUVVtxCutPQ=new TH1F("hAllNCRecoEnPassUVVtxCutPQ",
35393                                         "hAllNCRecoEnPassUVVtxCutPQ",
35394                                         4*352,-32,320);
35395     hAllNCRecoEnPassUVVtxCutPQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
35396     hAllNCRecoEnPassUVVtxCutPQ->GetXaxis()->CenterTitle();
35397     hAllNCRecoEnPassUVVtxCutPQ->GetYaxis()->SetTitle("");
35398     hAllNCRecoEnPassUVVtxCutPQ->GetYaxis()->CenterTitle();
35399     hAllNCRecoEnPassUVVtxCutPQ->SetFillColor(0);
35400     hAllNCRecoEnPassUVVtxCutPQ->SetLineColor(1);
35401     //hAllNCRecoEnPassUVVtxCutPQ->SetBit(TH1::kCanRebin);
35402 
35403     hAllNCTrueEnPassUVVtxCutPQ=new TH1F
35404       ("hAllNCTrueEnPassUVVtxCutPQ","hAllNCTrueEnPassUVVtxCutPQ",
35405        4*352,-32,320);
35406     hAllNCTrueEnPassUVVtxCutPQ->GetXaxis()->SetTitle("True Energy (GeV)");
35407     hAllNCTrueEnPassUVVtxCutPQ->GetXaxis()->CenterTitle();
35408     hAllNCTrueEnPassUVVtxCutPQ->GetYaxis()->SetTitle("");
35409     hAllNCTrueEnPassUVVtxCutPQ->GetYaxis()->CenterTitle();
35410     hAllNCTrueEnPassUVVtxCutPQ->SetFillColor(0);
35411     hAllNCTrueEnPassUVVtxCutPQ->SetLineColor(1);
35412     //hAllNCTrueEnPassUVVtxCutPQ->SetBit(TH1::kCanRebin);
35413 
35414     hAllShwRecoEnPassUVVtxCutPQ=new TH1F("hAllShwRecoEnPassUVVtxCutPQ",
35415                                          "hAllShwRecoEnPassUVVtxCutPQ",
35416                                          4*352,-32,320);
35417     hAllShwRecoEnPassUVVtxCutPQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
35418     hAllShwRecoEnPassUVVtxCutPQ->GetXaxis()->CenterTitle();
35419     hAllShwRecoEnPassUVVtxCutPQ->GetYaxis()->SetTitle("");
35420     hAllShwRecoEnPassUVVtxCutPQ->GetYaxis()->CenterTitle();
35421     hAllShwRecoEnPassUVVtxCutPQ->SetFillColor(0);
35422     hAllShwRecoEnPassUVVtxCutPQ->SetLineColor(1);
35423     //hAllShwRecoEnPassUVVtxCutPQ->SetBit(TH1::kCanRebin);
35424 
35425     hAllShwTrueEnPassUVVtxCutPQ=new TH1F
35426       ("hAllShwTrueEnPassUVVtxCutPQ","hAllShwTrueEnPassUVVtxCutPQ",
35427        4*352,-32,320);
35428     hAllShwTrueEnPassUVVtxCutPQ->GetXaxis()->SetTitle("True Energy (GeV)");
35429     hAllShwTrueEnPassUVVtxCutPQ->GetXaxis()->CenterTitle();
35430     hAllShwTrueEnPassUVVtxCutPQ->GetYaxis()->SetTitle("");
35431     hAllShwTrueEnPassUVVtxCutPQ->GetYaxis()->CenterTitle();
35432     hAllShwTrueEnPassUVVtxCutPQ->SetFillColor(0);
35433     hAllShwTrueEnPassUVVtxCutPQ->SetLineColor(1);
35434     //hAllShwTrueEnPassUVVtxCutPQ->SetBit(TH1::kCanRebin);
35435 
35436     hNotNMRecoEnPassUVVtxCutPQ=new TH1F
35437       ("hNotNMRecoEnPassUVVtxCutPQ","hNotNMRecoEnPassUVVtxCutPQ",
35438        4*352,-32,320);
35439     hNotNMRecoEnPassUVVtxCutPQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
35440     hNotNMRecoEnPassUVVtxCutPQ->GetXaxis()->CenterTitle();
35441     hNotNMRecoEnPassUVVtxCutPQ->GetYaxis()->SetTitle("");
35442     hNotNMRecoEnPassUVVtxCutPQ->GetYaxis()->CenterTitle();
35443     hNotNMRecoEnPassUVVtxCutPQ->SetFillColor(0);
35444     hNotNMRecoEnPassUVVtxCutPQ->SetLineColor(1);
35445     //hNotNMRecoEnPassUVVtxCutPQ->SetBit(TH1::kCanRebin);
35446 
35447     hNotNMTrueEnPassUVVtxCutPQ=new TH1F
35448       ("hNotNMTrueEnPassUVVtxCutPQ","hNotNMTrueEnPassUVVtxCutPQ",
35449        4*352,-32,320);
35450     hNotNMTrueEnPassUVVtxCutPQ->GetXaxis()->SetTitle("True Energy (GeV)");
35451     hNotNMTrueEnPassUVVtxCutPQ->GetXaxis()->CenterTitle();
35452     hNotNMTrueEnPassUVVtxCutPQ->GetYaxis()->SetTitle("");
35453     hNotNMTrueEnPassUVVtxCutPQ->GetYaxis()->CenterTitle();
35454     hNotNMTrueEnPassUVVtxCutPQ->SetFillColor(0);
35455     hNotNMTrueEnPassUVVtxCutPQ->SetLineColor(1);
35456     //hNotNMTrueEnPassUVVtxCutPQ->SetBit(TH1::kCanRebin);
35457 
35458     hNotNMBRecoEnPassUVVtxCutPQ=new TH1F("hNotNMBRecoEnPassUVVtxCutPQ",
35459                                          "hNotNMBRecoEnPassUVVtxCutPQ",
35460                                          4*352,-32,320);
35461     hNotNMBRecoEnPassUVVtxCutPQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
35462     hNotNMBRecoEnPassUVVtxCutPQ->GetXaxis()->CenterTitle();
35463     hNotNMBRecoEnPassUVVtxCutPQ->GetYaxis()->SetTitle("");
35464     hNotNMBRecoEnPassUVVtxCutPQ->GetYaxis()->CenterTitle();
35465     hNotNMBRecoEnPassUVVtxCutPQ->SetFillColor(0);
35466     hNotNMBRecoEnPassUVVtxCutPQ->SetLineColor(1);
35467     //hNotNMBRecoEnPassUVVtxCutPQ->SetBit(TH1::kCanRebin);
35468 
35469     hNotNMBTrueEnPassUVVtxCutPQ=new TH1F
35470       ("hNotNMBTrueEnPassUVVtxCutPQ","hNotNMBTrueEnPassUVVtxCutPQ",
35471        4*352,-32,320);
35472     hNotNMBTrueEnPassUVVtxCutPQ->GetXaxis()->SetTitle("True Energy (GeV)");
35473     hNotNMBTrueEnPassUVVtxCutPQ->GetXaxis()->CenterTitle();
35474     hNotNMBTrueEnPassUVVtxCutPQ->GetYaxis()->SetTitle("");
35475     hNotNMBTrueEnPassUVVtxCutPQ->GetYaxis()->CenterTitle();
35476     hNotNMBTrueEnPassUVVtxCutPQ->SetFillColor(0);
35477     hNotNMBTrueEnPassUVVtxCutPQ->SetLineColor(1);
35478     //hNotNMBTrueEnPassUVVtxCutPQ->SetBit(TH1::kCanRebin);
35479 
35480 
35481 
35482 
35483     //NQ
35484     hSigqp_qpPassUVVtxCutNQN=new TH1F("hSigqp_qpPassUVVtxCutNQN","hSigqp_qpPassUVVtxCutNQN",800*160,-160,160);
35485     hSigqp_qpPassUVVtxCutNQN->GetXaxis()->SetTitle("#sigma(Q/P)/(Q/P)");
35486     hSigqp_qpPassUVVtxCutNQN->GetXaxis()->CenterTitle();
35487     hSigqp_qpPassUVVtxCutNQN->GetYaxis()->SetTitle("");
35488     hSigqp_qpPassUVVtxCutNQN->GetYaxis()->CenterTitle();
35489     hSigqp_qpPassUVVtxCutNQN->SetFillColor(0);
35490     hSigqp_qpPassUVVtxCutNQN->SetLineColor(1);
35491     hSigqp_qpPassUVVtxCutNQN->SetLineWidth(2);
35492     hSigqp_qpPassUVVtxCutNQN->SetLineStyle(2);
35493     //hSigqp_qpPassUVVtxCutNQN->SetBit(TH1::kCanRebin);
35494 
35495     hChi2PassUVVtxCutNQN=new TH1F("hChi2PassUVVtxCutNQN","hChi2PassUVVtxCutNQN",10*176,-16,160);
35496     hChi2PassUVVtxCutNQN->GetXaxis()->SetTitle("#chi^{2}/ndof");
35497     hChi2PassUVVtxCutNQN->GetXaxis()->CenterTitle();
35498     hChi2PassUVVtxCutNQN->GetYaxis()->SetTitle("");
35499     hChi2PassUVVtxCutNQN->GetYaxis()->CenterTitle();
35500     hChi2PassUVVtxCutNQN->SetFillColor(0);
35501     hChi2PassUVVtxCutNQN->SetLineColor(1);
35502     hChi2PassUVVtxCutNQN->SetLineWidth(2);
35503     hChi2PassUVVtxCutNQN->SetLineStyle(2);
35504     //hChi2PassUVVtxCutNQN->SetBit(TH1::kCanRebin);
35505 
35506     hProbPassUVVtxCutNQN=new TH1F("hProbPassUVVtxCutNQN","hProbPassUVVtxCutNQN",14000,-0.2,1.2);
35507     hProbPassUVVtxCutNQN->GetXaxis()->SetTitle("Fit Probability");
35508     hProbPassUVVtxCutNQN->GetXaxis()->CenterTitle();
35509     hProbPassUVVtxCutNQN->GetYaxis()->SetTitle("");
35510     hProbPassUVVtxCutNQN->GetYaxis()->CenterTitle();
35511     hProbPassUVVtxCutNQN->SetFillColor(0);
35512     hProbPassUVVtxCutNQN->SetLineColor(1);
35513     hProbPassUVVtxCutNQN->SetLineWidth(2);
35514     hProbPassUVVtxCutNQN->SetLineStyle(2);
35515     //hProbPassUVVtxCutNQN->SetBit(TH1::kCanRebin);
35516 
35517     hDpIDPassUVVtxCutNQN=new TH1F("hDpIDPassUVVtxCutNQN","hDpIDPassUVVtxCutNQN",4*160,-1.6,1.6);
35518     hDpIDPassUVVtxCutNQN->GetXaxis()->SetTitle("PID (from MadDpID)");
35519     hDpIDPassUVVtxCutNQN->GetXaxis()->CenterTitle();
35520     hDpIDPassUVVtxCutNQN->GetYaxis()->SetTitle("");
35521     hDpIDPassUVVtxCutNQN->GetYaxis()->CenterTitle();
35522     hDpIDPassUVVtxCutNQN->SetFillColor(0);
35523     hDpIDPassUVVtxCutNQN->SetLineColor(1);
35524     hDpIDPassUVVtxCutNQN->SetLineWidth(2);
35525     //hDpIDPassUVVtxCutNQN->SetBit(TH1::kCanRebin);
35526 
35527     hRecoEnPassUVVtxCutNQ=new TH1F("hRecoEnPassUVVtxCutNQ","hRecoEnPassUVVtxCutNQ",
35528                                    4*352,-32,320);
35529     hRecoEnPassUVVtxCutNQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
35530     hRecoEnPassUVVtxCutNQ->GetXaxis()->CenterTitle();
35531     hRecoEnPassUVVtxCutNQ->GetYaxis()->SetTitle("");
35532     hRecoEnPassUVVtxCutNQ->GetYaxis()->CenterTitle();
35533     hRecoEnPassUVVtxCutNQ->SetFillColor(0);
35534     hRecoEnPassUVVtxCutNQ->SetLineColor(1);
35535     //hRecoEnPassUVVtxCutNQ->SetBit(TH1::kCanRebin);
35536 
35537     hRecoYPassUVVtxCutNQ=new TH1F("hRecoYPassUVVtxCutNQ","hRecoYPassUVVtxCutNQ",
35538                                   1400,-0.2,1.2);
35539     hRecoYPassUVVtxCutNQ->GetXaxis()->SetTitle("Reconstructed y");
35540     hRecoYPassUVVtxCutNQ->GetXaxis()->CenterTitle();
35541     hRecoYPassUVVtxCutNQ->GetYaxis()->SetTitle("");
35542     hRecoYPassUVVtxCutNQ->GetYaxis()->CenterTitle();
35543     hRecoYPassUVVtxCutNQ->SetFillColor(0);
35544     hRecoYPassUVVtxCutNQ->SetLineColor(1);
35545     //hRecoYPassUVVtxCutNQ->SetBit(TH1::kCanRebin);
35546 
35547 
35548     hNMProbPassUVVtxCutNQ=new TH1F
35549       ("hNMProbPassUVVtxCutNQ","hNMProbPassUVVtxCutNQ",14000,-0.2,1.2);
35550     hNMProbPassUVVtxCutNQ->GetXaxis()->SetTitle("Fit Probability");
35551     hNMProbPassUVVtxCutNQ->GetXaxis()->CenterTitle();
35552     hNMProbPassUVVtxCutNQ->GetYaxis()->SetTitle("");
35553     hNMProbPassUVVtxCutNQ->GetYaxis()->CenterTitle();
35554     hNMProbPassUVVtxCutNQ->SetFillColor(0);
35555     hNMProbPassUVVtxCutNQ->SetLineColor(1);
35556     hNMProbPassUVVtxCutNQ->SetLineWidth(2);
35557     hNMProbPassUVVtxCutNQ->SetLineStyle(2);
35558     //hNMProbPassUVVtxCutNQ->SetBit(TH1::kCanRebin);
35559 
35560     hNMBProbPassUVVtxCutNQ=new TH1F
35561       ("hNMBProbPassUVVtxCutNQ","hNMBProbPassUVVtxCutNQ",14000,-0.2,1.2);
35562     hNMBProbPassUVVtxCutNQ->GetXaxis()->SetTitle("Fit Probability");
35563     hNMBProbPassUVVtxCutNQ->GetXaxis()->CenterTitle();
35564     hNMBProbPassUVVtxCutNQ->GetYaxis()->SetTitle("");
35565     hNMBProbPassUVVtxCutNQ->GetYaxis()->CenterTitle();
35566     hNMBProbPassUVVtxCutNQ->SetFillColor(0);
35567     hNMBProbPassUVVtxCutNQ->SetLineColor(1);
35568     hNMBProbPassUVVtxCutNQ->SetLineWidth(2);
35569     hNMBProbPassUVVtxCutNQ->SetLineStyle(2);
35570     //hNMBProbPassUVVtxCutNQ->SetBit(TH1::kCanRebin);
35571 
35572     hAllShwProbPassUVVtxCutNQ=new TH1F
35573       ("hAllShwProbPassUVVtxCutNQ",
35574        "hAllShwProbPassUVVtxCutNQ",14000,-0.2,1.2);
35575     hAllShwProbPassUVVtxCutNQ->GetXaxis()->SetTitle("Fit Probability");
35576     hAllShwProbPassUVVtxCutNQ->GetXaxis()->CenterTitle();
35577     hAllShwProbPassUVVtxCutNQ->GetYaxis()->SetTitle("");
35578     hAllShwProbPassUVVtxCutNQ->GetYaxis()->CenterTitle();
35579     hAllShwProbPassUVVtxCutNQ->SetFillColor(0);
35580     hAllShwProbPassUVVtxCutNQ->SetLineColor(1);
35581     hAllShwProbPassUVVtxCutNQ->SetLineWidth(2);
35582     hAllShwProbPassUVVtxCutNQ->SetLineStyle(2);
35583     //hAllShwProbPassUVVtxCutNQ->SetBit(TH1::kCanRebin);
35584 
35585 
35586     hNMRecoEnPassUVVtxCutNQ=new TH1F
35587       ("hNMRecoEnPassUVVtxCutNQ","hNMRecoEnPassUVVtxCutNQ",4*352,-32,320);
35588     hNMRecoEnPassUVVtxCutNQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
35589     hNMRecoEnPassUVVtxCutNQ->GetXaxis()->CenterTitle();
35590     hNMRecoEnPassUVVtxCutNQ->GetYaxis()->SetTitle("");
35591     hNMRecoEnPassUVVtxCutNQ->GetYaxis()->CenterTitle();
35592     hNMRecoEnPassUVVtxCutNQ->SetFillColor(0);
35593     hNMRecoEnPassUVVtxCutNQ->SetLineColor(1);
35594     //hNMRecoEnPassUVVtxCutNQ->SetBit(TH1::kCanRebin);
35595 
35596     hNMTrueEnPassUVVtxCutNQ=new TH1F
35597       ("hNMTrueEnPassUVVtxCutNQ","hNMTrueEnPassUVVtxCutNQ",4*352,-32,320);
35598     hNMTrueEnPassUVVtxCutNQ->GetXaxis()->SetTitle("True Energy (GeV)");
35599     hNMTrueEnPassUVVtxCutNQ->GetXaxis()->CenterTitle();
35600     hNMTrueEnPassUVVtxCutNQ->GetYaxis()->SetTitle("");
35601     hNMTrueEnPassUVVtxCutNQ->GetYaxis()->CenterTitle();
35602     hNMTrueEnPassUVVtxCutNQ->SetFillColor(0);
35603     hNMTrueEnPassUVVtxCutNQ->SetLineColor(1);
35604     //hNMTrueEnPassUVVtxCutNQ->SetBit(TH1::kCanRebin);
35605 
35606     hNMBRecoEnPassUVVtxCutNQ=new TH1F("hNMBRecoEnPassUVVtxCutNQ",
35607                                       "hNMBRecoEnPassUVVtxCutNQ",
35608                                       4*352,-32,320);
35609     hNMBRecoEnPassUVVtxCutNQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
35610     hNMBRecoEnPassUVVtxCutNQ->GetXaxis()->CenterTitle();
35611     hNMBRecoEnPassUVVtxCutNQ->GetYaxis()->SetTitle("");
35612     hNMBRecoEnPassUVVtxCutNQ->GetYaxis()->CenterTitle();
35613     hNMBRecoEnPassUVVtxCutNQ->SetFillColor(0);
35614     hNMBRecoEnPassUVVtxCutNQ->SetLineColor(1);
35615     //hNMBRecoEnPassUVVtxCutNQ->SetBit(TH1::kCanRebin);
35616 
35617     hNMBTrueEnPassUVVtxCutNQ=new TH1F
35618       ("hNMBTrueEnPassUVVtxCutNQ","hNMBTrueEnPassUVVtxCutNQ",
35619        4*352,-32,320);
35620     hNMBTrueEnPassUVVtxCutNQ->GetXaxis()->SetTitle("True Energy (GeV)");
35621     hNMBTrueEnPassUVVtxCutNQ->GetXaxis()->CenterTitle();
35622     hNMBTrueEnPassUVVtxCutNQ->GetYaxis()->SetTitle("");
35623     hNMBTrueEnPassUVVtxCutNQ->GetYaxis()->CenterTitle();
35624     hNMBTrueEnPassUVVtxCutNQ->SetFillColor(0);
35625     hNMBTrueEnPassUVVtxCutNQ->SetLineColor(1);
35626     //hNMBTrueEnPassUVVtxCutNQ->SetBit(TH1::kCanRebin);
35627 
35628 
35629 
35630     hAllNCRecoEnPassUVVtxCutNQ=new TH1F("hAllNCRecoEnPassUVVtxCutNQ",
35631                                         "hAllNCRecoEnPassUVVtxCutNQ",
35632                                         4*352,-32,320);
35633     hAllNCRecoEnPassUVVtxCutNQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
35634     hAllNCRecoEnPassUVVtxCutNQ->GetXaxis()->CenterTitle();
35635     hAllNCRecoEnPassUVVtxCutNQ->GetYaxis()->SetTitle("");
35636     hAllNCRecoEnPassUVVtxCutNQ->GetYaxis()->CenterTitle();
35637     hAllNCRecoEnPassUVVtxCutNQ->SetFillColor(0);
35638     hAllNCRecoEnPassUVVtxCutNQ->SetLineColor(1);
35639     //hAllNCRecoEnPassUVVtxCutNQ->SetBit(TH1::kCanRebin);
35640 
35641     hAllNCTrueEnPassUVVtxCutNQ=new TH1F
35642       ("hAllNCTrueEnPassUVVtxCutNQ","hAllNCTrueEnPassUVVtxCutNQ",
35643        4*352,-32,320);
35644     hAllNCTrueEnPassUVVtxCutNQ->GetXaxis()->SetTitle("True Energy (GeV)");
35645     hAllNCTrueEnPassUVVtxCutNQ->GetXaxis()->CenterTitle();
35646     hAllNCTrueEnPassUVVtxCutNQ->GetYaxis()->SetTitle("");
35647     hAllNCTrueEnPassUVVtxCutNQ->GetYaxis()->CenterTitle();
35648     hAllNCTrueEnPassUVVtxCutNQ->SetFillColor(0);
35649     hAllNCTrueEnPassUVVtxCutNQ->SetLineColor(1);
35650     //hAllNCTrueEnPassUVVtxCutNQ->SetBit(TH1::kCanRebin);
35651 
35652     hAllShwRecoEnPassUVVtxCutNQ=new TH1F("hAllShwRecoEnPassUVVtxCutNQ",
35653                                          "hAllShwRecoEnPassUVVtxCutNQ",
35654                                          4*352,-32,320);
35655     hAllShwRecoEnPassUVVtxCutNQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
35656     hAllShwRecoEnPassUVVtxCutNQ->GetXaxis()->CenterTitle();
35657     hAllShwRecoEnPassUVVtxCutNQ->GetYaxis()->SetTitle("");
35658     hAllShwRecoEnPassUVVtxCutNQ->GetYaxis()->CenterTitle();
35659     hAllShwRecoEnPassUVVtxCutNQ->SetFillColor(0);
35660     hAllShwRecoEnPassUVVtxCutNQ->SetLineColor(1);
35661     //hAllShwRecoEnPassUVVtxCutNQ->SetBit(TH1::kCanRebin);
35662 
35663     hAllShwTrueEnPassUVVtxCutNQ=new TH1F
35664       ("hAllShwTrueEnPassUVVtxCutNQ","hAllShwTrueEnPassUVVtxCutNQ",
35665        4*352,-32,320);
35666     hAllShwTrueEnPassUVVtxCutNQ->GetXaxis()->SetTitle("True Energy (GeV)");
35667     hAllShwTrueEnPassUVVtxCutNQ->GetXaxis()->CenterTitle();
35668     hAllShwTrueEnPassUVVtxCutNQ->GetYaxis()->SetTitle("");
35669     hAllShwTrueEnPassUVVtxCutNQ->GetYaxis()->CenterTitle();
35670     hAllShwTrueEnPassUVVtxCutNQ->SetFillColor(0);
35671     hAllShwTrueEnPassUVVtxCutNQ->SetLineColor(1);
35672     //hAllShwTrueEnPassUVVtxCutNQ->SetBit(TH1::kCanRebin);
35673 
35674     hNotNMRecoEnPassUVVtxCutNQ=new TH1F
35675       ("hNotNMRecoEnPassUVVtxCutNQ","hNotNMRecoEnPassUVVtxCutNQ",
35676        4*352,-32,320);
35677     hNotNMRecoEnPassUVVtxCutNQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
35678     hNotNMRecoEnPassUVVtxCutNQ->GetXaxis()->CenterTitle();
35679     hNotNMRecoEnPassUVVtxCutNQ->GetYaxis()->SetTitle("");
35680     hNotNMRecoEnPassUVVtxCutNQ->GetYaxis()->CenterTitle();
35681     hNotNMRecoEnPassUVVtxCutNQ->SetFillColor(0);
35682     hNotNMRecoEnPassUVVtxCutNQ->SetLineColor(1);
35683     //hNotNMRecoEnPassUVVtxCutNQ->SetBit(TH1::kCanRebin);
35684 
35685     hNotNMTrueEnPassUVVtxCutNQ=new TH1F
35686       ("hNotNMTrueEnPassUVVtxCutNQ","hNotNMTrueEnPassUVVtxCutNQ",
35687        4*352,-32,320);
35688     hNotNMTrueEnPassUVVtxCutNQ->GetXaxis()->SetTitle("True Energy (GeV)");
35689     hNotNMTrueEnPassUVVtxCutNQ->GetXaxis()->CenterTitle();
35690     hNotNMTrueEnPassUVVtxCutNQ->GetYaxis()->SetTitle("");
35691     hNotNMTrueEnPassUVVtxCutNQ->GetYaxis()->CenterTitle();
35692     hNotNMTrueEnPassUVVtxCutNQ->SetFillColor(0);
35693     hNotNMTrueEnPassUVVtxCutNQ->SetLineColor(1);
35694     //hNotNMTrueEnPassUVVtxCutNQ->SetBit(TH1::kCanRebin);
35695 
35696     hNotNMBRecoEnPassUVVtxCutNQ=new TH1F("hNotNMBRecoEnPassUVVtxCutNQ",
35697                                          "hNotNMBRecoEnPassUVVtxCutNQ",
35698                                          4*352,-32,320);
35699     hNotNMBRecoEnPassUVVtxCutNQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
35700     hNotNMBRecoEnPassUVVtxCutNQ->GetXaxis()->CenterTitle();
35701     hNotNMBRecoEnPassUVVtxCutNQ->GetYaxis()->SetTitle("");
35702     hNotNMBRecoEnPassUVVtxCutNQ->GetYaxis()->CenterTitle();
35703     hNotNMBRecoEnPassUVVtxCutNQ->SetFillColor(0);
35704     hNotNMBRecoEnPassUVVtxCutNQ->SetLineColor(1);
35705     //hNotNMBRecoEnPassUVVtxCutNQ->SetBit(TH1::kCanRebin);
35706 
35707     hNotNMBTrueEnPassUVVtxCutNQ=new TH1F
35708       ("hNotNMBTrueEnPassUVVtxCutNQ","hNotNMBTrueEnPassUVVtxCutNQ",
35709        4*352,-32,320);
35710     hNotNMBTrueEnPassUVVtxCutNQ->GetXaxis()->SetTitle("True Energy (GeV)");
35711     hNotNMBTrueEnPassUVVtxCutNQ->GetXaxis()->CenterTitle();
35712     hNotNMBTrueEnPassUVVtxCutNQ->GetYaxis()->SetTitle("");
35713     hNotNMBTrueEnPassUVVtxCutNQ->GetYaxis()->CenterTitle();
35714     hNotNMBTrueEnPassUVVtxCutNQ->SetFillColor(0);
35715     hNotNMBTrueEnPassUVVtxCutNQ->SetLineColor(1);
35716     //hNotNMBTrueEnPassUVVtxCutNQ->SetBit(TH1::kCanRebin);
35717   }
35718 
35719 
35720   //PQ
35721   if (nu.charge==+1){
35722     hSigqp_qpPassUVVtxCutPQN->Fill(nu.sigqp_qp,nu.rw);
35723     hChi2PassUVVtxCutPQN->Fill(nu.chi2PerNdof,nu.rw);
35724     hProbPassUVVtxCutPQN->Fill(nu.prob,nu.rw);
35725     hDpIDPassUVVtxCutPQN->Fill(nu.dpID,nu.rw);
35726 
35727     hRecoEnPassUVVtxCutPQ->Fill(nu.energy,nu.rw);
35728     hRecoYPassUVVtxCutPQ->Fill(nu.y,nu.rw);
35729   }
35730   //NQ
35731   else if (nu.charge==-1){
35732     hSigqp_qpPassUVVtxCutNQN->Fill(nu.sigqp_qp,nu.rw);
35733     hChi2PassUVVtxCutNQN->Fill(nu.chi2PerNdof,nu.rw);
35734     hProbPassUVVtxCutNQN->Fill(nu.prob,nu.rw);
35735     hDpIDPassUVVtxCutNQN->Fill(nu.dpID,nu.rw);
35736 
35737     hRecoEnPassUVVtxCutNQ->Fill(nu.energy,nu.rw);
35738     hRecoYPassUVVtxCutNQ->Fill(nu.y,nu.rw);
35739   }
35740   else MSG("NuPlots",Msg::kWarning)<<"Ahh, bad charge"<<endl;
35741 
35742 
35743   //now fill the truth plots
35744   if (nu.iaction==1){//CC
35745     if (nu.inu==14){//NuMu
35746       if (nu.charge==+1) {
35747         hNMProbPassUVVtxCutPQ->Fill(nu.prob,nu.rw);
35748         hNMRecoEnPassUVVtxCutPQ->Fill(nu.energy,nu.rw);
35749         hNMTrueEnPassUVVtxCutPQ->Fill(nu.energyMC,nu.rw);
35750       }
35751       else if (nu.charge==-1){
35752         hNMProbPassUVVtxCutNQ->Fill(nu.prob,nu.rw);
35753         hNMRecoEnPassUVVtxCutNQ->Fill(nu.energy,nu.rw);
35754         hNMTrueEnPassUVVtxCutNQ->Fill(nu.energyMC,nu.rw);
35755       }
35756     }
35757     else if (nu.inu==-14){//NuMuBar
35758       if (nu.charge==+1) {
35759         hNMBProbPassUVVtxCutPQ->Fill(nu.prob,nu.rw);
35760         hNMBRecoEnPassUVVtxCutPQ->Fill(nu.energy,nu.rw);
35761         hNMBTrueEnPassUVVtxCutPQ->Fill(nu.energyMC,nu.rw);
35762       }
35763       else if (nu.charge==-1){
35764         hNMBProbPassUVVtxCutNQ->Fill(nu.prob,nu.rw);
35765         hNMBRecoEnPassUVVtxCutNQ->Fill(nu.energy,nu.rw);
35766         hNMBTrueEnPassUVVtxCutNQ->Fill(nu.energyMC,nu.rw);
35767       }
35768     }
35769   }
35770   else if (nu.iaction==0){//NC
35771     if (nu.charge==+1) {
35772       hAllNCRecoEnPassUVVtxCutPQ->Fill(nu.energy,nu.rw);
35773       hAllNCTrueEnPassUVVtxCutPQ->Fill(nu.energyMC,nu.rw);
35774     }
35775     else if (nu.charge==-1){
35776       hAllNCRecoEnPassUVVtxCutNQ->Fill(nu.energy,nu.rw);
35777       hAllNCTrueEnPassUVVtxCutNQ->Fill(nu.energyMC,nu.rw);
35778     }
35779   }
35780 
35781   //all but NuMu/NuMuBar CC
35782   if (!(nu.iaction==1 && (nu.inu==14 || nu.inu==-14))) {
35783     if (nu.charge==+1) {
35784       hAllShwProbPassUVVtxCutPQ->Fill(nu.prob,nu.rw);
35785       hAllShwRecoEnPassUVVtxCutPQ->Fill(nu.energy,nu.rw);
35786       hAllShwTrueEnPassUVVtxCutPQ->Fill(nu.energyMC,nu.rw);
35787     }
35788     else if (nu.charge==-1){
35789       hAllShwProbPassUVVtxCutNQ->Fill(nu.prob,nu.rw);
35790       hAllShwRecoEnPassUVVtxCutNQ->Fill(nu.energy,nu.rw);
35791       hAllShwTrueEnPassUVVtxCutNQ->Fill(nu.energyMC,nu.rw);
35792     }
35793   }
35794 
35795   //fill all-but-numubar-cc histos
35796   if (!(nu.inu==-14 && nu.iaction==1)) {// !numubarCC
35797     if (nu.charge==+1) {
35798       hNotNMBRecoEnPassUVVtxCutPQ->Fill(nu.energy,nu.rw);
35799       hNotNMBTrueEnPassUVVtxCutPQ->Fill(nu.energyMC,nu.rw);
35800     }
35801     else if (nu.charge==-1){
35802       hNotNMBRecoEnPassUVVtxCutNQ->Fill(nu.energy,nu.rw);
35803       hNotNMBTrueEnPassUVVtxCutNQ->Fill(nu.energyMC,nu.rw);
35804     }
35805   }
35806 
35807   //fill all-but-numu-cc histos
35808   if (!(nu.inu==14 && nu.iaction==1)) {// !numuCC
35809     if (nu.charge==+1) {
35810       hNotNMRecoEnPassUVVtxCutPQ->Fill(nu.energy,nu.rw);
35811       hNotNMTrueEnPassUVVtxCutPQ->Fill(nu.energyMC,nu.rw);
35812     }
35813     else if (nu.charge==-1){
35814       hNotNMRecoEnPassUVVtxCutNQ->Fill(nu.energy,nu.rw);
35815       hNotNMTrueEnPassUVVtxCutNQ->Fill(nu.energyMC,nu.rw);
35816     }
35817   }
35818 
35819 
35820 
35821 
35822 
35823   /*
35824 
35825 
35826     static TH1F* hNMRecoEnPassUVVtxCut=0;
35827     static TH1F* hNMTrueEnPassUVVtxCut=0;
35828     static TH1F* hNMBRecoEnPassUVVtxCut=0;
35829     static TH1F* hNMBTrueEnPassUVVtxCut=0;
35830 
35831     //PQ
35832     static TH1F* hSigqp_qpPassUVVtxCutPQN=0;
35833     static TH1F* hChi2PassUVVtxCutPQN=0;
35834     static TH1F* hProbPassUVVtxCutPQN=0;
35835     static TH1F* hDpIDPassUVVtxCutPQN=0;
35836     static TH1F* hRecoEnPassUVVtxCutPQ=0;
35837     static TH1F* hRecoYPassUVVtxCutPQ=0;
35838 
35839     static TH1F* hNMProbPassUVVtxCutPQ=0;
35840     static TH1F* hNMBProbPassUVVtxCutPQ=0;
35841     static TH1F* hAllShwProbPassUVVtxCutPQ=0;
35842 
35843     static TH1F* hNMRecoEnPassUVVtxCutPQ=0;
35844     static TH1F* hNMTrueEnPassUVVtxCutPQ=0;
35845     static TH1F* hNMBRecoEnPassUVVtxCutPQ=0;
35846     static TH1F* hNMBTrueEnPassUVVtxCutPQ=0;
35847 
35848     //NQ
35849     static TH1F* hSigqp_qpPassUVVtxCutNQN=0;
35850     static TH1F* hChi2PassUVVtxCutNQN=0;
35851     static TH1F* hProbPassUVVtxCutNQN=0;
35852     static TH1F* hDpIDPassUVVtxCutNQN=0;
35853     static TH1F* hRecoEnPassUVVtxCutNQ=0;
35854     static TH1F* hRecoYPassUVVtxCutNQ=0;
35855 
35856     static TH1F* hNMProbPassUVVtxCutNQ=0;
35857     static TH1F* hNMBProbPassUVVtxCutNQ=0;
35858     static TH1F* hAllShwProbPassUVVtxCutNQ=0;
35859 
35860     static TH1F* hNMBRecoEnPassUVVtxCutNQ=0;
35861     static TH1F* hNMBTrueEnPassUVVtxCutNQ=0;
35862     static TH1F* hNMRecoEnPassUVVtxCutNQ=0;
35863     static TH1F* hNMTrueEnPassUVVtxCutNQ=0;
35864 
35865     if (!hChi2PassUVVtxCutNQN){
35866     MAXMSG("NuPlots",Msg::kDebug,1)
35867     <<"Creating DPIdSigmaQPPassUVVtxCutPlots plots..."<<endl;
35868 
35869     //PQ
35870     hSigqp_qpPassUVVtxCutPQN=new TH1F("hSigqp_qpPassUVVtxCutPQN","hSigqp_qpPassUVVtxCutPQN",800*160,-160,160);
35871     hSigqp_qpPassUVVtxCutPQN->GetXaxis()->SetTitle("#sigma(Q/P)/(Q/P)");
35872     hSigqp_qpPassUVVtxCutPQN->GetXaxis()->CenterTitle();
35873     hSigqp_qpPassUVVtxCutPQN->GetYaxis()->SetTitle("");
35874     hSigqp_qpPassUVVtxCutPQN->GetYaxis()->CenterTitle();
35875     hSigqp_qpPassUVVtxCutPQN->SetFillColor(0);
35876     hSigqp_qpPassUVVtxCutPQN->SetLineColor(1);
35877     hSigqp_qpPassUVVtxCutPQN->SetLineWidth(2);
35878     hSigqp_qpPassUVVtxCutPQN->SetLineStyle(2);
35879     //hSigqp_qpPassUVVtxCutPQN->SetBit(TH1::kCanRebin);
35880 
35881     hChi2PassUVVtxCutPQN=new TH1F("hChi2PassUVVtxCutPQN","hChi2PassUVVtxCutPQN",10*176,-16,160);
35882     hChi2PassUVVtxCutPQN->GetXaxis()->SetTitle("#chi^{2}/ndof");
35883     hChi2PassUVVtxCutPQN->GetXaxis()->CenterTitle();
35884     hChi2PassUVVtxCutPQN->GetYaxis()->SetTitle("");
35885     hChi2PassUVVtxCutPQN->GetYaxis()->CenterTitle();
35886     hChi2PassUVVtxCutPQN->SetFillColor(0);
35887     hChi2PassUVVtxCutPQN->SetLineColor(1);
35888     hChi2PassUVVtxCutPQN->SetLineWidth(2);
35889     hChi2PassUVVtxCutPQN->SetLineStyle(2);
35890     //hChi2PassUVVtxCutPQN->SetBit(TH1::kCanRebin);
35891 
35892     hProbPassUVVtxCutPQN=new TH1F("hProbPassUVVtxCutPQN","hProbPassUVVtxCutPQN",14000,-0.2,1.2);
35893     hProbPassUVVtxCutPQN->GetXaxis()->SetTitle("Fit Probability");
35894     hProbPassUVVtxCutPQN->GetXaxis()->CenterTitle();
35895     hProbPassUVVtxCutPQN->GetYaxis()->SetTitle("");
35896     hProbPassUVVtxCutPQN->GetYaxis()->CenterTitle();
35897     hProbPassUVVtxCutPQN->SetFillColor(0);
35898     hProbPassUVVtxCutPQN->SetLineColor(1);
35899     hProbPassUVVtxCutPQN->SetLineWidth(2);
35900     hProbPassUVVtxCutPQN->SetLineStyle(2);
35901     //hProbPassUVVtxCutPQN->SetBit(TH1::kCanRebin);
35902 
35903     hDpIDPassUVVtxCutPQN=new TH1F("hDpIDPassUVVtxCutPQN","hDpIDPassUVVtxCutPQN",4*160,-1.6,1.6);
35904     hDpIDPassUVVtxCutPQN->GetXaxis()->SetTitle("PID (from MadDpID)");
35905     hDpIDPassUVVtxCutPQN->GetXaxis()->CenterTitle();
35906     hDpIDPassUVVtxCutPQN->GetYaxis()->SetTitle("");
35907     hDpIDPassUVVtxCutPQN->GetYaxis()->CenterTitle();
35908     hDpIDPassUVVtxCutPQN->SetFillColor(0);
35909     hDpIDPassUVVtxCutPQN->SetLineColor(1);
35910     hDpIDPassUVVtxCutPQN->SetLineWidth(2);
35911     //hDpIDPassUVVtxCutPQN->SetBit(TH1::kCanRebin);
35912 
35913     hRecoEnPassUVVtxCutPQ=new TH1F("hRecoEnPassUVVtxCutPQ","hRecoEnPassUVVtxCutPQ",
35914     4*352,-32,320);
35915     hRecoEnPassUVVtxCutPQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
35916     hRecoEnPassUVVtxCutPQ->GetXaxis()->CenterTitle();
35917     hRecoEnPassUVVtxCutPQ->GetYaxis()->SetTitle("");
35918     hRecoEnPassUVVtxCutPQ->GetYaxis()->CenterTitle();
35919     hRecoEnPassUVVtxCutPQ->SetFillColor(0);
35920     hRecoEnPassUVVtxCutPQ->SetLineColor(1);
35921     //hRecoEnPassUVVtxCutPQ->SetBit(TH1::kCanRebin);
35922 
35923     hRecoYPassUVVtxCutPQ=new TH1F("hRecoYPassUVVtxCutPQ","hRecoYPassUVVtxCutPQ",
35924     1400,-0.2,1.2);
35925     hRecoYPassUVVtxCutPQ->GetXaxis()->SetTitle("Reconstructed y");
35926     hRecoYPassUVVtxCutPQ->GetXaxis()->CenterTitle();
35927     hRecoYPassUVVtxCutPQ->GetYaxis()->SetTitle("");
35928     hRecoYPassUVVtxCutPQ->GetYaxis()->CenterTitle();
35929     hRecoYPassUVVtxCutPQ->SetFillColor(0);
35930     hRecoYPassUVVtxCutPQ->SetLineColor(1);
35931     //hRecoYPassUVVtxCutPQ->SetBit(TH1::kCanRebin);
35932 
35933 
35934     hNMProbPassUVVtxCutPQ=new TH1F
35935     ("hNMProbPassUVVtxCutPQ","hNMProbPassUVVtxCutPQ",14000,-0.2,1.2);
35936     hNMProbPassUVVtxCutPQ->GetXaxis()->SetTitle("Fit Probability");
35937     hNMProbPassUVVtxCutPQ->GetXaxis()->CenterTitle();
35938     hNMProbPassUVVtxCutPQ->GetYaxis()->SetTitle("");
35939     hNMProbPassUVVtxCutPQ->GetYaxis()->CenterTitle();
35940     hNMProbPassUVVtxCutPQ->SetFillColor(0);
35941     hNMProbPassUVVtxCutPQ->SetLineColor(1);
35942     hNMProbPassUVVtxCutPQ->SetLineWidth(2);
35943     hNMProbPassUVVtxCutPQ->SetLineStyle(2);
35944     //hNMProbPassUVVtxCutPQ->SetBit(TH1::kCanRebin);
35945 
35946     hNMBProbPassUVVtxCutPQ=new TH1F
35947     ("hNMBProbPassUVVtxCutPQ","hNMBProbPassUVVtxCutPQ",14000,-0.2,1.2);
35948     hNMBProbPassUVVtxCutPQ->GetXaxis()->SetTitle("Fit Probability");
35949     hNMBProbPassUVVtxCutPQ->GetXaxis()->CenterTitle();
35950     hNMBProbPassUVVtxCutPQ->GetYaxis()->SetTitle("");
35951     hNMBProbPassUVVtxCutPQ->GetYaxis()->CenterTitle();
35952     hNMBProbPassUVVtxCutPQ->SetFillColor(0);
35953     hNMBProbPassUVVtxCutPQ->SetLineColor(1);
35954     hNMBProbPassUVVtxCutPQ->SetLineWidth(2);
35955     hNMBProbPassUVVtxCutPQ->SetLineStyle(2);
35956     //hNMBProbPassUVVtxCutPQ->SetBit(TH1::kCanRebin);
35957 
35958     hAllShwProbPassUVVtxCutPQ=new TH1F
35959     ("hAllShwProbPassUVVtxCutPQ",
35960     "hAllShwProbPassUVVtxCutPQ",14000,-0.2,1.2);
35961     hAllShwProbPassUVVtxCutPQ->GetXaxis()->SetTitle("Fit Probability");
35962     hAllShwProbPassUVVtxCutPQ->GetXaxis()->CenterTitle();
35963     hAllShwProbPassUVVtxCutPQ->GetYaxis()->SetTitle("");
35964     hAllShwProbPassUVVtxCutPQ->GetYaxis()->CenterTitle();
35965     hAllShwProbPassUVVtxCutPQ->SetFillColor(0);
35966     hAllShwProbPassUVVtxCutPQ->SetLineColor(1);
35967     hAllShwProbPassUVVtxCutPQ->SetLineWidth(2);
35968     hAllShwProbPassUVVtxCutPQ->SetLineStyle(2);
35969     //hAllShwProbPassUVVtxCutPQ->SetBit(TH1::kCanRebin);
35970 
35971     hNMRecoEnPassUVVtxCutPQ=new TH1F
35972     ("hNMRecoEnPassUVVtxCutPQ","hNMRecoEnPassUVVtxCutPQ",4*352,-32,320);
35973     hNMRecoEnPassUVVtxCutPQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
35974     hNMRecoEnPassUVVtxCutPQ->GetXaxis()->CenterTitle();
35975     hNMRecoEnPassUVVtxCutPQ->GetYaxis()->SetTitle("");
35976     hNMRecoEnPassUVVtxCutPQ->GetYaxis()->CenterTitle();
35977     hNMRecoEnPassUVVtxCutPQ->SetFillColor(0);
35978     hNMRecoEnPassUVVtxCutPQ->SetLineColor(1);
35979     //hNMRecoEnPassUVVtxCutPQ->SetBit(TH1::kCanRebin);
35980 
35981     hNMTrueEnPassUVVtxCutPQ=new TH1F
35982     ("hNMTrueEnPassUVVtxCutPQ","hNMTrueEnPassUVVtxCutPQ",4*352,-32,320);
35983     hNMTrueEnPassUVVtxCutPQ->GetXaxis()->SetTitle("True Energy (GeV)");
35984     hNMTrueEnPassUVVtxCutPQ->GetXaxis()->CenterTitle();
35985     hNMTrueEnPassUVVtxCutPQ->GetYaxis()->SetTitle("");
35986     hNMTrueEnPassUVVtxCutPQ->GetYaxis()->CenterTitle();
35987     hNMTrueEnPassUVVtxCutPQ->SetFillColor(0);
35988     hNMTrueEnPassUVVtxCutPQ->SetLineColor(1);
35989     //hNMTrueEnPassUVVtxCutPQ->SetBit(TH1::kCanRebin);
35990 
35991     hNMBRecoEnPassUVVtxCutPQ=new TH1F("hNMBRecoEnPassUVVtxCutPQ",
35992     "hNMBRecoEnPassUVVtxCutPQ",
35993     4*352,-32,320);
35994     hNMBRecoEnPassUVVtxCutPQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
35995     hNMBRecoEnPassUVVtxCutPQ->GetXaxis()->CenterTitle();
35996     hNMBRecoEnPassUVVtxCutPQ->GetYaxis()->SetTitle("");
35997     hNMBRecoEnPassUVVtxCutPQ->GetYaxis()->CenterTitle();
35998     hNMBRecoEnPassUVVtxCutPQ->SetFillColor(0);
35999     hNMBRecoEnPassUVVtxCutPQ->SetLineColor(1);
36000     //hNMBRecoEnPassUVVtxCutPQ->SetBit(TH1::kCanRebin);
36001 
36002     hNMBTrueEnPassUVVtxCutPQ=new TH1F
36003     ("hNMBTrueEnPassUVVtxCutPQ","hNMBTrueEnPassUVVtxCutPQ",
36004     4*352,-32,320);
36005     hNMBTrueEnPassUVVtxCutPQ->GetXaxis()->SetTitle("True Energy (GeV)");
36006     hNMBTrueEnPassUVVtxCutPQ->GetXaxis()->CenterTitle();
36007     hNMBTrueEnPassUVVtxCutPQ->GetYaxis()->SetTitle("");
36008     hNMBTrueEnPassUVVtxCutPQ->GetYaxis()->CenterTitle();
36009     hNMBTrueEnPassUVVtxCutPQ->SetFillColor(0);
36010     hNMBTrueEnPassUVVtxCutPQ->SetLineColor(1);
36011     //hNMBTrueEnPassUVVtxCutPQ->SetBit(TH1::kCanRebin);
36012 
36013 
36014     hNMRecoEnPassUVVtxCut=new TH1F
36015     ("hNMRecoEnPassUVVtxCut","hNMRecoEnPassUVVtxCut",
36016     4*352,-32,320);
36017     hNMRecoEnPassUVVtxCut->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
36018     hNMRecoEnPassUVVtxCut->GetXaxis()->CenterTitle();
36019     hNMRecoEnPassUVVtxCut->GetYaxis()->SetTitle("");
36020     hNMRecoEnPassUVVtxCut->GetYaxis()->CenterTitle();
36021     hNMRecoEnPassUVVtxCut->SetFillColor(0);
36022     hNMRecoEnPassUVVtxCut->SetLineColor(1);
36023     //hNMRecoEnPassUVVtxCut->SetBit(TH1::kCanRebin);
36024 
36025     hNMTrueEnPassUVVtxCut=new TH1F
36026     ("hNMTrueEnPassUVVtxCut","hNMTrueEnPassUVVtxCut",
36027     4*352,-32,320);
36028     hNMTrueEnPassUVVtxCut->GetXaxis()->SetTitle("True Energy (GeV)");
36029     hNMTrueEnPassUVVtxCut->GetXaxis()->CenterTitle();
36030     hNMTrueEnPassUVVtxCut->GetYaxis()->SetTitle("");
36031     hNMTrueEnPassUVVtxCut->GetYaxis()->CenterTitle();
36032     hNMTrueEnPassUVVtxCut->SetFillColor(0);
36033     hNMTrueEnPassUVVtxCut->SetLineColor(1);
36034     //hNMTrueEnPassUVVtxCut->SetBit(TH1::kCanRebin);
36035 
36036     hNMBRecoEnPassUVVtxCut=new TH1F("hNMBRecoEnPassUVVtxCut",
36037     "hNMBRecoEnPassUVVtxCut",
36038     4*352,-32,320);
36039     hNMBRecoEnPassUVVtxCut->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
36040     hNMBRecoEnPassUVVtxCut->GetXaxis()->CenterTitle();
36041     hNMBRecoEnPassUVVtxCut->GetYaxis()->SetTitle("");
36042     hNMBRecoEnPassUVVtxCut->GetYaxis()->CenterTitle();
36043     hNMBRecoEnPassUVVtxCut->SetFillColor(0);
36044     hNMBRecoEnPassUVVtxCut->SetLineColor(1);
36045     //hNMBRecoEnPassUVVtxCut->SetBit(TH1::kCanRebin);
36046 
36047     hNMBTrueEnPassUVVtxCut=new TH1F
36048     ("hNMBTrueEnPassUVVtxCut","hNMBTrueEnPassUVVtxCut",
36049     4*352,-32,320);
36050     hNMBTrueEnPassUVVtxCut->GetXaxis()->SetTitle("True Energy (GeV)");
36051     hNMBTrueEnPassUVVtxCut->GetXaxis()->CenterTitle();
36052     hNMBTrueEnPassUVVtxCut->GetYaxis()->SetTitle("");
36053     hNMBTrueEnPassUVVtxCut->GetYaxis()->CenterTitle();
36054     hNMBTrueEnPassUVVtxCut->SetFillColor(0);
36055     hNMBTrueEnPassUVVtxCut->SetLineColor(1);
36056     //hNMBTrueEnPassUVVtxCut->SetBit(TH1::kCanRebin);
36057 
36058 
36059 
36060 
36061     //NQ
36062     hSigqp_qpPassUVVtxCutNQN=new TH1F("hSigqp_qpPassUVVtxCutNQN","hSigqp_qpPassUVVtxCutNQN",800*160,-160,160);
36063     hSigqp_qpPassUVVtxCutNQN->GetXaxis()->SetTitle("#sigma(Q/P)/(Q/P)");
36064     hSigqp_qpPassUVVtxCutNQN->GetXaxis()->CenterTitle();
36065     hSigqp_qpPassUVVtxCutNQN->GetYaxis()->SetTitle("");
36066     hSigqp_qpPassUVVtxCutNQN->GetYaxis()->CenterTitle();
36067     hSigqp_qpPassUVVtxCutNQN->SetFillColor(0);
36068     hSigqp_qpPassUVVtxCutNQN->SetLineColor(1);
36069     hSigqp_qpPassUVVtxCutNQN->SetLineWidth(2);
36070     hSigqp_qpPassUVVtxCutNQN->SetLineStyle(2);
36071     //hSigqp_qpPassUVVtxCutNQN->SetBit(TH1::kCanRebin);
36072 
36073     hChi2PassUVVtxCutNQN=new TH1F("hChi2PassUVVtxCutNQN","hChi2PassUVVtxCutNQN",10*176,-16,160);
36074     hChi2PassUVVtxCutNQN->GetXaxis()->SetTitle("#chi^{2}/ndof");
36075     hChi2PassUVVtxCutNQN->GetXaxis()->CenterTitle();
36076     hChi2PassUVVtxCutNQN->GetYaxis()->SetTitle("");
36077     hChi2PassUVVtxCutNQN->GetYaxis()->CenterTitle();
36078     hChi2PassUVVtxCutNQN->SetFillColor(0);
36079     hChi2PassUVVtxCutNQN->SetLineColor(1);
36080     hChi2PassUVVtxCutNQN->SetLineWidth(2);
36081     hChi2PassUVVtxCutNQN->SetLineStyle(2);
36082     //hChi2PassUVVtxCutNQN->SetBit(TH1::kCanRebin);
36083 
36084     hProbPassUVVtxCutNQN=new TH1F("hProbPassUVVtxCutNQN","hProbPassUVVtxCutNQN",14000,-0.2,1.2);
36085     hProbPassUVVtxCutNQN->GetXaxis()->SetTitle("Fit Probability");
36086     hProbPassUVVtxCutNQN->GetXaxis()->CenterTitle();
36087     hProbPassUVVtxCutNQN->GetYaxis()->SetTitle("");
36088     hProbPassUVVtxCutNQN->GetYaxis()->CenterTitle();
36089     hProbPassUVVtxCutNQN->SetFillColor(0);
36090     hProbPassUVVtxCutNQN->SetLineColor(1);
36091     hProbPassUVVtxCutNQN->SetLineWidth(2);
36092     hProbPassUVVtxCutNQN->SetLineStyle(2);
36093     //hProbPassUVVtxCutNQN->SetBit(TH1::kCanRebin);
36094 
36095     hDpIDPassUVVtxCutNQN=new TH1F("hDpIDPassUVVtxCutNQN","hDpIDPassUVVtxCutNQN",4*160,-1.6,1.6);
36096     hDpIDPassUVVtxCutNQN->GetXaxis()->SetTitle("PID (from MadDpID)");
36097     hDpIDPassUVVtxCutNQN->GetXaxis()->CenterTitle();
36098     hDpIDPassUVVtxCutNQN->GetYaxis()->SetTitle("");
36099     hDpIDPassUVVtxCutNQN->GetYaxis()->CenterTitle();
36100     hDpIDPassUVVtxCutNQN->SetFillColor(0);
36101     hDpIDPassUVVtxCutNQN->SetLineColor(1);
36102     hDpIDPassUVVtxCutNQN->SetLineWidth(2);
36103     //hDpIDPassUVVtxCutNQN->SetBit(TH1::kCanRebin);
36104 
36105     hRecoEnPassUVVtxCutNQ=new TH1F("hRecoEnPassUVVtxCutNQ","hRecoEnPassUVVtxCutNQ",
36106     4*352,-32,320);
36107     hRecoEnPassUVVtxCutNQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
36108     hRecoEnPassUVVtxCutNQ->GetXaxis()->CenterTitle();
36109     hRecoEnPassUVVtxCutNQ->GetYaxis()->SetTitle("");
36110     hRecoEnPassUVVtxCutNQ->GetYaxis()->CenterTitle();
36111     hRecoEnPassUVVtxCutNQ->SetFillColor(0);
36112     hRecoEnPassUVVtxCutNQ->SetLineColor(1);
36113     //hRecoEnPassUVVtxCutNQ->SetBit(TH1::kCanRebin);
36114 
36115     hRecoYPassUVVtxCutNQ=new TH1F("hRecoYPassUVVtxCutNQ","hRecoYPassUVVtxCutNQ",
36116     1400,-0.2,1.2);
36117     hRecoYPassUVVtxCutNQ->GetXaxis()->SetTitle("Reconstructed y");
36118     hRecoYPassUVVtxCutNQ->GetXaxis()->CenterTitle();
36119     hRecoYPassUVVtxCutNQ->GetYaxis()->SetTitle("");
36120     hRecoYPassUVVtxCutNQ->GetYaxis()->CenterTitle();
36121     hRecoYPassUVVtxCutNQ->SetFillColor(0);
36122     hRecoYPassUVVtxCutNQ->SetLineColor(1);
36123     //hRecoYPassUVVtxCutNQ->SetBit(TH1::kCanRebin);
36124 
36125 
36126     hNMProbPassUVVtxCutNQ=new TH1F
36127     ("hNMProbPassUVVtxCutNQ","hNMProbPassUVVtxCutNQ",14000,-0.2,1.2);
36128     hNMProbPassUVVtxCutNQ->GetXaxis()->SetTitle("Fit Probability");
36129     hNMProbPassUVVtxCutNQ->GetXaxis()->CenterTitle();
36130     hNMProbPassUVVtxCutNQ->GetYaxis()->SetTitle("");
36131     hNMProbPassUVVtxCutNQ->GetYaxis()->CenterTitle();
36132     hNMProbPassUVVtxCutNQ->SetFillColor(0);
36133     hNMProbPassUVVtxCutNQ->SetLineColor(1);
36134     hNMProbPassUVVtxCutNQ->SetLineWidth(2);
36135     hNMProbPassUVVtxCutNQ->SetLineStyle(2);
36136     //hNMProbPassUVVtxCutNQ->SetBit(TH1::kCanRebin);
36137 
36138     hNMBProbPassUVVtxCutNQ=new TH1F
36139     ("hNMBProbPassUVVtxCutNQ","hNMBProbPassUVVtxCutNQ",14000,-0.2,1.2);
36140     hNMBProbPassUVVtxCutNQ->GetXaxis()->SetTitle("Fit Probability");
36141     hNMBProbPassUVVtxCutNQ->GetXaxis()->CenterTitle();
36142     hNMBProbPassUVVtxCutNQ->GetYaxis()->SetTitle("");
36143     hNMBProbPassUVVtxCutNQ->GetYaxis()->CenterTitle();
36144     hNMBProbPassUVVtxCutNQ->SetFillColor(0);
36145     hNMBProbPassUVVtxCutNQ->SetLineColor(1);
36146     hNMBProbPassUVVtxCutNQ->SetLineWidth(2);
36147     hNMBProbPassUVVtxCutNQ->SetLineStyle(2);
36148     //hNMBProbPassUVVtxCutNQ->SetBit(TH1::kCanRebin);
36149 
36150     hAllShwProbPassUVVtxCutNQ=new TH1F
36151     ("hAllShwProbPassUVVtxCutNQ",
36152     "hAllShwProbPassUVVtxCutNQ",14000,-0.2,1.2);
36153     hAllShwProbPassUVVtxCutNQ->GetXaxis()->SetTitle("Fit Probability");
36154     hAllShwProbPassUVVtxCutNQ->GetXaxis()->CenterTitle();
36155     hAllShwProbPassUVVtxCutNQ->GetYaxis()->SetTitle("");
36156     hAllShwProbPassUVVtxCutNQ->GetYaxis()->CenterTitle();
36157     hAllShwProbPassUVVtxCutNQ->SetFillColor(0);
36158     hAllShwProbPassUVVtxCutNQ->SetLineColor(1);
36159     hAllShwProbPassUVVtxCutNQ->SetLineWidth(2);
36160     hAllShwProbPassUVVtxCutNQ->SetLineStyle(2);
36161     //hAllShwProbPassUVVtxCutNQ->SetBit(TH1::kCanRebin);
36162 
36163 
36164     hNMRecoEnPassUVVtxCutNQ=new TH1F
36165     ("hNMRecoEnPassUVVtxCutNQ","hNMRecoEnPassUVVtxCutNQ",4*352,-32,320);
36166     hNMRecoEnPassUVVtxCutNQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
36167     hNMRecoEnPassUVVtxCutNQ->GetXaxis()->CenterTitle();
36168     hNMRecoEnPassUVVtxCutNQ->GetYaxis()->SetTitle("");
36169     hNMRecoEnPassUVVtxCutNQ->GetYaxis()->CenterTitle();
36170     hNMRecoEnPassUVVtxCutNQ->SetFillColor(0);
36171     hNMRecoEnPassUVVtxCutNQ->SetLineColor(1);
36172     //hNMRecoEnPassUVVtxCutNQ->SetBit(TH1::kCanRebin);
36173 
36174     hNMTrueEnPassUVVtxCutNQ=new TH1F
36175     ("hNMTrueEnPassUVVtxCutNQ","hNMTrueEnPassUVVtxCutNQ",4*352,-32,320);
36176     hNMTrueEnPassUVVtxCutNQ->GetXaxis()->SetTitle("True Energy (GeV)");
36177     hNMTrueEnPassUVVtxCutNQ->GetXaxis()->CenterTitle();
36178     hNMTrueEnPassUVVtxCutNQ->GetYaxis()->SetTitle("");
36179     hNMTrueEnPassUVVtxCutNQ->GetYaxis()->CenterTitle();
36180     hNMTrueEnPassUVVtxCutNQ->SetFillColor(0);
36181     hNMTrueEnPassUVVtxCutNQ->SetLineColor(1);
36182     //hNMTrueEnPassUVVtxCutNQ->SetBit(TH1::kCanRebin);
36183 
36184     hNMBRecoEnPassUVVtxCutNQ=new TH1F("hNMBRecoEnPassUVVtxCutNQ",
36185     "hNMBRecoEnPassUVVtxCutNQ",
36186     4*352,-32,320);
36187     hNMBRecoEnPassUVVtxCutNQ->GetXaxis()->SetTitle("Reconstructed Energy (GeV)");
36188     hNMBRecoEnPassUVVtxCutNQ->GetXaxis()->CenterTitle();
36189     hNMBRecoEnPassUVVtxCutNQ->GetYaxis()->SetTitle("");
36190     hNMBRecoEnPassUVVtxCutNQ->GetYaxis()->CenterTitle();
36191     hNMBRecoEnPassUVVtxCutNQ->SetFillColor(0);
36192     hNMBRecoEnPassUVVtxCutNQ->SetLineColor(1);
36193     //hNMBRecoEnPassUVVtxCutNQ->SetBit(TH1::kCanRebin);
36194 
36195     hNMBTrueEnPassUVVtxCutNQ=new TH1F
36196     ("hNMBTrueEnPassUVVtxCutNQ","hNMBTrueEnPassUVVtxCutNQ",
36197     4*352,-32,320);
36198     hNMBTrueEnPassUVVtxCutNQ->GetXaxis()->SetTitle("True Energy (GeV)");
36199     hNMBTrueEnPassUVVtxCutNQ->GetXaxis()->CenterTitle();
36200     hNMBTrueEnPassUVVtxCutNQ->GetYaxis()->SetTitle("");
36201     hNMBTrueEnPassUVVtxCutNQ->GetYaxis()->CenterTitle();
36202     hNMBTrueEnPassUVVtxCutNQ->SetFillColor(0);
36203     hNMBTrueEnPassUVVtxCutNQ->SetLineColor(1);
36204     //hNMBTrueEnPassUVVtxCutNQ->SetBit(TH1::kCanRebin);
36205     }
36206 
36207     //PQ
36208     if (nu.charge==+1){
36209     hSigqp_qpPassUVVtxCutPQN->Fill(nu.sigqp_qp,nu.rw);
36210     hChi2PassUVVtxCutPQN->Fill(nu.chi2PerNdof,nu.rw);
36211     hProbPassUVVtxCutPQN->Fill(nu.prob,nu.rw);
36212     hDpIDPassUVVtxCutPQN->Fill(nu.dpID,nu.rw);
36213 
36214     hRecoEnPassUVVtxCutPQ->Fill(nu.energy,nu.rw);
36215     hRecoYPassUVVtxCutPQ->Fill(nu.y,nu.rw);
36216     }
36217     //NQ
36218     else if (nu.charge==-1){
36219     hSigqp_qpPassUVVtxCutNQN->Fill(nu.sigqp_qp,nu.rw);
36220     hChi2PassUVVtxCutNQN->Fill(nu.chi2PerNdof,nu.rw);
36221     hProbPassUVVtxCutNQN->Fill(nu.prob,nu.rw);
36222     hDpIDPassUVVtxCutNQN->Fill(nu.dpID,nu.rw);
36223 
36224     hRecoEnPassUVVtxCutNQ->Fill(nu.energy,nu.rw);
36225     hRecoYPassUVVtxCutNQ->Fill(nu.y,nu.rw);
36226     }
36227     else MSG("NuPlots",Msg::kWarning)<<"Ahh, bad charge"<<endl;
36228 
36229 
36230     //now fill the truth plots
36231     if (nu.iaction==1){//CC
36232     if (nu.inu==14){//NuMu
36233     hNMRecoEnPassUVVtxCut->Fill(nu.energy,nu.rw);
36234     hNMTrueEnPassUVVtxCut->Fill(nu.energyMC,nu.rw);
36235     if (nu.charge==+1) {
36236     hNMProbPassUVVtxCutPQ->Fill(nu.prob,nu.rw);
36237     hNMRecoEnPassUVVtxCutPQ->Fill(nu.energy,nu.rw);
36238     hNMTrueEnPassUVVtxCutPQ->Fill(nu.energyMC,nu.rw);
36239     }
36240     else if (nu.charge==-1){
36241     hNMProbPassUVVtxCutNQ->Fill(nu.prob,nu.rw);
36242     hNMRecoEnPassUVVtxCutNQ->Fill(nu.energy,nu.rw);
36243     hNMTrueEnPassUVVtxCutNQ->Fill(nu.energyMC,nu.rw);
36244     }
36245     }
36246     else if (nu.inu==-14){//NuMuBar
36247     hNMBRecoEnPassUVVtxCut->Fill(nu.energy,nu.rw);
36248     hNMBTrueEnPassUVVtxCut->Fill(nu.energyMC,nu.rw);
36249     if (nu.charge==+1) {
36250     hNMBProbPassUVVtxCutPQ->Fill(nu.prob,nu.rw);
36251     hNMBRecoEnPassUVVtxCutPQ->Fill(nu.energy,nu.rw);
36252     hNMBTrueEnPassUVVtxCutPQ->Fill(nu.energyMC,nu.rw);
36253     }
36254     else if (nu.charge==-1){
36255     hNMBProbPassUVVtxCutNQ->Fill(nu.prob,nu.rw);
36256     hNMBRecoEnPassUVVtxCutNQ->Fill(nu.energy,nu.rw);
36257     hNMBTrueEnPassUVVtxCutNQ->Fill(nu.energyMC,nu.rw);
36258     }
36259     }
36260     }
36261 
36262     //all but NuMu/NuMuBar CC
36263     if (!(nu.iaction==1 && (nu.inu==14 || nu.inu==-14))) {
36264     if (nu.charge==+1) {
36265     hAllShwProbPassUVVtxCutPQ->Fill(nu.prob,nu.rw);
36266     }
36267     else if (nu.charge==-1){
36268     hAllShwProbPassUVVtxCutNQ->Fill(nu.prob,nu.rw);
36269     }
36270     }
36271   */
36272 }

void NuPlots::FillDPIdSigmaQPPlotsN ( const NuEvent nu  )  const

Definition at line 32572 of file NuPlots.cxx.

References NuEvent::abID, NuEvent::charge, NuEvent::chi2PerNdof, NuEvent::dpID, NuEvent::iaction, NuEvent::inu, NuEvent::jPID, Msg::kDebug, Msg::kWarning, MAXMSG, NuEvent::medianTime, Munits::microsecond, MSG, Munits::ns, NuEvent::prob, NuEvent::qp, NuEvent::roID, NuEvent::rw, NuEvent::sigqp, NuEvent::sigqp_qp, NuEvent::timeEvtMax, NuEvent::timeEvtMin, NuEvent::timeNanoSec, and NuEvent::timeToNearestSpill.

Referenced by NuAnalysis::ChargeSeparationOneSnarl(), NuAnalysis::EnergySpect(), NuAnalysis::LIRejectionTest(), NuDSTAna::MakeFinalPlots(), and NuAnalysis::NMBSummaryTreeAna().

32573 { 
32574   //Both
32575   static TH1F* hqp=0;
32576 
32577   //PQ
32578   static TH1F* hqpPQN=0;
32579   static TH1F* hqpNotNMBCCPQN=0;
32580   static TH1F* hSigqpPQN=0;
32581   static TH1F* hSigqp_qpPQN=0;
32582   static TH1F* hqp_sigqpPQN=0;
32583   static TH1F* hqp_sigqpNotNMBCCPQN=0;
32584   static TH1F* hChi2PQN=0;
32585   static TH1F* hProbPQN=0;
32586   static TH1F* hDpIDPQN=0;
32587   static TH1F* hDpIDNoRwPQN=0;
32588   //static TH1F* hPoIDPQN=0;
32589   static TH1F* hRoIDPQN=0;
32590   static TH1F* hRoIDNoRwPQN=0;
32591   static TH1F* hAbIDPQN=0;
32592   static TH1F* hJeIDPQN=0;
32593   static TH1D* hEvtTimeWrtSpillPQN=0;
32594   static TH1D* hEvtMedianTimeWrtSpillPQN=0;
32595   static TH1D* hEvtTimeWrtTriggerPQN=0;
32596   static TH1D* hEventTimeLengthPQN=0;
32597   static TH1D* hEvtMedMinusMinPQN;
32598 
32599   //NQ
32600   static TH1F* hqpNQN=0;
32601   static TH1F* hqpNotNMCCNQN=0;
32602   static TH1F* hSigqpNQN=0;
32603   static TH1F* hSigqp_qpNQN=0;
32604   static TH1F* hqp_sigqpNQN=0;
32605   static TH1F* hqp_sigqpNotNMCCNQN=0;
32606   static TH1F* hChi2NQN=0;
32607   static TH1F* hProbNQN=0;
32608   static TH1F* hDpIDNQN=0;
32609   static TH1F* hDpIDNoRwNQN=0;
32610   //static TH1F* hPoIDNQN=0;
32611   static TH1F* hRoIDNQN=0;
32612   static TH1F* hRoIDNoRwNQN=0;
32613   static TH1F* hAbIDNQN=0;
32614   static TH1F* hJeIDNQN=0;
32615   static TH1D* hEvtTimeWrtSpillNQN=0;
32616   static TH1D* hEvtMedianTimeWrtSpillNQN=0;
32617   static TH1D* hEvtTimeWrtTriggerNQN=0;
32618   static TH1D* hEventTimeLengthNQN=0;
32619   static TH1D* hEvtMedMinusMinNQN;
32620 
32621   Double_t medianTimeWrtTrigger=nu.medianTime-(nu.timeNanoSec*(Munits::ns));
32622 
32623   if (!hChi2NQN){
32624     MAXMSG("NuPlots",Msg::kDebug,1)
32625       <<"Creating DPIdSigmaQPPlotsN plots..."<<endl;
32626 
32627     //Both
32628     hqp=new TH1F("hqp","hqp",200*160,-16,16);
32629     hqp->GetXaxis()->SetTitle("Q/P");
32630     hqp->GetXaxis()->CenterTitle();
32631     hqp->GetYaxis()->SetTitle("");
32632     hqp->GetYaxis()->CenterTitle();
32633     hqp->SetFillColor(0);
32634     hqp->SetLineColor(1);
32635     hqp->SetLineWidth(2);
32636     hqp->SetLineStyle(2);
32637     //hqp->SetBit(TH1::kCanRebin);
32638 
32639     //PQ
32640     hqpPQN=new TH1F("hqpPQN","hqpPQN",200*160,-16,16);
32641     hqpPQN->GetXaxis()->SetTitle("Q/P");
32642     hqpPQN->GetXaxis()->CenterTitle();
32643     hqpPQN->GetYaxis()->SetTitle("");
32644     hqpPQN->GetYaxis()->CenterTitle();
32645     hqpPQN->SetFillColor(0);
32646     hqpPQN->SetLineColor(1);
32647     hqpPQN->SetLineWidth(2);
32648     hqpPQN->SetLineStyle(2);
32649     //hqpPQN->SetBit(TH1::kCanRebin);
32650 
32651     hqpNotNMBCCPQN=new TH1F("hqpNotNMBCCPQN","hqpNotNMBCCPQN",200*160,-16,16);
32652     hqpNotNMBCCPQN->GetXaxis()->SetTitle("Q/P");
32653     hqpNotNMBCCPQN->GetXaxis()->CenterTitle();
32654     hqpNotNMBCCPQN->GetYaxis()->SetTitle("");
32655     hqpNotNMBCCPQN->GetYaxis()->CenterTitle();
32656     hqpNotNMBCCPQN->SetFillColor(0);
32657     hqpNotNMBCCPQN->SetLineColor(1);
32658     hqpNotNMBCCPQN->SetLineWidth(2);
32659     hqpNotNMBCCPQN->SetLineStyle(2);
32660     //hqpNotNMBCCPQN->SetBit(TH1::kCanRebin);
32661 
32662     //PQ
32663     hSigqpPQN=new TH1F("hSigqpPQN","hSigqpPQN",200*160,-16,16);
32664     hSigqpPQN->GetXaxis()->SetTitle("#sigma(Q/P)");
32665     hSigqpPQN->GetXaxis()->CenterTitle();
32666     hSigqpPQN->GetYaxis()->SetTitle("");
32667     hSigqpPQN->GetYaxis()->CenterTitle();
32668     hSigqpPQN->SetFillColor(0);
32669     hSigqpPQN->SetLineColor(1);
32670     hSigqpPQN->SetLineWidth(2);
32671     hSigqpPQN->SetLineStyle(2);
32672     //hSigqpPQN->SetBit(TH1::kCanRebin);
32673 
32674     //PQ
32675     hSigqp_qpPQN=new TH1F("hSigqp_qpPQN","hSigqp_qpPQN",800*160,-160,160);
32676     hSigqp_qpPQN->GetXaxis()->SetTitle("#sigma(Q/P)/(Q/P)");
32677     hSigqp_qpPQN->GetXaxis()->CenterTitle();
32678     hSigqp_qpPQN->GetYaxis()->SetTitle("");
32679     hSigqp_qpPQN->GetYaxis()->CenterTitle();
32680     hSigqp_qpPQN->SetFillColor(0);
32681     hSigqp_qpPQN->SetLineColor(1);
32682     hSigqp_qpPQN->SetLineWidth(2);
32683     hSigqp_qpPQN->SetLineStyle(2);
32684     //hSigqp_qpPQN->SetBit(TH1::kCanRebin);
32685 
32686     hqp_sigqpPQN=new TH1F("hqp_sigqpPQN","hqp_sigqpPQN",800*160,-160,160);
32687     hqp_sigqpPQN->GetXaxis()->SetTitle("(Q/P)/#sigma(Q/P)");
32688     hqp_sigqpPQN->GetXaxis()->CenterTitle();
32689     hqp_sigqpPQN->GetYaxis()->SetTitle("");
32690     hqp_sigqpPQN->GetYaxis()->CenterTitle();
32691     hqp_sigqpPQN->SetFillColor(0);
32692     hqp_sigqpPQN->SetLineColor(1);
32693     hqp_sigqpPQN->SetLineWidth(2);
32694     hqp_sigqpPQN->SetLineStyle(2);
32695     //hqp_sigqpPQN->SetBit(TH1::kCanRebin);
32696 
32697     hqp_sigqpNotNMBCCPQN=new TH1F("hqp_sigqpNotNMBCCPQN","hqp_sigqpNotNMBCCPQN",800*160,-160,160);
32698     hqp_sigqpNotNMBCCPQN->GetXaxis()->SetTitle("(Q/P)/#sigma(Q/P)");
32699     hqp_sigqpNotNMBCCPQN->GetXaxis()->CenterTitle();
32700     hqp_sigqpNotNMBCCPQN->GetYaxis()->SetTitle("");
32701     hqp_sigqpNotNMBCCPQN->GetYaxis()->CenterTitle();
32702     hqp_sigqpNotNMBCCPQN->SetFillColor(0);
32703     hqp_sigqpNotNMBCCPQN->SetLineColor(1);
32704     hqp_sigqpNotNMBCCPQN->SetLineWidth(2);
32705     hqp_sigqpNotNMBCCPQN->SetLineStyle(2);
32706     //hqp_sigqpNotNMBCCPQN->SetBit(TH1::kCanRebin);
32707 
32708     hChi2PQN=new TH1F("hChi2PQN","hChi2PQN",10*176,-16,160);
32709     hChi2PQN->GetXaxis()->SetTitle("#chi^{2}/ndof");
32710     hChi2PQN->GetXaxis()->CenterTitle();
32711     hChi2PQN->GetYaxis()->SetTitle("");
32712     hChi2PQN->GetYaxis()->CenterTitle();
32713     hChi2PQN->SetFillColor(0);
32714     hChi2PQN->SetLineColor(1);
32715     hChi2PQN->SetLineWidth(2);
32716     hChi2PQN->SetLineStyle(2);
32717     //hChi2PQN->SetBit(TH1::kCanRebin);
32718 
32719     hProbPQN=new TH1F("hProbPQN","hProbPQN",14000,-0.2,1.2);
32720     //hProbPQN=new TH1F("hProbPQN","hProbPQN",10*160,-0.5,1.5);
32721     hProbPQN->GetXaxis()->SetTitle("Fit Probability");
32722     hProbPQN->GetXaxis()->CenterTitle();
32723     hProbPQN->GetYaxis()->SetTitle("");
32724     hProbPQN->GetYaxis()->CenterTitle();
32725     hProbPQN->SetFillColor(0);
32726     hProbPQN->SetLineColor(1);
32727     hProbPQN->SetLineWidth(2);
32728     hProbPQN->SetLineStyle(2);
32729     //hProbPQN->SetBit(TH1::kCanRebin);
32730 
32731     hDpIDPQN=new TH1F("hDpIDPQN","hDpIDPQN",4*160,-1.6,1.6);
32732     hDpIDPQN->GetXaxis()->SetTitle("PID (from MadDpID)");
32733     hDpIDPQN->GetXaxis()->CenterTitle();
32734     hDpIDPQN->GetYaxis()->SetTitle("");
32735     hDpIDPQN->GetYaxis()->CenterTitle();
32736     hDpIDPQN->SetFillColor(0);
32737     hDpIDPQN->SetLineColor(1);
32738     hDpIDPQN->SetLineWidth(2);
32739     //hDpIDPQN->SetBit(TH1::kCanRebin);
32740 
32741     hDpIDNoRwPQN=new TH1F("hDpIDNoRwPQN","hDpIDNoRwPQN",4*160,-1.6,1.6);
32742     hDpIDNoRwPQN->GetXaxis()->SetTitle("PID (from MadDpID)");
32743     hDpIDNoRwPQN->GetXaxis()->CenterTitle();
32744     hDpIDNoRwPQN->GetYaxis()->SetTitle("");
32745     hDpIDNoRwPQN->GetYaxis()->CenterTitle();
32746     hDpIDNoRwPQN->SetFillColor(0);
32747     hDpIDNoRwPQN->SetLineColor(1);
32748     hDpIDNoRwPQN->SetLineWidth(2);
32749     //hDpIDNoRwPQN->SetBit(TH1::kCanRebin);
32750 
32751     // PoID Officially depracated
32752     //    hPoIDPQN=new TH1F("hPoIDPQN","hPoIDPQN",4*320,-3.2,3.2);
32753     //    hPoIDPQN->GetXaxis()->SetTitle("PID (from NuBarPID)");
32754     //    hPoIDPQN->GetXaxis()->CenterTitle();
32755     //    hPoIDPQN->GetYaxis()->SetTitle("");
32756     //    hPoIDPQN->GetYaxis()->CenterTitle();
32757     //    hPoIDPQN->SetFillColor(0);
32758     //    hPoIDPQN->SetLineColor(1);
32759     //    hPoIDPQN->SetLineWidth(2);
32760     //    //hPoIDPQN->SetBit(TH1::kCanRebin);
32761 
32762     hRoIDPQN=new TH1F("hRoIDPQN","hRoIDPQN",81,0,1);
32763     hRoIDPQN->GetXaxis()->SetTitle("PID (from Rustem O)");
32764     hRoIDPQN->GetXaxis()->CenterTitle();
32765     hRoIDPQN->GetYaxis()->SetTitle("");
32766     hRoIDPQN->GetYaxis()->CenterTitle();
32767     hRoIDPQN->SetFillColor(0);
32768     hRoIDPQN->SetLineColor(1);
32769     hRoIDPQN->SetLineWidth(2);
32770     //hRoIDPQN->SetBit(TH1::kCanRebin);
32771 
32772 
32773     hRoIDNoRwPQN=new TH1F("hRoIDNoRwPQN","hRoIDNoRwPQN",81,0,1);
32774     hRoIDNoRwPQN->GetXaxis()->SetTitle("PID (from Rustem O)");
32775     hRoIDNoRwPQN->GetXaxis()->CenterTitle();
32776     hRoIDNoRwPQN->GetYaxis()->SetTitle("");
32777     hRoIDNoRwPQN->GetYaxis()->CenterTitle();
32778     hRoIDNoRwPQN->SetFillColor(0);
32779     hRoIDNoRwPQN->SetLineColor(1);
32780     hRoIDNoRwPQN->SetLineWidth(2);
32781     //hRoIDNoRwPQN->SetBit(TH1::kCanRebin);
32782 
32783     hAbIDPQN=new TH1F("hAbIDPQN","hAbIDPQN",4*320,-3.2,3.2);
32784     hAbIDPQN->GetXaxis()->SetTitle("PID (from Andy B)");
32785     hAbIDPQN->GetXaxis()->CenterTitle();
32786     hAbIDPQN->GetYaxis()->SetTitle("");
32787     hAbIDPQN->GetYaxis()->CenterTitle();
32788     hAbIDPQN->SetFillColor(0);
32789     hAbIDPQN->SetLineColor(1);
32790     hAbIDPQN->SetLineWidth(2);
32791     //hAbIDPQN->SetBit(TH1::kCanRebin);
32792 
32793     hJeIDPQN=new TH1F("hJeIDPQN","hJeIDPQN",4*320,-3.2,3.2);
32794     hJeIDPQN->GetXaxis()->SetTitle("PID (from Justin E)");
32795     hJeIDPQN->GetXaxis()->CenterTitle();
32796     hJeIDPQN->GetYaxis()->SetTitle("");
32797     hJeIDPQN->GetYaxis()->CenterTitle();
32798     hJeIDPQN->SetFillColor(0);
32799     hJeIDPQN->SetLineColor(1);
32800     hJeIDPQN->SetLineWidth(2);
32801     //hJeIDPQN->SetBit(TH1::kCanRebin);
32802 
32803     //10 ns resolution
32804     hEvtTimeWrtSpillPQN=new TH1D
32805       ("hEvtTimeWrtSpillPQN","hEvtTimeWrtSpillPQN",20000,
32806        -100*(Munits::microsecond),
32807        +100*(Munits::microsecond));
32808     hEvtTimeWrtSpillPQN->GetXaxis()->
32809       SetTitle("Event time - beam spill time (s)");
32810     hEvtTimeWrtSpillPQN->GetXaxis()->CenterTitle();
32811     hEvtTimeWrtSpillPQN->GetYaxis()->SetTitle("");
32812     hEvtTimeWrtSpillPQN->GetYaxis()->CenterTitle();
32813     hEvtTimeWrtSpillPQN->SetFillColor(0);
32814     //hEvtTimeWrtSpillPQN->SetBit(TH1::kCanRebin);
32815 
32816 
32817     //10 ns resolution
32818     hEvtMedianTimeWrtSpillPQN=new TH1D
32819       ("hEvtMedianTimeWrtSpillPQN","hEvtMedianTimeWrtSpillPQN",20000,
32820        -100*(Munits::microsecond),
32821        +100*(Munits::microsecond));
32822     hEvtMedianTimeWrtSpillPQN->GetXaxis()->
32823       SetTitle("Event median time - beam spill time (s)");
32824     hEvtMedianTimeWrtSpillPQN->GetXaxis()->CenterTitle();
32825     hEvtMedianTimeWrtSpillPQN->GetYaxis()->SetTitle("");
32826     hEvtMedianTimeWrtSpillPQN->GetYaxis()->CenterTitle();
32827     hEvtMedianTimeWrtSpillPQN->SetFillColor(0);
32828     //hEvtMedianTimeWrtSpillPQN->SetBit(TH1::kCanRebin);
32829 
32830     //10 ns resolution
32831     hEvtMedMinusMinPQN=new TH1D
32832       ("hEvtMedMinusMinPQN","hEvtMedMinusMinPQN",20000,
32833        -100*(Munits::microsecond),
32834        +100*(Munits::microsecond));
32835     hEvtMedMinusMinPQN->GetXaxis()->
32836       SetTitle("(Event median time - Event time) (s)");
32837     hEvtMedMinusMinPQN->GetXaxis()->CenterTitle();
32838     hEvtMedMinusMinPQN->GetYaxis()->SetTitle("");
32839     hEvtMedMinusMinPQN->GetYaxis()->CenterTitle();
32840     hEvtMedMinusMinPQN->SetFillColor(0);
32841     //hEvtMedMinusMinPQN->SetBit(TH1::kCanRebin);
32842 
32843     //10 ns resolution
32844     hEvtTimeWrtTriggerPQN=new TH1D
32845       ("hEvtTimeWrtTriggerPQN","hEvtTimeWrtTriggerPQN",20000,
32846        -100*(Munits::microsecond),
32847        +100*(Munits::microsecond));
32848     hEvtTimeWrtTriggerPQN->GetXaxis()->
32849       SetTitle("Event time - trigger time (s)");
32850     hEvtTimeWrtTriggerPQN->GetXaxis()->CenterTitle();
32851     hEvtTimeWrtTriggerPQN->GetYaxis()->SetTitle("");
32852     hEvtTimeWrtTriggerPQN->GetYaxis()->CenterTitle();
32853     hEvtTimeWrtTriggerPQN->SetFillColor(0);
32854     //hEvtTimeWrtTriggerPQN->SetBit(TH1::kCanRebin);
32855 
32856     //10 ns resolution
32857     hEventTimeLengthPQN=new TH1D
32858       ("hEventTimeLengthPQN","hEventTimeLengthPQN",20000,
32859        -100*(Munits::microsecond),
32860        +100*(Munits::microsecond));
32861     hEventTimeLengthPQN->GetXaxis()->SetTitle("Event length (s)");
32862     hEventTimeLengthPQN->GetXaxis()->CenterTitle();
32863     hEventTimeLengthPQN->GetYaxis()->SetTitle("");
32864     hEventTimeLengthPQN->GetYaxis()->CenterTitle();
32865     hEventTimeLengthPQN->SetFillColor(0);
32866     //hEventTimeLengthPQN->SetBit(TH1::kCanRebin);
32867 
32868 
32869     //NQ
32870     hqpNQN=new TH1F("hqpNQN","hqpNQN",200*160,-16,16);
32871     hqpNQN->GetXaxis()->SetTitle("Q/P");
32872     hqpNQN->GetXaxis()->CenterTitle();
32873     hqpNQN->GetYaxis()->SetTitle("");
32874     hqpNQN->GetYaxis()->CenterTitle();
32875     hqpNQN->SetFillColor(0);
32876     hqpNQN->SetLineColor(1);
32877     hqpNQN->SetLineWidth(2);
32878     hqpNQN->SetLineStyle(2);
32879     //hqpNQN->SetBit(TH1::kCanRebin);
32880 
32881     hqpNotNMCCNQN=new TH1F("hqpNotNMCCNQN","hqpNotNMCCNQN",200*160,-16,16);
32882     hqpNotNMCCNQN->GetXaxis()->SetTitle("Q/P");
32883     hqpNotNMCCNQN->GetXaxis()->CenterTitle();
32884     hqpNotNMCCNQN->GetYaxis()->SetTitle("");
32885     hqpNotNMCCNQN->GetYaxis()->CenterTitle();
32886     hqpNotNMCCNQN->SetFillColor(0);
32887     hqpNotNMCCNQN->SetLineColor(1);
32888     hqpNotNMCCNQN->SetLineWidth(2);
32889     hqpNotNMCCNQN->SetLineStyle(2);
32890     //hqpNotNMCCNQN->SetBit(TH1::kCanRebin);
32891 
32892     hSigqpNQN=new TH1F("hSigqpNQN","hSigqpNQN",200*160,-16,16);
32893     hSigqpNQN->GetXaxis()->SetTitle("#sigma(Q/P)");
32894     hSigqpNQN->GetXaxis()->CenterTitle();
32895     hSigqpNQN->GetYaxis()->SetTitle("");
32896     hSigqpNQN->GetYaxis()->CenterTitle();
32897     hSigqpNQN->SetFillColor(0);
32898     hSigqpNQN->SetLineColor(1);
32899     hSigqpNQN->SetLineWidth(2);
32900     hSigqpNQN->SetLineStyle(2);
32901     //hSigqpNQN->SetBit(TH1::kCanRebin);
32902 
32903     hSigqp_qpNQN=new TH1F("hSigqp_qpNQN","hSigqp_qpNQN",800*160,-160,160);
32904     hSigqp_qpNQN->GetXaxis()->SetTitle("#sigma(Q/P)/(Q/P)");
32905     hSigqp_qpNQN->GetXaxis()->CenterTitle();
32906     hSigqp_qpNQN->GetYaxis()->SetTitle("");
32907     hSigqp_qpNQN->GetYaxis()->CenterTitle();
32908     hSigqp_qpNQN->SetFillColor(0);
32909     hSigqp_qpNQN->SetLineColor(1);
32910     hSigqp_qpNQN->SetLineWidth(2);
32911     hSigqp_qpNQN->SetLineStyle(2);
32912     //hSigqp_qpNQN->SetBit(TH1::kCanRebin);
32913 
32914     hqp_sigqpNQN=new TH1F("hqp_sigqpNQN","hqp_sigqpNQN",800*160,-160,160);
32915     hqp_sigqpNQN->GetXaxis()->SetTitle("(Q/P)/#sigma(Q/P)");
32916     hqp_sigqpNQN->GetXaxis()->CenterTitle();
32917     hqp_sigqpNQN->GetYaxis()->SetTitle("");
32918     hqp_sigqpNQN->GetYaxis()->CenterTitle();
32919     hqp_sigqpNQN->SetFillColor(0);
32920     hqp_sigqpNQN->SetLineColor(1);
32921     hqp_sigqpNQN->SetLineWidth(2);
32922     hqp_sigqpNQN->SetLineStyle(2);
32923     //hqp_sigqpNQN->SetBit(TH1::kCanRebin);
32924 
32925     hqp_sigqpNotNMCCNQN=new TH1F("hqp_sigqpNotNMCCNQN","hqp_sigqpNotNMCCNQN",800*160,-160,160);
32926     hqp_sigqpNotNMCCNQN->GetXaxis()->SetTitle("(Q/P)/#sigma(Q/P)");
32927     hqp_sigqpNotNMCCNQN->GetXaxis()->CenterTitle();
32928     hqp_sigqpNotNMCCNQN->GetYaxis()->SetTitle("");
32929     hqp_sigqpNotNMCCNQN->GetYaxis()->CenterTitle();
32930     hqp_sigqpNotNMCCNQN->SetFillColor(0);
32931     hqp_sigqpNotNMCCNQN->SetLineColor(1);
32932     hqp_sigqpNotNMCCNQN->SetLineWidth(2);
32933     hqp_sigqpNotNMCCNQN->SetLineStyle(2);
32934     //hqp_sigqpNotNMCCNQN->SetBit(TH1::kCanRebin);
32935 
32936     hChi2NQN=new TH1F("hChi2NQN","hChi2NQN",10*176,-16,160);
32937     hChi2NQN->GetXaxis()->SetTitle("#chi^{2}/ndof");
32938     hChi2NQN->GetXaxis()->CenterTitle();
32939     hChi2NQN->GetYaxis()->SetTitle("");
32940     hChi2NQN->GetYaxis()->CenterTitle();
32941     hChi2NQN->SetFillColor(0);
32942     hChi2NQN->SetLineColor(1);
32943     hChi2NQN->SetLineWidth(2);
32944     hChi2NQN->SetLineStyle(2);
32945     //hChi2NQN->SetBit(TH1::kCanRebin);
32946 
32947     hProbNQN=new TH1F("hProbNQN","hProbNQN",14000,-0.2,1.2);
32948     hProbNQN->GetXaxis()->SetTitle("Fit Probability");
32949     hProbNQN->GetXaxis()->CenterTitle();
32950     hProbNQN->GetYaxis()->SetTitle("");
32951     hProbNQN->GetYaxis()->CenterTitle();
32952     hProbNQN->SetFillColor(0);
32953     hProbNQN->SetLineColor(1);
32954     hProbNQN->SetLineWidth(2);
32955     hProbNQN->SetLineStyle(2);
32956     //hProbNQN->SetBit(TH1::kCanRebin);
32957 
32958     hDpIDNQN=new TH1F("hDpIDNQN","hDpIDNQN",4*160,-1.6,1.6);
32959     hDpIDNQN->GetXaxis()->SetTitle("PID (from MadDpID)");
32960     hDpIDNQN->GetXaxis()->CenterTitle();
32961     hDpIDNQN->GetYaxis()->SetTitle("");
32962     hDpIDNQN->GetYaxis()->CenterTitle();
32963     hDpIDNQN->SetFillColor(0);
32964     hDpIDNQN->SetLineColor(1);
32965     hDpIDNQN->SetLineWidth(2);
32966     //hDpIDNQN->SetBit(TH1::kCanRebin);
32967 
32968     hDpIDNoRwNQN=new TH1F("hDpIDNoRwNQN","hDpIDNoRwNQN",4*160,-1.6,1.6);
32969     hDpIDNoRwNQN->GetXaxis()->SetTitle("PID (from MadDpID)");
32970     hDpIDNoRwNQN->GetXaxis()->CenterTitle();
32971     hDpIDNoRwNQN->GetYaxis()->SetTitle("");
32972     hDpIDNoRwNQN->GetYaxis()->CenterTitle();
32973     hDpIDNoRwNQN->SetFillColor(0);
32974     hDpIDNoRwNQN->SetLineColor(1);
32975     hDpIDNoRwNQN->SetLineWidth(2);
32976     //hDpIDNoRwNQN->SetBit(TH1::kCanRebin);
32977 
32978     // PoID Officially depracated
32979     //    hPoIDNQN=new TH1F("hPoIDNQN","hPoIDNQN",4*320,-3.2,3.2);
32980     //    hPoIDNQN->GetXaxis()->SetTitle("PID (from NuBarPID)");
32981     //    hPoIDNQN->GetXaxis()->CenterTitle();
32982     //    hPoIDNQN->GetYaxis()->SetTitle("");
32983     //    hPoIDNQN->GetYaxis()->CenterTitle();
32984     //    hPoIDNQN->SetFillColor(0);
32985     //    hPoIDNQN->SetLineColor(1);
32986     //    hPoIDNQN->SetLineWidth(2);
32987     //    //hPoIDNQN->SetBit(TH1::kCanRebin);
32988 
32989     hRoIDNQN=new TH1F("hRoIDNQN","hRoIDNQN",81,0,1);
32990     hRoIDNQN->GetXaxis()->SetTitle("PID (from Rustem O)");
32991     hRoIDNQN->GetXaxis()->CenterTitle();
32992     hRoIDNQN->GetYaxis()->SetTitle("");
32993     hRoIDNQN->GetYaxis()->CenterTitle();
32994     hRoIDNQN->SetFillColor(0);
32995     hRoIDNQN->SetLineColor(1);
32996     hRoIDNQN->SetLineWidth(2);
32997     //hRoIDNQN->SetBit(TH1::kCanRebin);
32998 
32999     hRoIDNoRwNQN=new TH1F("hRoIDNoRwNQN","hRoIDNoRwNQN",81,0,1);
33000     hRoIDNoRwNQN->GetXaxis()->SetTitle("PID (from Rustem O)");
33001     hRoIDNoRwNQN->GetXaxis()->CenterTitle();
33002     hRoIDNoRwNQN->GetYaxis()->SetTitle("");
33003     hRoIDNoRwNQN->GetYaxis()->CenterTitle();
33004     hRoIDNoRwNQN->SetFillColor(0);
33005     hRoIDNoRwNQN->SetLineColor(1);
33006     hRoIDNoRwNQN->SetLineWidth(2);
33007     //hRoIDNoRwNQN->SetBit(TH1::kCanRebin);
33008 
33009     hAbIDNQN=new TH1F("hAbIDNQN","hAbIDNQN",4*320,-3.2,3.2);
33010     hAbIDNQN->GetXaxis()->SetTitle("PID (from Andy B)");
33011     hAbIDNQN->GetXaxis()->CenterTitle();
33012     hAbIDNQN->GetYaxis()->SetTitle("");
33013     hAbIDNQN->GetYaxis()->CenterTitle();
33014     hAbIDNQN->SetFillColor(0);
33015     hAbIDNQN->SetLineColor(1);
33016     hAbIDNQN->SetLineWidth(2);
33017     //hAbIDNQN->SetBit(TH1::kCanRebin);
33018 
33019     hJeIDNQN=new TH1F("hJeIDNQN","hJeIDNQN",4*320,-3.2,3.2);
33020     hJeIDNQN->GetXaxis()->SetTitle("PID (from Justin E)");
33021     hJeIDNQN->GetXaxis()->CenterTitle();
33022     hJeIDNQN->GetYaxis()->SetTitle("");
33023     hJeIDNQN->GetYaxis()->CenterTitle();
33024     hJeIDNQN->SetFillColor(0);
33025     hJeIDNQN->SetLineColor(1);
33026     hJeIDNQN->SetLineWidth(2);
33027     //hJeIDNQN->SetBit(TH1::kCanRebin);
33028 
33029     //10 ns resolution
33030     hEvtTimeWrtSpillNQN=new TH1D
33031       ("hEvtTimeWrtSpillNQN","hEvtTimeWrtSpillNQN",20000,
33032        -100*(Munits::microsecond),
33033        +100*(Munits::microsecond));
33034     hEvtTimeWrtSpillNQN->GetXaxis()->
33035       SetTitle("Event time - beam spill time (s)");
33036     hEvtTimeWrtSpillNQN->GetXaxis()->CenterTitle();
33037     hEvtTimeWrtSpillNQN->GetYaxis()->SetTitle("");
33038     hEvtTimeWrtSpillNQN->GetYaxis()->CenterTitle();
33039     hEvtTimeWrtSpillNQN->SetFillColor(0);
33040     //hEvtTimeWrtSpillNQN->SetBit(TH1::kCanRebin);
33041 
33042     //10 ns resolution
33043     hEvtMedianTimeWrtSpillNQN=new TH1D
33044       ("hEvtMedianTimeWrtSpillNQN","hEvtMedianTimeWrtSpillNQN",20000,
33045        -100*(Munits::microsecond),
33046        +100*(Munits::microsecond));
33047     hEvtMedianTimeWrtSpillNQN->GetXaxis()->
33048       SetTitle("Event median time - beam spill time (s)");
33049     hEvtMedianTimeWrtSpillNQN->GetXaxis()->CenterTitle();
33050     hEvtMedianTimeWrtSpillNQN->GetYaxis()->SetTitle("");
33051     hEvtMedianTimeWrtSpillNQN->GetYaxis()->CenterTitle();
33052     hEvtMedianTimeWrtSpillNQN->SetFillColor(0);
33053     //hEvtMedianTimeWrtSpillNQN->SetBit(TH1::kCanRebin);
33054 
33055     //10 ns resolution
33056     hEvtMedMinusMinNQN=new TH1D
33057       ("hEvtMedMinusMinNQN","hEvtMedMinusMinNQN",20000,
33058        -100*(Munits::microsecond),
33059        +100*(Munits::microsecond));
33060     hEvtMedMinusMinNQN->GetXaxis()->
33061       SetTitle("(Event median time - Event time) (s)");
33062     hEvtMedMinusMinNQN->GetXaxis()->CenterTitle();
33063     hEvtMedMinusMinNQN->GetYaxis()->SetTitle("");
33064     hEvtMedMinusMinNQN->GetYaxis()->CenterTitle();
33065     hEvtMedMinusMinNQN->SetFillColor(0);
33066     //hEvtMedMinusMinNQN->SetBit(TH1::kCanRebin);
33067 
33068     //10 ns resolution
33069     hEvtTimeWrtTriggerNQN=new TH1D
33070       ("hEvtTimeWrtTriggerNQN","hEvtTimeWrtTriggerNQN",20000,
33071        -100*(Munits::microsecond),
33072        +100*(Munits::microsecond));
33073     hEvtTimeWrtTriggerNQN->GetXaxis()->
33074       SetTitle("Event time - trigger time (s)");
33075     hEvtTimeWrtTriggerNQN->GetXaxis()->CenterTitle();
33076     hEvtTimeWrtTriggerNQN->GetYaxis()->SetTitle("");
33077     hEvtTimeWrtTriggerNQN->GetYaxis()->CenterTitle();
33078     hEvtTimeWrtTriggerNQN->SetFillColor(0);
33079     //hEvtTimeWrtTriggerNQN->SetBit(TH1::kCanRebin);
33080 
33081     //10 ns resolution
33082     hEventTimeLengthNQN=new TH1D
33083       ("hEventTimeLengthNQN","hEventTimeLengthNQN",20000,
33084        -100*(Munits::microsecond),
33085        +100*(Munits::microsecond));
33086     hEventTimeLengthNQN->GetXaxis()->SetTitle("Event length (s)");
33087     hEventTimeLengthNQN->GetXaxis()->CenterTitle();
33088     hEventTimeLengthNQN->GetYaxis()->SetTitle("");
33089     hEventTimeLengthNQN->GetYaxis()->CenterTitle();
33090     hEventTimeLengthNQN->SetFillColor(0);
33091     //hEventTimeLengthNQN->SetBit(TH1::kCanRebin);
33092   }
33093   
33094   //Both
33095   hqp->Fill(nu.qp,nu.rw);
33096 
33097   //PQ
33098   if (nu.charge==+1){
33099     hqpPQN->Fill(nu.qp,nu.rw);
33100     hSigqpPQN->Fill(nu.sigqp,nu.rw);
33101     hSigqp_qpPQN->Fill(nu.sigqp_qp,nu.rw);
33102     hqp_sigqpPQN->Fill(1./nu.sigqp_qp,nu.rw);
33103     hChi2PQN->Fill(nu.chi2PerNdof,nu.rw);
33104     hProbPQN->Fill(nu.prob,nu.rw);
33105     hDpIDPQN->Fill(nu.dpID,nu.rw);
33106     hDpIDNoRwPQN->Fill(nu.dpID);
33107     // PoID Officially depracated
33108     //hPoIDPQN->Fill(nu.poID,nu.rw);
33109     hRoIDPQN->Fill(nu.roID,nu.rw);
33110     hRoIDNoRwPQN->Fill(nu.roID);
33111     hAbIDPQN->Fill(nu.abID,nu.rw);
33112     hJeIDPQN->Fill(nu.jPID,nu.rw);
33113     hEvtTimeWrtSpillPQN->Fill(nu.timeEvtMin-nu.timeToNearestSpill,nu.rw);
33114     hEvtMedianTimeWrtSpillPQN->Fill(medianTimeWrtTrigger-nu.timeToNearestSpill,nu.rw);
33115     hEvtMedMinusMinPQN->Fill(medianTimeWrtTrigger-nu.timeEvtMin,nu.rw);
33116     hEvtTimeWrtTriggerPQN->Fill(nu.timeEvtMin,nu.rw);
33117     hEventTimeLengthPQN->Fill(nu.timeEvtMax-nu.timeEvtMin,nu.rw);
33118     if(!(nu.inu == -14 && nu.iaction == 1)){
33119       hqp_sigqpNotNMBCCPQN->Fill(1./nu.sigqp_qp,nu.rw);
33120       hqpNotNMBCCPQN->Fill(nu.qp,nu.rw);
33121     }
33122   }
33123   //NQ
33124   else if (nu.charge==-1){
33125     hqpNQN->Fill(nu.qp,nu.rw);
33126     hSigqpNQN->Fill(nu.sigqp,nu.rw);
33127     hSigqp_qpNQN->Fill(nu.sigqp_qp,nu.rw);
33128     hqp_sigqpNQN->Fill(1./nu.sigqp_qp,nu.rw);
33129     hChi2NQN->Fill(nu.chi2PerNdof,nu.rw);
33130     hProbNQN->Fill(nu.prob,nu.rw);
33131     hDpIDNQN->Fill(nu.dpID,nu.rw);
33132     hDpIDNoRwNQN->Fill(nu.dpID);
33133     // PoID Officially depracated
33134     //hPoIDNQN->Fill(nu.poID,nu.rw);
33135     hRoIDNQN->Fill(nu.roID,nu.rw);
33136     hRoIDNoRwNQN->Fill(nu.roID);
33137     hAbIDNQN->Fill(nu.abID,nu.rw);
33138     hJeIDNQN->Fill(nu.jPID,nu.rw);
33139     hEvtTimeWrtSpillNQN->Fill(nu.timeEvtMin-nu.timeToNearestSpill,nu.rw);
33140     hEvtMedianTimeWrtSpillNQN->Fill(medianTimeWrtTrigger-nu.timeToNearestSpill,nu.rw);
33141     hEvtMedMinusMinNQN->Fill(medianTimeWrtTrigger-nu.timeEvtMin,nu.rw);
33142     hEvtTimeWrtTriggerNQN->Fill(nu.timeEvtMin,nu.rw);
33143     hEventTimeLengthNQN->Fill(nu.timeEvtMax-nu.timeEvtMin,nu.rw);
33144     if(!(nu.inu == 14 && nu.iaction == 1)){
33145       hqp_sigqpNotNMCCNQN->Fill(1./nu.sigqp_qp,nu.rw);
33146       hqpNotNMCCNQN->Fill(nu.qp,nu.rw);
33147     }
33148   }
33149   else MSG("NuPlots",Msg::kWarning)<<"Ahh, bad charge"<<endl;
33150 }

void NuPlots::FillEffPur ( const NuEvent nu,
bool  sel 
) const

Definition at line 47366 of file NuPlots.cxx.

References NuEvent::charge, NuEvent::dpID, NuEvent::energy, NuEvent::iaction, NuEvent::inu, and NuEvent::rw.

Referenced by NuDSTAna::CSSAna().

47367 {
47368 
47369   static TH1F* Selected;
47370   static TH1F* SelectedTrue;
47371   static TH1F* SelectedFalse;
47372   static TH1F* AllTrue;
47373   static TH1F* SelectedNC;
47374   static TH1F* SelectedTrueNC;
47375   static TH1F* SelectedFalseNC;
47376   static float bins[11] = {0,2,4,6,8,10,12,16,20,24,30};
47377 
47378   if (!Selected) {
47379     Selected = new TH1F("hSelected", "Selected;Reconstructed Energy (GeV)", 10, bins);
47380     SelectedTrue = new TH1F("hSelectedTrue", "Selected True;Reconstructed Energy (GeV)", 10, bins);
47381     SelectedFalse = new TH1F("hSelectedFalse", "Selected False;Reconstructed Energy (GeV)", 10, bins);
47382     AllTrue = new TH1F("hAllTrue", "All True;Reconstructed Energy (GeV)", 10, bins);
47383     SelectedNC = new TH1F("hSelectedNC", "Selected w/ NC;Reconstructed Energy (GeV)", 10, bins);
47384     SelectedTrueNC = new TH1F("hSelectedTrueNC", "Selected True w/ NC;Reconstructed Energy (GeV)", 10, bins);
47385     SelectedFalseNC = new TH1F("hSelectedFalseNC", "Selected False w/ NC;Reconstructed Energy (GeV)", 10, bins);
47386   }
47387 
47388   bool btrue = (nu.inu == -14 && nu.iaction == 1);
47389   bool bnc   = nu.dpID > 0.4;
47390   bool bsel  = (bpid && nu.charge == +1);
47391 
47392   if (btrue) {
47393     AllTrue->Fill(nu.energy,nu.rw);
47394   }
47395 
47396   if (bsel) {
47397     Selected->Fill(nu.energy,nu.rw);
47398     if (btrue)
47399       SelectedTrue->Fill(nu.energy,nu.rw);
47400     else
47401       SelectedFalse->Fill(nu.energy,nu.rw);
47402 
47403     if (bnc) {
47404       SelectedNC->Fill(nu.energy,nu.rw);
47405       if (btrue)
47406         SelectedTrueNC->Fill(nu.energy,nu.rw);
47407       else
47408         SelectedFalseNC->Fill(nu.energy,nu.rw);
47409     }
47410   }
47411 }

void NuPlots::FillEnergyBinHistos ( const NuEvent nu  )  const

Definition at line 45621 of file NuPlots.cxx.

References NuEvent::abID, NuEvent::charge, NuEvent::chi2PerNdof, NuEvent::dpID, NuEvent::energy, Form(), Munits::GeV, NuEvent::iaction, NuEvent::inu, NuEvent::jPID, Msg::kDebug, Msg::kWarning, max, MAXMSG, min, MSG, NuEvent::planeTrkEnd, NuEvent::planeTrkVtx, NuEvent::prob, NuEvent::qp, NuEvent::roID, NuEvent::rTrkEnd, NuEvent::rTrkVtx, NuEvent::rw, NuEvent::shwEn, NuEvent::sigqp, NuEvent::sigqp_qp, NuEvent::trkEn, NuEvent::xTrkEnd, NuEvent::xTrkVtx, NuEvent::y, NuEvent::yTrkEnd, NuEvent::yTrkVtx, NuEvent::zTrkEnd, and NuEvent::zTrkVtx.

Referenced by NuAnalysis::ChargeSeparationOneSnarl(), NuAnalysis::LIRejectionTest(), NuDSTAna::NMBAna(), and NuAnalysis::NMBSummaryTreeAna().

45622 {
45623   const Float_t min=0*(Munits::GeV);
45624   const Float_t max=50*(Munits::GeV);
45625   const Float_t binSize=1*(Munits::GeV);
45626   const Int_t bins=static_cast<Int_t>((max-min)/binSize);
45627 
45628   //decide which variable to use
45629   Float_t energy=nu.energy;
45630   //Float_t energy=nu.trkEn;
45631 
45632   //cap the energy in order to cap the index to avoid overflow
45633   if (energy>=max) energy=max-0.01*(Munits::GeV);
45634 
45635   //calc the index to access histos in the vectors
45636   Int_t index=static_cast<Int_t>(energy/binSize);
45637   MAXMSG("NuPlots",Msg::kDebug,4)
45638     <<"FillEnergyBinHistos:: energy="<<energy<<", index="<<index
45639     <<", bins="<<bins<<endl;
45640 
45641   if (index>=30) {
45642     MSG("NuPlots",Msg::kWarning)
45643       <<"FillEnergyBinHistos::energy="<<energy<<", index="<<index
45644       <<", bins="<<bins<<endl;
45645   }
45646 
45647   static Bool_t firstTime=true;
45648 
45649   //PQ
45650   static vector<TH1F*> vhRecoEnPQ(bins);
45651   static vector<TH1F*> vhRecoEnNMBPQ(bins);
45652   static vector<TH1F*> vhRecoEnNMPQ(bins);
45653   static vector<TH1F*> vhRecoEnAllShwPQ(bins);
45654   static vector<TH1F*> vhRecoEnTrkPQ(bins);
45655   static vector<TH1F*> vhRecoEnTrkNMBPQ(bins);
45656   static vector<TH1F*> vhRecoEnTrkNMPQ(bins);
45657   static vector<TH1F*> vhRecoEnTrkAllShwPQ(bins);
45658   static vector<TH1F*> vhRecoEnShwPQ(bins);
45659   static vector<TH1F*> vhRecoEnShwNMBPQ(bins);
45660   static vector<TH1F*> vhRecoEnShwNMPQ(bins);
45661   static vector<TH1F*> vhRecoEnShwAllShwPQ(bins);
45662   static vector<TH1F*> vhRecoYPQ(bins);
45663   static vector<TH1F*> vhRecoYNMBPQ(bins);
45664   static vector<TH1F*> vhRecoYNMPQ(bins);
45665   static vector<TH1F*> vhRecoYAllShwPQ(bins);
45666 
45667   static vector<TH1F*> vhqpPQ(bins);
45668   static vector<TH1F*> vhqpNMBPQ(bins);
45669   static vector<TH1F*> vhqpNMPQ(bins);
45670   static vector<TH1F*> vhqpAllShwPQ(bins);
45671   static vector<TH1F*> vhSigqpPQ(bins);
45672   static vector<TH1F*> vhSigqpNMBPQ(bins);
45673   static vector<TH1F*> vhSigqpNMPQ(bins);
45674   static vector<TH1F*> vhSigqpAllShwPQ(bins);
45675   static vector<TH1F*> vhSigqp_qpPQ(bins);
45676   static vector<TH1F*> vhSigqp_qpNMBPQ(bins);
45677   static vector<TH1F*> vhSigqp_qpNMPQ(bins);
45678   static vector<TH1F*> vhSigqp_qpAllShwPQ(bins);
45679   static vector<TH1F*> vhChi2PQ(bins);
45680   static vector<TH1F*> vhChi2NMBPQ(bins);
45681   static vector<TH1F*> vhChi2NMPQ(bins);
45682   static vector<TH1F*> vhChi2AllShwPQ(bins);
45683   static vector<TH1F*> vhProbPQ(bins);
45684   static vector<TH1F*> vhProbNMBPQ(bins);
45685   static vector<TH1F*> vhProbNMPQ(bins);
45686   static vector<TH1F*> vhProbAllShwPQ(bins);
45687   static vector<TH1F*> vhDpIDPQ(bins);
45688   static vector<TH1F*> vhDpIDNMBPQ(bins);
45689   static vector<TH1F*> vhDpIDNMPQ(bins);
45690   static vector<TH1F*> vhDpIDAllShwPQ(bins);
45691   // PoID Officially depracated
45692   //static vector<TH1F*> vhPoIDPQ(bins);
45693   //static vector<TH1F*> vhPoIDNMBPQ(bins);
45694   //static vector<TH1F*> vhPoIDNMPQ(bins);
45695   //static vector<TH1F*> vhPoIDAllShwPQ(bins);
45696   static vector<TH1F*> vhRoIDPQ(bins);
45697   static vector<TH1F*> vhRoIDNMBPQ(bins);
45698   static vector<TH1F*> vhRoIDNMPQ(bins);
45699   static vector<TH1F*> vhRoIDAllShwPQ(bins);
45700   static vector<TH1F*> vhAbIDPQ(bins);
45701   static vector<TH1F*> vhAbIDNMBPQ(bins);
45702   static vector<TH1F*> vhAbIDNMPQ(bins);
45703   static vector<TH1F*> vhAbIDAllShwPQ(bins);
45704   static vector<TH1F*> vhJeIDPQ(bins);
45705   static vector<TH1F*> vhJeIDNMBPQ(bins);
45706   static vector<TH1F*> vhJeIDNMPQ(bins);
45707   static vector<TH1F*> vhJeIDAllShwPQ(bins);
45708 
45709   static vector<TH1F*> vhXTrkVtxPQ(bins);
45710   static vector<TH1F*> vhYTrkVtxPQ(bins);
45711   static vector<TH1F*> vhRTrkVtxPQ(bins);
45712   static vector<TH1F*> vhR2TrkVtxPQ(bins);
45713   static vector<TH1F*> vhZTrkVtxPQ(bins);
45714   static vector<TH1F*> vhPlaneTrkVtxPQ(bins);
45715   static vector<TH1F*> vhXTrkEndPQ(bins);
45716   static vector<TH1F*> vhYTrkEndPQ(bins);
45717   static vector<TH1F*> vhRTrkEndPQ(bins);
45718   static vector<TH1F*> vhR2TrkEndPQ(bins);
45719   static vector<TH1F*> vhZTrkEndPQ(bins);
45720   static vector<TH1F*> vhPlaneTrkEndPQ(bins);
45721 
45722   //NQ
45723   static vector<TH1F*> vhRecoEnNQ(bins);
45724   static vector<TH1F*> vhRecoEnNMBNQ(bins);
45725   static vector<TH1F*> vhRecoEnNMNQ(bins);
45726   static vector<TH1F*> vhRecoEnAllShwNQ(bins);
45727   static vector<TH1F*> vhRecoEnTrkNQ(bins);
45728   static vector<TH1F*> vhRecoEnTrkNMBNQ(bins);
45729   static vector<TH1F*> vhRecoEnTrkNMNQ(bins);
45730   static vector<TH1F*> vhRecoEnTrkAllShwNQ(bins);
45731   static vector<TH1F*> vhRecoEnShwNQ(bins);
45732   static vector<TH1F*> vhRecoEnShwNMBNQ(bins);
45733   static vector<TH1F*> vhRecoEnShwNMNQ(bins);
45734   static vector<TH1F*> vhRecoEnShwAllShwNQ(bins);
45735   static vector<TH1F*> vhRecoYNQ(bins);
45736   static vector<TH1F*> vhRecoYNMBNQ(bins);
45737   static vector<TH1F*> vhRecoYNMNQ(bins);
45738   static vector<TH1F*> vhRecoYAllShwNQ(bins);
45739 
45740   static vector<TH1F*> vhqpNQ(bins);
45741   static vector<TH1F*> vhqpNMBNQ(bins);
45742   static vector<TH1F*> vhqpNMNQ(bins);
45743   static vector<TH1F*> vhqpAllShwNQ(bins);
45744   static vector<TH1F*> vhSigqpNQ(bins);
45745   static vector<TH1F*> vhSigqpNMBNQ(bins);
45746   static vector<TH1F*> vhSigqpNMNQ(bins);
45747   static vector<TH1F*> vhSigqpAllShwNQ(bins);
45748   static vector<TH1F*> vhSigqp_qpNQ(bins);
45749   static vector<TH1F*> vhSigqp_qpNMBNQ(bins);
45750   static vector<TH1F*> vhSigqp_qpNMNQ(bins);
45751   static vector<TH1F*> vhSigqp_qpAllShwNQ(bins);
45752   static vector<TH1F*> vhChi2NQ(bins);
45753   static vector<TH1F*> vhChi2NMBNQ(bins);
45754   static vector<TH1F*> vhChi2NMNQ(bins);
45755   static vector<TH1F*> vhChi2AllShwNQ(bins);
45756   static vector<TH1F*> vhProbNQ(bins);
45757   static vector<TH1F*> vhProbNMBNQ(bins);
45758   static vector<TH1F*> vhProbNMNQ(bins);
45759   static vector<TH1F*> vhProbAllShwNQ(bins);
45760   static vector<TH1F*> vhDpIDNQ(bins);
45761   static vector<TH1F*> vhDpIDNMBNQ(bins);
45762   static vector<TH1F*> vhDpIDNMNQ(bins);
45763   static vector<TH1F*> vhDpIDAllShwNQ(bins);
45764   // PoID Officially depracated
45765   //static vector<TH1F*> vhPoIDNQ(bins);
45766   //static vector<TH1F*> vhPoIDNMBNQ(bins);
45767   //static vector<TH1F*> vhPoIDNMNQ(bins);
45768   //static vector<TH1F*> vhPoIDAllShwNQ(bins);
45769   static vector<TH1F*> vhRoIDNQ(bins);
45770   static vector<TH1F*> vhRoIDNMBNQ(bins);
45771   static vector<TH1F*> vhRoIDNMNQ(bins);
45772   static vector<TH1F*> vhRoIDAllShwNQ(bins);
45773   static vector<TH1F*> vhAbIDNQ(bins);
45774   static vector<TH1F*> vhAbIDNMBNQ(bins);
45775   static vector<TH1F*> vhAbIDNMNQ(bins);
45776   static vector<TH1F*> vhAbIDAllShwNQ(bins);
45777   static vector<TH1F*> vhJeIDNQ(bins);
45778   static vector<TH1F*> vhJeIDNMBNQ(bins);
45779   static vector<TH1F*> vhJeIDNMNQ(bins);
45780   static vector<TH1F*> vhJeIDAllShwNQ(bins);
45781 
45782   static vector<TH1F*> vhXTrkVtxNQ(bins);
45783   static vector<TH1F*> vhYTrkVtxNQ(bins);
45784   static vector<TH1F*> vhRTrkVtxNQ(bins);
45785   static vector<TH1F*> vhR2TrkVtxNQ(bins);
45786   static vector<TH1F*> vhZTrkVtxNQ(bins);
45787   static vector<TH1F*> vhPlaneTrkVtxNQ(bins);
45788   static vector<TH1F*> vhXTrkEndNQ(bins);
45789   static vector<TH1F*> vhYTrkEndNQ(bins);
45790   static vector<TH1F*> vhRTrkEndNQ(bins);
45791   static vector<TH1F*> vhR2TrkEndNQ(bins);
45792   static vector<TH1F*> vhZTrkEndNQ(bins);
45793   static vector<TH1F*> vhPlaneTrkEndNQ(bins);
45794 
45795   if (firstTime){
45796     MAXMSG("NuPlots",Msg::kDebug,1)
45797       <<"Creating EnergyBins plots..."<<endl;
45798 
45799     for (Int_t i=0;i<bins;i++){
45800       string s="";
45801       string sBin=Form("%d",i);
45802       if (i<10) sBin="00"+sBin;
45803       else if (i<100) sBin="0"+sBin;
45804       MAXMSG("NuPlots",Msg::kDebug,100)
45805         <<"i="<<i<<", sBin="<<sBin<<endl;
45806 
45807       s="hRecoEnPQBin"+sBin;
45808       vhRecoEnPQ[i]=new TH1F(s.c_str(),s.c_str(),
45809                              4*352,-32,320);
45810       vhRecoEnPQ[i]->GetXaxis()->
45811         SetTitle("Reconstructed Energy (GeV)");
45812       vhRecoEnPQ[i]->GetXaxis()->CenterTitle();
45813       vhRecoEnPQ[i]->GetYaxis()->SetTitle("");
45814       vhRecoEnPQ[i]->GetYaxis()->CenterTitle();
45815       vhRecoEnPQ[i]->SetFillColor(0);
45816       vhRecoEnPQ[i]->SetLineColor(1);
45817       //vhRecoEnPQ[i]->SetBit(TH1::kCanRebin);
45818 
45819       MAXMSG("NuPlots",Msg::kDebug,100)
45820         <<"done first one i="<<i<<", sBin="<<sBin<<endl;
45821 
45822       s="hRecoEnNMBPQBin"+sBin;
45823       vhRecoEnNMBPQ[i]=static_cast<TH1F*>
45824         (vhRecoEnPQ[i]->Clone(s.c_str()));
45825       s="hRecoEnNMPQBin"+sBin;
45826       vhRecoEnNMPQ[i]=static_cast<TH1F*>
45827         (vhRecoEnPQ[i]->Clone(s.c_str()));
45828       s="hRecoEnAllShwPQBin"+sBin;
45829       vhRecoEnAllShwPQ[i]=static_cast<TH1F*>
45830         (vhRecoEnPQ[i]->Clone(s.c_str()));
45831 
45832       s="hRecoEnTrkPQBin"+sBin;
45833       vhRecoEnTrkPQ[i]=new TH1F(s.c_str(),s.c_str(),
45834                                 4*352,-32,320);
45835       vhRecoEnTrkPQ[i]->GetXaxis()->
45836         SetTitle("Track Reconstructed Energy (GeV)");
45837       vhRecoEnTrkPQ[i]->GetXaxis()->CenterTitle();
45838       vhRecoEnTrkPQ[i]->GetYaxis()->SetTitle("");
45839       vhRecoEnTrkPQ[i]->GetYaxis()->CenterTitle();
45840       vhRecoEnTrkPQ[i]->SetFillColor(0);
45841       vhRecoEnTrkPQ[i]->SetLineColor(1);
45842       //vhRecoEnTrkPQ[i]->SetBit(TH1::kCanRebin);
45843 
45844       s="hRecoEnTrkNMBPQBin"+sBin;
45845       vhRecoEnTrkNMBPQ[i]=static_cast<TH1F*>
45846         (vhRecoEnTrkPQ[i]->Clone(s.c_str()));
45847       s="hRecoEnTrkNMPQBin"+sBin;
45848       vhRecoEnTrkNMPQ[i]=static_cast<TH1F*>
45849         (vhRecoEnTrkPQ[i]->Clone(s.c_str()));
45850       s="hRecoEnTrkAllShwPQBin"+sBin;
45851       vhRecoEnTrkAllShwPQ[i]=static_cast<TH1F*>
45852         (vhRecoEnTrkPQ[i]->Clone(s.c_str()));
45853 
45854       s="hRecoEnShwPQBin"+sBin;
45855       vhRecoEnShwPQ[i]=new TH1F(s.c_str(),s.c_str(),
45856                                 4*352,-32,320);
45857       vhRecoEnShwPQ[i]->GetXaxis()->
45858         SetTitle("Shower Reconstructed Energy (GeV)");
45859       vhRecoEnShwPQ[i]->GetXaxis()->CenterTitle();
45860       vhRecoEnShwPQ[i]->GetYaxis()->SetTitle("");
45861       vhRecoEnShwPQ[i]->GetYaxis()->CenterTitle();
45862       vhRecoEnShwPQ[i]->SetFillColor(0);
45863       vhRecoEnShwPQ[i]->SetLineColor(1);
45864       //vhRecoEnShwPQ[i]->SetBit(TH1::kCanRebin);
45865 
45866       s="hRecoEnShwNMBPQBin"+sBin;
45867       vhRecoEnShwNMBPQ[i]=static_cast<TH1F*>
45868         (vhRecoEnShwPQ[i]->Clone(s.c_str()));
45869       s="hRecoEnShwNMPQBin"+sBin;
45870       vhRecoEnShwNMPQ[i]=static_cast<TH1F*>
45871         (vhRecoEnShwPQ[i]->Clone(s.c_str()));
45872       s="hRecoEnShwAllShwPQBin"+sBin;
45873       vhRecoEnShwAllShwPQ[i]=static_cast<TH1F*>
45874         (vhRecoEnShwPQ[i]->Clone(s.c_str()));
45875 
45876       s="hRecoYPQBin"+sBin;
45877       vhRecoYPQ[i]=new TH1F(s.c_str(),s.c_str(),
45878                             1400,-0.2,1.2);
45879       vhRecoYPQ[i]->GetXaxis()->SetTitle("Reconstructed y");
45880       vhRecoYPQ[i]->GetXaxis()->CenterTitle();
45881       vhRecoYPQ[i]->GetYaxis()->SetTitle("");
45882       vhRecoYPQ[i]->GetYaxis()->CenterTitle();
45883       vhRecoYPQ[i]->SetFillColor(0);
45884       vhRecoYPQ[i]->SetLineColor(1);
45885       //vhRecoYPQ[i]->SetBit(TH1::kCanRebin);
45886 
45887       s="hRecoYNMBPQBin"+sBin;
45888       vhRecoYNMBPQ[i]=static_cast<TH1F*>
45889         (vhRecoYPQ[i]->Clone(s.c_str()));
45890       s="hRecoYNMPQBin"+sBin;
45891       vhRecoYNMPQ[i]=static_cast<TH1F*>
45892         (vhRecoYPQ[i]->Clone(s.c_str()));
45893       s="hRecoYAllShwPQBin"+sBin;
45894       vhRecoYAllShwPQ[i]=static_cast<TH1F*>
45895         (vhRecoYPQ[i]->Clone(s.c_str()));
45896 
45897       s="hqpPQBin"+sBin;
45898       vhqpPQ[i]=new TH1F(s.c_str(),s.c_str(),200*160,-16,16);
45899       vhqpPQ[i]->GetXaxis()->SetTitle("Q/P");
45900       vhqpPQ[i]->GetXaxis()->CenterTitle();
45901       vhqpPQ[i]->GetYaxis()->SetTitle("");
45902       vhqpPQ[i]->GetYaxis()->CenterTitle();
45903       vhqpPQ[i]->SetFillColor(0);
45904       //vhqpPQ[i]->SetBit(TH1::kCanRebin);
45905 
45906       s="hqpNMBPQBin"+sBin;
45907       vhqpNMBPQ[i]=static_cast<TH1F*>
45908         (vhqpPQ[i]->Clone(s.c_str()));
45909       s="hqpNMPQBin"+sBin;
45910       vhqpNMPQ[i]=static_cast<TH1F*>
45911         (vhqpPQ[i]->Clone(s.c_str()));
45912       s="hqpAllShwPQBin"+sBin;
45913       vhqpAllShwPQ[i]=static_cast<TH1F*>
45914         (vhqpPQ[i]->Clone(s.c_str()));
45915 
45916       s="hSigqpPQBin"+sBin;
45917       vhSigqpPQ[i]=new TH1F(s.c_str(),s.c_str(),200*160,-16,16);
45918       vhSigqpPQ[i]->GetXaxis()->SetTitle("#sigma(Q/P)");
45919       vhSigqpPQ[i]->GetXaxis()->CenterTitle();
45920       vhSigqpPQ[i]->GetYaxis()->SetTitle("");
45921       vhSigqpPQ[i]->GetYaxis()->CenterTitle();
45922       vhSigqpPQ[i]->SetFillColor(0);
45923       //vhSigqpPQ[i]->SetBit(TH1::kCanRebin);
45924 
45925       s="hSigqpNMBPQBin"+sBin;
45926       vhSigqpNMBPQ[i]=static_cast<TH1F*>
45927         (vhSigqpPQ[i]->Clone(s.c_str()));
45928       s="hSigqpNMPQBin"+sBin;
45929       vhSigqpNMPQ[i]=static_cast<TH1F*>
45930         (vhSigqpPQ[i]->Clone(s.c_str()));
45931       s="hSigqpAllShwPQBin"+sBin;
45932       vhSigqpAllShwPQ[i]=static_cast<TH1F*>
45933         (vhSigqpPQ[i]->Clone(s.c_str()));
45934 
45935       s="hSigqp_qpPQBin"+sBin;
45936       vhSigqp_qpPQ[i]=new TH1F(s.c_str(),s.c_str(),800*160,-160,160);
45937       vhSigqp_qpPQ[i]->GetXaxis()->SetTitle("#sigma(Q/P)/(Q/P)");
45938       vhSigqp_qpPQ[i]->GetXaxis()->CenterTitle();
45939       vhSigqp_qpPQ[i]->GetYaxis()->SetTitle("");
45940       vhSigqp_qpPQ[i]->GetYaxis()->CenterTitle();
45941       vhSigqp_qpPQ[i]->SetFillColor(0);
45942       //vhSigqp_qpPQ[i]->SetBit(TH1::kCanRebin);
45943 
45944       s="hSigqp_qpNMBPQBin"+sBin;
45945       vhSigqp_qpNMBPQ[i]=static_cast<TH1F*>
45946         (vhSigqp_qpPQ[i]->Clone(s.c_str()));
45947       s="hSigqp_qpNMPQBin"+sBin;
45948       vhSigqp_qpNMPQ[i]=static_cast<TH1F*>
45949         (vhSigqp_qpPQ[i]->Clone(s.c_str()));
45950       s="hSigqp_qpAllShwPQBin"+sBin;
45951       vhSigqp_qpAllShwPQ[i]=static_cast<TH1F*>
45952         (vhSigqp_qpPQ[i]->Clone(s.c_str()));
45953 
45954       s="hChi2PQBin"+sBin;
45955       vhChi2PQ[i]=new TH1F(s.c_str(),s.c_str(),10*176,-16,160);
45956       vhChi2PQ[i]->GetXaxis()->SetTitle("#chi^{2}/ndof");
45957       vhChi2PQ[i]->GetXaxis()->CenterTitle();
45958       vhChi2PQ[i]->GetYaxis()->SetTitle("");
45959       vhChi2PQ[i]->GetYaxis()->CenterTitle();
45960       vhChi2PQ[i]->SetFillColor(0);
45961       //vhChi2PQ[i]->SetBit(TH1::kCanRebin);
45962 
45963       s="hChi2NMBPQBin"+sBin;
45964       vhChi2NMBPQ[i]=static_cast<TH1F*>
45965         (vhChi2PQ[i]->Clone(s.c_str()));
45966       s="hChi2NMPQBin"+sBin;
45967       vhChi2NMPQ[i]=static_cast<TH1F*>
45968         (vhChi2PQ[i]->Clone(s.c_str()));
45969       s="hChi2AllShwPQBin"+sBin;
45970       vhChi2AllShwPQ[i]=static_cast<TH1F*>
45971         (vhChi2PQ[i]->Clone(s.c_str()));
45972 
45973       s="hProbPQBin"+sBin;
45974       vhProbPQ[i]=new TH1F(s.c_str(),s.c_str(),14000,-0.2,1.2);
45975       vhProbPQ[i]->GetXaxis()->SetTitle("Fit Probability");
45976       vhProbPQ[i]->GetXaxis()->CenterTitle();
45977       vhProbPQ[i]->GetYaxis()->SetTitle("");
45978       vhProbPQ[i]->GetYaxis()->CenterTitle();
45979       vhProbPQ[i]->SetFillColor(0);
45980       //vhProbPQ[i]->SetBit(TH1::kCanRebin);
45981 
45982       s="hProbNMBPQBin"+sBin;
45983       vhProbNMBPQ[i]=static_cast<TH1F*>
45984         (vhProbPQ[i]->Clone(s.c_str()));
45985       s="hProbNMPQBin"+sBin;
45986       vhProbNMPQ[i]=static_cast<TH1F*>
45987         (vhProbPQ[i]->Clone(s.c_str()));
45988       s="hProbAllShwPQBin"+sBin;
45989       vhProbAllShwPQ[i]=static_cast<TH1F*>
45990         (vhProbPQ[i]->Clone(s.c_str()));
45991 
45992       s="hDpIDPQBin"+sBin;
45993       vhDpIDPQ[i]=new TH1F(s.c_str(),s.c_str(),4*160,-1.6,1.6);
45994       vhDpIDPQ[i]->GetXaxis()->SetTitle("PID (from MadDpID)");
45995       vhDpIDPQ[i]->GetXaxis()->CenterTitle();
45996       vhDpIDPQ[i]->GetYaxis()->SetTitle("");
45997       vhDpIDPQ[i]->GetYaxis()->CenterTitle();
45998       vhDpIDPQ[i]->SetFillColor(0);
45999       //vhDpIDPQ[i]->SetBit(TH1::kCanRebin);
46000 
46001       s="hDpIDNMBPQBin"+sBin;
46002       vhDpIDNMBPQ[i]=static_cast<TH1F*>
46003         (vhDpIDPQ[i]->Clone(s.c_str()));
46004       s="hDpIDNMPQBin"+sBin;
46005       vhDpIDNMPQ[i]=static_cast<TH1F*>
46006         (vhDpIDPQ[i]->Clone(s.c_str()));
46007       s="hDpIDAllShwPQBin"+sBin;
46008       vhDpIDAllShwPQ[i]=static_cast<TH1F*>
46009         (vhDpIDPQ[i]->Clone(s.c_str()));
46010 
46011       // PoID Officially Depracated
46012       //      s="hPoIDPQBin"+sBin;
46013       //      vhPoIDPQ[i]=new TH1F(s.c_str(),s.c_str(),4*320,-3.2,3.2);
46014       //      vhPoIDPQ[i]->GetXaxis()->SetTitle("PID (from NuBarPID)");
46015       //      vhPoIDPQ[i]->GetXaxis()->CenterTitle();
46016       //      vhPoIDPQ[i]->GetYaxis()->SetTitle("");
46017       //      vhPoIDPQ[i]->GetYaxis()->CenterTitle();
46018       //      vhPoIDPQ[i]->SetFillColor(0);
46019       //      //vhPoIDPQ[i]->SetBit(TH1::kCanRebin);
46020 
46021       //      s="hPoIDNMBPQBin"+sBin;
46022       //      vhPoIDNMBPQ[i]=static_cast<TH1F*>
46023       //        (vhPoIDPQ[i]->Clone(s.c_str()));
46024       //      s="hPoIDNMPQBin"+sBin;
46025       //      vhPoIDNMPQ[i]=static_cast<TH1F*>
46026       //        (vhPoIDPQ[i]->Clone(s.c_str()));
46027       //      s="hPoIDAllShwPQBin"+sBin;
46028       //      vhPoIDAllShwPQ[i]=static_cast<TH1F*>
46029       //        (vhPoIDPQ[i]->Clone(s.c_str()));
46030 
46031       s="hRoIDPQBin"+sBin;
46032       vhRoIDPQ[i]=new TH1F(s.c_str(),s.c_str(),81,0,1);
46033       vhRoIDPQ[i]->GetXaxis()->SetTitle("PID (from Rustem O)");
46034       vhRoIDPQ[i]->GetXaxis()->CenterTitle();
46035       vhRoIDPQ[i]->GetYaxis()->SetTitle("");
46036       vhRoIDPQ[i]->GetYaxis()->CenterTitle();
46037       vhRoIDPQ[i]->SetFillColor(0);
46038       //vhRoIDPQ[i]->SetBit(TH1::kCanRebin);
46039 
46040       s="hRoIDNMBPQBin"+sBin;
46041       vhRoIDNMBPQ[i]=static_cast<TH1F*>
46042         (vhRoIDPQ[i]->Clone(s.c_str()));
46043       s="hRoIDNMPQBin"+sBin;
46044       vhRoIDNMPQ[i]=static_cast<TH1F*>
46045         (vhRoIDPQ[i]->Clone(s.c_str()));
46046       s="hRoIDAllShwPQBin"+sBin;
46047       vhRoIDAllShwPQ[i]=static_cast<TH1F*>
46048         (vhRoIDPQ[i]->Clone(s.c_str()));
46049 
46050       s="hAbIDPQBin"+sBin;
46051       vhAbIDPQ[i]=new TH1F(s.c_str(),s.c_str(),4*320,-3.2,3.2);
46052       vhAbIDPQ[i]->GetXaxis()->SetTitle("PID (from Andy B)");
46053       vhAbIDPQ[i]->GetXaxis()->CenterTitle();
46054       vhAbIDPQ[i]->GetYaxis()->SetTitle("");
46055       vhAbIDPQ[i]->GetYaxis()->CenterTitle();
46056       vhAbIDPQ[i]->SetFillColor(0);
46057       //vhAbIDPQ[i]->SetBit(TH1::kCanRebin);
46058 
46059       s="hAbIDNMBPQBin"+sBin;
46060       vhAbIDNMBPQ[i]=static_cast<TH1F*>
46061         (vhAbIDPQ[i]->Clone(s.c_str()));
46062       s="hAbIDNMPQBin"+sBin;
46063       vhAbIDNMPQ[i]=static_cast<TH1F*>
46064         (vhAbIDPQ[i]->Clone(s.c_str()));
46065       s="hAbIDAllShwPQBin"+sBin;
46066       vhAbIDAllShwPQ[i]=static_cast<TH1F*>
46067         (vhAbIDPQ[i]->Clone(s.c_str()));
46068 
46069       s="hJeIDPQBin"+sBin;
46070       vhJeIDPQ[i]=new TH1F(s.c_str(),s.c_str(),4*320,-3.2,3.2);
46071       vhJeIDPQ[i]->GetXaxis()->SetTitle("PID (from Justin E)");
46072       vhJeIDPQ[i]->GetXaxis()->CenterTitle();
46073       vhJeIDPQ[i]->GetYaxis()->SetTitle("");
46074       vhJeIDPQ[i]->GetYaxis()->CenterTitle();
46075       vhJeIDPQ[i]->SetFillColor(0);
46076       //vhJeIDPQ[i]->SetBit(TH1::kCanRebin);
46077 
46078       s="hJeIDNMBPQBin"+sBin;
46079       vhJeIDNMBPQ[i]=static_cast<TH1F*>
46080         (vhJeIDPQ[i]->Clone(s.c_str()));
46081       s="hJeIDNMPQBin"+sBin;
46082       vhJeIDNMPQ[i]=static_cast<TH1F*>
46083         (vhJeIDPQ[i]->Clone(s.c_str()));
46084       s="hJeIDAllShwPQBin"+sBin;
46085       vhJeIDAllShwPQ[i]=static_cast<TH1F*>
46086         (vhJeIDPQ[i]->Clone(s.c_str()));
46087 
46088       s="hXTrkVtxPQBin"+sBin;
46089       vhXTrkVtxPQ[i]=new TH1F(s.c_str(),s.c_str(),1000,-5,5);
46090       vhXTrkVtxPQ[i]->GetXaxis()->SetTitle("Track Vertex X Position (m)");
46091       vhXTrkVtxPQ[i]->GetXaxis()->CenterTitle();
46092       vhXTrkVtxPQ[i]->GetYaxis()->SetTitle("");
46093       vhXTrkVtxPQ[i]->GetYaxis()->CenterTitle();
46094       vhXTrkVtxPQ[i]->SetFillColor(0);
46095       //vhXTrkVtxPQ[i]->SetBit(TH1::kCanRebin);
46096 
46097       s="hYTrkVtxPQBin"+sBin;
46098       vhYTrkVtxPQ[i]=new TH1F(s.c_str(),s.c_str(),1000,-5,5);
46099       vhYTrkVtxPQ[i]->GetXaxis()->SetTitle("Track Vertex Y Position (m)");
46100       vhYTrkVtxPQ[i]->GetXaxis()->CenterTitle();
46101       vhYTrkVtxPQ[i]->GetYaxis()->SetTitle("");
46102       vhYTrkVtxPQ[i]->GetYaxis()->CenterTitle();
46103       vhYTrkVtxPQ[i]->SetFillColor(0);
46104       //vhYTrkVtxPQ[i]->SetBit(TH1::kCanRebin);
46105 
46106       s="hZTrkVtxPQBin"+sBin;
46107       vhZTrkVtxPQ[i]=new TH1F(s.c_str(),s.c_str(),4000,-1,39);
46108       vhZTrkVtxPQ[i]->GetXaxis()->SetTitle("Track Vertex Z Position (m)");
46109       vhZTrkVtxPQ[i]->GetXaxis()->CenterTitle();
46110       vhZTrkVtxPQ[i]->GetYaxis()->SetTitle("");
46111       vhZTrkVtxPQ[i]->GetYaxis()->CenterTitle();
46112       vhZTrkVtxPQ[i]->SetFillColor(0);
46113       //vhZTrkVtxPQ[i]->SetBit(TH1::kCanRebin);
46114 
46115       s="hRTrkVtxPQBin"+sBin;
46116       vhRTrkVtxPQ[i]=new TH1F(s.c_str(),s.c_str(),700,-2,5);
46117       vhRTrkVtxPQ[i]->GetXaxis()->SetTitle("Track Vertex Radius (m)");
46118       vhRTrkVtxPQ[i]->GetXaxis()->CenterTitle();
46119       vhRTrkVtxPQ[i]->GetYaxis()->SetTitle("");
46120       vhRTrkVtxPQ[i]->GetYaxis()->CenterTitle();
46121       vhRTrkVtxPQ[i]->SetFillColor(0);
46122       //vhRTrkVtxPQ[i]->SetBit(TH1::kCanRebin);
46123 
46124       s="hR2TrkVtxPQBin"+sBin;
46125       vhR2TrkVtxPQ[i]=new TH1F(s.c_str(),s.c_str(),2700,-2,25);
46126       vhR2TrkVtxPQ[i]->GetXaxis()
46127         ->SetTitle("Track Vertex Radius^{2} (m^{2})");
46128       vhR2TrkVtxPQ[i]->GetXaxis()->CenterTitle();
46129       vhR2TrkVtxPQ[i]->GetYaxis()->SetTitle("");
46130       vhR2TrkVtxPQ[i]->GetYaxis()->CenterTitle();
46131       vhR2TrkVtxPQ[i]->SetFillColor(0);
46132       //vhR2TrkVtxPQ[i]->SetBit(TH1::Caribbean);
46133 
46134       s="hPlaneTrkVtxPQBin"+sBin;
46135       vhPlaneTrkVtxPQ[i]=new TH1F(s.c_str(),s.c_str(),500,-10,490);
46136       vhPlaneTrkVtxPQ[i]->GetXaxis()
46137         ->SetTitle("Track Vertex Z Position (planes)");
46138       vhPlaneTrkVtxPQ[i]->GetXaxis()->CenterTitle();
46139       vhPlaneTrkVtxPQ[i]->GetYaxis()->SetTitle("");
46140       vhPlaneTrkVtxPQ[i]->GetYaxis()->CenterTitle();
46141       vhPlaneTrkVtxPQ[i]->SetFillColor(0);
46142       //vhPlaneTrkVtxPQ[i]->SetBit(TH1::kCanRebin);
46143 
46144       s="hXTrkEndPQBin"+sBin;
46145       vhXTrkEndPQ[i]=new TH1F(s.c_str(),s.c_str(),1000,-5,5);
46146       vhXTrkEndPQ[i]->GetXaxis()->SetTitle("Track End X Position (m)");
46147       vhXTrkEndPQ[i]->GetXaxis()->CenterTitle();
46148       vhXTrkEndPQ[i]->GetYaxis()->SetTitle("");
46149       vhXTrkEndPQ[i]->GetYaxis()->CenterTitle();
46150       vhXTrkEndPQ[i]->SetFillColor(0);
46151       //vhXTrkEndPQ[i]->SetBit(TH1::kCanRebin);
46152 
46153       s="hYTrkEndPQBin"+sBin;
46154       vhYTrkEndPQ[i]=new TH1F(s.c_str(),s.c_str(),1000,-5,5);
46155       vhYTrkEndPQ[i]->GetXaxis()->SetTitle("Track End Y Position (m)");
46156       vhYTrkEndPQ[i]->GetXaxis()->CenterTitle();
46157       vhYTrkEndPQ[i]->GetYaxis()->SetTitle("");
46158       vhYTrkEndPQ[i]->GetYaxis()->CenterTitle();
46159       vhYTrkEndPQ[i]->SetFillColor(0);
46160       //vhYTrkEndPQ[i]->SetBit(TH1::kCanRebin);
46161 
46162       s="hZTrkEndPQBin"+sBin;
46163       vhZTrkEndPQ[i]=new TH1F(s.c_str(),s.c_str(),4000,-1,39);
46164       vhZTrkEndPQ[i]->GetXaxis()->SetTitle("Track End Z Position (m)");
46165       vhZTrkEndPQ[i]->GetXaxis()->CenterTitle();
46166       vhZTrkEndPQ[i]->GetYaxis()->SetTitle("");
46167       vhZTrkEndPQ[i]->GetYaxis()->CenterTitle();
46168       vhZTrkEndPQ[i]->SetFillColor(0);
46169       //vhZTrkEndPQ[i]->SetBit(TH1::kCanRebin);
46170 
46171       s="hRTrkEndPQBin"+sBin;
46172       vhRTrkEndPQ[i]=new TH1F(s.c_str(),s.c_str(),700,-2,5);
46173       vhRTrkEndPQ[i]->GetXaxis()->SetTitle("Track End Radius (m)");
46174       vhRTrkEndPQ[i]->GetXaxis()->CenterTitle();
46175       vhRTrkEndPQ[i]->GetYaxis()->SetTitle("");
46176       vhRTrkEndPQ[i]->GetYaxis()->CenterTitle();
46177       vhRTrkEndPQ[i]->SetFillColor(0);
46178       //vhRTrkEndPQ[i]->SetBit(TH1::kCanRebin);
46179 
46180       s="hR2TrkEndPQBin"+sBin;
46181       vhR2TrkEndPQ[i]=new TH1F(s.c_str(),s.c_str(),2700,-2,25);
46182       vhR2TrkEndPQ[i]->GetXaxis()
46183         ->SetTitle("Track End Radius^{2} (m^{2})");
46184       vhR2TrkEndPQ[i]->GetXaxis()->CenterTitle();
46185       vhR2TrkEndPQ[i]->GetYaxis()->SetTitle("");
46186       vhR2TrkEndPQ[i]->GetYaxis()->CenterTitle();
46187       vhR2TrkEndPQ[i]->SetFillColor(0);
46188       //vhR2TrkEndPQ[i]->SetBit(TH1::Caribbean);
46189 
46190       s="hPlaneTrkEndPQBin"+sBin;
46191       vhPlaneTrkEndPQ[i]=new TH1F(s.c_str(),s.c_str(),500,-10,490);
46192       vhPlaneTrkEndPQ[i]->GetXaxis()
46193         ->SetTitle("Track End Z Position (planes)");
46194       vhPlaneTrkEndPQ[i]->GetXaxis()->CenterTitle();
46195       vhPlaneTrkEndPQ[i]->GetYaxis()->SetTitle("");
46196       vhPlaneTrkEndPQ[i]->GetYaxis()->CenterTitle();
46197       vhPlaneTrkEndPQ[i]->SetFillColor(0);
46198       //vhPlaneTrkEndPQ[i]->SetBit(TH1::kCanRebin);
46199 
46200       //NQ
46201       s="hRecoEnNQBin"+sBin;
46202       vhRecoEnNQ[i]=new TH1F(s.c_str(),s.c_str(),
46203                              4*352,-32,320);
46204       vhRecoEnNQ[i]->GetXaxis()->
46205         SetTitle("Reconstructed Energy (GeV)");
46206       vhRecoEnNQ[i]->GetXaxis()->CenterTitle();
46207       vhRecoEnNQ[i]->GetYaxis()->SetTitle("");
46208       vhRecoEnNQ[i]->GetYaxis()->CenterTitle();
46209       vhRecoEnNQ[i]->SetFillColor(0);
46210       vhRecoEnNQ[i]->SetLineColor(1);
46211       //vhRecoEnNQ[i]->SetBit(TH1::kCanRebin);
46212 
46213       s="hRecoEnNMBNQBin"+sBin;
46214       vhRecoEnNMBNQ[i]=static_cast<TH1F*>
46215         (vhRecoEnNQ[i]->Clone(s.c_str()));
46216       s="hRecoEnNMNQBin"+sBin;
46217       vhRecoEnNMNQ[i]=static_cast<TH1F*>
46218         (vhRecoEnNQ[i]->Clone(s.c_str()));
46219       s="hRecoEnAllShwNQBin"+sBin;
46220       vhRecoEnAllShwNQ[i]=static_cast<TH1F*>
46221         (vhRecoEnNQ[i]->Clone(s.c_str()));
46222 
46223       s="hRecoEnTrkNQBin"+sBin;
46224       vhRecoEnTrkNQ[i]=new TH1F(s.c_str(),s.c_str(),
46225                                 4*352,-32,320);
46226       vhRecoEnTrkNQ[i]->GetXaxis()->
46227         SetTitle("Track Reconstructed Energy (GeV)");
46228       vhRecoEnTrkNQ[i]->GetXaxis()->CenterTitle();
46229       vhRecoEnTrkNQ[i]->GetYaxis()->SetTitle("");
46230       vhRecoEnTrkNQ[i]->GetYaxis()->CenterTitle();
46231       vhRecoEnTrkNQ[i]->SetFillColor(0);
46232       vhRecoEnTrkNQ[i]->SetLineColor(1);
46233       //vhRecoEnTrkNQ[i]->SetBit(TH1::kCanRebin);
46234 
46235       s="hRecoEnTrkNMBNQBin"+sBin;
46236       vhRecoEnTrkNMBNQ[i]=static_cast<TH1F*>
46237         (vhRecoEnTrkNQ[i]->Clone(s.c_str()));
46238       s="hRecoEnTrkNMNQBin"+sBin;
46239       vhRecoEnTrkNMNQ[i]=static_cast<TH1F*>
46240         (vhRecoEnTrkNQ[i]->Clone(s.c_str()));
46241       s="hRecoEnTrkAllShwNQBin"+sBin;
46242       vhRecoEnTrkAllShwNQ[i]=static_cast<TH1F*>
46243         (vhRecoEnTrkNQ[i]->Clone(s.c_str()));
46244 
46245       s="hRecoEnShwNQBin"+sBin;
46246       vhRecoEnShwNQ[i]=new TH1F(s.c_str(),s.c_str(),
46247                                 4*352,-32,320);
46248       vhRecoEnShwNQ[i]->GetXaxis()->
46249         SetTitle("Shower Reconstructed Energy (GeV)");
46250       vhRecoEnShwNQ[i]->GetXaxis()->CenterTitle();
46251       vhRecoEnShwNQ[i]->GetYaxis()->SetTitle("");
46252       vhRecoEnShwNQ[i]->GetYaxis()->CenterTitle();
46253       vhRecoEnShwNQ[i]->SetFillColor(0);
46254       vhRecoEnShwNQ[i]->SetLineColor(1);
46255       //vhRecoEnShwNQ[i]->SetBit(TH1::kCanRebin);
46256 
46257       s="hRecoEnShwNMBNQBin"+sBin;
46258       vhRecoEnShwNMBNQ[i]=static_cast<TH1F*>
46259         (vhRecoEnShwNQ[i]->Clone(s.c_str()));
46260       s="hRecoEnShwNMNQBin"+sBin;
46261       vhRecoEnShwNMNQ[i]=static_cast<TH1F*>
46262         (vhRecoEnShwNQ[i]->Clone(s.c_str()));
46263       s="hRecoEnShwAllShwNQBin"+sBin;
46264       vhRecoEnShwAllShwNQ[i]=static_cast<TH1F*>
46265         (vhRecoEnShwNQ[i]->Clone(s.c_str()));
46266 
46267       s="hRecoYNQBin"+sBin;
46268       vhRecoYNQ[i]=new TH1F(s.c_str(),s.c_str(),
46269                             1400,-0.2,1.2);
46270       vhRecoYNQ[i]->GetXaxis()->SetTitle("Reconstructed y");
46271       vhRecoYNQ[i]->GetXaxis()->CenterTitle();
46272       vhRecoYNQ[i]->GetYaxis()->SetTitle("");
46273       vhRecoYNQ[i]->GetYaxis()->CenterTitle();
46274       vhRecoYNQ[i]->SetFillColor(0);
46275       vhRecoYNQ[i]->SetLineColor(1);
46276       //vhRecoYNQ[i]->SetBit(TH1::kCanRebin);
46277 
46278       s="hRecoYNMBNQBin"+sBin;
46279       vhRecoYNMBNQ[i]=static_cast<TH1F*>
46280         (vhRecoYNQ[i]->Clone(s.c_str()));
46281       s="hRecoYNMNQBin"+sBin;
46282       vhRecoYNMNQ[i]=static_cast<TH1F*>
46283         (vhRecoYNQ[i]->Clone(s.c_str()));
46284       s="hRecoYAllShwNQBin"+sBin;
46285       vhRecoYAllShwNQ[i]=static_cast<TH1F*>
46286         (vhRecoYNQ[i]->Clone(s.c_str()));
46287 
46288 
46289 
46290       s="hqpNQBin"+sBin;
46291       vhqpNQ[i]=new TH1F(s.c_str(),s.c_str(),200*160,-16,16);
46292       vhqpNQ[i]->GetXaxis()->SetTitle("Q/P");
46293       vhqpNQ[i]->GetXaxis()->CenterTitle();
46294       vhqpNQ[i]->GetYaxis()->SetTitle("");
46295       vhqpNQ[i]->GetYaxis()->CenterTitle();
46296       vhqpNQ[i]->SetFillColor(0);
46297       //vhqpNQ[i]->SetBit(TH1::kCanRebin);
46298 
46299       s="hqpNMBNQBin"+sBin;
46300       vhqpNMBNQ[i]=static_cast<TH1F*>
46301         (vhqpNQ[i]->Clone(s.c_str()));
46302       s="hqpNMNQBin"+sBin;
46303       vhqpNMNQ[i]=static_cast<TH1F*>
46304         (vhqpNQ[i]->Clone(s.c_str()));
46305       s="hqpAllShwNQBin"+sBin;
46306       vhqpAllShwNQ[i]=static_cast<TH1F*>
46307         (vhqpNQ[i]->Clone(s.c_str()));
46308 
46309       s="hSigqpNQBin"+sBin;
46310       vhSigqpNQ[i]=new TH1F(s.c_str(),s.c_str(),200*160,-16,16);
46311       vhSigqpNQ[i]->GetXaxis()->SetTitle("#sigma(Q/P)");
46312       vhSigqpNQ[i]->GetXaxis()->CenterTitle();
46313       vhSigqpNQ[i]->GetYaxis()->SetTitle("");
46314       vhSigqpNQ[i]->GetYaxis()->CenterTitle();
46315       vhSigqpNQ[i]->SetFillColor(0);
46316       //vhSigqpNQ[i]->SetBit(TH1::kCanRebin);
46317 
46318       s="hSigqpNMBNQBin"+sBin;
46319       vhSigqpNMBNQ[i]=static_cast<TH1F*>
46320         (vhSigqpNQ[i]->Clone(s.c_str()));
46321       s="hSigqpNMNQBin"+sBin;
46322       vhSigqpNMNQ[i]=static_cast<TH1F*>
46323         (vhSigqpNQ[i]->Clone(s.c_str()));
46324       s="hSigqpAllShwNQBin"+sBin;
46325       vhSigqpAllShwNQ[i]=static_cast<TH1F*>
46326         (vhSigqpNQ[i]->Clone(s.c_str()));
46327 
46328       s="hSigqp_qpNQBin"+sBin;
46329       vhSigqp_qpNQ[i]=new TH1F(s.c_str(),s.c_str(),800*160,-160,160);
46330       vhSigqp_qpNQ[i]->GetXaxis()->SetTitle("#sigma(Q/P)/(Q/P)");
46331       vhSigqp_qpNQ[i]->GetXaxis()->CenterTitle();
46332       vhSigqp_qpNQ[i]->GetYaxis()->SetTitle("");
46333       vhSigqp_qpNQ[i]->GetYaxis()->CenterTitle();
46334       vhSigqp_qpNQ[i]->SetFillColor(0);
46335       //vhSigqp_qpNQ[i]->SetBit(TH1::kCanRebin);
46336 
46337       s="hSigqp_qpNMBNQBin"+sBin;
46338       vhSigqp_qpNMBNQ[i]=static_cast<TH1F*>
46339         (vhSigqp_qpNQ[i]->Clone(s.c_str()));
46340       s="hSigqp_qpNMNQBin"+sBin;
46341       vhSigqp_qpNMNQ[i]=static_cast<TH1F*>
46342         (vhSigqp_qpNQ[i]->Clone(s.c_str()));
46343       s="hSigqp_qpAllShwNQBin"+sBin;
46344       vhSigqp_qpAllShwNQ[i]=static_cast<TH1F*>
46345         (vhSigqp_qpNQ[i]->Clone(s.c_str()));
46346 
46347       s="hChi2NQBin"+sBin;
46348       vhChi2NQ[i]=new TH1F(s.c_str(),s.c_str(),10*176,-16,160);
46349       vhChi2NQ[i]->GetXaxis()->SetTitle("#chi^{2}/ndof");
46350       vhChi2NQ[i]->GetXaxis()->CenterTitle();
46351       vhChi2NQ[i]->GetYaxis()->SetTitle("");
46352       vhChi2NQ[i]->GetYaxis()->CenterTitle();
46353       vhChi2NQ[i]->SetFillColor(0);
46354       //vhChi2NQ[i]->SetBit(TH1::kCanRebin);
46355 
46356       s="hChi2NMBNQBin"+sBin;
46357       vhChi2NMBNQ[i]=static_cast<TH1F*>
46358         (vhChi2NQ[i]->Clone(s.c_str()));
46359       s="hChi2NMNQBin"+sBin;
46360       vhChi2NMNQ[i]=static_cast<TH1F*>
46361         (vhChi2NQ[i]->Clone(s.c_str()));
46362       s="hChi2AllShwNQBin"+sBin;
46363       vhChi2AllShwNQ[i]=static_cast<TH1F*>
46364         (vhChi2NQ[i]->Clone(s.c_str()));
46365 
46366       s="hProbNQBin"+sBin;
46367       vhProbNQ[i]=new TH1F(s.c_str(),s.c_str(),14000,-0.2,1.2);
46368       vhProbNQ[i]->GetXaxis()->SetTitle("Fit Probability");
46369       vhProbNQ[i]->GetXaxis()->CenterTitle();
46370       vhProbNQ[i]->GetYaxis()->SetTitle("");
46371       vhProbNQ[i]->GetYaxis()->CenterTitle();
46372       vhProbNQ[i]->SetFillColor(0);
46373       //vhProbNQ[i]->SetBit(TH1::kCanRebin);
46374 
46375       s="hProbNMBNQBin"+sBin;
46376       vhProbNMBNQ[i]=static_cast<TH1F*>
46377         (vhProbNQ[i]->Clone(s.c_str()));
46378       s="hProbNMNQBin"+sBin;
46379       vhProbNMNQ[i]=static_cast<TH1F*>
46380         (vhProbNQ[i]->Clone(s.c_str()));
46381       s="hProbAllShwNQBin"+sBin;
46382       vhProbAllShwNQ[i]=static_cast<TH1F*>
46383         (vhProbNQ[i]->Clone(s.c_str()));
46384 
46385       s="hDpIDNQBin"+sBin;
46386       vhDpIDNQ[i]=new TH1F(s.c_str(),s.c_str(),4*160,-1.6,1.6);
46387       vhDpIDNQ[i]->GetXaxis()->SetTitle("PID (from MadDpID)");
46388       vhDpIDNQ[i]->GetXaxis()->CenterTitle();
46389       vhDpIDNQ[i]->GetYaxis()->SetTitle("");
46390       vhDpIDNQ[i]->GetYaxis()->CenterTitle();
46391       vhDpIDNQ[i]->SetFillColor(0);
46392       //vhDpIDNQ[i]->SetBit(TH1::kCanRebin);
46393 
46394       s="hDpIDNMBNQBin"+sBin;
46395       vhDpIDNMBNQ[i]=static_cast<TH1F*>
46396         (vhDpIDNQ[i]->Clone(s.c_str()));
46397       s="hDpIDNMNQBin"+sBin;
46398       vhDpIDNMNQ[i]=static_cast<TH1F*>
46399         (vhDpIDNQ[i]->Clone(s.c_str()));
46400       s="hDpIDAllShwNQBin"+sBin;
46401       vhDpIDAllShwNQ[i]=static_cast<TH1F*>
46402         (vhDpIDNQ[i]->Clone(s.c_str()));
46403 
46404       // PoID Officially Depracated
46405       //      s="hPoIDNQBin"+sBin;
46406       //      vhPoIDNQ[i]=new TH1F(s.c_str(),s.c_str(),4*320,-3.2,3.2);
46407       //      vhPoIDNQ[i]->GetXaxis()->SetTitle("PID (from NuBarPID)");
46408       //      vhPoIDNQ[i]->GetXaxis()->CenterTitle();
46409       //      vhPoIDNQ[i]->GetYaxis()->SetTitle("");
46410       //      vhPoIDNQ[i]->GetYaxis()->CenterTitle();
46411       //      vhPoIDNQ[i]->SetFillColor(0);
46412       //      //vhPoIDNQ[i]->SetBit(TH1::kCanRebin);
46413 
46414       //      s="hPoIDNMBNQBin"+sBin;
46415       //      vhPoIDNMBNQ[i]=static_cast<TH1F*>
46416       //        (vhPoIDNQ[i]->Clone(s.c_str()));
46417       //      s="hPoIDNMNQBin"+sBin;
46418       //      vhPoIDNMNQ[i]=static_cast<TH1F*>
46419       //        (vhPoIDNQ[i]->Clone(s.c_str()));
46420       //      s="hPoIDAllShwNQBin"+sBin;
46421       //      vhPoIDAllShwNQ[i]=static_cast<TH1F*>
46422       //        (vhPoIDNQ[i]->Clone(s.c_str()));
46423 
46424       s="hRoIDNQBin"+sBin;
46425       vhRoIDNQ[i]=new TH1F(s.c_str(),s.c_str(),81,0,1);
46426       vhRoIDNQ[i]->GetXaxis()->SetTitle("PID (from Rustem O)");
46427       vhRoIDNQ[i]->GetXaxis()->CenterTitle();
46428       vhRoIDNQ[i]->GetYaxis()->SetTitle("");
46429       vhRoIDNQ[i]->GetYaxis()->CenterTitle();
46430       vhRoIDNQ[i]->SetFillColor(0);
46431       //vhRoIDNQ[i]->SetBit(TH1::kCanRebin);
46432 
46433       s="hRoIDNMBNQBin"+sBin;
46434       vhRoIDNMBNQ[i]=static_cast<TH1F*>
46435         (vhRoIDNQ[i]->Clone(s.c_str()));
46436       s="hRoIDNMNQBin"+sBin;
46437       vhRoIDNMNQ[i]=static_cast<TH1F*>
46438         (vhRoIDNQ[i]->Clone(s.c_str()));
46439       s="hRoIDAllShwNQBin"+sBin;
46440       vhRoIDAllShwNQ[i]=static_cast<TH1F*>
46441         (vhRoIDNQ[i]->Clone(s.c_str()));
46442 
46443       s="hAbIDNQBin"+sBin;
46444       vhAbIDNQ[i]=new TH1F(s.c_str(),s.c_str(),4*320,-3.2,3.2);
46445       vhAbIDNQ[i]->GetXaxis()->SetTitle("PID (from Andy B)");
46446       vhAbIDNQ[i]->GetXaxis()->CenterTitle();
46447       vhAbIDNQ[i]->GetYaxis()->SetTitle("");
46448       vhAbIDNQ[i]->GetYaxis()->CenterTitle();
46449       vhAbIDNQ[i]->SetFillColor(0);
46450       //vhAbIDNQ[i]->SetBit(TH1::kCanRebin);
46451 
46452       s="hAbIDNMBNQBin"+sBin;
46453       vhAbIDNMBNQ[i]=static_cast<TH1F*>
46454         (vhAbIDNQ[i]->Clone(s.c_str()));
46455       s="hAbIDNMNQBin"+sBin;
46456       vhAbIDNMNQ[i]=static_cast<TH1F*>
46457         (vhAbIDNQ[i]->Clone(s.c_str()));
46458       s="hAbIDAllShwNQBin"+sBin;
46459       vhAbIDAllShwNQ[i]=static_cast<TH1F*>
46460         (vhAbIDNQ[i]->Clone(s.c_str()));
46461 
46462       s="hJeIDNQBin"+sBin;
46463       vhJeIDNQ[i]=new TH1F(s.c_str(),s.c_str(),4*320,-3.2,3.2);
46464       vhJeIDNQ[i]->GetXaxis()->SetTitle("PID (from Justin E)");
46465       vhJeIDNQ[i]->GetXaxis()->CenterTitle();
46466       vhJeIDNQ[i]->GetYaxis()->SetTitle("");
46467       vhJeIDNQ[i]->GetYaxis()->CenterTitle();
46468       vhJeIDNQ[i]->SetFillColor(0);
46469       //vhJeIDNQ[i]->SetBit(TH1::kCanRebin);
46470 
46471       s="hJeIDNMBNQBin"+sBin;
46472       vhJeIDNMBNQ[i]=static_cast<TH1F*>
46473         (vhJeIDNQ[i]->Clone(s.c_str()));
46474       s="hJeIDNMNQBin"+sBin;
46475       vhJeIDNMNQ[i]=static_cast<TH1F*>
46476         (vhJeIDNQ[i]->Clone(s.c_str()));
46477       s="hJeIDAllShwNQBin"+sBin;
46478       vhJeIDAllShwNQ[i]=static_cast<TH1F*>
46479         (vhJeIDNQ[i]->Clone(s.c_str()));
46480 
46481       s="hXTrkVtxNQBin"+sBin;
46482       vhXTrkVtxNQ[i]=new TH1F(s.c_str(),s.c_str(),1000,-5,5);
46483       vhXTrkVtxNQ[i]->GetXaxis()->SetTitle("Track Vertex X Position (m)");
46484       vhXTrkVtxNQ[i]->GetXaxis()->CenterTitle();
46485       vhXTrkVtxNQ[i]->GetYaxis()->SetTitle("");
46486       vhXTrkVtxNQ[i]->GetYaxis()->CenterTitle();
46487       vhXTrkVtxNQ[i]->SetFillColor(0);
46488       //vhXTrkVtxNQ[i]->SetBit(TH1::kCanRebin);
46489 
46490       s="hYTrkVtxNQBin"+sBin;
46491       vhYTrkVtxNQ[i]=new TH1F(s.c_str(),s.c_str(),1000,-5,5);
46492       vhYTrkVtxNQ[i]->GetXaxis()->SetTitle("Track Vertex Y Position (m)");
46493       vhYTrkVtxNQ[i]->GetXaxis()->CenterTitle();
46494       vhYTrkVtxNQ[i]->GetYaxis()->SetTitle("");
46495       vhYTrkVtxNQ[i]->GetYaxis()->CenterTitle();
46496       vhYTrkVtxNQ[i]->SetFillColor(0);
46497       //vhYTrkVtxNQ[i]->SetBit(TH1::kCanRebin);
46498 
46499       s="hZTrkVtxNQBin"+sBin;
46500       vhZTrkVtxNQ[i]=new TH1F(s.c_str(),s.c_str(),4000,-1,39);
46501       vhZTrkVtxNQ[i]->GetXaxis()->SetTitle("Track Vertex Z Position (m)");
46502       vhZTrkVtxNQ[i]->GetXaxis()->CenterTitle();
46503       vhZTrkVtxNQ[i]->GetYaxis()->SetTitle("");
46504       vhZTrkVtxNQ[i]->GetYaxis()->CenterTitle();
46505       vhZTrkVtxNQ[i]->SetFillColor(0);
46506       //vhZTrkVtxNQ[i]->SetBit(TH1::kCanRebin);
46507 
46508       s="hRTrkVtxNQBin"+sBin;
46509       vhRTrkVtxNQ[i]=new TH1F(s.c_str(),s.c_str(),700,-2,5);
46510       vhRTrkVtxNQ[i]->GetXaxis()->SetTitle("Track Vertex Radius (m)");
46511       vhRTrkVtxNQ[i]->GetXaxis()->CenterTitle();
46512       vhRTrkVtxNQ[i]->GetYaxis()->SetTitle("");
46513       vhRTrkVtxNQ[i]->GetYaxis()->CenterTitle();
46514       vhRTrkVtxNQ[i]->SetFillColor(0);
46515       //vhRTrkVtxNQ[i]->SetBit(TH1::kCanRebin);
46516 
46517       s="hR2TrkVtxNQBin"+sBin;
46518       vhR2TrkVtxNQ[i]=new TH1F(s.c_str(),s.c_str(),2700,-2,25);
46519       vhR2TrkVtxNQ[i]->GetXaxis()
46520         ->SetTitle("Track Vertex Radius^{2} (m^{2})");
46521       vhR2TrkVtxNQ[i]->GetXaxis()->CenterTitle();
46522       vhR2TrkVtxNQ[i]->GetYaxis()->SetTitle("");
46523       vhR2TrkVtxNQ[i]->GetYaxis()->CenterTitle();
46524       vhR2TrkVtxNQ[i]->SetFillColor(0);
46525       //vhR2TrkVtxNQ[i]->SetBit(TH1::Caribbean);
46526 
46527       s="hPlaneTrkVtxNQBin"+sBin;
46528       vhPlaneTrkVtxNQ[i]=new TH1F(s.c_str(),s.c_str(),500,-10,490);
46529       vhPlaneTrkVtxNQ[i]->GetXaxis()
46530         ->SetTitle("Track Vertex Z Position (planes)");
46531       vhPlaneTrkVtxNQ[i]->GetXaxis()->CenterTitle();
46532       vhPlaneTrkVtxNQ[i]->GetYaxis()->SetTitle("");
46533       vhPlaneTrkVtxNQ[i]->GetYaxis()->CenterTitle();
46534       vhPlaneTrkVtxNQ[i]->SetFillColor(0);
46535       //vhPlaneTrkVtxNQ[i]->SetBit(TH1::kCanRebin);
46536 
46537       s="hXTrkEndNQBin"+sBin;
46538       vhXTrkEndNQ[i]=new TH1F(s.c_str(),s.c_str(),1000,-5,5);
46539       vhXTrkEndNQ[i]->GetXaxis()->SetTitle("Track End X Position (m)");
46540       vhXTrkEndNQ[i]->GetXaxis()->CenterTitle();
46541       vhXTrkEndNQ[i]->GetYaxis()->SetTitle("");
46542       vhXTrkEndNQ[i]->GetYaxis()->CenterTitle();
46543       vhXTrkEndNQ[i]->SetFillColor(0);
46544       //vhXTrkEndNQ[i]->SetBit(TH1::kCanRebin);
46545 
46546       s="hYTrkEndNQBin"+sBin;
46547       vhYTrkEndNQ[i]=new TH1F(s.c_str(),s.c_str(),1000,-5,5);
46548       vhYTrkEndNQ[i]->GetXaxis()->SetTitle("Track End Y Position (m)");
46549       vhYTrkEndNQ[i]->GetXaxis()->CenterTitle();
46550       vhYTrkEndNQ[i]->GetYaxis()->SetTitle("");
46551       vhYTrkEndNQ[i]->GetYaxis()->CenterTitle();
46552       vhYTrkEndNQ[i]->SetFillColor(0);
46553       //vhYTrkEndNQ[i]->SetBit(TH1::kCanRebin);
46554 
46555       s="hZTrkEndNQBin"+sBin;
46556       vhZTrkEndNQ[i]=new TH1F(s.c_str(),s.c_str(),4000,-1,39);
46557       vhZTrkEndNQ[i]->GetXaxis()->SetTitle("Track End Z Position (m)");
46558       vhZTrkEndNQ[i]->GetXaxis()->CenterTitle();
46559       vhZTrkEndNQ[i]->GetYaxis()->SetTitle("");
46560       vhZTrkEndNQ[i]->GetYaxis()->CenterTitle();
46561       vhZTrkEndNQ[i]->SetFillColor(0);
46562       //vhZTrkEndNQ[i]->SetBit(TH1::kCanRebin);
46563 
46564       s="hRTrkEndNQBin"+sBin;
46565       vhRTrkEndNQ[i]=new TH1F(s.c_str(),s.c_str(),700,-2,5);
46566       vhRTrkEndNQ[i]->GetXaxis()->SetTitle("Track End Radius (m)");
46567       vhRTrkEndNQ[i]->GetXaxis()->CenterTitle();
46568       vhRTrkEndNQ[i]->GetYaxis()->SetTitle("");
46569       vhRTrkEndNQ[i]->GetYaxis()->CenterTitle();
46570       vhRTrkEndNQ[i]->SetFillColor(0);
46571       //vhRTrkEndNQ[i]->SetBit(TH1::kCanRebin);
46572 
46573       s="hR2TrkEndNQBin"+sBin;
46574       vhR2TrkEndNQ[i]=new TH1F(s.c_str(),s.c_str(),2700,-2,25);
46575       vhR2TrkEndNQ[i]->GetXaxis()
46576         ->SetTitle("Track End Radius^{2} (m^{2})");
46577       vhR2TrkEndNQ[i]->GetXaxis()->CenterTitle();
46578       vhR2TrkEndNQ[i]->GetYaxis()->SetTitle("");
46579       vhR2TrkEndNQ[i]->GetYaxis()->CenterTitle();
46580       vhR2TrkEndNQ[i]->SetFillColor(0);
46581       //vhR2TrkEndNQ[i]->SetBit(TH1::Caribbean);
46582 
46583       s="hPlaneTrkEndNQBin"+sBin;
46584       vhPlaneTrkEndNQ[i]=new TH1F(s.c_str(),s.c_str(),500,-10,490);
46585       vhPlaneTrkEndNQ[i]->GetXaxis()
46586         ->SetTitle("Track End Z Position (planes)");
46587       vhPlaneTrkEndNQ[i]->GetXaxis()->CenterTitle();
46588       vhPlaneTrkEndNQ[i]->GetYaxis()->SetTitle("");
46589       vhPlaneTrkEndNQ[i]->GetYaxis()->CenterTitle();
46590       vhPlaneTrkEndNQ[i]->SetFillColor(0);
46591       //vhPlaneTrkEndNQ[i]->SetBit(TH1::kCanRebin);
46592 
46593     }
46594   }
46595   firstTime=false;
46596 
46597   //PQ
46598   if (nu.charge==+1){
46599     vhRecoEnPQ[index]->Fill(nu.energy,nu.rw);
46600     vhRecoEnTrkPQ[index]->Fill(nu.trkEn,nu.rw);
46601     vhRecoEnShwPQ[index]->Fill(nu.shwEn,nu.rw);
46602     vhRecoYPQ[index]->Fill(nu.y,nu.rw);
46603 
46604     vhqpPQ[index]->Fill(nu.qp,nu.rw);
46605     vhSigqpPQ[index]->Fill(nu.sigqp,nu.rw);
46606     vhSigqp_qpPQ[index]->Fill(nu.sigqp_qp,nu.rw);
46607     vhChi2PQ[index]->Fill(nu.chi2PerNdof,nu.rw);
46608     vhProbPQ[index]->Fill(nu.prob,nu.rw);
46609     vhDpIDPQ[index]->Fill(nu.dpID,nu.rw);
46610     // PoID Officially Depracated
46611     //vhPoIDPQ[index]->Fill(nu.poID,nu.rw);
46612     vhRoIDPQ[index]->Fill(nu.roID,nu.rw);
46613     vhAbIDPQ[index]->Fill(nu.abID,nu.rw);
46614     vhJeIDPQ[index]->Fill(nu.jPID,nu.rw);
46615 
46616     vhXTrkVtxPQ[index]->Fill(nu.xTrkVtx,nu.rw);
46617     vhYTrkVtxPQ[index]->Fill(nu.yTrkVtx,nu.rw);
46618     vhZTrkVtxPQ[index]->Fill(nu.zTrkVtx,nu.rw);
46619     vhRTrkVtxPQ[index]->Fill(nu.rTrkVtx,nu.rw);
46620     vhR2TrkVtxPQ[index]->Fill(nu.rTrkVtx*nu.rTrkVtx,nu.rw);
46621     vhZTrkVtxPQ[index]->Fill(nu.zTrkVtx,nu.rw);
46622     vhPlaneTrkVtxPQ[index]->Fill(nu.planeTrkVtx,nu.rw);
46623 
46624     vhXTrkEndPQ[index]->Fill(nu.xTrkEnd,nu.rw);
46625     vhYTrkEndPQ[index]->Fill(nu.yTrkEnd,nu.rw);
46626     vhZTrkEndPQ[index]->Fill(nu.zTrkEnd,nu.rw);
46627     vhRTrkEndPQ[index]->Fill(nu.rTrkEnd,nu.rw);
46628     vhR2TrkEndPQ[index]->Fill(nu.rTrkEnd*nu.rTrkEnd,nu.rw);
46629     vhZTrkEndPQ[index]->Fill(nu.zTrkEnd,nu.rw);
46630     vhPlaneTrkEndPQ[index]->Fill(nu.planeTrkEnd,nu.rw);
46631 
46632     if (nu.iaction==1){//CC
46633       if (nu.inu==14){//NuMu
46634         vhRecoEnNMPQ[index]->Fill(nu.energy,nu.rw);
46635         vhRecoEnTrkNMPQ[index]->Fill(nu.trkEn,nu.rw);
46636         vhRecoEnShwNMPQ[index]->Fill(nu.shwEn,nu.rw);
46637         vhRecoYNMPQ[index]->Fill(nu.y,nu.rw);
46638 
46639         vhqpNMPQ[index]->Fill(nu.qp,nu.rw);
46640         vhSigqpNMPQ[index]->Fill(nu.sigqp,nu.rw);
46641         vhSigqp_qpNMPQ[index]->Fill(nu.sigqp_qp,nu.rw);
46642         vhChi2NMPQ[index]->Fill(nu.chi2PerNdof,nu.rw);
46643         vhProbNMPQ[index]->Fill(nu.prob,nu.rw);
46644         vhDpIDNMPQ[index]->Fill(nu.dpID,nu.rw);
46645         // PoID Officially Depracated
46646         //vhPoIDNMPQ[index]->Fill(nu.poID,nu.rw);
46647         vhRoIDNMPQ[index]->Fill(nu.roID,nu.rw);
46648         vhAbIDNMPQ[index]->Fill(nu.abID,nu.rw);
46649         vhJeIDNMPQ[index]->Fill(nu.jPID,nu.rw);
46650       }
46651       else if (nu.inu==-14){//NuMuBar
46652         vhRecoEnNMBPQ[index]->Fill(nu.energy,nu.rw);
46653         vhRecoEnTrkNMBPQ[index]->Fill(nu.trkEn,nu.rw);
46654         vhRecoEnShwNMBPQ[index]->Fill(nu.shwEn,nu.rw);
46655         vhRecoYNMBPQ[index]->Fill(nu.y,nu.rw);
46656 
46657         vhqpNMBPQ[index]->Fill(nu.qp,nu.rw);
46658         vhSigqpNMBPQ[index]->Fill(nu.sigqp,nu.rw);
46659         vhSigqp_qpNMBPQ[index]->Fill(nu.sigqp_qp,nu.rw);
46660         vhChi2NMBPQ[index]->Fill(nu.chi2PerNdof,nu.rw);
46661         vhProbNMBPQ[index]->Fill(nu.prob,nu.rw);
46662         vhDpIDNMBPQ[index]->Fill(nu.dpID,nu.rw);
46663         // PoID Officially Depracated
46664         //vhPoIDNMBPQ[index]->Fill(nu.poID,nu.rw);
46665         vhRoIDNMBPQ[index]->Fill(nu.roID,nu.rw);
46666         vhAbIDNMBPQ[index]->Fill(nu.abID,nu.rw);
46667         vhJeIDNMBPQ[index]->Fill(nu.jPID,nu.rw);
46668       }
46669     }
46670 
46671     //all but NuMu/NuMuBar CC
46672     if (!(nu.iaction==1 && (nu.inu==14 || nu.inu==-14))) {
46673       vhRecoEnAllShwPQ[index]->Fill(nu.energy,nu.rw);
46674       vhRecoEnTrkAllShwPQ[index]->Fill(nu.trkEn,nu.rw);
46675       vhRecoEnShwAllShwPQ[index]->Fill(nu.shwEn,nu.rw);
46676       vhRecoYAllShwPQ[index]->Fill(nu.y,nu.rw);
46677 
46678       vhqpAllShwPQ[index]->Fill(nu.qp,nu.rw);
46679       vhSigqpAllShwPQ[index]->Fill(nu.sigqp,nu.rw);
46680       vhSigqp_qpAllShwPQ[index]->Fill(nu.sigqp_qp,nu.rw);
46681       vhChi2AllShwPQ[index]->Fill(nu.chi2PerNdof,nu.rw);
46682       vhProbAllShwPQ[index]->Fill(nu.prob,nu.rw);
46683       vhDpIDAllShwPQ[index]->Fill(nu.dpID,nu.rw);
46684       // PoID Officially Depracated
46685       //vhPoIDAllShwPQ[index]->Fill(nu.poID,nu.rw);
46686       vhRoIDAllShwPQ[index]->Fill(nu.roID,nu.rw);
46687       vhAbIDAllShwPQ[index]->Fill(nu.abID,nu.rw);
46688       vhJeIDAllShwPQ[index]->Fill(nu.jPID,nu.rw);
46689     }
46690   }
46691   //NQ
46692   else if (nu.charge==-1){
46693     vhRecoEnNQ[index]->Fill(nu.energy,nu.rw);
46694     vhRecoEnTrkNQ[index]->Fill(nu.trkEn,nu.rw);
46695     vhRecoEnShwNQ[index]->Fill(nu.shwEn,nu.rw);
46696     vhRecoYNQ[index]->Fill(nu.y,nu.rw);
46697 
46698     vhqpNQ[index]->Fill(nu.qp,nu.rw);
46699     vhSigqpNQ[index]->Fill(nu.sigqp,nu.rw);
46700     vhSigqp_qpNQ[index]->Fill(nu.sigqp_qp,nu.rw);
46701     vhChi2NQ[index]->Fill(nu.chi2PerNdof,nu.rw);
46702     vhProbNQ[index]->Fill(nu.prob,nu.rw);
46703     vhDpIDNQ[index]->Fill(nu.dpID,nu.rw);
46704     // PoID Officially Depracated
46705     //vhPoIDNQ[index]->Fill(nu.poID,nu.rw);
46706     vhRoIDNQ[index]->Fill(nu.roID,nu.rw);
46707     vhAbIDNQ[index]->Fill(nu.abID,nu.rw);
46708     vhJeIDNQ[index]->Fill(nu.jPID,nu.rw);
46709 
46710     vhXTrkVtxNQ[index]->Fill(nu.xTrkVtx,nu.rw);
46711     vhYTrkVtxNQ[index]->Fill(nu.yTrkVtx,nu.rw);
46712     vhZTrkVtxNQ[index]->Fill(nu.zTrkVtx,nu.rw);
46713     vhRTrkVtxNQ[index]->Fill(nu.rTrkVtx,nu.rw);
46714     vhR2TrkVtxNQ[index]->Fill(nu.rTrkVtx*nu.rTrkVtx,nu.rw);
46715     vhZTrkVtxNQ[index]->Fill(nu.zTrkVtx,nu.rw);
46716     vhPlaneTrkVtxNQ[index]->Fill(nu.planeTrkVtx,nu.rw);
46717 
46718     vhXTrkEndNQ[index]->Fill(nu.xTrkEnd,nu.rw);
46719     vhYTrkEndNQ[index]->Fill(nu.yTrkEnd,nu.rw);
46720     vhZTrkEndNQ[index]->Fill(nu.zTrkEnd,nu.rw);
46721     vhRTrkEndNQ[index]->Fill(nu.rTrkEnd,nu.rw);
46722     vhR2TrkEndNQ[index]->Fill(nu.rTrkEnd*nu.rTrkEnd,nu.rw);
46723     vhZTrkEndNQ[index]->Fill(nu.zTrkEnd,nu.rw);
46724     vhPlaneTrkEndNQ[index]->Fill(nu.planeTrkEnd,nu.rw);
46725 
46726 
46727     if (nu.iaction==1){//CC
46728       if (nu.inu==14){//NuMu
46729         vhRecoEnNMNQ[index]->Fill(nu.energy,nu.rw);
46730         vhRecoEnTrkNMNQ[index]->Fill(nu.trkEn,nu.rw);
46731         vhRecoEnShwNMNQ[index]->Fill(nu.shwEn,nu.rw);
46732         vhRecoYNMNQ[index]->Fill(nu.y,nu.rw);
46733 
46734         vhqpNMNQ[index]->Fill(nu.qp,nu.rw);
46735         vhSigqpNMNQ[index]->Fill(nu.sigqp,nu.rw);
46736         vhSigqp_qpNMNQ[index]->Fill(nu.sigqp_qp,nu.rw);
46737         vhChi2NMNQ[index]->Fill(nu.chi2PerNdof,nu.rw);
46738         vhProbNMNQ[index]->Fill(nu.prob,nu.rw);
46739         vhDpIDNMNQ[index]->Fill(nu.dpID,nu.rw);
46740         // PoID Officially Depracated
46741         //vhPoIDNMNQ[index]->Fill(nu.poID,nu.rw);
46742         vhRoIDNMNQ[index]->Fill(nu.roID,nu.rw);
46743         vhAbIDNMNQ[index]->Fill(nu.abID,nu.rw);
46744         vhJeIDNMNQ[index]->Fill(nu.jPID,nu.rw);
46745       }
46746       else if (nu.inu==-14){//NuMuBar
46747         vhRecoEnNMBNQ[index]->Fill(nu.energy,nu.rw);
46748         vhRecoEnTrkNMBNQ[index]->Fill(nu.trkEn,nu.rw);
46749         vhRecoEnShwNMBNQ[index]->Fill(nu.shwEn,nu.rw);
46750         vhRecoYNMBNQ[index]->Fill(nu.y,nu.rw);
46751 
46752         vhqpNMBNQ[index]->Fill(nu.qp,nu.rw);
46753         vhSigqpNMBNQ[index]->Fill(nu.sigqp,nu.rw);
46754         vhSigqp_qpNMBNQ[index]->Fill(nu.sigqp_qp,nu.rw);
46755         vhChi2NMBNQ[index]->Fill(nu.chi2PerNdof,nu.rw);
46756         vhProbNMBNQ[index]->Fill(nu.prob,nu.rw);
46757         vhDpIDNMBNQ[index]->Fill(nu.dpID,nu.rw);
46758         // PoID Officially Depracated
46759         //vhPoIDNMBNQ[index]->Fill(nu.poID,nu.rw);
46760         vhRoIDNMBNQ[index]->Fill(nu.roID,nu.rw);
46761         vhAbIDNMBNQ[index]->Fill(nu.abID,nu.rw);
46762         vhJeIDNMBNQ[index]->Fill(nu.jPID,nu.rw);
46763       }
46764     }
46765 
46766     //all but NuMu/NuMuBar CC
46767     if (!(nu.iaction==1 && (nu.inu==14 || nu.inu==-14))) {
46768       vhRecoEnAllShwNQ[index]->Fill(nu.energy,nu.rw);
46769       vhRecoEnTrkAllShwNQ[index]->Fill(nu.trkEn,nu.rw);
46770       vhRecoEnShwAllShwNQ[index]->Fill(nu.shwEn,nu.rw);
46771       vhRecoYAllShwNQ[index]->Fill(nu.y,nu.rw);
46772 
46773       vhqpAllShwNQ[index]->Fill(nu.qp,nu.rw);
46774       vhSigqpAllShwNQ[index]->Fill(nu.sigqp,nu.rw);
46775       vhSigqp_qpAllShwNQ[index]->Fill(nu.sigqp_qp,nu.rw);
46776       vhChi2AllShwNQ[index]->Fill(nu.chi2PerNdof,nu.rw);
46777       vhProbAllShwNQ[index]->Fill(nu.prob,nu.rw);
46778       vhDpIDAllShwNQ[index]->Fill(nu.dpID,nu.rw);
46779       // PoID Officially Depracated
46780       //vhPoIDAllShwNQ[index]->Fill(nu.poID,nu.rw);
46781       vhRoIDAllShwNQ[index]->Fill(nu.roID,nu.rw);
46782       vhAbIDAllShwNQ[index]->Fill(nu.abID,nu.rw);
46783       vhJeIDAllShwNQ[index]->Fill(nu.jPID,nu.rw);
46784     }
46785   }
46786   else MSG("NuPlots",Msg::kWarning)<<"Ahh, bad charge"<<endl;
46787 }

void NuPlots::FillEvtAndSpillTimingPlots ( const NuEvent nu  )  const

Definition at line 1163 of file NuPlots.cxx.

References NuEvent::charge, Msg::kDebug, MAXMSG, NuEvent::medianTime, Munits::microsecond, Munits::ns, NuEvent::rw, Munits::second, NuEvent::timeEvtMax, NuEvent::timeEvtMin, NuEvent::timeNanoSec, and NuEvent::timeToNearestSpill.

Referenced by NuAnalysis::ChargeSeparationOneSnarl(), NuCutImps::NuCutsSelection::IsGoodPreSelectionCuts(), and NuDSTAna::MakeFinalPlots().

01164 {
01165   //PQ
01166   static TH1D* hTimeToSpillPQ=0;
01167   static TH1D* hTimeToSpillSecPQ=0;
01168   static TH1D* hTimeToSpill1kSecPQ=0;
01169   static TH1D* hTimeToSpill100kSecPQ=0;
01170 
01171   static TH1D* hEvtTimeWrtSpillPQ=0;
01172   static TH1D* hEvtMedianTimeWrtSpillPQ=0;
01173   static TH1D* hEvtTimeWrtTriggerPQ=0;
01174   static TH1D* hEventTimeLengthPQ=0;
01175   static TH1D* hEvtMedMinusMinPQ;
01176 
01177 
01178   //NQ
01179   static TH1D* hTimeToSpillNQ=0;
01180   static TH1D* hTimeToSpillSecNQ=0;
01181   static TH1D* hTimeToSpill1kSecNQ=0;
01182   static TH1D* hTimeToSpill100kSecNQ=0;
01183 
01184   static TH1D* hEvtTimeWrtSpillNQ=0;
01185   static TH1D* hEvtMedianTimeWrtSpillNQ=0;
01186   static TH1D* hEvtTimeWrtTriggerNQ=0;
01187   static TH1D* hEventTimeLengthNQ=0;
01188 
01189   static TH1D* hEvtMedMinusMinNQ;
01190 
01191   Double_t medianTimeWrtTrigger=nu.medianTime-(nu.timeNanoSec*(Munits::ns));
01192 
01193   if (!hTimeToSpillPQ){
01194     MAXMSG("NuPlots",Msg::kDebug,1)
01195       <<"Creating SpillTiming plots..."<<endl;
01196 
01197     //10 ns resolution
01198     hTimeToSpillPQ=new TH1D
01199       ("hTimeToSpillPQ","hTimeToSpillPQ",20000,
01200        -100*(Munits::microsecond),
01201        +100*(Munits::microsecond));
01202     hTimeToSpillPQ->GetXaxis()->
01203       SetTitle("Time to nearest spill (s)");
01204     hTimeToSpillPQ->GetXaxis()->CenterTitle();
01205     hTimeToSpillPQ->GetYaxis()->SetTitle("");
01206     hTimeToSpillPQ->GetYaxis()->CenterTitle();
01207     hTimeToSpillPQ->SetFillColor(0);
01208     //hTimeToSpillPQ->SetBit(TH1::kCanRebin);
01209 
01210     //10 us resolution
01211     hTimeToSpillSecPQ=new TH1D
01212       ("hTimeToSpillSecPQ","hTimeToSpillSecPQ",200000,
01213        -1*(Munits::second),
01214        +1*(Munits::second));
01215     hTimeToSpillSecPQ->GetXaxis()->
01216       SetTitle("Time to nearest spill (s)");
01217     hTimeToSpillSecPQ->GetXaxis()->CenterTitle();
01218     hTimeToSpillSecPQ->GetYaxis()->SetTitle("");
01219     hTimeToSpillSecPQ->GetYaxis()->CenterTitle();
01220     hTimeToSpillSecPQ->SetFillColor(0);
01221     //hTimeToSpillSecPQ->SetBit(TH1::kCanRebin);
01222 
01223     //0.1 s resolution
01224     hTimeToSpill1kSecPQ=new TH1D
01225       ("hTimeToSpill1kSecPQ","hTimeToSpill1kSecPQ",20000,
01226        -1000*(Munits::second),
01227        +1000*(Munits::second));
01228     hTimeToSpill1kSecPQ->GetXaxis()->
01229       SetTitle("Time to nearest spill (s)");
01230     hTimeToSpill1kSecPQ->GetXaxis()->CenterTitle();
01231     hTimeToSpill1kSecPQ->GetYaxis()->SetTitle("");
01232     hTimeToSpill1kSecPQ->GetYaxis()->CenterTitle();
01233     hTimeToSpill1kSecPQ->SetFillColor(0);
01234     //hTimeToSpill1kSecPQ->SetBit(TH1::kCanRebin);
01235 
01236     //10 s resolution
01237     hTimeToSpill100kSecPQ=new TH1D
01238       ("hTimeToSpill100kSecPQ","hTimeToSpill100kSecPQ",20000,
01239        -100000*(Munits::second),
01240        +100000*(Munits::second));
01241     hTimeToSpill100kSecPQ->GetXaxis()->
01242       SetTitle("Time to nearest spill (s)");
01243     hTimeToSpill100kSecPQ->GetXaxis()->CenterTitle();
01244     hTimeToSpill100kSecPQ->GetYaxis()->SetTitle("");
01245     hTimeToSpill100kSecPQ->GetYaxis()->CenterTitle();
01246     hTimeToSpill100kSecPQ->SetFillColor(0);
01247     //hTimeToSpill100kSecPQ->SetBit(TH1::kCanRebin);
01248 
01249 
01250     //10 ns resolution
01251     hEvtTimeWrtSpillPQ=new TH1D
01252       ("hEvtTimeWrtSpillPQ","hEvtTimeWrtSpillPQ",20000,
01253        -100*(Munits::microsecond),
01254        +100*(Munits::microsecond));
01255     hEvtTimeWrtSpillPQ->GetXaxis()->
01256       SetTitle("Event time - beam spill time (s)");
01257     hEvtTimeWrtSpillPQ->GetXaxis()->CenterTitle();
01258     hEvtTimeWrtSpillPQ->GetYaxis()->SetTitle("");
01259     hEvtTimeWrtSpillPQ->GetYaxis()->CenterTitle();
01260     hEvtTimeWrtSpillPQ->SetFillColor(0);
01261     //hEvtTimeWrtSpillPQ->SetBit(TH1::kCanRebin);
01262 
01263     //10 ns resolution
01264     hEvtMedianTimeWrtSpillPQ=new TH1D
01265       ("hEvtMedianTimeWrtSpillPQ","hEvtMedianTimeWrtSpillPQ",20000,
01266        -100*(Munits::microsecond),
01267        +100*(Munits::microsecond));
01268     hEvtMedianTimeWrtSpillPQ->GetXaxis()->
01269       SetTitle("Event median time - beam spill time (s)");
01270     hEvtMedianTimeWrtSpillPQ->GetXaxis()->CenterTitle();
01271     hEvtMedianTimeWrtSpillPQ->GetYaxis()->SetTitle("");
01272     hEvtMedianTimeWrtSpillPQ->GetYaxis()->CenterTitle();
01273     hEvtMedianTimeWrtSpillPQ->SetFillColor(0);
01274     //hEvtMedianTimeWrtSpillPQ->SetBit(TH1::kCanRebin);
01275 
01276     //10 ns resolution
01277     hEvtMedMinusMinPQ=new TH1D
01278       ("hEvtMedMinusMinPQ","hEvtMedMinusMinPQ",20000,
01279        -100*(Munits::microsecond),
01280        +100*(Munits::microsecond));
01281     hEvtMedMinusMinPQ->GetXaxis()->
01282       SetTitle("(Event median time - Event time) (s)");
01283     hEvtMedMinusMinPQ->GetXaxis()->CenterTitle();
01284     hEvtMedMinusMinPQ->GetYaxis()->SetTitle("");
01285     hEvtMedMinusMinPQ->GetYaxis()->CenterTitle();
01286     hEvtMedMinusMinPQ->SetFillColor(0);
01287     //hEvtMedMinusMinPQ->SetBit(TH1::kCanRebin);
01288 
01289     //10 ns resolution
01290     hEvtTimeWrtTriggerPQ=new TH1D
01291       ("hEvtTimeWrtTriggerPQ","hEvtTimeWrtTriggerPQ",20000,
01292        -100*(Munits::microsecond),
01293        +100*(Munits::microsecond));
01294     hEvtTimeWrtTriggerPQ->GetXaxis()->
01295       SetTitle("Event time - trigger time (s)");
01296     hEvtTimeWrtTriggerPQ->GetXaxis()->CenterTitle();
01297     hEvtTimeWrtTriggerPQ->GetYaxis()->SetTitle("");
01298     hEvtTimeWrtTriggerPQ->GetYaxis()->CenterTitle();
01299     hEvtTimeWrtTriggerPQ->SetFillColor(0);
01300     //hEvtTimeWrtTriggerPQ->SetBit(TH1::kCanRebin);
01301 
01302     //10 ns resolution
01303     hEventTimeLengthPQ=new TH1D
01304