#include <string>#include <vector>#include "TH1.h"#include "TH2.h"#include "MCNNAnalysis/ComparisonResult.h"Go to the source code of this file.
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
Definition at line 157 of file MCNNFunctions.h. References NtpTools::GetEvent(), NtpSRPlane::n, NtpSREvent::nstrip, NtpSRPlane::nu, NtpSRPlane::nv, NtpSRPulseHeight::pe, NtpSREvent::ph, and NtpSREvent::plane. Referenced by MCNNRunner::WriteResults(). 00157 {
00158
00159 bool isPreselected = true;
00160 const NtpSREvent* event = NtpTools::GetEvent(record, eventno);
00161 if(event->ph.pe<50) isPreselected = 0;
00162 if(event->ph.pe>10000) isPreselected = 0;
00163 if(event->plane.nu<2) isPreselected = 0;
00164 if(event->plane.nv<2) isPreselected = 0;
00165 if(event->plane.n<5) isPreselected = 0;
00166 if(event->plane.n>30) isPreselected = 0;
00167 if(event->nstrip<8) isPreselected = 0;
00168 if(event->nstrip>80) isPreselected = 0;
00169
00170 return isPreselected;
00171 }
|
|
|
|
|
|
|
|
|
Definition at line 332 of file MCNNFunctions.h. References MinosMC::IDact, MinosEvent::MCInfo, MinosStrip::Plane, MinosStrip::QPEcorr, MinosEvent::Run, MinosStrip::Strip, MinosEvent::StripList, and MinosStrip::View. Referenced by MCNNRunner::WriteResults(). 00332 {
00333 //================================================================
00334 // applies some preselection to the MC events in the ibrary
00335 // Author: Caius Howcroft (&Mark Thomson?)
00336 //================================================================
00337
00338 //NOTE: this is OBSOLETE NOW. Has not been duly updated
00339
00340 bool isPreselected = false;
00341
00342 bool planes[500];
00343 for(int i=0;i<500;++i)planes[i]=false;
00344
00345 // loop over the strips to determine number of u and v strips to be stored
00346 const int nstrips = (int)(event->StripList->GetEntries());
00347 const MinosMC& eventMC = event->MCInfo;
00348
00349 // Don't process NC events in electron/tau neutrino samples
00350 int runType = event->Run;
00351 runType = runType/100000;
00352 if(runType==211&&eventMC.IDact==0)return false;
00353 if(runType==213&&eventMC.IDact==0)return false;
00354
00355 // if(DEBUG)cout << " PRESELECTION : " << nstrips << endl;
00356 float sumQ = 0.;
00357 float sumQU = 0.;
00358 float sumQV = 0.;
00359 float sumU = 0.;
00360 float sumV = 0.;
00361 int nU = 0;
00362 int nV = 0;
00363 for(int istp = 0; istp< nstrips; istp++){
00364 const MinosStrip* strip = dynamic_cast<const MinosStrip*>(event->StripList->At(istp));
00365 // if(DEBUG)cout << " strip : " << istp << " " << strip << endl;
00366 float qpe = strip->QPEcorr[0]+strip->QPEcorr[1];
00367 sumQ += qpe;
00368 if(strip->View==0){
00369 nU++;
00370 sumU += strip->Strip*qpe;
00371 sumQU += qpe;
00372 }
00373 if(strip->View==1){
00374 nV++;
00375 sumV += strip->Strip*qpe;
00376 sumQV += qpe;
00377 }
00378 planes[strip->Plane]=true;
00379 }
00380
00381 float nPlanes = 0.;
00382 int firstPlane = 999;
00383 int lastPlane = -999;
00384
00385 for(int i=0;i<500;++i){
00386 if(planes[i]){
00387 nPlanes++;
00388 if(i<firstPlane)firstPlane=i;
00389 if(i>lastPlane)lastPlane=i;
00390 }
00391 }
00392
00393 // no selection at the moment so pass everything
00394 isPreselected = true;
00395 float meanU = -96.*0.041666;//<--
00396 float meanV = -96.*0.041666;
00397 if(nU!=0){
00398 meanU = (sumU/sumQU-96.)*0.041666;
00399 }
00400 if(nV!=0){
00401 meanV = (sumV/sumQV-96.)*0.041666;
00402 }
00403 float meanX = (meanU+meanV)/1.41421;
00404 float meanY = (meanU-meanV)/1.41421;
00405
00406
00407 // ------------ Fiducial Cuts ---------------------
00408 // cut out start of SM1
00409 if(firstPlane<5)isPreselected = false;
00410 // cut out end of SM2
00411 if(lastPlane>481)isPreselected = false;
00412 // cut out events cross SMs
00413 if(firstPlane<249&&lastPlane>249)isPreselected = false;
00414 // cut out start of SM2
00415 if(firstPlane>=249&&firstPlane<=251)isPreselected = false;
00416 // cut end of SM1
00417 if(lastPlane>=247&&lastPlane<=249)isPreselected = false;
00418 // cut away 25 cm from detector edges
00419 if(isPreselected){
00420 if(fabs(meanU)>3.75)isPreselected = false;
00421 if(fabs(meanV)>3.75)isPreselected = false;
00422 if(fabs(meanX)>3.75)isPreselected = false;
00423 if(fabs(meanY)>3.75)isPreselected = false;
00424 }
00425 // remove 0.4m radius around coil hole
00426 if(meanU*meanU+meanV*meanV<0.16)isPreselected = false;
00427
00428 // ---------------- nue cuts -----------------------
00429 if(nU<2)isPreselected = false;
00430 if(nV<2)isPreselected = false;
00431 if(nPlanes<5.5)isPreselected = false;
00432 if(nPlanes>30.5)isPreselected = false;
00433 if(nstrips<7.5)isPreselected = false;
00434 if(nstrips>80.)isPreselected = false;
00435 if(sumQ<50.)isPreselected = false;
00436 if(sumQ>1600.)isPreselected = false;
00437
00438 return isPreselected;
00439
00440 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.3.9.1