Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
1cebf4d
Add files via upload
rodwyer100 Feb 9, 2024
70c2ed8
Add files via upload
rodwyer100 Feb 9, 2024
fcd26f8
Add files via upload
rodwyer100 Feb 9, 2024
2334566
Update and rename RoryClusterAnaProcessor.cxx to ClusterAnaProcessor.cxx
rodwyer100 Feb 9, 2024
bb58bfb
Update and rename RoryClusterAnaProcessor.h to ClusterAnaProcessor.h
rodwyer100 Feb 9, 2024
c078393
Update RoryClusterCompareAnaProcessor.cxx
rodwyer100 Feb 9, 2024
0c9dc32
Rename RoryClusterCompareAnaProcessor.cxx to ClusterCompareAnaProcess…
rodwyer100 Feb 9, 2024
57dda9c
Update and rename RoryClusterCompareAnaProcessor.h to ClusterCompareA…
rodwyer100 Feb 9, 2024
d83ce7c
Update and rename roryClusterAna.py to ClusterAna.py
rodwyer100 Feb 9, 2024
c13425d
Rename ClusterAna.py to clusterAna.py
rodwyer100 Feb 9, 2024
f3fdf0f
Update and rename roryClusterCompareAna.py to clusterCompareAna.py
rodwyer100 Feb 9, 2024
00214c4
Update ClusterAnaProcessor.cxx
rodwyer100 Feb 9, 2024
583d12e
Update ClusterAnaProcessor.cxx
rodwyer100 Feb 9, 2024
5ef8bc1
Update ClusterAnaProcessor.h
rodwyer100 Feb 9, 2024
b394c05
Update ClusterCompareAnaProcessor.cxx
rodwyer100 Feb 9, 2024
2a15437
Update ClusterCompareAnaProcessor.h
rodwyer100 Feb 9, 2024
08173a7
Update SvtRawDataAnaProcessor.cxx
rodwyer100 Feb 9, 2024
587d0e8
Update SvtRawDataAnaProcessor.cxx
rodwyer100 Feb 9, 2024
3803627
Update ClusterAnaProcessor.cxx
rodwyer100 Feb 9, 2024
6cc3479
Update ClusterCompareAnaProcessor.cxx
rodwyer100 Feb 9, 2024
a0ebd65
Update ClusterAnaProcessor.cxx
rodwyer100 Feb 9, 2024
a195747
Update ClusterCompareAnaProcessor.cxx
rodwyer100 Feb 9, 2024
99144ff
Add files via upload
rodwyer100 Feb 9, 2024
0b1ee7b
Update AddIdentity.C
rodwyer100 Feb 9, 2024
e30a221
Update clusterCompareAna.py
rodwyer100 Feb 9, 2024
4192a63
Update clusterAna.py
rodwyer100 Feb 9, 2024
e8235b2
Update ClusterAnaProcessor.cxx
rodwyer100 Feb 12, 2024
d2a0858
Update ClusterCompareAnaProcessor.cxx
rodwyer100 Feb 12, 2024
25176f2
Update ClusterCompareAnaProcessor.cxx
rodwyer100 Feb 12, 2024
7e54020
Update SvtRawDataAnaProcessor.cxx
rodwyer100 Feb 12, 2024
4d687fa
Update ClusterCompareAnaProcessor.cxx
rodwyer100 Feb 12, 2024
8f63366
Update ClusterAnaProcessor.h
rodwyer100 Feb 12, 2024
816cabb
Update ClusterAnaProcessor.cxx
rodwyer100 Feb 12, 2024
b3bbd67
Update ClusterAnaProcessor.h
rodwyer100 Feb 12, 2024
a8ca709
Update ClusterCompareAnaProcessor.h
rodwyer100 Feb 12, 2024
aa9916a
Update SvtRawDataAnaProcessor.h
rodwyer100 Feb 12, 2024
4fba76f
Update SvtRawDataAnaProcessor.cxx
rodwyer100 Feb 12, 2024
d1c9152
Update clusterCompareAna.py
rodwyer100 Feb 12, 2024
8b6fde5
Update clusterAna.py
rodwyer100 Feb 12, 2024
79f3bc0
Update SvtRawDataAnaProcessor.cxx
rodwyer100 Feb 13, 2024
8aa2e1b
Update ClusterCompareAnaProcessor.cxx
rodwyer100 Feb 13, 2024
e080a80
Add files via upload
rodwyer100 Feb 13, 2024
152581b
Update clusterAna.py
rodwyer100 Feb 13, 2024
7dcd3bd
Update clusterCompareAna.py
rodwyer100 Feb 13, 2024
9808597
Update ClusterCompareAnaProcessor.cxx
rodwyer100 Feb 13, 2024
af81dc1
Update ClusterCompareAnaProcessor.h
rodwyer100 Feb 13, 2024
e1de849
Update ClusterAnaProcessor.h
rodwyer100 Feb 13, 2024
7510500
Update ClusterAnaProcessor.cxx
rodwyer100 Feb 13, 2024
f22f808
Update and rename ClusterCompareAnaProcessor.h to TrackHitCompareAnaP…
rodwyer100 Feb 13, 2024
6cf9e35
Update TrackHitCompareAnaProcessor.h
rodwyer100 Feb 13, 2024
60b6f2f
Update TrackHitCompareAnaProcessor.h
rodwyer100 Feb 13, 2024
196ac7a
Update and rename ClusterCompareAnaProcessor.cxx to TrackHitCompareAn…
rodwyer100 Feb 13, 2024
430020f
Update and rename ClusterAnaProcessor.h to SVTClusterAnaProcessor.h
rodwyer100 Feb 13, 2024
880994a
Update and rename ClusterAnaProcessor.cxx to SVTClusterAnaProcessor.cxx
rodwyer100 Feb 13, 2024
e7dc888
Update and rename clusterCompareAna.py to trackHitCompareAna.py
rodwyer100 Feb 13, 2024
145d7e3
Update and rename clusterAna.py to trackHitClusterAna.py
rodwyer100 Feb 13, 2024
a054ff4
formatting
sarahgaiser Feb 12, 2024
70c4510
small change
sarahgaiser Feb 13, 2024
ceecdea
Add files via upload
rodwyer100 Feb 13, 2024
79b7bfe
Add files via upload
rodwyer100 Feb 13, 2024
020ffb1
Add files via upload
rodwyer100 Feb 13, 2024
836ec6a
Add files via upload
rodwyer100 Feb 13, 2024
f687df7
last formatting touches
sarahgaiser Feb 13, 2024
b255f95
Delete .vscode/settings.json
sarahgaiser Feb 13, 2024
792ff00
Update trackHitCompareAna.py
rodwyer100 Feb 13, 2024
695f1a8
Add files via upload
rodwyer100 Feb 13, 2024
7f30ee7
Add files via upload
rodwyer100 Feb 13, 2024
2d93527
Delete processors/dat/badchannels2021.dat
rodwyer100 Feb 13, 2024
0b93b36
Update trackHitCompareAna.py
rodwyer100 Feb 13, 2024
4ad1faa
Update trackHitClusterAna.py
rodwyer100 Feb 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions processors/config/roryClusterAna.py
Comment thread
rodwyer100 marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import HpstrConf
import sys
import baseConfig as base
from baseConfig import bfield

