v1_05

  • Options file Ana_CCProtonPi0.opts Improved
    • More Control for CCProtonPi0 Flow
  • Debugging Messages from older versions removed
  • New NTuple Data Added to track all of the CUTs
  • New Function: setVertexData()
  • Class: AngleScan
    • Styling Modified to match Package Styling
    • Comments Added
  • Class: ClusterVectorInfo
    • Styling Modified to match Package Styling
    • Comments Added
  • Prong Colors Added for Scanning Sessions
  • New Documentation: ProcessAna_Scripts.txt

Status Update: Fake Pi0 Reconstruction

  • First we suspected it is due to proton hits
  • I did some tests on Cluster History at different stages of reconstruction
    • Before Everything
    • Before Muon
    • Before Michel
    • Before Proton
    • Before Pi0 Reconstruction
    • etc…
  • Find out that Pi0 Reconstruction DOES NOT touch proton prongs.
    • This is good. We are not having extra hits from proton/pion hits
    • However, this means that our first assumption is wrong! There is some other problem!
  • Prof. Mann and I decided that the best way to figure out what is going on is a scanning session of two sample of events
    • Signal with FAILED Reconstruction
    • Background with SUCCESSFUL Reconstruction

Cluster History Test

Test 1: Proton Prong Cluster History

  • Checking Cluster History of a single prong
    • Before: Used
    • After: Used

Test 2: Cluster History in Different Stages

  • Got all clusters and checked their history before each stage
    • Example Result:
    • N(Unused) N(Used)
    • Before Reco 41 120
    • Before Muon 41 120
    • Before Michel 41 120
    • Before Proton 41 120
    • Before Pi0 41 120
    • After Reco 0 161
  • Findings
    • Prong Clusters are already USED
    • There are additional clusters which are unused are used in Pi0 Reconstruction
    • In 2 sample Michel Stage also changed cluster History – See full list: NClusters Sheet1

v1_04

  • Revised Pi0 Reconstruction
    • Global Variables Used in all functions
    • Removed unused functions and variables
    • ConeBlobs()
      • Variable Naming Match
      • Return type changed: StatusCode to bool
        • Returns false if setPi0ParticleData() fails
      • ConeBlobs() main function that controls Pi0 Reconstruction.
        • If it fails, the reconstructEvent() for that event stops.
    • VtxBlob()
      • Return type changed: StatusCode to bool
        • Always returns true (return type reserved for future implementation)
    • processBlobs()
      • Removed unused variables
      • Return type changed: StatusCode to void
  • Options File Modifications
    • New Options files for DEBUG
    • Original options file set to INFO

v1_03

  • correctProtonProngEnergy()
    • Fixed a bug causing P4(Proton) = (nan,nan,nan,nan)
    • returns bool if Energy Correction Fails
  • setProtonParticleData()
    • double vertexZ no longer input parameter
    • Using Global Variable m_PrimaryVertex

Bug: correctProtonProngEnergy()

Problem:

  • For some events 4-Momentum is zero
  • two fail modes observed:
    1. kinked tracks – if kinked track has 0 energy
    2. If particle already has 0 energy

Attempts

  1. kinked tracks
    • Currently correctProtonProngEnergy() returns the final tracks energy as prong energy
    • Total Energy should be used
    • Summing 4-Momentum for each track in a prong
  2. If particle already has 0 energy
    • Check Particle energy before correctProtonProngEnergy()
    • if(E == 0) proton_isRecoGood = -1
    • else proton_isRecoGood = 1
  3. correctProtonProngEnergy() returns bool
    • returns false incase function fails
    • in this case use default particle 4-Momentum

v1_02

  • TG4Trajectory Map Removed
  • Muon Reconstruction
    • Using Global Variables
      • m_MuonTrack
      • m_MuonProng
      • m_MuonParticle
    • SetMuonParticleData() Improved
  • Proton Reconstruction
    • Fixed a bug causing empty NTuple Branches even with a successful proton reconstruction
    • Using Global Variables
      • m_ProtonProngs
      • m_ProtonParticles
    • Stop Algorithm if CreateTrackedParticles() fails
    • New Variable Cut_Particle_None
    • Removed Proton Score Cut
    • getProtonProng() Improved
    • SetProtonParticleData() Improved
    • Branches initialized to SENTINEL = -9.9
  • Global Variable: m_PrimaryVertex
    • Still need to pass the variable to CCPi0 Functions – Some of the functions outside the Global Scope
  • Found a new bug in correctProtonProngEnergy()
    • If the function changes proton energy, NTuple Branches for Momentum and Energy does not filled correctly
    • Will fix this with v1_03

Debugging for Proton Reconstruction

