#include <RockMatrixRAF0720Std.h>
Inheritance diagram for RockMatrixRAF0720Std:

Public Member Functions | |
| RockMatrixRAF0720Std (Double_t POT=0.0) | |
| virtual void | PrepareBins (RockEvent *nu) const |
| Precalculates a RockEvents bins for the RockMatrix histograms. | |
| virtual void | FillJess (const RockEvent &nu, const Double_t weight) |
| virtual void | Fill (const RockEvent &nu, const Double_t weight=1.0, const bool display=false) |
| virtual void | Fill (const NuEvent &nu, const Double_t weight, const bool display=false) |
| virtual void | FillFromFileRockEvents (TString fname, TString brName="r") |
| virtual void | FillFromFileNuEvents (TString fname, TString brName="s") |
| virtual void | ResetPOT (Double_t new_POT) |
| Sets the POT count directly, without scaling. | |
| virtual Double_t | StatsLikelihood (const NuMatrix *with) const |
| Compares two NuMatrix objects and returns the LL difference. | |
| virtual Double_t | StatsLikelihood (const RockMatrixRAF0720Std *with) const |
| virtual RockMatrixRAF0720Std * | Copy (void) const |
| Makes a 'deep copy' - every subclass should implement this. | |
| virtual Bool_t | Complete () const |
| Tells the user if the class is completely configured. | |
| virtual TH1 * | Spectrum (void) const |
| Returns a TH1 object representing the data the spectrum holds. Or zero. | |
| virtual void | Draw (Option_t *option="") |
| virtual Int_t | Write (const TString &name) const |
| Writes to the current file. | |
| virtual Int_t | Read (const TString &fname, const TString &name) |
| virtual void | SetValue (Double_t val) |
| virtual void | ScaleToPOT (Double_t new_POT) |
| Changes the POT, by scaling the data. | |
| virtual void | Scale (Double_t value) |
| Scales the Matrix, without changing the POT. | |
| virtual void | Divide (const NuMatrix &correction) |
| Make a correction by Dividing. | |
| virtual void | Divide (const TH1 &correction, const Option_t *option="") |
| virtual void | Divide (const TGraph &correction) |
| virtual void | Multiply (const NuMatrix &correction) |
| Make a correction by Multiplying. | |
| virtual void | Multiply (const TH1 &correction, const Option_t *option="") |
| virtual void | Multiply (const TGraph &correction) |
| virtual void | Add (const NuMatrix &correction, Bool_t addpot=false) |
| Functions for addition and subtraction. | |
| virtual void | Add (const RockMatrixRAF0720Std &correction, Bool_t addpot=false) |
| virtual void | Subtract (const NuMatrix &correction) |
| virtual void | Subtract (const RockMatrixRAF0720Std &correction) |
| virtual void | RecoToTrue (const TH2D &correction) |
| virtual void | TrueToReco (const TH2D &correction) |
| virtual void | ExtrapolateNDToFD (const TH2D &beammatrix) |
| virtual void | Oscillate (const Double_t dm2, const Double_t sn2) |
| virtual void | DecayCC (double, double, double) |
| virtual void | DecayNC (double, double) |
| virtual void | DecayMuToTau (double, double, double) |
| virtual void | Decohere (double, double, double) |
| NuMatrix1D & | Front (void) |
| NuMatrix1D & | Gap (void) |
| NuMatrix1D & | GapEdge (void) |
| NuMatrix1D & | Back (void) |
| NuMatrix1D & | EdgeRock (void) |
| NuMatrix1D & | EdgeDet (void) |
| NuMatrix1D & | dispfront (void) |
| NuMatrix1D & | dispgap (void) |
| NuMatrix1D & | dispgapedge (void) |
| NuMatrix1D & | dispback (void) |
| NuMatrix1D & | dispedgerock (void) |
| NuMatrix1D & | dispedgedet (void) |
| NuMatrix1D & | disprocklike (void) |
| NuMatrix1D & | dispdetlike (void) |
| NuMatrix1D & | dispall (void) |
| NuMatrix2D & | Jess_ccmu (void) |
| NuMatrix2D & | Jess_cctau (void) |
| NuMatrix1D & | Jess_no (void) |
| NuMatrix1D & | AllReco (void) |
| NuMatrix1D & | AllRecoNW (void) |
| NuMatrix1D & | AllTruth (void) |
| void | GlobalBin2enang (Float_t &dang, Float_t &trkEn, int globalbin) |
| void | GlobalBin2trkEn (Float_t &trkEn, int globalbin) |
Static Public Member Functions | |
| static int | ear2GlobalBin (const Float_t dang, const Float_t trkEn, const Int_t regionTrkVtx, const Char_t edgemid) |
| static int | Linearize2d (Float_t dang, Float_t trkEn, bool sparse=false) |
| static void | Rectangularize1d (Float_t &dang, Float_t &trkEn, int onedbin, bool sparse=false) |
| static void | GlobalBin2ear (Float_t &dang, Float_t &trkEn, Int_t ®ionTrkVtx, Char_t &edgemid, int globalbin) |
Protected Attributes | |
| NuMatrix1D | fFront |
| NuMatrix1D | fGap |
| NuMatrix1D | fGapEdge |
| NuMatrix1D | fBack |
| NuMatrix1D | fEdgeRock |
| NuMatrix1D | fEdgeDet |
| NuMatrix1D | fAllReco |
| NuMatrix1D | fAllRecoNW |
| NuMatrix1D | fAllTruth |
| NuMatrix1D | fdispfront |
| NuMatrix1D | fdispgap |
| NuMatrix1D | fdispedgerock |
| NuMatrix1D | fdispedgedet |
| NuMatrix1D | fdispback |
| NuMatrix1D | fdispgapedge |
| NuMatrix1D | fdisprocklike |
| NuMatrix1D | fdispdetlike |
| NuMatrix1D | fdispall |
| NuMatrix2D | fJess_ccmu |
| NuMatrix2D | fJess_cctau |
| NuMatrix1D | fJess_no |
Definition at line 11 of file RockMatrixRAF0720Std.h.
| RockMatrixRAF0720Std::RockMatrixRAF0720Std | ( | Double_t | POT = 0.0 |
) |
Definition at line 51 of file RockMatrixRAF0720Std.cxx.
References An(), debins, dispa(), En(), fAllReco, fAllRecoNW, fAllTruth, fBack, fdispall, fdispback, fdispdetlike, fdispedgedet, fdispedgerock, fdispfront, fdispgap, fdispgapedge, fdisprocklike, fEdgeDet, fEdgeRock, fFront, fGap, fGapEdge, fJess_ccmu, fJess_cctau, fJess_no, Plot::Format(), NBINS1DA, NBINS1DE, NBINS2D, RS_DISPDUMMYMAX, RS_DISPMAX1, NuMatrix2D::SetSpectrum(), and NuMatrix1D::SetSpectrum().
Referenced by Copy().
00051 : 00052 NuMatrix(POT), RockMatrix(POT) 00053 { 00054 static unsigned int hin = 0; // Shut ROOT up about histogram names 00055 hin++; 00056 00057 // Hey look! It's one of those ROOT functions that modifies a global state! 00058 // I'll do all the extra work necessary to avoid this hurting other people. 00059 bool restore_sumw2 = TH1::GetDefaultSumw2(); 00060 TH1::SetDefaultSumw2(); // yes, this sets it for TH1D, TH2D, etc. 00061 00062 En.Sumw2(); 00063 An.Sumw2(); 00064 00065 fGapEdge.SetSpectrum(En); 00066 00067 fBack.SetSpectrum(An); 00068 00069 // 2-D in energy and angle, except collapse it to a 1-D histogram 00070 // since ROOT can't the handle my type of non-uniform binning 00071 TH1D EAf (TString::Format("trkenan%df", hin), "trkenan",NBINS2D,0,NBINS2D); 00072 TH1D EAg (TString::Format("trkenan%dg", hin), "trkenan",NBINS2D,0,NBINS2D); 00073 TH1D EAer(TString::Format("trkenan%der",hin), "trkenan",NBINS2D,0,NBINS2D); 00074 TH1D EAed(TString::Format("trkenan%ded",hin), "trkenan",NBINS2D,0,NBINS2D); 00075 fFront .SetSpectrum(EAf); 00076 fGap .SetSpectrum(EAg); 00077 fEdgeRock.SetSpectrum(EAer); 00078 fEdgeDet .SetSpectrum(EAed); 00079 00080 const int NHISTOS = 6; // These are the numbers used directly for analysis 00081 // normal bins plus under & overflow for each, even if those are always empty 00082 int totalbins = NBINS1DA + NBINS1DE + 4*NBINS2D + NHISTOS*2; 00083 00084 // ------------------------------------------------------------------------ 00085 00086 // These are for Jess and not used by the RAF analysis 00087 TH2D true2reco(TString::Format("trueenergy2recobin%d", hin), 00088 "trueenergy2recobin", 800, 0, 200, totalbins, 0, totalbins); 00089 00090 TH1D oned(TString::Format("oned%d", hin), "", totalbins, 0, totalbins); 00091 00092 fJess_ccmu.SetSpectrum(true2reco); // CC nu mu (bar) events 00093 fJess_cctau.SetSpectrum(true2reco); // CC nu tau (bar) events 00094 fJess_no.SetSpectrum(oned); // All else, i.e. things that don't oscillate 00095 00096 // ------------------------------------------------------------------------ 00097 00098 // This is for convenience of debugging 00099 TH1D reco(TString::Format("recobin%d", hin), 00100 "recobin", totalbins, 0, totalbins); 00101 fAllReco.SetSpectrum(reco); 00102 fAllRecoNW.SetSpectrum(reco); 00103 00104 TH1D truth(TString::Format("truthbin%d", hin), 00105 "truthbin", 800, 0, 200); 00106 fAllTruth.SetSpectrum(truth); 00107 00108 00109 // ------------------------------------------------------------------------ 00110 00111 // These are for display (and debugging) 00112 00113 const int DNBINS = 9; 00114 double debins[DNBINS+1] = 00115 { 0, 1, 2, 3, 4, 5, 6, 8, RS_DISPMAX1, RS_DISPDUMMYMAX }; 00116 00117 TH1D dispf (TString::Format("trkendisp%df", hin),"trkendisp",DNBINS,debins); // r 00118 TH1D dispg (TString::Format("trkendisp%dg", hin),"trkendisp",DNBINS,debins); // d 00119 TH1D disper(TString::Format("trkendisp%der",hin),"trkendisp",DNBINS,debins); // r 00120 TH1D disped(TString::Format("trkendisp%ded",hin),"trkendisp",DNBINS,debins); // d 00121 TH1D dispb (TString::Format("trkendisp%db", hin),"trkendisp",DNBINS,debins); // d 00122 TH1D dispge(TString::Format("trkendisp%dge",hin),"trkendisp",DNBINS,debins); // mix 00123 00124 TH1D dispr(TString::Format("trkendisp%dr",hin),"trkendisp",DNBINS,debins); 00125 TH1D dispd(TString::Format("trkendisp%dd",hin),"trkendisp",DNBINS,debins); 00126 TH1D dispa(TString::Format("trkendisp%da",hin),"trkendisp",DNBINS,debins); 00127 00128 fdispfront .SetSpectrum(dispf ); 00129 fdispgap .SetSpectrum(dispg ); 00130 fdispedgerock.SetSpectrum(disper); 00131 fdispedgedet .SetSpectrum(disped); 00132 fdispback .SetSpectrum(dispb ); 00133 fdispgapedge .SetSpectrum(dispge); 00134 00135 fdisprocklike.SetSpectrum(dispr); 00136 fdispdetlike .SetSpectrum(dispd); 00137 fdispall .SetSpectrum(dispa); 00138 00139 // Put the GLOBAL state back to where it was at the top 00140 TH1::SetDefaultSumw2(restore_sumw2); 00141 }
| void RockMatrixRAF0720Std::Add | ( | const RockMatrixRAF0720Std & | correction, | |
| Bool_t | addpot = false | |||
| ) | [virtual] |
Definition at line 1061 of file RockMatrixRAF0720Std.cxx.
References NuMatrix1D::Add(), fBack, fEdgeDet, fEdgeRock, fFront, fGap, fGapEdge, NuMatrix::GetPOT(), and ResetPOT().
01062 { 01063 // Base the addition on the 'essential' histograms listed in complete 01064 // Also, this probably won't be used so don't bother with validation/clever behaviour for now 01065 fFront.Add(correction.fFront); 01066 fGap.Add(correction.fGap); 01067 fGapEdge.Add(correction.fGapEdge); 01068 fBack.Add(correction.fBack); 01069 fEdgeRock.Add(correction.fEdgeRock); 01070 fEdgeDet.Add(correction.fEdgeDet); 01071 01072 if (addpot) ResetPOT(GetPOT()+correction.GetPOT()); 01073 }
| void RockMatrixRAF0720Std::Add | ( | const NuMatrix & | correction, | |
| Bool_t | addpot = false | |||
| ) | [virtual] |
Functions for addition and subtraction.
Implements NuMatrix.
Definition at line 1049 of file RockMatrixRAF0720Std.cxx.
References Msg::kWarning, and MSG.
01050 { 01051 // Convert the NuMatrix to a RockMatrixRAF0720Std 01052 const RockMatrixRAF0720Std *other = dynamic_cast<const RockMatrixRAF0720Std*>(&with); 01053 if (other == 0) { 01054 MSG("RockMatrixRAF0720Std",Msg::kWarning) << "Attempting to add a RockMatrixRAF0720Std to something other than a RockMatrixRAF0720Std" << endl; 01055 } 01056 01057 this->Add(*other, addpot); 01058 }
| NuMatrix1D& RockMatrixRAF0720Std::AllReco | ( | void | ) | [inline] |
Definition at line 92 of file RockMatrixRAF0720Std.h.
References fAllReco.
00092 { return fAllReco; }
| NuMatrix1D& RockMatrixRAF0720Std::AllRecoNW | ( | void | ) | [inline] |
Definition at line 93 of file RockMatrixRAF0720Std.h.
References fAllRecoNW.
00093 { return fAllRecoNW; }
| NuMatrix1D& RockMatrixRAF0720Std::AllTruth | ( | void | ) | [inline] |
Definition at line 94 of file RockMatrixRAF0720Std.h.
References fAllTruth.
00094 { return fAllTruth; }
| NuMatrix1D& RockMatrixRAF0720Std::Back | ( | void | ) | [inline] |
| Bool_t RockMatrixRAF0720Std::Complete | ( | ) | const [virtual] |
Tells the user if the class is completely configured.
Implements NuMatrix.
Definition at line 1033 of file RockMatrixRAF0720Std.cxx.
References NuMatrix1D::Complete(), fBack, fEdgeDet, fEdgeRock, fFront, fGap, and fGapEdge.
01034 { 01035 Bool_t complete = true; 01036 01037 // This can't possibly return anything but true... what's the point? 01038 complete = complete || fFront.Complete(); 01039 complete = complete || fGap.Complete(); 01040 complete = complete || fGapEdge.Complete(); 01041 complete = complete || fBack.Complete(); 01042 complete = complete || fEdgeRock.Complete(); 01043 complete = complete || fEdgeDet.Complete(); 01044 01045 return complete; 01046 }
| virtual RockMatrixRAF0720Std* RockMatrixRAF0720Std::Copy | ( | void | ) | const [inline, virtual] |
Makes a 'deep copy' - every subclass should implement this.
Implements NuMatrix.
Definition at line 33 of file RockMatrixRAF0720Std.h.
References RockMatrixRAF0720Std().
00033 { 00034 return new RockMatrixRAF0720Std(*this); 00035 }
| virtual void RockMatrixRAF0720Std::DecayCC | ( | double | , | |
| double | , | |||
| double | ||||
| ) | [inline, virtual] |
| virtual void RockMatrixRAF0720Std::DecayMuToTau | ( | double | , | |
| double | , | |||
| double | ||||
| ) | [inline, virtual] |
| virtual void RockMatrixRAF0720Std::DecayNC | ( | double | , | |
| double | ||||
| ) | [inline, virtual] |
| virtual void RockMatrixRAF0720Std::Decohere | ( | double | , | |
| double | , | |||
| double | ||||
| ) | [inline, virtual] |
| NuMatrix1D& RockMatrixRAF0720Std::dispall | ( | void | ) | [inline] |
Definition at line 87 of file RockMatrixRAF0720Std.h.
References fdispall.
00087 { return fdispall; }
| NuMatrix1D& RockMatrixRAF0720Std::dispback | ( | void | ) | [inline] |
Definition at line 81 of file RockMatrixRAF0720Std.h.
References fdispback.
00081 { return fdispback; }
| NuMatrix1D& RockMatrixRAF0720Std::dispdetlike | ( | void | ) | [inline] |
Definition at line 86 of file RockMatrixRAF0720Std.h.
References fdispdetlike.
00086 { return fdispdetlike; }
| NuMatrix1D& RockMatrixRAF0720Std::dispedgedet | ( | void | ) | [inline] |
Definition at line 83 of file RockMatrixRAF0720Std.h.
References fdispedgedet.
00083 { return fdispedgedet; }
| NuMatrix1D& RockMatrixRAF0720Std::dispedgerock | ( | void | ) | [inline] |
Definition at line 82 of file RockMatrixRAF0720Std.h.
References fdispedgerock.
00082 { return fdispedgerock; }
| NuMatrix1D& RockMatrixRAF0720Std::dispfront | ( | void | ) | [inline] |
Definition at line 78 of file RockMatrixRAF0720Std.h.
References fdispfront.
00078 { return fdispfront; }
| NuMatrix1D& RockMatrixRAF0720Std::dispgap | ( | void | ) | [inline] |
Definition at line 79 of file RockMatrixRAF0720Std.h.
References fdispgap.
00079 { return fdispgap; }
| NuMatrix1D& RockMatrixRAF0720Std::dispgapedge | ( | void | ) | [inline] |
Definition at line 80 of file RockMatrixRAF0720Std.h.
References fdispgapedge.
00080 { return fdispgapedge; }
| NuMatrix1D& RockMatrixRAF0720Std::disprocklike | ( | void | ) | [inline] |
Definition at line 85 of file RockMatrixRAF0720Std.h.
References fdisprocklike.
00085 { return fdisprocklike; }
| void RockMatrixRAF0720Std::Divide | ( | const TGraph & | correction | ) | [virtual] |
Implements NuMatrix.
Definition at line 982 of file RockMatrixRAF0720Std.cxx.
References Msg::kError, and MSG.
00983 { 00984 MSG("RockMatrixRAF0720Std",Msg::kError)<<"Divide not implemented"<<endl; 00985 }
| void RockMatrixRAF0720Std::Divide | ( | const TH1 & | correction, | |
| const Option_t * | option = "" | |||
| ) | [virtual] |
Implements NuMatrix.
Definition at line 976 of file RockMatrixRAF0720Std.cxx.
References Msg::kError, and MSG.
00977 { 00978 MSG("RockMatrixRAF0720Std",Msg::kError)<<"Divide not implemented"<<endl; 00979 }
| void RockMatrixRAF0720Std::Divide | ( | const NuMatrix & | correction | ) | [virtual] |
Make a correction by Dividing.
Implements NuMatrix.
Definition at line 970 of file RockMatrixRAF0720Std.cxx.
References Msg::kError, and MSG.
00971 { 00972 MSG("RockMatrixRAF0720Std",Msg::kError)<<"Divide not implemented"<<endl; 00973 }
| void RockMatrixRAF0720Std::Draw | ( | Option_t * | option = "" |
) | [virtual] |
| int RockMatrixRAF0720Std::ear2GlobalBin | ( | const Float_t | dang, | |
| const Float_t | trkEn, | |||
| const Int_t | regionTrkVtx, | |||
| const Char_t | edgemid | |||
| ) | [static] |
Definition at line 147 of file RockMatrixRAF0720Std.cxx.
References An(), En(), Msg::kError, Linearize2d(), MAXMSG, NBINS1DA, NBINS1DE, and NBINS2D.
Referenced by GlobalBin2ear(), and PrepareBins().
00149 { 00150 // This awkwardly duplicates Fill, and must be kept in sync with it 00151 // Whee good programming practices! 00152 00153 const int UNDERANDOVERFLOW = 2; 00154 00155 if(regionTrkVtx==4 || regionTrkVtx==5){ // Front and front+edge 00156 return Linearize2d(dang, trkEn) + 1; 00157 } 00158 00159 else if(regionTrkVtx==8 || regionTrkVtx==12){ // N & S side of gap 00160 return Linearize2d(dang, trkEn, true) + 1 // SPARSE 00161 + NBINS2D 00162 + UNDERANDOVERFLOW; 00163 // The tree in the hole in the ground 00164 } 00165 00166 else if(regionTrkVtx==9 || regionTrkVtx==13){ //N & S side of gap+edge 00167 return En.FindBin(trkEn) 00168 + NBINS2D 00169 + NBINS2D 00170 + 2*UNDERANDOVERFLOW; 00171 // The branch on the tree in the hole in the ground 00172 } 00173 00174 else if(regionTrkVtx==16 || regionTrkVtx==17){ // Back and back+edge 00175 return An.FindBin(dang) 00176 + NBINS2D 00177 + NBINS2D 00178 + NBINS1DE 00179 + 3*UNDERANDOVERFLOW; 00180 // The twig on the branch on the tree in the hole in the ground 00181 } 00182 00183 else if(regionTrkVtx==1 && edgemid == 0){ // Edge rock-like 00184 return 00185 Linearize2d(dang, trkEn) + 1 00186 + NBINS2D 00187 + NBINS2D 00188 + NBINS1DE 00189 + NBINS1DA 00190 + 4*UNDERANDOVERFLOW; 00191 // The bug on the twig on the branch on the tree in the hole in the ground 00192 } 00193 00194 else if(regionTrkVtx==1 && edgemid == 1){ // Edge detector-like 00195 return 00196 Linearize2d(dang, trkEn) + 1 00197 + NBINS2D 00198 + NBINS2D 00199 + NBINS1DE 00200 + NBINS1DA 00201 + NBINS2D 00202 + 5*UNDERANDOVERFLOW; 00203 // The hair on the bug on the twig on the branch on the tree in the hole 00204 // in the ground. And the green grass grows all round, the green grass 00205 // grows all around 00206 } 00207 00208 else{ 00209 MAXMSG("RockMatrixRAF0720Std", Msg::kError, 100) << 00210 "No events should reach this point in RockMatrixRAF0720Std::" 00211 "ear2GlobalBin!\nregionTrkVtx = " << int(regionTrkVtx) << endl << 00212 "edgemid = " << int(edgemid) << endl; 00213 return -1; 00214 } 00215 }
| NuMatrix1D& RockMatrixRAF0720Std::EdgeDet | ( | void | ) | [inline] |
Definition at line 76 of file RockMatrixRAF0720Std.h.
References fEdgeDet.
00076 { return fEdgeDet; }
| NuMatrix1D& RockMatrixRAF0720Std::EdgeRock | ( | void | ) | [inline] |
Definition at line 75 of file RockMatrixRAF0720Std.h.
References fEdgeRock.
00075 { return fEdgeRock; }
| void RockMatrixRAF0720Std::ExtrapolateNDToFD | ( | const TH2D & | beammatrix | ) | [virtual] |
Implements NuMatrix.
Definition at line 1019 of file RockMatrixRAF0720Std.cxx.
References Msg::kError, and MSG.
01020 { 01021 MSG("RockMatrixRAF0720Std",Msg::kError) 01022 << "ExtrapolateNDToFD not implemented" << endl; 01023 }
| virtual void RockMatrixRAF0720Std::Fill | ( | const NuEvent & | nu, | |
| const Double_t | weight, | |||
| const bool | display = false | |||
| ) | [inline, virtual] |
| void RockMatrixRAF0720Std::Fill | ( | const RockEvent & | nu, | |
| const Double_t | weight = 1.0, |
|||
| const bool | display = false | |||
| ) | [virtual] |
Implements RockMatrix.
Definition at line 642 of file RockMatrixRAF0720Std.cxx.
References RockEvent::binNumber, RockEvent::dang, RockEvent::edgemid, fAllReco, fAllRecoNW, fAllTruth, fBack, fdispall, fdispback, fdispdetlike, fdispedgedet, fdispedgerock, fdispfront, fdispgap, fdispgapedge, fdisprocklike, fEdgeDet, fEdgeRock, fFront, fGap, fGapEdge, Msg::kError, Linearize2d(), MAXMSG, RockEvent::neuEnMC, RockEvent::regionTrkVtx, NuMatrix1D::Spectrum(), spoonlawn(), and RockEvent::trkEn.
Referenced by Fill(), FillFromFileNuEvents(), and FillFromFileRockEvents().
00643 { 00644 // Don't fill jesstograms here since oscillation has already occured, 00645 // or if it hasn't, the taus have, in any case, been zeroed. 00646 // these are the same as adding together the three jesstograms and then 00647 // collapsing them to 1D. It is pure convenience to explicitly construct 00648 // them here. 00649 if(display){ 00650 fAllReco.Spectrum()->Fill(nu.binNumber, weight); 00651 fAllRecoNW.Spectrum()->Fill(nu.binNumber); 00652 fAllTruth.Spectrum()->Fill(nu.neuEnMC, weight); 00653 fdispall.Spectrum()->Fill(spoonlawn(nu.trkEn), weight); 00654 } 00655 00656 // Decide where to fill based on region 00657 if(nu.regionTrkVtx==4 || nu.regionTrkVtx==5){ // Front and front+edge 00658 fFront .Spectrum()->Fill(Linearize2d(nu.dang, nu.trkEn), weight); 00659 if(display){ 00660 fdispfront .Spectrum()->Fill(spoonlawn(nu.trkEn), weight); 00661 fdisprocklike.Spectrum()->Fill(spoonlawn(nu.trkEn), weight); 00662 } 00663 } 00664 00665 else if(nu.regionTrkVtx==8 || nu.regionTrkVtx==12){ // N & S side of gap 00666 // gap is sparse, see Linearize2d 00667 fGap .Spectrum()->Fill(Linearize2d(nu.dang, nu.trkEn, true), weight); 00668 if(display){ 00669 fdispgap .Spectrum()->Fill(spoonlawn(nu.trkEn), weight); 00670 fdispdetlike.Spectrum()->Fill(spoonlawn(nu.trkEn), weight); 00671 } 00672 } 00673 00674 else if(nu.regionTrkVtx==9 || nu.regionTrkVtx==13){ // N & S side of gap+edge 00675 fGapEdge .Spectrum()->Fill(nu.trkEn, weight); 00676 if(display){ 00677 fdispgapedge.Spectrum()->Fill(spoonlawn(nu.trkEn), weight); 00678 // not rock-like or det-like 00679 } 00680 } 00681 00682 else if(nu.regionTrkVtx==16 || nu.regionTrkVtx==17){ // Back and back+edge 00683 fBack .Spectrum()->Fill(nu.dang, weight); 00684 if(display){ 00685 fdispback .Spectrum()->Fill(spoonlawn(nu.trkEn), weight); 00686 fdispdetlike.Spectrum()->Fill(spoonlawn(nu.trkEn), weight); 00687 } 00688 } 00689 00690 else if(nu.regionTrkVtx==1 && nu.edgemid == 0){ // Edge rock-like 00691 fEdgeRock.Spectrum()->Fill(Linearize2d(nu.dang, nu.trkEn), weight); 00692 if(display){ 00693 fdispedgerock.Spectrum()->Fill(spoonlawn(nu.trkEn), weight); 00694 fdisprocklike.Spectrum()->Fill(spoonlawn(nu.trkEn), weight); 00695 } 00696 } 00697 00698 else if(nu.regionTrkVtx==1 && nu.edgemid == 1){ // Edge detector-like 00699 fEdgeDet .Spectrum()->Fill(Linearize2d(nu.dang, nu.trkEn), weight); 00700 if(display){ 00701 fdispedgedet.Spectrum()->Fill(spoonlawn(nu.trkEn), weight); 00702 fdispdetlike.Spectrum()->Fill(spoonlawn(nu.trkEn), weight); 00703 } 00704 } 00705 00706 else{ 00707 MAXMSG("RockMatrixRAF0720Std", Msg::kError, 100) 00708 << "No events should reach this point in RockMatrixRAF0720Std::Fill!\n" 00709 "regionTrkVtx = " << int(nu.regionTrkVtx) << endl << 00710 "edgemid = " << int(nu.edgemid) << endl; 00711 } 00712 }
| void RockMatrixRAF0720Std::FillFromFileNuEvents | ( | TString | fname, | |
| TString | brName = "s" | |||
| ) | [virtual] |
Definition at line 735 of file RockMatrixRAF0720Std.cxx.
References Fill(), Msg::kError, MSG, PrepareBins(), and RockEvent::rw.
00736 { 00737 TChain ch(brName); 00738 ch.Add(fname); 00739 if(ch.GetEntries() == 0){ 00740 MSG("RockMatrixRAF0720Std", Msg::kError) 00741 << "Empty or nonexistent file " << fname << endl; 00742 return; 00743 } 00744 00745 NuEvent* ev = 0; 00746 ch.SetBranchAddress(brName, &ev); 00747 for(int i = 0; i < ch.GetEntries(); ++i){ 00748 ch.GetEntry(i); 00749 RockEvent evr(*ev); 00750 PrepareBins(&evr); 00751 Fill(evr, evr.rw, true); 00752 } 00753 }
| void RockMatrixRAF0720Std::FillFromFileRockEvents | ( | TString | fname, | |
| TString | brName = "r" | |||
| ) | [virtual] |
Definition at line 715 of file RockMatrixRAF0720Std.cxx.
References Fill(), Msg::kError, MSG, PrepareBins(), and RockEvent::rw.
00716 { 00717 TChain ch(brName); 00718 ch.Add(fname); 00719 if(ch.GetEntries() == 0){ 00720 MSG("RockMatrixRAF0720Std", Msg::kError) 00721 << "Empty or nonexistent file " << fname << endl; 00722 return; 00723 } 00724 00725 RockEvent* ev = 0; 00726 ch.SetBranchAddress(brName, &ev); 00727 for(int i = 0; i < ch.GetEntries(); ++i){ 00728 ch.GetEntry(i); 00729 PrepareBins(ev); 00730 Fill(*ev, ev->rw, true); 00731 } 00732 }
| void RockMatrixRAF0720Std::FillJess | ( | const RockEvent & | nu, | |
| const Double_t | weight | |||
| ) | [virtual] |
Reimplemented from RockMatrix.
Definition at line 622 of file RockMatrixRAF0720Std.cxx.
References RockEvent::binNumber, fJess_ccmu, fJess_cctau, fJess_no, RockEvent::iaction, RockEvent::inu, RockEvent::neuEnMC, NuMatrix1D::Spectrum(), and NuMatrix2D::Spectrum().
00623 { 00624 // Fill these true-to-reco histograms for Jess. 00625 00626 // Numu(bar) charged current 00627 if(nu.iaction == 1 && abs(nu.inu) == 14) 00628 fJess_ccmu.Spectrum()->Fill(nu.neuEnMC, nu.binNumber, weight); 00629 00630 // Nutau(bar) charged current 00631 if(nu.iaction == 1 && abs(nu.inu) == 16) 00632 fJess_cctau.Spectrum()->Fill(nu.neuEnMC, nu.binNumber, weight); 00633 00634 // Neutral current, nue(bar) and (accidentally) most real data 00635 // Don't include taus here because we'd double-count them (the taus are 00636 // unoscillated at this point) 00637 if((nu.iaction == 0 && abs(nu.inu) != 16) || abs(nu.inu) == 12) 00638 fJess_no.Spectrum()->Fill(nu.binNumber, weight); 00639 }
| NuMatrix1D& RockMatrixRAF0720Std::Front | ( | void | ) | [inline] |
| NuMatrix1D& RockMatrixRAF0720Std::Gap | ( | void | ) | [inline] |
| NuMatrix1D& RockMatrixRAF0720Std::GapEdge | ( | void | ) | [inline] |
Definition at line 73 of file RockMatrixRAF0720Std.h.
References fGapEdge.
00073 { return fGapEdge; }
| void RockMatrixRAF0720Std::GlobalBin2ear | ( | Float_t & | dang, | |
| Float_t & | trkEn, | |||
| Int_t & | regionTrkVtx, | |||
| Char_t & | edgemid, | |||
| int | globalbin | |||
| ) | [static] |
Definition at line 259 of file RockMatrixRAF0720Std.cxx.
References An(), ear2GlobalBin(), En(), issueobobwarning(), Msg::kError, MSG, NBINS1DA, NBINS1DE, NBINS2D, and Rectangularize1d().
Referenced by GlobalBin2enang(), and GlobalBin2trkEn().
00261 { 00262 // See PrepareBins for how the global bin number is found. This 00263 // function reverses the procedure. This is obviously somewhat fragile 00264 // and quite possibly will need to be edited if PrepareBins is edited! 00265 00266 dang = trkEn = -1; // junk default values for errors 00267 edgemid = regionTrkVtx = -1; 00268 00269 // 2s are for overflow and underflow bins. -1 is an artifact of how the 00270 // global bin number is calculated. See below. 00271 int lastbin_front = -1 + NBINS2D + 2, 00272 lastbin_gap = lastbin_front + NBINS2D + 2, 00273 lastbin_gapedge = lastbin_gap + NBINS1DE + 2, 00274 lastbin_back = lastbin_gapedge + NBINS1DA + 2, 00275 lastbin_edgerock= lastbin_back + NBINS2D + 2, 00276 lastbin_edgedet = lastbin_edgerock + NBINS2D + 2; 00277 00278 if(globalbin < 1){ 00279 MSG("RockMatrixRAF0720Std", Msg::kError) << "Unexpected global bin number " 00280 "below 1 (" << globalbin << "). Underflow should not be possible.\n"; 00281 return; 00282 } 00283 else if(globalbin >= lastbin_edgedet+1){ 00284 MSG("RockMatrixRAF0720Std", Msg::kError) << "Unexpected global bin number " 00285 << globalbin << " greater than the number of bins in fAllReco (" 00286 << lastbin_edgedet << ").\n"; 00287 issueobobwarning(); 00288 return; 00289 } 00290 00291 if(globalbin <= lastbin_front){ 00292 // So what's going on here? The lowest bin that can actually get filled 00293 // is created as follows: An event on the front face with trkEn < 0.5 and 00294 // dang < 30 is passed into Linearize2d, which returns 0. PrepareBins gets 00295 // the value zero and wants to fill fFront with it. fFront is a 1D 00296 // histogram with 133 bins and range 0 to 133 (so that 133 itself goes into 00297 // the overflow bin). So the value 0 gets put into bin number 1. 00298 // the global bin number is then set to just that. 00299 // 00300 // Now, Rectangularize1d is the straight-up inverse of Linearize2d, so it 00301 // knows nothing about the off-by-one shift we caused above. So: 00302 00303 Rectangularize1d(dang, trkEn, globalbin-1); 00304 regionTrkVtx = 4; // semi-fiducial front 00305 edgemid = 1; // not very meaningful 00306 } 00307 else if(globalbin == lastbin_front+1){ 00308 MSG("RockMatrixRAF0720Std", Msg::kError) << "Unexpected global bin number " 00309 << globalbin << " would be an underflow in fGap. That can't happen.\n"; 00310 issueobobwarning(); 00311 return; 00312 } 00313 else if(globalbin <= lastbin_gap){ 00314 // Now the next histogram, fGap. The lowest bin of this does the following: 00315 // Linearize2d returns 0. PrepareBins determines that this goes in bin 1 of 00316 // fGap, and calculates the global bin number as: 00317 // 1 + fFront.GetNbinsX() [133] + UNDERANDOVERFLOW [2] = 136 00318 // We want this go to back into Retangularize1d as 0. 00319 // The last bin (including overflow) of fFront is global bin number 134. So: 00320 00321 Rectangularize1d(dang, trkEn, globalbin - lastbin_front - 2, true);//SPARSE 00322 regionTrkVtx = 12; // north side of semi-fiducial gap 00323 edgemid = 1; // not very meaningful 00324 } 00325 else if(globalbin <= lastbin_gapedge){ 00326 // Now the next histogram, fGapEdge. This is 1D in trkEn. The lowest 00327 // non-underflow bin of this (bin number 1) has global bin number 271, so 00328 // to retrieve the bin number in fGapEdge, we have to subtract 270 00329 // The pattern now starts to be clear: 00330 // --> global - lastbin - 2 (1) for linearized (normal) histograms <-- 00331 00332 dang = 45; // no information on angle 00333 00334 // What does this return for the overflow bin, you might wonder. 00335 // Turns out it figures that ROOT pretends that the overflow bin has the 00336 // average width of the non-overflow bins in this case. 00337 trkEn = En.GetBinCenter(globalbin - lastbin_gap - 1); 00338 00339 regionTrkVtx = 13; // north side of gap+edge 00340 edgemid = 0; // not very meaningful 00341 } 00342 else if(globalbin <= lastbin_back){ 00343 // Now the back histogram, which has no energy information 00344 00345 trkEn = 1.111; //Hey! This might be annoying! But so might 0, -1 or 10000... 00346 dang = An.GetBinCenter(globalbin - lastbin_gapedge - 1); 00347 00348 regionTrkVtx = 16; // semi-fiducial back 00349 edgemid = 0; // not very meaningful 00350 } 00351 else if(globalbin == lastbin_back+1){ 00352 MSG("RockMatrixRAF0720Std", Msg::kError) << "Unexpected global bin number " 00353 << globalbin<< " would be an underflow in fEdgeRock. That can't happen.\n"; 00354 issueobobwarning(); 00355 return; 00356 } 00357 else if(globalbin <= lastbin_edgerock){ 00358 Rectangularize1d(dang, trkEn, globalbin - lastbin_back - 2); 00359 regionTrkVtx = 1; // semi-fiducial edge 00360 edgemid = 0; // detector-like edge 00361 } 00362 else if(globalbin == lastbin_edgerock+1){ 00363 MSG("RockMatrixRAF0720Std", Msg::kError) << "Unexpected global bin number " 00364 << globalbin <<" would be an underflow in fEdgeRock. That can't happen.\n"; 00365 issueobobwarning(); 00366 return; 00367 } 00368 else if(globalbin <= lastbin_edgedet){ 00369 Rectangularize1d(dang, trkEn, globalbin - lastbin_edgerock - 2); 00370 regionTrkVtx = 1; // semi-fiducial edge 00371 edgemid = 1; // rock-like edge 00372 } 00373 00374 // check answer 00375 if(ear2GlobalBin(dang, trkEn, regionTrkVtx, edgemid) != globalbin) 00376 cerr<<"OH NO: inconsistent GlobalBin2ear result for " << globalbin << endl 00377 << dang << " " << trkEn << " " << regionTrkVtx << " " << edgemid << endl; 00378 }
| void RockMatrixRAF0720Std::GlobalBin2enang | ( | Float_t & | dang, | |
| Float_t & | trkEn, | |||
| int | globalbin | |||
| ) |
Definition at line 237 of file RockMatrixRAF0720Std.cxx.
References GlobalBin2ear().
00239 { 00240 Int_t regionTrkVtx = 0; 00241 Char_t edgemid = 0; 00242 GlobalBin2ear(dang, trkEn, regionTrkVtx, edgemid, globalbin); 00243 }
| void RockMatrixRAF0720Std::GlobalBin2trkEn | ( | Float_t & | trkEn, | |
| int | globalbin | |||
| ) |
Definition at line 227 of file RockMatrixRAF0720Std.cxx.
References GlobalBin2ear().
00228 { 00229 Int_t regionTrkVtx = 0; 00230 Char_t edgemid = 0; 00231 Float_t dang = 0; 00232 GlobalBin2ear(dang, trkEn, regionTrkVtx, edgemid, globalbin); 00233 }
| NuMatrix2D& RockMatrixRAF0720Std::Jess_ccmu | ( | void | ) | [inline] |
Definition at line 89 of file RockMatrixRAF0720Std.h.
References fJess_ccmu.
00089 { return fJess_ccmu; }
| NuMatrix2D& RockMatrixRAF0720Std::Jess_cctau | ( | void | ) | [inline] |
Definition at line 90 of file RockMatrixRAF0720Std.h.
References fJess_cctau.
00090 { return fJess_cctau; }
| NuMatrix1D& RockMatrixRAF0720Std::Jess_no | ( | void | ) | [inline] |
Definition at line 91 of file RockMatrixRAF0720Std.h.
References fJess_no.
00091 { return fJess_no; }
| int RockMatrixRAF0720Std::Linearize2d | ( | Float_t | dang, | |
| Float_t | trkEn, | |||
| bool | sparse = false | |||
| ) | [static] |
Definition at line 498 of file RockMatrixRAF0720Std.cxx.
Referenced by ear2GlobalBin(), Fill(), and Rectangularize1d().
00499 { 00500 // Notes: 00501 // * Non-use of "else" in this function is deliberate 00502 // * This could be written more compactly in a variety of ways. 00503 // All of the ones I can think of make it essentially unreadable. 00504 if(trkEn < 0.5){ 00505 if(dang < 30) return 0; 00506 return 1; 00507 } 00508 00509 if(trkEn < 1.0){ 00510 if(dang < 10) return 2; 00511 if(dang < 15) return 3; 00512 if(dang < 20) return 4; 00513 if(dang < 25) return 5; 00514 if(dang < 30) return 6; 00515 if(dang < 35) return 7; 00516 if(dang < 40) return 8; 00517 if(dang < 45) return 9; 00518 if(dang < 50) return 10; 00519 if(dang < 55) return 11; 00520 return 12; 00521 } 00522 00523 if(trkEn < 1.5){ 00524 if(dang < 10) return 13; 00525 if(dang < 15) return 14; 00526 if(dang < 20) return 15; 00527 if(dang < 25) return 16; 00528 if(dang < 30) return 17; 00529 if(dang < 35) return 18; 00530 if(dang < 40) return 19; 00531 if(dang < 45) return 20; 00532 if(dang < 50) return 21; 00533 return 22; 00534 } 00535 00536 if(trkEn < 2.0){ 00537 if(dang < 10) return 23; 00538 if(dang < 15) return 24; 00539 if(dang < 20) return 25; 00540 if(dang < 25) return 26; 00541 if(dang < 30) return 27; 00542 if(dang < 35) return 28; 00543 return 29; 00544 } 00545 00546 if(trkEn < 2.5){ 00547 if(dang < 10) return 30; 00548 if(dang < 15) return 31; 00549 if(dang < 20) return 32; 00550 if(dang < 25) return 33; 00551 if(dang < 30) return 34; 00552 return 35; 00553 } 00554 00555 if(trkEn < 3.0){ 00556 if(dang < 5) return 36; 00557 if(dang < 10) return 37; 00558 if(dang < 15) return 38; 00559 if(dang < 20) return 39; 00560 return 40; 00561 } 00562 00563 if(trkEn < 3.5){ 00564 if(dang < 5) return 41; 00565 if(dang < 10) return 42; 00566 if(dang < 15) return 43; 00567 if(dang < 20) return 44; 00568 return 45; 00569 } 00570 00571 if(trkEn < 4.0){ 00572 if(dang < 10) return 46; 00573 return 47; 00574 } 00575 00576 if(trkEn < 4.5){ 00577 if(dang < 10) return 48; 00578 return 49; 00579 } 00580 00581 if(trkEn < 5.0){ 00582 if(dang < 10) return 50; 00583 return 51; 00584 } 00585 00586 00587 if(!sparse){ 00588 // If not sparse, match the fiducial binning 00589 // It only matches for ease of explanation, not for any technical reason 00590 00591 if(trkEn < 20.0) return 52 + int( (trkEn - 5.0)*4 ); // max 111 00592 if(trkEn < 30.0) return 112 + int( trkEn - 20.0 ); // max 121 00593 if(trkEn < 50.0) return 122 + int( (trkEn - 30.0)/2 ); // max 131 00594 if(trkEn < 200.0) return 132; 00595 00596 00597 return 133; // intended to go into the overflow bin 00598 // Really no events should be over 200 GeV (but some are) 00599 } 00600 else{ 00601 // 1/2 GeV for 5-10 00602 // 5 GeV for 10-30 00603 // 1 bin for 30-200 00604 00605 if(trkEn < 10) return 52 + int( (trkEn - 5.0)*2 ); // max 61 00606 if(trkEn < 30) return 62 + int( (trkEn - 10.0)/5 ); // max 65 00607 if(trkEn < 200) return 66; 00608 00609 return 133; // overflow: use same number as above to make sure it goes into 00610 // the overflow bin 00611 } 00612 }
| void RockMatrixRAF0720Std::Multiply | ( | const TGraph & | correction | ) | [virtual] |
Implements NuMatrix.
Definition at line 1000 of file RockMatrixRAF0720Std.cxx.
References Msg::kError, and MSG.
01001 { 01002 MSG("RockMatrixRAF0720Std",Msg::kError)<<"Multiply not implemented"<<endl; 01003 }
| void RockMatrixRAF0720Std::Multiply | ( | const TH1 & | correction, | |
| const Option_t * | option = "" | |||
| ) | [virtual] |
Implements NuMatrix.
Definition at line 994 of file RockMatrixRAF0720Std.cxx.
References Msg::kError, and MSG.
00995 { 00996 MSG("RockMatrixRAF0720Std",Msg::kError)<<"Multiply not implemented"<<endl; 00997 }
| void RockMatrixRAF0720Std::Multiply | ( | const NuMatrix & | correction | ) | [virtual] |
Make a correction by Multiplying.
Implements NuMatrix.
Definition at line 988 of file RockMatrixRAF0720Std.cxx.
References Msg::kError, and MSG.
00989 { 00990 MSG("RockMatrixRAF0720Std",Msg::kError)<<"Multiply not implemented"<<endl; 00991 }
| void RockMatrixRAF0720Std::Oscillate | ( | const Double_t | dm2, | |
| const Double_t | sn2 | |||
| ) | [virtual] |
Implements NuMatrix.
Definition at line 1026 of file RockMatrixRAF0720Std.cxx.
References Msg::kError, and MSG.
01027 { 01028 MSG("RockMatrixRAF0720Std",Msg::kError)<<"Oscillate not implemented"<<endl; 01029 }
| void RockMatrixRAF0720Std::PrepareBins | ( | RockEvent * | nu | ) | const [virtual] |
Precalculates a RockEvents bins for the RockMatrix histograms.
Implements RockMatrix.
Definition at line 219 of file RockMatrixRAF0720Std.cxx.
References RockEvent::binNumber, RockEvent::dang, ear2GlobalBin(), RockEvent::edgemid, RockEvent::regionTrkVtx, and RockEvent::trkEn.
Referenced by FillFromFileNuEvents(), and FillFromFileRockEvents().
00220 { 00221 nu->binNumber = ear2GlobalBin(nu->dang, nu->trkEn, nu->regionTrkVtx, 00222 nu->edgemid); 00223 }
| Int_t RockMatrixRAF0720Std::Read | ( | const TString & | fname, | |
| const TString & | name | |||
| ) | [virtual] |
Definition at line 866 of file RockMatrixRAF0720Std.cxx.
References fAllReco, fAllRecoNW, fAllTruth, fBack, fdispall, fdispback, fdispdetlike, fdispedgedet, fdispedgerock, fdispfront, fdispgap, fdispgapedge, fdisprocklike, fEdgeDet, fEdgeRock, fFront, fGap, fGapEdge, fJess_ccmu, fJess_cctau, fJess_no, NuMatrix::fPot, Msg::kError, MSG, NuMatrix2D::Read(), and NuMatrix1D::Read().
00867 { 00868 TDirectory* dir_backup = gDirectory; 00869 00870 TFile* f = new TFile(fname); 00871 00872 if(!f || !f->IsOpen() || f->IsZombie()){ 00873 MSG("RockMatrixRAF0720Std",Msg::kError) << "Read() could not open " 00874 << fname << " Bailing out\n"; 00875 exit(1); 00876 } 00877 00878 fFront .Read(f, name + "_front" ); 00879 fGap .Read(f, name + "_gap" ); 00880 fGapEdge .Read(f, name + "_gapedge" ); 00881 fBack .Read(f, name + "_back" ); 00882 fEdgeRock.Read(f, name + "_edgerock"); 00883 fEdgeDet .Read(f, name + "_edgedet" ); 00884 00885 fAllReco .Read(f, name + "_allreco" ); 00886 fAllRecoNW.Read(f, name + "_allreconw" ); 00887 fAllTruth.Read(f, name + "_alltruth" ); 00888 00889 fJess_ccmu.Read(f, name + "_jess_ccmu"); 00890 fJess_cctau.Read(f, name + "_jess_cctau"); 00891 fJess_no.Read(f, name + "_jess_no"); 00892 00893 fdispfront .Read(f, name + "_dispfront"); 00894 fdispgap .Read(f, name + "_dispgap"); 00895 fdispedgerock.Read(f, name + "_dispedgerock"); 00896 fdispedgedet .Read(f, name + "_dispedgedet"); 00897 fdispback .Read(f, name + "_dispback"); 00898 fdispgapedge .Read(f, name + "_dispgapedge"); 00899 00900 fdisprocklike.Read(f, name + "_disprocklike"); 00901 fdispdetlike .Read(f, name + "_dispdetlike"); 00902 fdispall .Read(f, name + "_dispall"); 00903 00904 fPot = ((TH1*)f->Get(name + "_pot"))->GetBinContent(1); 00905 00906 f->Close(); 00907 dir_backup->cd(); 00908 00909 return 1; 00910 }
| void RockMatrixRAF0720Std::RecoToTrue | ( | const TH2D & | correction | ) | [virtual] |
Implements NuMatrix.
Definition at line 1007 of file RockMatrixRAF0720Std.cxx.
References Msg::kError, and MSG.
01008 { 01009 MSG("RockMatrixRAF0720Std",Msg::kError)<<"RecoToTrue not implemented"<<endl; 01010 }
| void RockMatrixRAF0720Std::Rectangularize1d | ( | Float_t & | dang, | |
| Float_t & | trkEn, | |||
| int | onedbin, | |||
| bool | sparse = false | |||
| ) | [static] |
Definition at line 385 of file RockMatrixRAF0720Std.cxx.
References Msg::kError, Linearize2d(), and MSG.
Referenced by GlobalBin2ear().
00387 { 00388 switch (onedbin) { 00389 case 0: dang = 15; trkEn = 0.25; break; 00390 case 1: dang = 60; trkEn = 0.25; break; 00391 00392 case 2: dang = 5; trkEn = 0.75; break; 00393 case 3: dang = 12.5; trkEn = 0.75; break; 00394 case 4: dang = 17.5; trkEn = 0.75; break; 00395 case 5: dang = 22.5; trkEn = 0.75; break; 00396 case 6: dang = 27.5; trkEn = 0.75; break; 00397 case 7: dang = 32.5; trkEn = 0.75; break; 00398 case 8: dang = 37.5; trkEn = 0.75; break; 00399 case 9: dang = 42.5; trkEn = 0.75; break; 00400 case 10: dang = 47.5; trkEn = 0.75; break; 00401 case 11: dang = 52.5; trkEn = 0.75; break; 00402 case 12: dang = 72.5; trkEn = 0.75; break; 00403 00404 case 13: dang = 5; trkEn = 1.25; break; 00405 case 14: dang = 12.5; trkEn = 1.25; break; 00406 case 15: dang = 17.5; trkEn = 1.25; break; 00407 case 16: dang = 22.5; trkEn = 1.25; break; 00408 case 17: dang = 27.5; trkEn = 1.25; break; 00409 case 18: dang = 32.5; trkEn = 1.25; break; 00410 case 19: dang = 37.5; trkEn = 1.25; break; 00411 case 20: dang = 42.5; trkEn = 1.25; break; 00412 case 21: dang = 47.5; trkEn = 1.25; break; 00413 case 22: dang = 75; trkEn = 1.25; break; 00414 00415 case 23: dang = 5; trkEn = 1.75; break; 00416 case 24: dang = 12.5; trkEn = 1.75; break; 00417 case 25: dang = 17.5; trkEn = 1.75; break; 00418 case 26: dang = 22.5; trkEn = 1.75; break; 00419 case 27: dang = 27.5; trkEn = 1.75; break; 00420 case 28: dang = 32.5; trkEn = 1.75; break; 00421 case 29: dang = 62.5; trkEn = 1.75; break; 00422 00423 case 30: dang = 5; trkEn = 2.25; break; 00424 case 31: dang = 12.5; trkEn = 2.25; break; 00425 case 32: dang = 17.5; trkEn = 2.25; break; 00426 case 33: dang = 22.5; trkEn = 2.25; break; 00427 case 34: dang = 27.5; trkEn = 2.25; break; 00428 case 35: dang = 60; trkEn = 2.25; break; 00429 00430 case 36: dang = 2.5; trkEn = 2.75; break; 00431 case 37: dang = 7.5; trkEn = 2.75; break; 00432 case 38: dang = 12.5; trkEn = 2.75; break; 00433 case 39: dang = 17.5; trkEn = 2.75; break; 00434 case 40: dang = 55.5; trkEn = 2.75; break; 00435 00436 case 41: dang = 2.5; trkEn = 3.25; break; 00437 case 42: dang = 7.5; trkEn = 3.25; break; 00438 case 43: dang = 12.5; trkEn = 3.25; break; 00439 case 44: dang = 17.5; trkEn = 3.25; break; 00440 case 45: dang = 55.5; trkEn = 3.25; break; 00441 00442 case 46: dang = 5; trkEn = 3.75; break; 00443 case 47: dang = 50; trkEn = 3.75; break; 00444 00445 case 48: dang = 5; trkEn = 4.25; break; 00446 case 49: dang = 50; trkEn = 4.25; break; 00447 00448 case 50: dang = 5; trkEn = 4.75; break; 00449 case 51: dang = 50; trkEn = 4.75; break; 00450 00451 default: 00452 dang = 45; 00453 00454 if(onedbin < 0){ 00455 MSG("RockMatrixRAF0720Std",Msg::kError) << "Rectangularize1d given " 00456 "bad input (valid range 0-133): " << onedbin << endl; 00457 trkEn = -1; 00458 } 00459 00460 else if(onedbin <= 132){ 00461 if(!sparse){ // see Linearize2d 00462 if( onedbin <= 111) trkEn = float(onedbin - 52)/4 + 5.125; 00463 else if(onedbin <= 121) trkEn = float(onedbin - 112) + 20.5; 00464 else if(onedbin <= 131) trkEn = float(onedbin - 122)*2 + 31; 00465 else if(onedbin == 132) trkEn = 125; 00466 } 00467 else{ 00468 if( onedbin <= 61) trkEn = float(onedbin - 52)/2 + 5.25; 00469 else if(onedbin <= 65) trkEn = float(onedbin - 62)*5 + 12.5; 00470 else if(onedbin == 66) trkEn = 115; 00471 else{ 00472 MSG("RockMatrixRAF0720Std",Msg::kError) << "Rectangularize1d given " 00473 "bad input (valid range when sparse 0-66,133): " << onedbin << endl; 00474 trkEn = -1; 00475 } 00476 } 00477 } 00478 00479 // not a bin center since this is an overflow 00480 else if(onedbin == 133) trkEn = 1000; 00481 else{ 00482 MSG("RockMatrixRAF0720Std",Msg::kError) << "Rectangularize1d given " 00483 "bad input (valid range 0-133): " << onedbin << endl; 00484 trkEn = -1; 00485 } 00486 } 00487 00488 if(RockMatrixRAF0720Std::Linearize2d(dang, trkEn, sparse) != onedbin) 00489 cerr << "OH NO: inconsistent Linearize2d result for " << onedbin << endl; 00490 }
| void RockMatrixRAF0720Std::ResetPOT | ( | Double_t | new_POT | ) | [virtual] |
Sets the POT count directly, without scaling.
Reimplemented from NuMatrix.
Definition at line 757 of file RockMatrixRAF0720Std.cxx.
References fAllReco, fAllRecoNW, fAllTruth, fBack, fdispall, fdispback, fdispdetlike, fdispedgedet, fdispedgerock, fdispfront, fdispgap, fdispgapedge, fdisprocklike, fEdgeDet, fEdgeRock, fFront, fGap, fGapEdge, fJess_ccmu, fJess_cctau, fJess_no, NuMatrix::fPot, and NuMatrix::ResetPOT().
Referenced by Add(), and ScaleToPOT().
00758 { 00759 fFront .ResetPOT(new_POT); 00760 fGap .ResetPOT(new_POT); 00761 fGapEdge .ResetPOT(new_POT); 00762 fBack .ResetPOT(new_POT); 00763 fEdgeRock.ResetPOT(new_POT); 00764 fEdgeDet .ResetPOT(new_POT); 00765 00766 fAllReco .ResetPOT(new_POT); 00767 fAllRecoNW.ResetPOT(new_POT); 00768 fAllTruth.ResetPOT(new_POT); 00769 00770 fJess_ccmu.ResetPOT(new_POT); 00771 fJess_cctau.ResetPOT(new_POT); 00772 fJess_no.ResetPOT(new_POT); 00773 00774 fdispfront .ResetPOT(new_POT); 00775 fdispgap .ResetPOT(new_POT); 00776 fdispedgerock.ResetPOT(new_POT); 00777 fdispedgedet .ResetPOT(new_POT); 00778 fdispback .ResetPOT(new_POT); 00779 fdispgapedge .ResetPOT(new_POT); 00780 00781 fdisprocklike.ResetPOT(new_POT); 00782 fdispdetlike .ResetPOT(new_POT); 00783 fdispall .ResetPOT(new_POT); 00784 00785 fPot = new_POT; 00786 }
| void RockMatrixRAF0720Std::Scale | ( | Double_t | value | ) | [virtual] |
Scales the Matrix, without changing the POT.
Implements NuMatrix.
Definition at line 944 of file RockMatrixRAF0720Std.cxx.
References fAllReco, fAllTruth, fBack, fdispback, fdispedgedet, fdispedgerock, fdispfront, fdispgap, fdispgapedge, fEdgeDet, fEdgeRock, fFront, fGap, fGapEdge, fJess_ccmu, fJess_cctau, fJess_no, NuMatrix2D::Scale(), and NuMatrix1D::Scale().
Referenced by ScaleToPOT().
00945 { 00946 fFront .Scale(value); 00947 fGap .Scale(value); 00948 fGapEdge .Scale(value); 00949 fBack .Scale(value); 00950 fEdgeRock.Scale(value); 00951 fEdgeDet .Scale(value); 00952 00953 fJess_ccmu .Scale(value); 00954 fJess_cctau.Scale(value); 00955 fJess_no .Scale(value); 00956 00957 fAllReco .Scale(value); 00958 /* Don't scale fAllRecoNW since it is supposed to represent actual MC count */ 00959 fAllTruth.Scale(value); 00960 00961 fdispfront .Scale(value); 00962 fdispgap .Scale(value); 00963 fdispedgerock.Scale(value); 00964 fdispedgedet .Scale(value); 00965 fdispback .Scale(value); 00966 fdispgapedge .Scale(value); 00967 }
| void RockMatrixRAF0720Std::ScaleToPOT | ( | Double_t | new_POT | ) | [virtual] |
Changes the POT, by scaling the data.
Implements NuMatrix.
Definition at line 932 of file RockMatrixRAF0720Std.cxx.
References NuMatrix::GetPOT(), ResetPOT(), and Scale().
00933 { 00934 if (GetPOT() != 0.0) { 00935 // The spectrum must exist - calculate the scale factor 00936 Double_t scale_factor = new_POT / GetPOT(); 00937 Scale(scale_factor); 00938 } 00939 00940 ResetPOT(new_POT); 00941 }
| void RockMatrixRAF0720Std::SetValue | ( | Double_t | val | ) | [virtual] |
Implements NuMatrix.
Definition at line 915 of file RockMatrixRAF0720Std.cxx.
References fAllReco, fAllRecoNW, fAllTruth, fBack, fEdgeDet, fEdgeRock, fFront, fGap, fGapEdge, and NuMatrix1D::SetValue().
00916 { 00917 cerr << "RockMatrixRAF0720Std::SetValue might not do what you think.\n"; 00918 00919 fFront .SetValue(val); 00920 fGap .SetValue(val); 00921 fGapEdge .SetValue(val); 00922 fBack .SetValue(val); 00923 fEdgeRock.SetValue(val); 00924 fEdgeDet .SetValue(val); 00925 00926 fAllReco.SetValue(val); 00927 fAllRecoNW.SetValue(val); 00928 fAllTruth.SetValue(val); 00929 }
| virtual TH1* RockMatrixRAF0720Std::Spectrum | ( | void | ) | const [inline, virtual] |
Returns a TH1 object representing the data the spectrum holds. Or zero.
Implements NuMatrix.
Definition at line 37 of file RockMatrixRAF0720Std.h.
| Double_t RockMatrixRAF0720Std::StatsLikelihood | ( | const RockMatrixRAF0720Std * | with | ) | const [virtual] |
Definition at line 805 of file RockMatrixRAF0720Std.cxx.
References fBack, fEdgeDet, fEdgeRock, fFront, fGap, fGapEdge, and NuMatrix1D::StatsLikelihood().
00806 { 00807 Double_t like = 0.0; 00808 00809 like += fFront .StatsLikelihood(&with->fFront ); 00810 like += fGap .StatsLikelihood(&with->fGap ); 00811 like += fGapEdge .StatsLikelihood(&with->fGapEdge ); 00812 like += fBack .StatsLikelihood(&with->fBack ); 00813 like += fEdgeRock.StatsLikelihood(&with->fEdgeRock); 00814 like += fEdgeDet .StatsLikelihood(&with->fEdgeDet ); 00815 00816 // This SHOULD be nearly identical to all of the above, except that it will 00817 // include underflow and overflow bins in the fit. Test this sometime. 00818 // Do NOT use both the above and this; that's double counting 00819 //like += fAllReco.StatsLikelihood(&with->fAllReco ); 00820 00821 return like; 00822 }
| Double_t RockMatrixRAF0720Std::StatsLikelihood | ( | const NuMatrix * | with | ) | const [virtual] |
Compares two NuMatrix objects and returns the LL difference.
Implements NuMatrix.
Definition at line 788 of file RockMatrixRAF0720Std.cxx.
References Msg::kWarning, and MSG.
00789 { 00790 // Convert the NuMatrix to a RockMatrixRAF0720Std 00791 const RockMatrixRAF0720Std *other 00792 = dynamic_cast<const RockMatrixRAF0720Std*>(with); 00793 if (other == 0) { 00794 MSG("RockMatrixRAF0720Std",Msg::kWarning) 00795 << "Attempting to compare a RockMatrixRAF0720Std to " 00796 "something other than a RockMatrixRAF0720Std" << endl; 00797 return -1; 00798 } 00799 00800 return this->StatsLikelihood(other); 00801 }
| void RockMatrixRAF0720Std::Subtract | ( | const RockMatrixRAF0720Std & | correction | ) | [virtual] |
Definition at line 1089 of file RockMatrixRAF0720Std.cxx.
References NuMatrix1D::Add(), fBack, fEdgeDet, fEdgeRock, fFront, fGap, and fGapEdge.
01090 { 01091 // Base the addition on the 'essential' histograms listed in complete 01092 // Also, this probably won't be used so don't bother with validation/clever behaviour for now 01093 fFront.Add(correction.fFront, -1.0); 01094 fGap.Add(correction.fGap, -1.0); 01095 fGapEdge.Add(correction.fGapEdge, -1.0); 01096 fBack.Add(correction.fBack, -1.0); 01097 fEdgeRock.Add(correction.fEdgeRock, -1.0); 01098 fEdgeDet.Add(correction.fEdgeDet, -1.0); 01099 }
| void RockMatrixRAF0720Std::Subtract | ( | const NuMatrix & | correction | ) | [virtual] |
Implements NuMatrix.
Definition at line 1076 of file RockMatrixRAF0720Std.cxx.
References Msg::kWarning, and MSG.
01077 { 01078 // Convert the NuMatrix to a RockMatrixRAF0720Std 01079 const RockMatrixRAF0720Std *other = dynamic_cast<const RockMatrixRAF0720Std*>(&with); 01080 if (other == 0) { 01081 MSG("RockMatrixRAF0720Std",Msg::kWarning) << "Attempting to subtract a RockMatrixRAF0720Std from something other than a RockMatrixRAF0720Std" << endl; 01082 } 01083 01084 this->Subtract(*other); 01085 01086 }
| void RockMatrixRAF0720Std::TrueToReco | ( | const TH2D & | correction | ) | [virtual] |
Implements NuMatrix.
Definition at line 1013 of file RockMatrixRAF0720Std.cxx.
References Msg::kError, and MSG.
01014 { 01015 MSG("RockMatrixRAF0720Std",Msg::kError)<<"TrueToReco not implemented"<<endl; 01016 }
| Int_t RockMatrixRAF0720Std::Write | ( | const TString & | name | ) | const [virtual] |
Writes to the current file.
Implements NuMatrix.
Definition at line 830 of file RockMatrixRAF0720Std.cxx.
References fAllReco, fAllRecoNW, fAllTruth, fBack, fdispall, fdispback, fdispdetlike, fdispedgedet, fdispedgerock, fdispfront, fdispgap, fdispgapedge, fdisprocklike, fEdgeDet, fEdgeRock, fFront, fGap, fGapEdge, fJess_ccmu, fJess_cctau, fJess_no, NuMatrix::fPot, NuMatrix2D::Write(), and NuMatrix1D::Write().
00831 { 00832 fFront .Write(name + "_front" ); 00833 fGap .Write(name + "_gap" ); 00834 fGapEdge .Write(name + "_gapedge" ); 00835 fBack .Write(name + "_back" ); 00836 fEdgeRock.Write(name + "_edgerock"); 00837 fEdgeDet .Write(name + "_edgedet" ); 00838 00839 fAllReco.Write(name + "_allreco"); 00840 fAllRecoNW.Write(name + "_allreconw"); 00841 fAllTruth.Write(name + "_alltruth"); 00842 00843 fJess_ccmu.Write(name + "_jess_ccmu" ); 00844 fJess_cctau.Write(name + "_jess_cctau" ); 00845 fJess_no.Write(name + "_jess_no" ); 00846 00847 fdispfront .Write(name + "_dispfront"); 00848 fdispgap .Write(name + "_dispgap"); 00849 fdispedgerock.Write(name + "_dispedgerock"); 00850 fdispedgedet .Write(name + "_dispedgedet"); 00851 fdispback .Write(name + "_dispback"); 00852 fdispgapedge .Write(name + "_dispgapedge"); 00853 00854 fdisprocklike.Write(name + "_disprocklike"); 00855 fdispdetlike .Write(name + "_dispdetlike"); 00856 fdispall .Write(name + "_dispall"); 00857 00858 TH1* pot = new TH1D("", "", 1, 0, 1); 00859 pot->SetBinContent(1, fPot); 00860 pot->Write(name + "_pot"); 00861 00862 return 1; 00863 }
NuMatrix1D RockMatrixRAF0720Std::fAllReco [protected] |
Definition at line 111 of file RockMatrixRAF0720Std.h.
Referenced by AllReco(), Fill(), Read(), ResetPOT(), RockMatrixRAF0720Std(), Scale(), SetValue(), and Write().
NuMatrix1D RockMatrixRAF0720Std::fAllRecoNW [protected] |
Definition at line 111 of file RockMatrixRAF0720Std.h.
Referenced by AllRecoNW(), Fill(), Read(), ResetPOT(), RockMatrixRAF0720Std(), SetValue(), and Write().
NuMatrix1D RockMatrixRAF0720Std::fAllTruth [protected] |
Definition at line 111 of file RockMatrixRAF0720Std.h.
Referenced by AllTruth(), Fill(), Read(), ResetPOT(), RockMatrixRAF0720Std(), Scale(), SetValue(), and Write().
NuMatrix1D RockMatrixRAF0720Std::fBack [protected] |
Definition at line 111 of file RockMatrixRAF0720Std.h.
Referenced by Add(), Back(), Complete(), Fill(), Read(), ResetPOT(), RockMatrixRAF0720Std(), Scale(), SetValue(), StatsLikelihood(), Subtract(), and Write().
NuMatrix1D RockMatrixRAF0720Std::fdispall [protected] |
Definition at line 111 of file RockMatrixRAF0720Std.h.
Referenced by dispall(), Fill(), Read(), ResetPOT(), RockMatrixRAF0720Std(), and Write().
NuMatrix1D RockMatrixRAF0720Std::fdispback [protected] |
Definition at line 111 of file RockMatrixRAF0720Std.h.
Referenced by dispback(), Fill(), Read(), ResetPOT(), RockMatrixRAF0720Std(), Scale(), and Write().
NuMatrix1D RockMatrixRAF0720Std::fdispdetlike [protected] |
Definition at line 111 of file RockMatrixRAF0720Std.h.
Referenced by dispdetlike(), Fill(), Read(), ResetPOT(), RockMatrixRAF0720Std(), and Write().
NuMatrix1D RockMatrixRAF0720Std::fdispedgedet [protected] |
Definition at line 111 of file RockMatrixRAF0720Std.h.
Referenced by dispedgedet(), Fill(), Read(), ResetPOT(), RockMatrixRAF0720Std(), Scale(), and Write().
NuMatrix1D RockMatrixRAF0720Std::fdispedgerock [protected] |
Definition at line 111 of file RockMatrixRAF0720Std.h.
Referenced by dispedgerock(), Fill(), Read(), ResetPOT(), RockMatrixRAF0720Std(), Scale(), and Write().
NuMatrix1D RockMatrixRAF0720Std::fdispfront [protected] |
Definition at line 111 of file RockMatrixRAF0720Std.h.
Referenced by dispfront(), Fill(), Read(), ResetPOT(), RockMatrixRAF0720Std(), Scale(), and Write().
NuMatrix1D RockMatrixRAF0720Std::fdispgap [protected] |
Definition at line 111 of file RockMatrixRAF0720Std.h.
Referenced by dispgap(), Fill(), Read(), ResetPOT(), RockMatrixRAF0720Std(), Scale(), and Write().
NuMatrix1D RockMatrixRAF0720Std::fdispgapedge [protected] |
Definition at line 111 of file RockMatrixRAF0720Std.h.
Referenced by dispgapedge(), Fill(), Read(), ResetPOT(), RockMatrixRAF0720Std(), Scale(), and Write().
NuMatrix1D RockMatrixRAF0720Std::fdisprocklike [protected] |
Definition at line 111 of file RockMatrixRAF0720Std.h.
Referenced by disprocklike(), Fill(), Read(), ResetPOT(), RockMatrixRAF0720Std(), and Write().
NuMatrix1D RockMatrixRAF0720Std::fEdgeDet [protected] |
Definition at line 111 of file RockMatrixRAF0720Std.h.
Referenced by Add(), Complete(), EdgeDet(), Fill(), Read(), ResetPOT(), RockMatrixRAF0720Std(), Scale(), SetValue(), StatsLikelihood(), Subtract(), and Write().
NuMatrix1D RockMatrixRAF0720Std::fEdgeRock [protected] |
Definition at line 111 of file RockMatrixRAF0720Std.h.
Referenced by Add(), Complete(), EdgeRock(), Fill(), Read(), ResetPOT(), RockMatrixRAF0720Std(), Scale(), SetValue(), StatsLikelihood(), Subtract(), and Write().
NuMatrix1D RockMatrixRAF0720Std::fFront [protected] |
Definition at line 111 of file RockMatrixRAF0720Std.h.
Referenced by Add(), Complete(), Fill(), Front(), Read(), ResetPOT(), RockMatrixRAF0720Std(), Scale(), SetValue(), StatsLikelihood(), Subtract(), and Write().
NuMatrix1D RockMatrixRAF0720Std::fGap [protected] |
Definition at line 111 of file RockMatrixRAF0720Std.h.
Referenced by Add(), Complete(), Fill(), Gap(), Read(), ResetPOT(), RockMatrixRAF0720Std(), Scale(), SetValue(), StatsLikelihood(), Subtract(), and Write().
NuMatrix1D RockMatrixRAF0720Std::fGapEdge [protected] |
Definition at line 111 of file RockMatrixRAF0720Std.h.
Referenced by Add(), Complete(), Fill(), GapEdge(), Read(), ResetPOT(), RockMatrixRAF0720Std(), Scale(), SetValue(), StatsLikelihood(), Subtract(), and Write().
NuMatrix2D RockMatrixRAF0720Std::fJess_ccmu [protected] |
Definition at line 117 of file RockMatrixRAF0720Std.h.
Referenced by FillJess(), Jess_ccmu(), Read(), ResetPOT(), RockMatrixRAF0720Std(), Scale(), and Write().
NuMatrix2D RockMatrixRAF0720Std::fJess_cctau [protected] |
Definition at line 117 of file RockMatrixRAF0720Std.h.
Referenced by FillJess(), Jess_cctau(), Read(), ResetPOT(), RockMatrixRAF0720Std(), Scale(), and Write().
NuMatrix1D RockMatrixRAF0720Std::fJess_no [protected] |
Definition at line 119 of file RockMatrixRAF0720Std.h.
Referenced by FillJess(), Jess_no(), Read(), ResetPOT(), RockMatrixRAF0720Std(), Scale(), and Write().
1.4.7