#include <NuCutImps.h>
Inheritance diagram for NuCutImps::CC0325Std:

Public Member Functions | |
| CC0325Std (const NuPlots *plots=0) | |
| virtual Bool_t | InFidVol (const NuEvent &nu) const |
Static Public Member Functions | |
| Bool_t | IsGoodBeam (const NuEvent &nu) |
Protected Member Functions | |
| void | Preselection (const NuEvent &nu) |
| void | Selection (const NuEvent &nu) |
|
|
Definition at line 33 of file NuCutImps.cxx. References plots(), NuCut::SetAnaVersion(), and NuCut::SetFidVol(). 00033 : 00034 NuCut("CC0325Std", plots) 00035 { 00036 SetFidVol("cc2008"); 00037 SetAnaVersion(6); 00038 }
|
|
|
Fiducial volume calculation function. This is the basic 'infid' derived version, and should be overridden/passed to for any more complicated evaluations. Reimplemented from NuCut. Definition at line 42 of file NuCutImps.cxx. References NuCut::InFidVol(), and NuEvent::zTrkVtx. Referenced by Preselection(). 00043 {
00044 // Move trk vtx upstream by 3.92cm from scintillator to steel
00045 // for this analysis version
00046 NuEvent nuc = nu;
00047 nuc.zTrkVtx = nu.zTrkVtx - (0.0392*Munits::m);
00048
00049 return NuCut::InFidVol(nuc);
00050 }
|
|
|
Definition at line 117 of file NuCutImps.cxx. References NuEvent::beamTypeDB, NuEvent::cutOnBeamInfo, NuEvent::detector, NuEvent::goodBeam, NuEvent::goodBeamSntp, NuEvent::hornCur, NuEvent::hornIsReverse, MAXMSG, NuEvent::run, NuEvent::simFlag, NuEvent::snarl, and NuEvent::subRun. Referenced by Preselection(). 00118 {
00119 // Don't measure this unless we have data
00120 if (nu.simFlag!=SimFlag::kData) {
00121 // MAXMSG("NuCuts",Msg::kInfo,1)
00122 // <<"Not cutting on GoodBeam for simFlag="<<nu.simFlag<<endl;
00123 return true;
00124 }
00125
00126 // Don't cut on this if we've set not to
00127 if (!nu.cutOnBeamInfo) {
00128 MAXMSG("CC0325Std",Msg::kWarning,1)
00129 <<"Not cutting on BeamInfo (flag set to not cut)"<<endl;
00130 return true;
00131 }
00132
00133 // Assume we are good, and start from there
00134 bool isGood = true;
00135
00136 // Check current
00137 if (!nu.goodBeam)
00138 isGood = false;
00139 if (nu.hornCur==-999999)
00140 isGood = false;
00141
00142 if (nu.hornCur < -10) {
00143 if (nu.beamTypeDB != BeamType::kL010z185i &&
00144 nu.beamTypeDB != BeamType::kL010z170i &&
00145 nu.beamTypeDB != BeamType::kL010z200i &&
00146 nu.beamTypeDB != BeamType::kL250z200i) {
00147 isGood = false;
00148 }
00149 if (nu.hornIsReverse) {
00150 MAXMSG("CC0325Std",Msg::kError,1000)
00151 << "nu.hornIsReverse is true but it shouldn't be for beamTypeDB="
00152 << nu.beamTypeDB << endl;
00153 }
00154 }
00155 else if (nu.hornCur > 10) {
00156 if (nu.beamTypeDB != BeamType::kL010z185i_rev)
00157 isGood = false;
00158 if (!nu.hornIsReverse) {
00159 MAXMSG("CC0325Std",Msg::kError,1000)
00160 << "nu.hornIsReverse is false but it shouldn't be for beamTypeDB="
00161 << nu.beamTypeDB << endl;
00162 }
00163 }
00164 else {
00165 if (nu.beamTypeDB != BeamType::kL010z000i)
00166 isGood = false;
00167 }
00168
00169
00170 if (!isGood) {
00171 MAXMSG("CC0325Std",Msg::kInfo,100)
00172 <<"Bad beam: goodBeam="<<nu.goodBeam
00173 <<", goodBeamSntp="<<nu.goodBeamSntp
00174 <<", hornCur="<<nu.hornCur
00175 <<", nu.beamTypeDB="<<nu.beamTypeDB
00176 <<", hornIsReverse="<< (nu.hornIsReverse?"Yes":"No")
00177 << endl;
00178 if (nu.detector==Detector::kNear) {
00179 MAXMSG("CC0325Std",Msg::kError,1000)
00180 <<"IsGoodBeam: cutting on Bad beam here messes"
00181 <<" up POT counting. Event: " << nu.run << "/" << nu.subRun << ", " << nu.snarl <<endl;
00182 }
00183 return false;
00184 }
00185
00186 //Make sure we're not getting mixed beam
00187 static Bool_t firstGoodEvent = true;
00188 static Int_t firstType = 0;
00189
00190 if (firstGoodEvent){
00191 firstGoodEvent = false;
00192 firstType = nu.beamTypeDB;
00193 // Treat le10 170, 185, 200 as all the same
00194 if (firstType == BeamType::kL010z170i ||
00195 firstType == BeamType::kL010z200i) {
00196 firstType = BeamType::kL010z185i;
00197 }
00198 }
00199 else{
00200 Int_t thisType = nu.beamTypeDB;
00201 // Treat le10 170, 185, 200 as all the same
00202 if (nu.simFlag==SimFlag::kData && nu.detector==Detector::kFar){
00203 if (thisType == BeamType::kL010z170i ||
00204 thisType == BeamType::kL010z200i) {
00205 thisType = BeamType::kL010z185i;
00206 }
00207 }
00208
00209 if (thisType != firstType) {
00210 MAXMSG("CC0325Std",Msg::kWarning,100)
00211 << "Seeing mixed beam: firstType=" << firstType
00212 << ", thisType=" << thisType
00213 << ", beamTypeDB=" << nu.beamTypeDB << endl;
00214 if (nu.detector==Detector::kNear) {
00215 MAXMSG("NuCuts",Msg::kError,1000)
00216 <<"IsGoodBeam: cutting on Bad beam here messes"
00217 <<" up POT counting..."<<endl;
00218 }
00219 return false;
00220 }
00221 }
00222 //Beam consistent with first event in DST, so we can let it pass
00223 return true;
00224
00225 }
|
|
|
Implements NuCut. Definition at line 53 of file NuCutImps.cxx. References NuEvent::coilIsOk, NuCut::Cut_If(), NuEvent::cutOnBeamInfo, NuEvent::cutOnDataQuality, NuEvent::detector, NuEvent::goodBeamSntp, InFidVol(), IsGoodBeam(), NuEvent::isGoodDataQuality, NuEvent::isLI, NuCut::Keep_Data_If(), NuCut::Keep_If(), NuEvent::litime, MAXMSG, NuEvent::ntrk, NuEvent::simFlag, and NuEvent::trkfitpass. 00054 {
00055 if (nu.simFlag==SimFlag::kData) {
00056 MAXMSG("CC0325Std",Msg::kWarning, 10)
00057 << "NuCut derivative CC0325Std has not been validated against data. "
00058 << "Use at your own risk! (Or validate it then remove this warning!)" << endl;
00059 }
00060 // Good tracks
00061 Keep_If(nu.ntrk >= 1, "GoodNumberofTracks");
00062
00063 // Filter out LI events
00064 Cut_If(nu.isLI || nu.litime != -1, "LICut");
00065
00066 // Is the coil okay? Only cut if we have the cutOnDataQuality flag
00067 // Keep_Data_If(fNuCuts.IsCoilOk(nu), nu);
00068 Keep_Data_If(!nu.cutOnDataQuality || nu.coilIsOk, nu, "IsCoilOkay");
00069
00070 // IsGoodBeamDetPOTCountingStage
00071 // This can mess up POT counting apparently, so be careful!
00072 Keep_Data_If(nu.goodBeamSntp && nu.coilIsOk, nu,"GoodBeamDetPOT");
00073
00074 // Cut on good beam (IsGoodBeam)
00075 Keep_Data_If(!nu.cutOnBeamInfo || IsGoodBeam(nu), nu, "GoodBeam");
00076
00077 // Is it in the fiducial volume?
00078 Keep_If(InFidVol(nu), "FidVol");
00079
00080 // Per-detector cuts
00081 if (nu.detector == Detector::kFar)
00082 {
00083 // TrackFitPass
00084 Keep_If(nu.trkfitpass == 1, "trackfitpass");
00085
00086 // Data Quality
00087 Keep_Data_If(nu.isGoodDataQuality || !nu.cutOnDataQuality, nu, "DataQuality");
00088
00089 // IsGoodTimeToNearestSpill (FD only)
00090 // CC0325Std Uses -20us, +30us
00091 Keep_Data_If(NuCuts::GoodTimeToNearestSpill(nu, -20, +30) || !nu.cutOnSpillTiming, nu, "SpillTime");
00092
00093 // Cut on track direction angle
00094 Keep_If(nu.dirCosNu > 0.6, "dirCosNu");
00095 }
00096 else if (nu.detector == Detector::kNear)
00097 {
00098 // Need to implement ND Trackfitpass (uses reclamation)
00099 // See Zeynep talk DocDB-6382 - mentions 'Nikis Reclamation'
00100 Keep_If(NuCuts::IsGoodTrackFitPassReclamation(nu), "trackfitreclamation");
00101
00102 // Cut on the coil current
00103 Keep_Data_If(nu.coilCurrent < -1000 || !nu.cutOnDataQuality, nu, "CoilCurrent");
00104
00105 } // End of per-detector cuts
00106 } // Eend of preselection function
|
|
|
Implements NuCut. Definition at line 109 of file NuCutImps.cxx. References NuCut::Keep_If(), and NuEvent::roID. 00110 {
00111 Float_t cutValue=0.3;
00112 // Cut on RoID
00113 Keep_If(nu.roID > cutValue, "RoID");
00114
00115 }
|
1.3.9.1