Problem and Reason

  • Although recontructEvent() returns with a successful proton reconstruction; in some cases the NTuple branches for proton are empty.
  • Possible Reason:
    • getProtonProng() and setProtonParticleData() functions are not correctly working!
  • Using Global Variables making sure that getProtonProng() and setProtonParticleData() functions access SAME proton prong information.
  • This fix will be included under v1_2

Test Details

Test 1:

  • Global Variable:
    • testDouble
  • Function Used:
    • getProtonProng()
  • Did not passed variables to function
  • Assigned Value:
    • Before = 1987
    • Inside = 1986
  • Observed Value:
    • Before Call = 1987
    • Inside, Before Assignment = 1987
    • Inside, After Assignment = 1986
    • After Call = 1986
  • Test Results:
    • Do not PASS Global Variables to the Functions

Test 2:

  • Class Private Member:
    • testDouble
  • Test Results:
    • DOES NOT Compile
    • const functions CANNOT modify member variables

Test 3:

  • Global Variable:
    • testDouble
  • Functions Used:
    • getProtonProng() and setProtonParticleData()
  • Did not passed variables to function
  • Assigned Values and Observed Values were matched
  • Test Results:
    • getProtonProng() and setProtonParticleData() can access and modify the testDouble

Test 4:

  • Global Variables:
    • Minerva::ProngVect m_protonProngs;
    • Minerva::ParticleVect m_protonParticles;
  • Function Used: getProtonProng()
    • Before Call, m_protonProngs.size() = 0
    • After Call, m_protonProngs.size() = 1
  • Did not passed variables to functions
  • Test Results:
    • getProtonProng() can access and modify m_protonProngs;

Test 5:

  • Global Variables:
    • Minerva::ProngVect m_protonProngs;
    • Minerva::ParticleVect m_protonParticles;
  • Function Used:
    • getProtonProng() and setProtonParticleData()
  • Did not passed variables to functions
  • Test Results:
    • getProtonProng() and setProtonParticleData() can access and modify m_protonProngs;
    • PROBLEM: Need to clear m_protonProngs vector before each iteration.

Test 6:

  • Global Variables:
    • Minerva::ProngVect m_protonProngs;
    • Minerva::ParticleVect m_protonParticles;
  • Function Used:
    • getProtonProng() and setProtonParticleData()
  • Did not passed variables to functions
  • Testing for actual data analysis
  • Test Results:
    • Successful! – Works as expected!

v1_01

  • PreFilterPi0()
    • Getting Vertex as input
    • Return Value Changed: StatusCode -> bool
    • Debug Messages and Comments
    • New Variables:
      • Rejected Energy
      • Status
        • preFilter_Result     
        • 0 = Passes Filter     
        • 1 = Rejected by Target Filter     
        • 2 = Rejected by Max Other     
        • 3 = Rejected by Min Other
  • tagTruth()
  • Final State Particle Table as INFO
    • m_writeFSParticle_Table controls execution
  • Using reverse_iterator
  • setParticleData Functions
    • Return Value Changed: StatusCode -> bool

v1_00

  • setPi0ParticleData() Function reorganized completely
    • Function Order:
      1. Calculations
      2. Branch Filling
    • Additional Comments Added
  • Unused Variables Removed and Variable Naming Style Improved
  • Version Tracking Started
    • CCProtonPi0 v1_00 is the stable version capable of reconstructing All Final State Particles
  • changelog.txt file included with the package under doc/ folder

All Crashing Problems fixed

  • m_PrimaryVertex Global Variable was NULL inside some functions
    • Now passing, vertex as a parameter to the functions
  • There is no Truth Match Info for Pi0 for now
    • If I have good results, I may try to add it next week for better quality analysis
  • Functions disabled due to same Global Variable Problem
    • OneParLineFitBlob
    • TwoParLineFitBlobVtxDistance

Job Submission

./ProcessAna.py –mc –playlist minerva1 –dst –usecat –ana_tool CCProtonPi0 –outdir /minerva/data/users/oaltinok/CCProtonPi0/MC/minerva1

Date

Type

Version

PlayList

Run

Subrun

ana_tool

Other

Result

06/13/2014

MC

resurrection

minerva1

CCProtonPi0

–dst

Success

Updates

  • minerva1 playlist on data3 disk are removed. Running minerva13C for testing.
  • Fixed problems causing Job Submission crashes
  • Trung’s Truth Match disabled – DigitVectorTruthInfo
  • One and Two Parameter Fit functions disabled
  • Successful Muon, Proton, Pi0 Reconstruction after test submission (No Crashes)
  • Need a study to make sure Reconstruction is Correct!

