small insignificant chnages. The code tested with run 246-248. can produce 31Na decay
This commit is contained in:
parent
b2fcbf957d
commit
184b24b7c2
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
|
@ -5,6 +5,7 @@
|
|||
"peachCake.C": "cpp",
|
||||
"PIDCutCreator.C": "cpp",
|
||||
"plotPID.C": "cpp",
|
||||
"PIDCutChecker.C": "cpp"
|
||||
"PIDCutChecker.C": "cpp",
|
||||
"AutoFit.C": "cpp"
|
||||
}
|
||||
}
|
|
@ -168,7 +168,7 @@ Bool_t DecayFinder::Process(Long64_t entry){
|
|||
|
||||
if( debug && entry % 10 == 0 ) printf("------------- %llu\n", entry);
|
||||
|
||||
if( (flag == 3) && (vetoFlag & 2) == 0 ) hPID->Fill(AoQ, Z);
|
||||
if( (flag == 3) && (vetoFlag & 2) == 0 ) hPID->Fill(AoQ, Z); // with Beam + Ions, and has veto_rear
|
||||
|
||||
int cutID = -1;
|
||||
for(int i = 0; i < numCut; i++){
|
||||
|
@ -177,12 +177,12 @@ Bool_t DecayFinder::Process(Long64_t entry){
|
|||
}
|
||||
if( cutID == -1 ) return kTRUE;
|
||||
|
||||
if( flag >= 4 ) return kTRUE;
|
||||
if( flag >= 4 ) return kTRUE; /// has beta event
|
||||
///if( flag != 3 ) return kTRUE; ///
|
||||
|
||||
//if( (flag & 1) == 0 ) return kTRUE; /// no beam
|
||||
//if( (flag & 2) == 0 ) return kTRUE; /// no Ions
|
||||
//if( (flag & 4) == 4 ) return kTRUE; /// has beta
|
||||
//if( (flag & 4) == 4 ) return kTRUE; /// has only beta
|
||||
|
||||
//if( veto_f > 0 ) return kTRUE;
|
||||
//if( veto_r > 0 ) return kTRUE;
|
||||
|
@ -200,6 +200,7 @@ Bool_t DecayFinder::Process(Long64_t entry){
|
|||
|
||||
if( debug ) printf("===========%8lld, %13llu, %f, %f\n", ImplantEntry, ImplantTime, ImplantX, ImplantY);
|
||||
|
||||
//searching from past 10k events to all.
|
||||
for( ULong64_t k = ImplantEntry - 10000; k < totNumEntry ; k++){
|
||||
b_flag->GetEntry(k);
|
||||
b_vetoFlag->GetEntry(k);
|
||||
|
@ -211,21 +212,22 @@ Bool_t DecayFinder::Process(Long64_t entry){
|
|||
b_xBeta->GetEntry(k);
|
||||
b_yBeta->GetEntry(k);
|
||||
|
||||
if ( k == ImplantEntry ) continue;
|
||||
if ( k == ImplantEntry ) continue; // skip itself
|
||||
|
||||
//if( crossTime > 0 ) continue;
|
||||
//if( crossEnergy > 0 ) continue;
|
||||
if( (flag & 2) == 2 ) continue; /// has Ions
|
||||
//if( flag != 4 ) continue; /// no Beta
|
||||
if( (flag & 4) == 0 ) continue; /// no Beta
|
||||
if( !TMath::IsNaN(veto_f) ) continue;
|
||||
if( !TMath::IsNaN(veto_r) ) continue;
|
||||
if( (flag & 2) == 2 ) continue; /// has only Ions
|
||||
//if( flag != 4 ) continue; /// no only Beta
|
||||
if( (flag & 4) == 0 ) continue; /// no any Beta
|
||||
if( !TMath::IsNaN(veto_f) ) continue; /// no veto_front
|
||||
if( !TMath::IsNaN(veto_r) ) continue; /// no veto_rear
|
||||
//if( dyBetaTime[0] == 0) continue;
|
||||
if( dist(ImplantX, xBeta, ImplantY, yBeta) > distThreshold ) continue;
|
||||
if( dist(ImplantX, xBeta, ImplantY, yBeta) > distThreshold ) continue; /// when dist between ions and beta > distThread
|
||||
|
||||
if( k < ImplantEntry && ( ImplantTime - dyBetaTime[0] ) * tick2ms > backwardTime) continue;
|
||||
if( k > ImplantEntry && ( dyBetaTime[0] - ImplantTime ) * tick2ms > forwardTime ) break;
|
||||
if( k < ImplantEntry && ( ImplantTime - dyBetaTime[0] ) * tick2ms > backwardTime) continue; /// when past event, more than backwardTime
|
||||
if( k > ImplantEntry && ( dyBetaTime[0] - ImplantTime ) * tick2ms > forwardTime ) break; /// when future event, more then forwardTime
|
||||
|
||||
//===== print status
|
||||
clock.Stop("timer");
|
||||
Double_t time = clock.GetRealTime("timer");
|
||||
clock.Start("timer");
|
||||
|
|
|
@ -294,7 +294,7 @@ std::vector<std::vector<double>> LoadCorrectionParameters(TString corrFile, bool
|
|||
if( show ){
|
||||
printf("===== correction parameters \n");
|
||||
for( int i = 0; i < (int) corr.size(); i++){
|
||||
printf("det : %2d | ", i );
|
||||
printf("row : %2d | ", i );
|
||||
int len = (int) corr[i].size();
|
||||
for( int j = 0; j < len - 1 ; j++){
|
||||
printf("%14.6f, ", corr[i][j]);
|
||||
|
|
|
@ -282,6 +282,7 @@ Bool_t peachCake::Process(Long64_t entry){
|
|||
if( int(pidCorr[k][0]) != runID/100 ) continue;
|
||||
TOF = pidCorr[k][1] + pidCorr[k][2] * TOF;
|
||||
dE = pidCorr[k][3] + pidCorr[k][4] * dE + pidCorr[k][5] * dE * dE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -91,7 +91,7 @@ public :
|
|||
TFile * saveFile;
|
||||
TTree * newTree;
|
||||
TString saveFileName;
|
||||
int totnumEntry; //of the original file
|
||||
unsigned long int totnumEntry; //of the original file
|
||||
|
||||
//tree
|
||||
Int_t eventID;
|
||||
|
@ -141,7 +141,7 @@ void peachCake::Init(TTree *tree){
|
|||
if (!tree) return;
|
||||
|
||||
totnumEntry = tree->GetEntries();
|
||||
printf("============= num entry : %d\n", totnumEntry);
|
||||
printf("============= num entry : %lu\n", totnumEntry);
|
||||
|
||||
fChain = (TChain *)tree;
|
||||
fChain->SetMakeClass(1);
|
||||
|
|
32
script.C
32
script.C
|
@ -2,7 +2,7 @@
|
|||
|
||||
///evtReader * evt = new evtReader("run-0238-00.evt", true);
|
||||
|
||||
#inlcude "TString.h"
|
||||
#include "TString.h"
|
||||
|
||||
#include "peachCake.C+" // the + sign is make sure the peachCake is compiled.
|
||||
|
||||
|
@ -20,19 +20,19 @@ void script() {
|
|||
|
||||
// new beam
|
||||
chain->Add("root_data/run-024[6-8]*.root");
|
||||
// chain->Add("root_data/run-0250*.root");
|
||||
// chain->Add("root_data/run-025[1-4].root");
|
||||
// chain->Add("root_data/run-025[6-9].root");
|
||||
// chain->Add("root_data/run-026[1-4]*.root");
|
||||
// chain->Add("root_data/run-0269*.root");
|
||||
// chain->Add("root_data/run-027[0-1]*.root");
|
||||
// chain->Add("root_data/run-028[3-4]*.root");
|
||||
// chain->Add("root_data/run-028[6-8]*.root");
|
||||
// chain->Add("root_data/run-0292*.root");
|
||||
// chain->Add("root_data/run-029[4-6]*.root");
|
||||
// chain->Add("root_data/run-029[8-9]*.root");
|
||||
// chain->Add("root_data/run-031*.root");
|
||||
// chain->Add("root_data/run-032*.root");
|
||||
chain->Add("root_data/run-0250*.root");
|
||||
chain->Add("root_data/run-025[1-4].root");
|
||||
chain->Add("root_data/run-025[6-9].root");
|
||||
chain->Add("root_data/run-026[1-4]*.root");
|
||||
chain->Add("root_data/run-0269*.root");
|
||||
chain->Add("root_data/run-027[0-1]*.root");
|
||||
chain->Add("root_data/run-028[3-4]*.root");
|
||||
chain->Add("root_data/run-028[6-8]*.root");
|
||||
chain->Add("root_data/run-0292*.root");
|
||||
chain->Add("root_data/run-029[4-6]*.root");
|
||||
chain->Add("root_data/run-029[8-9]*.root");
|
||||
chain->Add("root_data/run-031*.root");
|
||||
chain->Add("root_data/run-032*.root");
|
||||
|
||||
|
||||
//chain->Add("root_data/run-0246-00.root");
|
||||
|
@ -58,8 +58,8 @@ void script() {
|
|||
|
||||
peachCake * selector = new peachCake();
|
||||
selector->SaveNewTree(isSaveNewTree);
|
||||
selector->SetPIDCorrectionFile(pidCorrFileName);
|
||||
selector->SetHistRootFileName(histRootFileName);
|
||||
selector->SetPIDCorrectionFile(pidCorrFileName); //
|
||||
selector->SetHistRootFileName(histRootFileName); //save histogram to root file.
|
||||
|
||||
chain->Process(selector, "");
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user