Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
873 changes: 873 additions & 0 deletions analysis/data/badchannels2021.dat

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions analysis/include/RawSvtHitHistos.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@ class RawSvtHitHistos : public HistoManager{
~RawSvtHitHistos();

void DefineHistos();
void FillHistograms(RawSvtHit* rawSvtHit,float weight = 1.,int Ireg=0,unsigned int nhit = 0,Float_t TimeDiff = -42069.0,Float_t AmpDiff = -42069.0);
void saveHistosSVT(TFile* outF,std::string folder);
void FillHistograms(RawSvtHit* rawSvtHit, float weight = 1., int Ireg = 0, unsigned int nhit = 0, Float_t TimeDiff = -42069.0, Float_t AmpDiff = -42069.0, int strip = -10000, int hitc = 0, int hitl = 0, float otherTime = 69420.0);
void saveHistosSVT(TFile* outF, std::string folder);

private:

int Event_number=0;
int Event_number = 0;

int debug_ = 1;
int adcs_[6];
Expand Down
168 changes: 80 additions & 88 deletions analysis/src/RawSvtHitHistos.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -12,153 +12,145 @@ RawSvtHitHistos::~RawSvtHitHistos() {
}

void RawSvtHitHistos::DefineHistos(){
//Define vector of hybrid names using ModuleMapper
//Use this list to define multiple copies of histograms, one for each hybrid, from json file
// Define vector of hybrid names using ModuleMapper
// Use this list to define multiple copies of histograms, one for each hybrid, from json file
std::vector<std::string> hybridNames;
mmapper_->getStrings(hybridNames);
std::string makeMultiplesTag = "SvtHybrids";
//std::cout<<"hello1"<<std::endl;
HistoManager::DefineHistos(hybridNames, makeMultiplesTag );
//std::cout<<"hello2"<<std::endl;
}

void RawSvtHitHistos::FillHistograms(RawSvtHit* rawSvtHit,float weight,int i,unsigned int i2,Float_t TimeDiff,Float_t AmpDiff) {
std::vector<std::string> hybridStrings={};
void RawSvtHitHistos::FillHistograms(RawSvtHit* rawSvtHit, float weight, int i, unsigned int i2, Float_t TimeDiff, Float_t AmpDiff, int strip, int hitc, int hitl, float otherTime) {
std::vector<std::string> hybridStrings = {};
std::string histokey;
//std::cout<<Event_number<<std::endl;
//if(Event_number>=10000){return;}
//if(Event_number==11) std::cout<<nhits<<i<<std::endl;
if(Event_number%10000 == 0){std::cout << "Event: " << Event_number << std::endl;Event_number++;}
if (Event_number%10000 == 0){
std::cout << "Event: " << Event_number << std::endl;
Event_number++;
}
// << " Number of RawSvtHits: " << nhits <<"\t"<<i<< std::endl;
if(i2==0){
Event_number++;}
if (i2==0){ Event_number++; }
auto mod = std::to_string(rawSvtHit->getModule());
auto lay = std::to_string(rawSvtHit->getLayer());
swTag= mmapper_->getStringFromSw("ly"+lay+"_m"+mod);
std::string helper = mmapper_->getHwFromSw("ly"+lay+"_m"+mod);
swTag = mmapper_->getStringFromSw("ly" + lay + "_m" + mod);
std::string helper = mmapper_->getHwFromSw("ly" + lay + "_m" + mod);
char char_array[helper.length()+1];
std::strcpy(char_array,helper.c_str());
std::strcpy(char_array, helper.c_str());
int feb = (int)char_array[1]-48;
int hyb = (int)char_array[3]-48;

histokey = swTag + "_SvtHybrids_getFitN_h";
//std::cout<<"hello3"<<std::endl;
Fill1DHisto(histokey, rawSvtHit->getFitN(),weight);

Fill1DHisto(histokey, rawSvtHit->getFitN(), weight);
histokey = swTag +"_SvtHybrids_T0_h";
//std::cout<<histokey<<std::endl;
//std::cout<<rawSvtHit->getT0(i)<<std::endl;
//std::cout<<rawSvtHit->getAmp(i)<<std::endl;
//std::cout<<rawSvtHit->getT0err(i)<<std::endl;
//std::cout<<rawSvtHit->getAmpErr(i)<<std::endl;
//if(i==0){
Fill1DHisto(histokey, rawSvtHit->getT0(i),weight);
//}//else{
// Fill1DHisto(histokey, rawSvtHit->getT0(i)-27.0,weight);
//}
//std::cout<<"hello6"<<std::endl;

Fill1DHisto(histokey, rawSvtHit->getT0(i), weight);

histokey = swTag + "_SvtHybrids_Am_h";
Fill1DHisto(histokey, rawSvtHit->getAmp(i),weight);
Fill1DHisto(histokey, rawSvtHit->getAmp(i), weight);
histokey = swTag + "_SvtHybrids_Chi_Sqr_h";
Fill1DHisto(histokey, rawSvtHit->getChiSq(i),weight);
//std::cout<<rawSvtHit->getStrip()<<std::endl;
Fill1DHisto(histokey, rawSvtHit->getChiSq(i), weight);

histokey = swTag + "_SvtHybrids_HitsPerCluster_h";
Fill1DHisto(histokey, hitc, weight);

histokey = swTag + "_SvtHybrids_HitsOnALayer_h";
Fill1DHisto(histokey, hitl, weight);

histokey = swTag + "_SvtHybrids_ADCcount_hh";
int * adcs=rawSvtHit->getADCs();
int * adcs = rawSvtHit->getADCs();
int maxx = 0;
for(unsigned int K=0; K<6; K++){
if(maxx<adcs[K]){maxx=adcs[K];}
for (unsigned int K=0; K<6; K++){
if (maxx<adcs[K]) { maxx = adcs[K]; }
//Fill2DHisto(histokey,24.0*K-(rawSvtHit->getT0(i)),((Float_t)(adcs[K]))/(rawSvtHit->getAmp(i)),weight);
}

for(unsigned int K=1; K<6; K++){
if(feb<=1){
Fill2DHisto(histokey,24.0*K-(rawSvtHit->getT0(i)),((Float_t)(adcs[K])-Float_t(baseErr1_[feb][hyb][(int)(rawSvtHit->getStrip())][K]))/(rawSvtHit->getAmp(i)),weight);
}else{
Fill2DHisto(histokey,24.0*K-(rawSvtHit->getT0(i)),((Float_t)(adcs[K])-Float_t(baseErr2_[feb-2][hyb][(int)(rawSvtHit->getStrip())][K]))/(rawSvtHit->getAmp(i)),weight);
for (unsigned int K=1; K<6; K++){
if (feb <= 1){
Fill2DHisto(histokey, 24.0*K-(rawSvtHit->getT0(i)), ((Float_t)(adcs[K])-Float_t(baseErr1_[feb][hyb][(int)(rawSvtHit->getStrip())][K]))/(rawSvtHit->getAmp(i)), weight);
} else {
Fill2DHisto(histokey, 24.0*K-(rawSvtHit->getT0(i)), ((Float_t)(adcs[K])-Float_t(baseErr2_[feb-2][hyb][(int)(rawSvtHit->getStrip())][K]))/(rawSvtHit->getAmp(i)), weight);
}
//((Float_t)maxx),weight);
}

//NOW THE CODE FOR THE TGRAPH SHITE
//




// The following code is for the TGraph
histokey = swTag + "_SvtHybrids_ADCcountdeshift_hh";
for(unsigned int K=1; K<6; K++){
if(feb<=1){
if(std::abs(rawSvtHit->getT0(i)+60)<25){
Fill2DHisto(histokey,K,((Float_t)(adcs[K])-Float_t(baseErr1_[feb][hyb][(int)(rawSvtHit->getStrip())][K])));//(rawSvtHit->getAmp(i)),weight);
}else{
Fill2DHisto(histokey,K,((Float_t)(adcs[K])-Float_t(baseErr1_[feb][hyb][(int)(rawSvtHit->getStrip())][K])));//(rawSvtHit->getAmp(i)),weight);
for (unsigned int K=1; K<6; K++){
if (feb <= 1){
if (std::abs(rawSvtHit->getT0(i)+60) < 25){
Fill2DHisto(histokey, K, ((Float_t)(adcs[K])-Float_t(baseErr1_[feb][hyb][(int)(rawSvtHit->getStrip())][K]))); //(rawSvtHit->getAmp(i)),weight);
} else {
Fill2DHisto(histokey, K, ((Float_t)(adcs[K])-Float_t(baseErr1_[feb][hyb][(int)(rawSvtHit->getStrip())][K]))); //(rawSvtHit->getAmp(i)),weight);
}
}else{
if(std::abs(rawSvtHit->getT0(i)+60)<25){
Fill2DHisto(histokey,K,((Float_t)(adcs[K])-Float_t(baseErr2_[feb-2][hyb][(int)(rawSvtHit->getStrip())][K])));//(rawSvtHit->getAmp(i)),weight);
}else{
Fill2DHisto(histokey,K,((Float_t)(adcs[K])-Float_t(baseErr2_[feb-2][hyb][(int)(rawSvtHit->getStrip())][K])));//(rawSvtHit->getAmp(i)),weight);
} else {
if (std::abs(rawSvtHit->getT0(i)+60) < 25){
Fill2DHisto(histokey, K, ((Float_t)(adcs[K])-Float_t(baseErr2_[feb-2][hyb][(int)(rawSvtHit->getStrip())][K]))); //(rawSvtHit->getAmp(i)),weight);
} else {
Fill2DHisto(histokey, K, ((Float_t)(adcs[K])-Float_t(baseErr2_[feb-2][hyb][(int)(rawSvtHit->getStrip())][K]))); //(rawSvtHit->getAmp(i)),weight);
}
}
//((Float_t)maxx),weight);
}
//adcs_=rawSvtHit->getADCs(i);
//Fill1DHisto(histokey, -(rawSvthit->getT0(i)),weight);

histokey = swTag + "_SvtHybrids_T0Strip_hh";
Fill2DHisto(histokey, rawSvtHit->getT0(i), rawSvtHit->getStrip()-strip, weight);

histokey = swTag + "_SvtHybrids_2HitCluDiff_hh";
Fill2DHisto(histokey, rawSvtHit->getT0(i), otherTime, weight);

histokey = swTag + "_SvtHybrids_AmChi_Sqr_hh";
Fill2DHisto(histokey, rawSvtHit->getChiSq(i), rawSvtHit->getAmp(i), weight);

//std::cout<<"hello7"<<std::endl;
histokey = swTag + "_SvtHybrids_T0Chi_Sqr_hh";
Fill2DHisto(histokey, rawSvtHit->getChiSq(i), rawSvtHit->getT0(i), weight);

histokey = swTag + "_SvtHybrids_T0Err_hh";
Fill2DHisto(histokey, rawSvtHit->getT0(i), rawSvtHit->getT0err(i),weight);
Fill2DHisto(histokey, rawSvtHit->getT0(i), rawSvtHit->getT0err(i), weight);

histokey = swTag + "_SvtHybrids_AmErr_hh";
//std::cout<<"hello8"<<std::endl;
Fill2DHisto(histokey, rawSvtHit->getAmp(i), rawSvtHit->getAmpErr(i),weight);
Fill2DHisto(histokey, rawSvtHit->getAmp(i), rawSvtHit->getAmpErr(i), weight);

histokey = swTag + "_SvtHybrids_AmT0_hh";
//std::cout<<"hello9"<<std::endl;
Fill2DHisto(histokey, rawSvtHit->getT0(i), rawSvtHit->getAmp(i),weight);
Fill2DHisto(histokey, rawSvtHit->getT0(i), rawSvtHit->getAmp(i), weight);

histokey = swTag + "_SvtHybrids_AmErrT0Err_hh";
//std::cout<<"hello10"<<std::endl;
Fill2DHisto(histokey, rawSvtHit->getT0err(i), rawSvtHit->getAmpErr(i),weight);
Fill2DHisto(histokey, rawSvtHit->getT0err(i), rawSvtHit->getAmpErr(i), weight);

histokey = swTag + "_SvtHybrids_AmT0Err_hh";
//std::cout<<"hello10"<<std::endl;
Fill2DHisto(histokey, rawSvtHit->getT0err(i), rawSvtHit->getAmp(i),weight);
Fill2DHisto(histokey, rawSvtHit->getT0err(i), rawSvtHit->getAmp(i), weight);

histokey = swTag + "_SvtHybrids_AmErrT0_hh";
//std::cout<<"hello10"<<std::endl;
Fill2DHisto(histokey, rawSvtHit->getT0(i), rawSvtHit->getAmpErr(i),weight);
Fill2DHisto(histokey, rawSvtHit->getT0(i), rawSvtHit->getAmpErr(i), weight);

if(i==1){
if (i==1) {
histokey = swTag + "_SvtHybrids_PT1PT2_hh";
Fill2DHisto(histokey, rawSvtHit->getT0(1),rawSvtHit->getT0(0));
}else{
Fill2DHisto(histokey, rawSvtHit->getT0(1), rawSvtHit->getT0(0));
} else {
histokey = swTag + "_SvtHybrids_PT1PT2_hh";
Fill2DHisto(histokey, rawSvtHit->getT0(0),rawSvtHit->getT0(1));
Fill2DHisto(histokey, rawSvtHit->getT0(0), rawSvtHit->getT0(1));
}

if(TimeDiff==-42069){return;}
else{
if (TimeDiff==-42069) { return; }
else {
histokey = swTag + "_SvtHybrids_TD_h";
Fill1DHisto(histokey, TimeDiff,weight);
Fill1DHisto(histokey, TimeDiff, weight);
histokey = swTag + "_SvtHybrids_T0TD_hh";
Fill2DHisto(histokey, rawSvtHit->getT0(i),TimeDiff,weight);
Fill2DHisto(histokey, rawSvtHit->getT0(i), TimeDiff, weight);
histokey = swTag + "_SvtHybrids_AmErrTD_hh";
Fill2DHisto(histokey, rawSvtHit->getAmpErr(i),TimeDiff,weight);
Fill2DHisto(histokey, rawSvtHit->getAmpErr(i), TimeDiff, weight);
histokey = swTag + "_SvtHybrids_AmpTD_hh";
Fill2DHisto(histokey, rawSvtHit->getAmp(i),TimeDiff,weight);
Fill2DHisto(histokey, rawSvtHit->getAmp(i), TimeDiff, weight);
histokey = swTag + "_SvtHybrids_Amp12_hh";
Fill2DHisto(histokey, rawSvtHit->getAmp(0),rawSvtHit->getAmp(1),weight);
Fill2DHisto(histokey, rawSvtHit->getAmp(0), rawSvtHit->getAmp(1), weight);
histokey = swTag + "_SvtHybrids_ADTD_hh";
Fill2DHisto(histokey, AmpDiff,TimeDiff,weight);
Fill2DHisto(histokey, AmpDiff, TimeDiff, weight);
}
//}
//std::cout<<"hello11"<<std::endl;
//}catch(std::exception& e){
//std::cout<<e.what()<<std::endl;
//continue;
//}
// }
//std::string regname = AnaHelpers::getFileName(regionSelections_[i_reg],false);
//reg_selectors_[regname] = std::make_shared<BaseSelector>(regname, regionSelections_[i_reg]);
// }
//}

return;
}

Expand Down
57 changes: 57 additions & 0 deletions processors/config/trackHitClusterAna.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
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 the file used generated from Monte Carlo", metavar="module", default=0)
base.parser.add_argument("-doT", "--doT", type=int, dest="doTrack",
help="We plot the tracking based cluster performance metrics", 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 #
###############################
clua = HpstrConf.Processor('clua', 'SVTClusterAnaProcessor')
clua.parameters["debug"] = 0
clua.parameters["layer"] = options.layer
clua.parameters["module"] = options.module
clua.parameters["isMC"] = options.isMC
clua.parameters["doTrack"] = options.doTrack
clua.parameters["cut"] = options.cut
clua.parameters["badchannels"] = os.environ['HPSTR_BASE']+"/analysis/data/badchannels2021.dat"

sequence = [clua]

p.sequence = sequence

print("processors::clusterAna: The input file is: " + str(root_file))
p.input_files = root_file
p.output_files = [ana_file]

p.printProcess()
57 changes: 57 additions & 0 deletions processors/config/trackHitCompareAna.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
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 the file used generated from Monte Carlo", metavar="module", default=0)
base.parser.add_argument("-doT", "--doT", type=int, dest="doTrack",
help="we plot tracking related cluster performance metrics", 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 #
###############################
cclua = HpstrConf.Processor('cclua', 'TrackHitCompareAnaProcessor')
cclua.parameters["debug"] = 0
cclua.parameters["layer"] = options.layer
cclua.parameters["module"] = options.module
cclua.parameters["isMC"] = options.isMC
cclua.parameters["doTrack"] = options.doTrack
cclua.parameters["cut"] = options.cut
cclua.parameters["badchannels"] = os.environ['HPSTR_BASE']+"/analysis/data/badchannels2021.dat"

sequence = [cclua]

p.sequence = sequence

print("processors::clusterAna: The input file is: " + str(root_file))
p.input_files = root_file
p.output_files = [ana_file]

p.printProcess()
Loading