Pi0 Reconstruction Integrated

  • Complete Pi0 Reconstruction duplicated from CCPi0
  • ConeBlobs() Function included
  • Global Variables are included as it is in CCPi0
  • Keeping all branches of CCPi0, most of them for debugging purposes and will be removed in future
  • requirements file modified for ROOT Libraries
    • CORRECT: macro_append ROOT_linkopts ” -lPhysics -lHist -lGeom -lEG -lGpad -lGraf -lMinuit2 “
    • WRONG: macro_append ROOT_linkopts “-L$(ROOTSYS)/lib -lPhysics -lHist -lGeom -lEG -lGpad -
  • lGraf -lMinuit2″
  • Additional Classes duplicated from CCPi0 Package
  • Successful Build but did not tested job submission

Job Submission PROBLEM:

  • ToolSvc ERROR Cannot create tool CCProtonPi0Ana (No factory found)
  • PhysicsEventAnalysisAlg FATAL PhysicsEventAnalysisAlg:: Exception throw: tool():: Could not re- trieve Tool ’CCProtonPi0Ana’ StatusCode=FAILURE
  • PhysicsEventAnalysisAlg ERROR Could not obtain analysis tool: CCProtonPi0Ana

Solution:

  • Changed source file name as CCProtonPi0
    • CCProtonPi0Ana -> CCProtonPi0

Update

  • tagTruth() Improved
    • Added gamma kinematics and trackID
    • proton, pi0 and gamma have parentID and vtx information in addition to their kinematics (4-Momentum)
  • VtxBlob() Function completely is added
    • Having problems during compile
  • requirement file modified
    • Included ROOT Libraries but causing problems while linking

CCProtonPi0 Package

  • CCDeltaPlus Package renamed as CCProtonPi0
    • Created new cmt package for CCProtonPi0
    • Removed all files under CCDeltaPlus
    • Sent an e-mail to Chris and Philip, they will add CCProtonPi0 to the MINERvA Framework – SystemTests Option Files modified
    • NTupleAnalysis Modified
    • Output Data Area Modified
    • Self Manuals Modified
    • Committed changes to GitHub

Update

  • Reconstructable and Fiducial Volumes compared with the Number of Events after each Cut
  • See Research/MINERVA/Deltap_Production/DetectorArea
  • Muon Charge added to NTuples
    • Getting muon charge from MuonUtils
  • Added Energy to Truth Matched Prongs
    • Using Gaudi::LorentzVector properties to get E() of 4-vector

Job Submission

./ProcessAna.py –mc –run 10205 –subrun 1,2,3,4,5 –ana_tool CCDeltaPlusAna –outdir /minerva/data/users/oaltinok/CCDeltaPlus/MC/test

Date

Type

Version

PlayList

Run

Subrun

ana_tool

Other

Result

05/12/2014

MC

resurrection

10205

1-5

CCDeltaPlusAna

Success

Job Submission

./ProcessAna.py –mc –run 10205 –subrun 1,2,3,4,5 –ana_tool CCDeltaPlusAna –outdir /minerva/data/users/oaltinok/CCDeltaPlus/MC/testDST

Date

Type

Version

PlayList

Run

Subrun

ana_tool

Other

Result

05/12/2014

MC

resurrection

10205

1-5

CCDeltaPlusAna

–dst

Success

Update

  • Truth Match Improved
    • For Each Prong added the Px,Py,Pz
  • Tool Name Alias’ Added
  • Options Files Modified
    • Tool Properties Added

Job Submission

./ProcessAna.py –mc –run 10205 –ana_tool CCDeltaPlusAna –outdir /minerva/data/users/oaltinok/CCDeltaPlus/MC/test2

Date

Type

Version

PlayList

Run

Subrun

ana_tool

Other

Result

05/01/2014

MC

resurrection

10205

all

CCDeltaPlusAna

Success

Updates

  • Proton & Pi0 Kinematics

setTrackProngTruth()

  • Taken from Tammy’s NukeCCQE – 04/29/2014
  • For muon and proton prongs saves the following information:
    • “isProtonInsideOD”
    • “ntrajProtonProng”
    • “trajProtonProngPrimary”
    • “trajProtonProngPDG”
    • “trajProtonProngMomentum” – “trajProtonTheta”
    • “trajProtonPhi”
    • “endProtonTrajMomentum” – “endProtonTrajXPosition”
    • “endProtonTrajYPosition”
    • “endProtonTrajZPosition”

Job Submission

./ProcessAna.py –mc –run 10205 –ana_tool CCDeltaPlusAna –outdir /minerva/data/users/oaltinok/CCDeltaPlus/MC/test2

Date

Type

Version

PlayList

Run

Subrun

ana_tool