base.parser.add_argument("-L", "--layer", type=int, dest="layer",
help="Layer Under Investigation", metavar="layer",default=-1)
base.parser.add_argument("-M", "--module", type=int, dest="module",
help="Module Under Investigation", metavar="module",default=-1)
base.parser.add_argument("-MC", "--MC", type=int, dest="isMC",
help="IS IT MC", metavar="module",default=0)
base.parser.add_argument("-doT", "--doT", type=int, dest="doTrack",
help="DO WE DO TRACK STUFF", metavar="doTrack",default=0)
Comment thread
rodwyer100 marked this conversation as resolved.
Outdated
base.parser.add_argument("-cut", "--cut", type=float, dest="cut",
help="Momentum Cut for NShared Profile", metavar="cut",default=-1.0)


options = base.parser.parse_args()

# Use the input file to set the output file name
root_file = options.inFilename
ana_file = options.outFilename

#print('LCIO file: %s' % root_file)
#print('Root file: %s' % ana_file)

p = HpstrConf.Process()

#p.max_events = 1000
p.run_mode = 1
p.skip_events = options.skip_events
p.max_events = options.nevents

# Library containing processors
p.add_library("libprocessors")

###############################
# Processors #
###############################
rclu = HpstrConf.Processor('rclu','RoryClusterAnaProcessor')
rclu.parameters["debug"] = 0
rclu.parameters["layer"] = options.layer
rclu.parameters["module"] = options.module
rclu.parameters["isMC"] = options.isMC
rclu.parameters["doTrack"] = options.doTrack
rclu.parameters["cut"] = options.cut

sequence = [rclu]

p.sequence = sequence

print("THE INPUT FILE IS "+str(root_file))
p.input_files = root_file
p.output_files = [ana_file]

p.printProcess()
56 changes: 56 additions & 0 deletions processors/config/roryClusterCompareAna.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import HpstrConf
import sys
import baseConfig as base
from baseConfig import bfield

base.parser.add_argument("-L", "--layer", type=int, dest="layer",
help="Layer Under Investigation", metavar="layer",default=-1)
base.parser.add_argument("-M", "--module", type=int, dest="module",
help="Module Under Investigation", metavar="module",default=-1)
base.parser.add_argument("-MC", "--MC", type=int, dest="isMC",
help="IS IT MC", metavar="module",default=0)
base.parser.add_argument("-doT", "--doT", type=int, dest="doTrack",
Comment thread
rodwyer100 marked this conversation as resolved.
help="DO WE DO TRACK STUFF", metavar="doTrack",default=0)
base.parser.add_argument("-cut", "--cut", type=float, dest="cut",
help="Momentum Cut for NShared Profile", metavar="cut",default=-1.0)


options = base.parser.parse_args()

# Use the input file to set the output file name
root_file = options.inFilename
ana_file = options.outFilename