Other

Result

04/29/2014

MC

resurrection

10205

all

CCDeltaPlusAna

Success

Proton Reconstruction and Other Updates

Proton Reconstruction

  • Plan Completed! Except truth match and marking prong with highest proton score: PrimaryProton selection left the NTuple Analysis Stage

interpretEvent()

interPretEvent() Flow:

  1. Identify and Store – Muon and Proton Prongs
  2. Calculate and Set Muon Kinematics
    • setMuonParticleData( nuInt, muonProng);
  3. Calculate and Set Proton Kinematics
    • setProtonParticleData(nuInt,protonProngs,protonParticles,vertexZ);
  4. Calculate and Set Vertex Parameters
  • Future plan: Increase modularity by creating functions for each stage

Reconstruction Cut List – 04/28/2014

Type

Name

Value

Event

Is Plausible? (MC Only)

truth && !truthIsPlausible(truth)

BadObject flag

event->filtertaglist()->isFilterTagTrue( AnaFilterTags::BadObject() )

Vertex

Is Vertex Exist?

!(event->hasInteractionVertex())

Is Null Vertex?

interactionVertex == NULL

Is Analyzable?

Apothem = 1000, UpStreamZ = 5750, DownStreamZ = 8700

Is Fiducial?

Apothem = 850, UpStreamZ = 5990, DownStreamZ = 8340

Muon

Is Muon Exist or NULL?

!muonProng

Is Plausible? (MC Only)

m_doPlausibilityCuts && !muonIsPlausible( muonProng, mc_frac)

Is Muon Good?

muonPart->score() >= (m_minMuonScore = 0.9)

Michel

Is Vertex Michel Exist?

foundMichel == true

Is End Point Michel Exist?

foundMichel == true

Proton

Is Proton Good?

getProtonProng() uses “m_minProtonScore = 0.1”

 

tagTruth()

  • Fiducial Volume Check
  • Prints Final State Particles with Parents
    • Study for primary and secondary particles in Final State
  • Count Number of Final State Particles
    • proton, neutron
    • mu-, mu+
    • pi0, pi-,pi+
    • delta+, gamma, other
  • Find Signal – CC Neutrino Interaction with FS Particles: muon, proton, pi0
  • Target Material
  • Vertex module and plane
  • Muon Kinematics

 

Updates

reconstructEvent()

  • After including the following functions the package does NOT have a complete structure to run with ProcessAna.py
  • interpretEvent() must be modified accordingly

Michel Tool

  • Brandon’s CCPionInc Package have a very detailed Michel Study
  • Vertex Michel: Look for Michels near vertex
  • End Point Michel: Look for Michels at the end point of short prongs.
  • MAKE CUT – Vertex and End Point Michels
  • My current plan is selecting my signal only. I will deal with background studies later.

Other Reconstructed Values

  • Determine vertex have a broken track
  • Get total visible energy in PhysicsEvent
  • Count long and short tracks in the event
  • Calculate dead time
  • Get event time

Plan for Proton Reconstruction

  1. Check all prongs except Muon for End Point Michel
  2. If a prong has End Point Michel, CUT that event
  3. If the event survives the end point Michel: Create particles from prongs using proton and pion hypotheses
  4. Mark the prong with highest proton score as PrimaryProton
  5. Calculate and Record its kinematics under proton hypothesis
  6. Add truth match!

 

Update on Event Selection

Event Plausibility

  • MC Plausibility
    • Default plausibility means that underlying truth is likely something to be rejected by standard Minos
  • Match CC analysis
  • Does this event carry a reco object with a BadObject flag?
    • If there is a BadObject in the event, do NOT reconstruct

Vertex Reconstruction

  • Require vertex analyzability so that we don’t run as much reco
    • Analyzable Volume (Vertex Must be inside this volume before running AnchoredShortTracks )
      • m_recoHexApothem = 1000.0*CLHEP::mm;
      • m_recoUpStreamZ = 5750.0*CLHEP::mm;
      • m_recoDownStreamZ = 8700.0*CLHEP::mm;
  • Using m_ccPionIncUtils->makeShortTracks(event) to create vertex-anchored short track Prongs
    • This method refits vertex
  • Require vertex to be in fiducial volume
    • If MC Event
      • Smear the vertex position by 1mm 1mm 10mm, then record whether the smeared vertex passes the fiducial volume cut
    • Fiducial Volume (Same as before)
      • m_fidHexApothem = 850.0*CLHEP::mm;
      • m_fidUpStreamZ = 5990.0*CLHEP::mm; // ~middle of module 27, plane 1
      • m_fidDownStreamZ = 8340.0*CLHEP::mm; // ~middle of module 79, plane 1