#print('LCIO file: %s' % root_file)
#print('Root file: %s' % ana_file)

p = HpstrConf.Process()

#p.max_events = 1000
p.run_mode = 1
p.skip_events = options.skip_events
p.max_events = options.nevents

# Library containing processors
p.add_library("libprocessors")

###############################
# Processors #
###############################
rcclu = HpstrConf.Processor('rclu','RoryClusterCompareAnaProcessor')
rcclu.parameters["debug"] = 0
rcclu.parameters["layer"] = options.layer
rcclu.parameters["module"] = options.module
rcclu.parameters["isMC"] = options.isMC
rcclu.parameters["doTrack"] = options.doTrack
rcclu.parameters["cut"] = options.cut

sequence = [rcclu]

p.sequence = sequence

print("THE INPUT FILE IS "+str(root_file))
p.input_files = root_file
p.output_files = [ana_file]

p.printProcess()
157 changes: 157 additions & 0 deletions processors/include/RoryClusterAnaProcessor.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
#ifndef __RORYCLUSTER_ANAPROCESSOR_H__
#define __RORYCLUSTER_ANAPROCESSOR_H__

//HPSTR
#include "HpsEvent.h"
#include "RawSvtHit.h"
#include "TrackerHit.h"
#include "RawSvtHitHistos.h"
#include "AnaHelpers.h"
#include "Event.h"
#include "BaseSelector.h"
#include "RawSvtHitHistos.h"
#include "EventHeader.h"
#include "VTPData.h"
#include "TSData.h"
#include "CalCluster.h"
#include "Track.h"
#include "TrackerHit.h"
#include "Collections.h"
//#include <IMPL/TrackerHitImpl.h>"
//ROOT

#include "Processor.h"
#include "TClonesArray.h"
#include "TBranch.h"
#include "TTree.h"
#include "TFile.h"
#include "TF1.h"
#include "TGraphErrors.h"
#include "TAxis.h"
#include "TROOT.h"
#include "TPad.h"
#include "TCanvas.h"
#include "TLegend.h"
#include "TProfile.h"

class TTree;


class RoryClusterAnaProcessor : public Processor {

public:

RoryClusterAnaProcessor(const std::string& name, Process& process);

~RoryClusterAnaProcessor();

virtual bool process(IEvent* ievent);

virtual void initialize(TTree* tree);

virtual void Plot1();

virtual void Plot2();

virtual void Plot3();

virtual void Plot4();

virtual void Plot5();

virtual void Plot6();

virtual void Plot7();

virtual void TrackPlot1();

//virtual void ClusterFit();

virtual void fillDeads();

virtual int GetStrip(int feb, int hyb,int strip);

//virtual void sample(RawSvtHit* thisHit, std::string word, IEvent* ievent, long t,int i);

//virtual int hitEff(IEvent* ievent, int L);

//virtual TF1* fourPoleFitFunction(std::string word, int caser);

//virtual float str_to_float(std::string word);

//float reverseEngineerTime(float ti, long t);

//virtual int maximum(int arr[]);

virtual void finalize();

virtual void configure(const ParameterSet& parameters);

private:

//Containers to hold histogrammer info
//RawSvtHitHistos* histos{nullptr};
ModuleMapper * mmapper_;

TTree* tree_;
TBranch* bClusters_{nullptr};
TBranch* bClustersKF_{nullptr};
TBranch* bsvtraw_{nullptr};
TBranch* btracks_{nullptr};

int layer_{-1};
int module_{-1};

TH1F* layers_;
TH1F* layersOnTrk_;
TH1F* layersOffTrk_;
TH1F* charges_;
TH1F* chargesOnTrk_;
TH1F* chargesOffTrk_;

TH1F* layersNTD_;
TH1F* layersOnTrkNTD_;
TH1F* layersOffTrkNTD_;
TH1F* chargesNTD_;
TH1F* chargesOnTrkNTD_;
TH1F* chargesOffTrkNTD_;

TH1F* positions_;
TH1F* positionsOnTrk_;
TH1F* ClusDistances_;
TH1F* ClusDistancesNTD_;

TH1F* times_;
TH1F* timesOnTrk_;
TH1F* timesOffTrk_;
TH1F* timesNTD_;
TH1F* timesOnTrkNTD_;
TH1F* timesOffTrkNTD_;

//TRACKING RELATED VARIABLES

TH2F* Z0VNShare2Hist_;
TH2F* Z0VNShare2HistCut_;
TH1F* SharedAmplitudes_;
TH1F* UnSharedAmplitudes_;
TH1F* SharedTimes_;
TH1F* UnSharedTimes_;

float pcut_{-1.0};

bool doingTracks_{false};

float Deads_[24576];

std::vector<TrackerHit*> * Clusters_{};
std::vector<TrackerHit*> * ClustersKF_{};
std::vector<RawSvtHit*> * svtraw_{};
std::vector<Track*> * tracks_{};


//std::string anaName_{"roryClusterAna"};
int debug_{0};
int isMC_{0};
};

#endif
Loading