modified: .vscode/settings.json
modified: Analyzer.C modified: Analyzer.h modified: Armory/ClassDet.h modified: Armory/ClassPW.h modified: Armory/Mapper.cpp modified: PCGainMatch.C modified: ProcessRun.sh modified: mapping.h
This commit is contained in:
parent
4cb8a2c48c
commit
a10081ea81
9
.vscode/settings.json
vendored
9
.vscode/settings.json
vendored
|
@ -1,5 +1,7 @@
|
||||||
{
|
{
|
||||||
"files.associations": {
|
"files.associations": {
|
||||||
|
"NiceMatStyle.C": "cpp",
|
||||||
|
"*.rmd": "markdown",
|
||||||
"ryanScript.C": "cpp",
|
"ryanScript.C": "cpp",
|
||||||
"ryanSelector.C": "cpp",
|
"ryanSelector.C": "cpp",
|
||||||
"array": "cpp",
|
"array": "cpp",
|
||||||
|
@ -90,6 +92,9 @@
|
||||||
"processRun.C": "cpp",
|
"processRun.C": "cpp",
|
||||||
"TrackRecon.C": "cpp",
|
"TrackRecon.C": "cpp",
|
||||||
"processRuns.C": "cpp",
|
"processRuns.C": "cpp",
|
||||||
"Analysis.C": "cpp"
|
"Analysis.C": "cpp",
|
||||||
}
|
"Analyzer1.C": "cpp",
|
||||||
|
"PCGainMatch.C": "cpp"
|
||||||
|
},
|
||||||
|
"C_Cpp.clang_format_fallbackStyle": "{BasedonStyle: Google, IndentWidth: 2, ColumnLimit: 0}"
|
||||||
}
|
}
|
572
Analyzer.C
572
Analyzer.C
|
@ -1,36 +1,38 @@
|
||||||
#define Analyzer_cxx
|
#define Analyzer_cxx
|
||||||
|
|
||||||
#include "Analyzer.h"
|
#include "Analyzer.h"
|
||||||
#include <TH2.h>
|
|
||||||
#include <TStyle.h>
|
|
||||||
#include <TCanvas.h>
|
#include <TCanvas.h>
|
||||||
#include <TMath.h>
|
|
||||||
#include <TCutG.h>
|
#include <TCutG.h>
|
||||||
#include <utility>
|
#include <TH2.h>
|
||||||
|
#include <TMath.h>
|
||||||
|
#include <TStyle.h>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
#include "Armory/ClassSX3.h"
|
|
||||||
#include "Armory/ClassPW.h"
|
#include "Armory/ClassPW.h"
|
||||||
|
#include "Armory/ClassSX3.h"
|
||||||
|
|
||||||
#include "TVector3.h"
|
#include "TVector3.h"
|
||||||
|
|
||||||
TH2F * hsx3IndexVE;
|
TH2F *hsx3IndexVE;
|
||||||
TH2F * hqqqIndexVE;
|
TH2F *hqqqIndexVE;
|
||||||
TH2F * hpcIndexVE;
|
TH2F *hpcIndexVE;
|
||||||
|
|
||||||
TH2F * hsx3Coin;
|
TH2F *hsx3Coin;
|
||||||
TH2F * hqqqCoin;
|
TH2F *hqqqCoin;
|
||||||
TH2F * hpcCoin;
|
TH2F *hpcCoin;
|
||||||
|
|
||||||
TH2F * hqqqPolar;
|
|
||||||
TH2F * hsx3VpcIndex;
|
|
||||||
TH2F * hqqqVpcIndex;
|
|
||||||
TH2F * hqqqVpcE;
|
|
||||||
TH2F * hsx3VpcE;
|
|
||||||
TH2F * hanVScatsum;
|
|
||||||
TH2F * hAnodeHits;
|
|
||||||
TH1F * hAnodeMultiplicity;
|
|
||||||
|
|
||||||
|
TH2F *hqqqPolar;
|
||||||
|
TH2F *hsx3VpcIndex;
|
||||||
|
TH2F *hqqqVpcIndex;
|
||||||
|
TH2F *hqqqVpcE;
|
||||||
|
TH2F *hsx3VpcE;
|
||||||
|
TH2F *hanVScatsum;
|
||||||
|
TH2F *hICvsSi;
|
||||||
|
TH2F *hAnodeHits;
|
||||||
|
TH1F *hAnodeHits1d;
|
||||||
|
TH1F *hPCMultiplicity;
|
||||||
|
TH1F *hRFtime;
|
||||||
|
|
||||||
int padID = 0;
|
int padID = 0;
|
||||||
|
|
||||||
|
@ -39,54 +41,68 @@ PW pw_contr;
|
||||||
TVector3 hitPos;
|
TVector3 hitPos;
|
||||||
bool HitNonZero;
|
bool HitNonZero;
|
||||||
|
|
||||||
TH1F * hZProj;
|
TH1F *hZProj;
|
||||||
TCutG *AnCatSum;
|
TCutG *PCCoinc;
|
||||||
bool inCut;
|
|
||||||
|
|
||||||
void Analyzer::Begin(TTree * /*tree*/){
|
TCutG *alpha_cut_up;
|
||||||
|
TCutG *alpha_cut_down;
|
||||||
|
bool inCut;
|
||||||
|
bool inCutUp;
|
||||||
|
bool inCutDown;
|
||||||
|
|
||||||
|
void Analyzer::Begin(TTree * /*tree*/) {
|
||||||
TString option = GetOption();
|
TString option = GetOption();
|
||||||
|
|
||||||
hsx3IndexVE = new TH2F("hsx3IndexVE", "SX3 index vs Energy; sx3 index ; Energy", 24*12, 0, 24*12, 400, 0, 5000); hsx3IndexVE->SetNdivisions( -612, "x");
|
hsx3IndexVE = new TH2F("hsx3IndexVE", "SX3 index vs Energy; sx3 index ; Energy", 24 * 12, 0, 24 * 12, 400, 0, 5000);
|
||||||
hqqqIndexVE = new TH2F("hqqqIndexVE", "QQQ index vs Energy; QQQ index ; Energy", 4*2*16, 0, 4*2*16, 400, 0, 5000); hqqqIndexVE->SetNdivisions( -1204, "x");
|
hsx3IndexVE->SetNdivisions(-612, "x");
|
||||||
hpcIndexVE = new TH2F("hpcIndexVE", "PC index vs Energy; PC index ; Energy", 2*24, 0, 2*24, 400, 0, 4000); hpcIndexVE->SetNdivisions( -1204, "x");
|
hqqqIndexVE = new TH2F("hqqqIndexVE", "QQQ index vs Energy; QQQ index ; Energy", 4 * 2 * 16, 0, 4 * 2 * 16, 400, 0, 5000);
|
||||||
|
hqqqIndexVE->SetNdivisions(-1204, "x");
|
||||||
|
hpcIndexVE = new TH2F("hpcIndexVE", "PC index vs Energy; PC index ; Energy", 2 * 24, 0, 2 * 24, 6400, 0, 20000);
|
||||||
|
hpcIndexVE->SetNdivisions(-1204, "x");
|
||||||
|
|
||||||
|
hsx3Coin = new TH2F("hsx3Coin", "SX3 Coincident", 24 * 12, 0, 24 * 12, 24 * 12, 0, 24 * 12);
|
||||||
|
hqqqCoin = new TH2F("hqqqCoin", "QQQ Coincident", 4 * 2 * 16, 0, 4 * 2 * 16, 4 * 2 * 16, 0, 4 * 2 * 16);
|
||||||
|
hpcCoin = new TH2F("hpcCoin", "PC Coincident", 2 * 24, 0, 2 * 24, 2 * 24, 0, 2 * 24);
|
||||||
|
|
||||||
hsx3Coin = new TH2F("hsx3Coin", "SX3 Coincident", 24*12, 0, 24*12, 24*12, 0, 24*12);
|
hqqqPolar = new TH2F("hqqqPolar", "QQQ Polar ID", 16 * 4, -TMath::Pi(), TMath::Pi(), 16, 10, 50);
|
||||||
hqqqCoin = new TH2F("hqqqCoin", "QQQ Coincident", 4*2*16, 0, 4*2*16, 4*2*16, 0, 4*2*16);
|
|
||||||
hpcCoin = new TH2F("hpcCoin", "PC Coincident", 2*24, 0, 2*24, 2*24, 0, 2*24);
|
|
||||||
|
|
||||||
hqqqPolar = new TH2F("hqqqPolar", "QQQ Polar ID", 16*4, -TMath::Pi(), TMath::Pi(),16, 10, 50);
|
hsx3VpcIndex = new TH2F("hsx3Vpcindex", "sx3 vs pc; sx3 index; pc index", 24 * 12, 0, 24 * 12, 48, 0, 48);
|
||||||
|
hsx3VpcIndex->SetNdivisions(-612, "x");
|
||||||
|
hsx3VpcIndex->SetNdivisions(-12, "y");
|
||||||
|
hqqqVpcIndex = new TH2F("hqqqVpcindex", "qqq vs pc; qqq index; pc index", 4 * 2 * 16, 0, 4 * 2 * 16, 48, 0, 48);
|
||||||
|
hqqqVpcIndex->SetNdivisions(-612, "x");
|
||||||
|
hqqqVpcIndex->SetNdivisions(-12, "y");
|
||||||
|
|
||||||
hsx3VpcIndex = new TH2F("hsx3Vpcindex", "sx3 vs pc; sx3 index; pc index", 24*12, 0, 24*12, 48, 0, 48);
|
hqqqVpcE = new TH2F("hqqqVpcEnergy", "qqq vs pc; qqq energy; pc energy", 400, 0, 5000, 6400, 0, 20000);
|
||||||
hsx3VpcIndex->SetNdivisions( -612, "x");
|
hqqqVpcE->SetNdivisions(-612, "x");
|
||||||
hsx3VpcIndex->SetNdivisions( -12, "y");
|
hqqqVpcE->SetNdivisions(-12, "y");
|
||||||
hqqqVpcIndex = new TH2F("hqqqVpcindex", "qqq vs pc; qqq index; pc index", 4*2*16, 0, 4*2*16, 48, 0, 48);
|
|
||||||
hqqqVpcIndex->SetNdivisions( -612, "x");
|
|
||||||
hqqqVpcIndex->SetNdivisions( -12, "y");
|
|
||||||
|
|
||||||
hqqqVpcE = new TH2F("hqqqVpcEnergy", "qqq vs pc; qqq energy; pc energy", 400, 0, 5000, 400, 0, 16000);
|
hsx3VpcE = new TH2F("hsx3VpcEnergy", "sx3 vs pc; sx3 energy; pc energy", 400, 0, 5000, 6400, 0, 20000);
|
||||||
hqqqVpcE->SetNdivisions( -612, "x");
|
hsx3VpcE->SetNdivisions(-612, "x");
|
||||||
hqqqVpcE->SetNdivisions( -12, "y");
|
hsx3VpcE->SetNdivisions(-12, "y");
|
||||||
|
|
||||||
hsx3VpcE = new TH2F("hsx3VpcEnergy", "sx3 vs pc; sx3 energy; pc energy", 3200, 0, 5000, 3200, 0, 8000);
|
|
||||||
hsx3VpcE->SetNdivisions( -612, "x");
|
|
||||||
hsx3VpcE->SetNdivisions( -12, "y");
|
|
||||||
|
|
||||||
hZProj = new TH1F("hZProj", "ZProjection", 600,-600, 600);
|
hZProj = new TH1F("hZProj", "ZProjection", 600, -600, 600);
|
||||||
hAnodeHits = new TH2F("hAnodeHits", "Anode vs Anode Energy, Anode ID; Anode E", 24,0 , 23, 400, 0 , 20000);
|
hAnodeHits1d = new TH1F("hAnodeHits1d", "Anode Hits", 24, 0, 24);
|
||||||
hAnodeMultiplicity = new TH1F("hAnodeMultiplicity", "Number of Anodes/Event", 40, 0, 40);
|
hAnodeHits = new TH2F("hAnodeHits", "Anode vs Anode Energy, Anode ID; Anode E", 24, 0, 23, 400, 0, 20000);
|
||||||
hanVScatsum = new TH2F("hanVScatsum", "Anode vs Cathode Sum; Anode E; Cathode E", 400,0 , 10000, 400, 0 , 16000);
|
hPCMultiplicity = new TH1F("hPCMultiplicity", "Number of PC/Event", 40, 0, 40);
|
||||||
|
hanVScatsum = new TH2F("hanVScatsum", "Anode vs Cathode Sum; Anode E; Cathode E", 6400, 0, 20000, 6400, 0, 20000);
|
||||||
|
hICvsSi = new TH2F("hICvsSi", "IC vs Si; Si E; IC E", 800, 0, 20000, 400, 0, 8000);
|
||||||
|
hRFtime = new TH1F("hRFtime", "RF time", 1000, 0, 200000);
|
||||||
|
|
||||||
sx3_contr.ConstructGeo();
|
sx3_contr.ConstructGeo();
|
||||||
pw_contr.ConstructGeo();
|
pw_contr.ConstructGeo();
|
||||||
TFile *f1 = new TFile("AnCatSum.root");
|
TFile *f1 = new TFile("PCCoinc.root");
|
||||||
AnCatSum= (TCutG*)f1->Get("AnCatSum");
|
PCCoinc = (TCutG *)f1->Get("PCCoinc");
|
||||||
|
TFile *f2 = new TFile("alpha_cut_up.root");
|
||||||
|
alpha_cut_up = (TCutG *)f2->Get("alpha_cut_up");
|
||||||
|
TFile *f3 = new TFile("alpha_cut_down.root");
|
||||||
|
alpha_cut_down = (TCutG *)f3->Get("alpha_cut_down");
|
||||||
|
|
||||||
|
// TFile *f1 = new TFile("AnCatSum.root");
|
||||||
|
// AnCatSum= (TCutG*)f1->Get("AnCatSum");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Bool_t Analyzer::Process(Long64_t entry) {
|
||||||
|
|
||||||
|
|
||||||
Bool_t Analyzer::Process(Long64_t entry){
|
|
||||||
|
|
||||||
// if ( entry > 100 ) return kTRUE;
|
// if ( entry > 100 ) return kTRUE;
|
||||||
|
|
||||||
|
@ -111,6 +127,12 @@ Bool_t Analyzer::Process(Long64_t entry){
|
||||||
b_pcCh->GetEntry(entry);
|
b_pcCh->GetEntry(entry);
|
||||||
b_pcE->GetEntry(entry);
|
b_pcE->GetEntry(entry);
|
||||||
b_pcT->GetEntry(entry);
|
b_pcT->GetEntry(entry);
|
||||||
|
b_miscCh->GetEntry(entry);
|
||||||
|
b_miscE->GetEntry(entry);
|
||||||
|
b_miscID->GetEntry(entry);
|
||||||
|
b_miscMulti->GetEntry(entry);
|
||||||
|
b_miscT->GetEntry(entry);
|
||||||
|
b_miscTf->GetEntry(entry);
|
||||||
|
|
||||||
sx3.CalIndex();
|
sx3.CalIndex();
|
||||||
qqq.CalIndex();
|
qqq.CalIndex();
|
||||||
|
@ -118,46 +140,45 @@ Bool_t Analyzer::Process(Long64_t entry){
|
||||||
|
|
||||||
// sx3.Print();
|
// sx3.Print();
|
||||||
|
|
||||||
//########################################################### Raw data
|
// ########################################################### Raw data
|
||||||
// //======================= SX3
|
// //======================= SX3
|
||||||
|
|
||||||
std::vector<std::pair<int, int>> ID; // first = id, 2nd = index
|
std::vector<std::pair<int, int>> ID; // first = id, 2nd = index
|
||||||
for( int i = 0; i < sx3.multi; i ++){
|
for (int i = 0; i < sx3.multi; i++) {
|
||||||
ID.push_back(std::pair<int, int>(sx3.id[i], i));
|
if (sx3.e[i] > 50) {
|
||||||
|
ID.push_back(std::pair<int, int>(sx3.id[i], i));
|
||||||
|
|
||||||
hsx3IndexVE->Fill( sx3.index[i], sx3.e[i] );
|
hsx3IndexVE->Fill(sx3.index[i], sx3.e[i]);
|
||||||
|
|
||||||
for( int j = i+1; j < sx3.multi; j++){
|
for (int j = i + 1; j < sx3.multi; j++) {
|
||||||
hsx3Coin->Fill( sx3.index[i], sx3.index[j]);
|
hsx3Coin->Fill(sx3.index[i], sx3.index[j]);
|
||||||
}
|
}
|
||||||
|
|
||||||
for( int j = 0; j < pc.multi; j++){
|
// for( int j = 0; j < pc.multi; j++){
|
||||||
// hsx3VpcIndex->Fill( sx3.index[i], pc.index[j] );
|
// hsx3VpcIndex->Fill( sx3.index[i], pc.index[j] );
|
||||||
// if( sx3.ch[index] > 8 ){
|
// if( sx3.ch[index] > 8 ){
|
||||||
// hsx3VpcE->Fill( sx3.e[i], pc.e[j] );
|
// hsx3VpcE->Fill( sx3.e[i], pc.e[j] );
|
||||||
// }
|
// }
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ID.size() > 0) {
|
||||||
if( ID.size() > 0 ){
|
std::sort(ID.begin(), ID.end(), [](const std::pair<int, int> &a, const std::pair<int, int> &b) { return a.first < b.first; });
|
||||||
std::sort(ID.begin(), ID.end(), [](const std::pair<int, int> & a, const std::pair<int, int> & b) {
|
|
||||||
return a.first < b.first;
|
|
||||||
} );
|
|
||||||
// printf("##############################\n");
|
// printf("##############################\n");
|
||||||
// for( size_t i = 0; i < ID.size(); i++) printf("%zu | %d %d \n", i, ID[i].first, ID[i].second );
|
// for( size_t i = 0; i < ID.size(); i++) printf("%zu | %d %d \n", i, ID[i].first, ID[i].second );
|
||||||
|
|
||||||
std::vector<std::pair<int, int>> sx3ID;
|
std::vector<std::pair<int, int>> sx3ID;
|
||||||
sx3ID.push_back(ID[0]);
|
sx3ID.push_back(ID[0]);
|
||||||
bool found = false;
|
bool found = false;
|
||||||
for( size_t i = 1; i < ID.size(); i++){
|
for (size_t i = 1; i < ID.size(); i++) {
|
||||||
if( ID[i].first == sx3ID.back().first) {
|
if (ID[i].first == sx3ID.back().first) {
|
||||||
sx3ID.push_back(ID[i]);
|
sx3ID.push_back(ID[i]);
|
||||||
if( sx3ID.size() >= 3) {
|
if (sx3ID.size() >= 3) {
|
||||||
found = true;
|
found = true;
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
if( !found ){
|
if (!found) {
|
||||||
sx3ID.clear();
|
sx3ID.clear();
|
||||||
sx3ID.push_back(ID[i]);
|
sx3ID.push_back(ID[i]);
|
||||||
}
|
}
|
||||||
|
@ -166,33 +187,32 @@ Bool_t Analyzer::Process(Long64_t entry){
|
||||||
|
|
||||||
// printf("---------- sx3ID Multi : %zu \n", sx3ID.size());
|
// printf("---------- sx3ID Multi : %zu \n", sx3ID.size());
|
||||||
|
|
||||||
if( found ){
|
if (found) {
|
||||||
int sx3ChUp, sx3ChDn, sx3ChBk;
|
int sx3ChUp, sx3ChDn, sx3ChBk;
|
||||||
float sx3EUp, sx3EDn;
|
float sx3EUp, sx3EDn;
|
||||||
// printf("------ sx3 ID : %d, multi: %zu\n", sx3ID[0].first, sx3ID.size());
|
// printf("------ sx3 ID : %d, multi: %zu\n", sx3ID[0].first, sx3ID.size());
|
||||||
for( size_t i = 0; i < sx3ID.size(); i++ ){
|
for (size_t i = 0; i < sx3ID.size(); i++) {
|
||||||
int index = sx3ID[i].second;
|
int index = sx3ID[i].second;
|
||||||
// printf(" %zu | index %d | ch : %d, energy : %d \n", i, index, sx3.ch[index], sx3.e[index]);
|
// printf(" %zu | index %d | ch : %d, energy : %d \n", i, index, sx3.ch[index], sx3.e[index]);
|
||||||
|
|
||||||
|
if (sx3.ch[index] < 8) {
|
||||||
if( sx3.ch[index] < 8 ){
|
if (sx3.ch[index] % 2 == 0) {
|
||||||
if( sx3.ch[index] % 2 == 0) {
|
|
||||||
sx3ChDn = sx3.ch[index];
|
sx3ChDn = sx3.ch[index];
|
||||||
sx3EDn = sx3.e[index];
|
sx3EDn = sx3.e[index];
|
||||||
}else{
|
} else {
|
||||||
sx3ChUp = sx3.ch[index];
|
sx3ChUp = sx3.ch[index];
|
||||||
sx3EUp = sx3.e[index];
|
sx3EUp = sx3.e[index];
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
sx3ChBk = sx3.ch[index];
|
sx3ChBk = sx3.ch[index];
|
||||||
}
|
}
|
||||||
for( int j = 0; j < pc.multi; j++){
|
for (int j = 0; j < pc.multi; j++) {
|
||||||
// hsx3VpcIndex->Fill( sx3.index[i], pc.index[j] );
|
// hsx3VpcIndex->Fill( sx3.index[i], pc.index[j] );
|
||||||
if( sx3.ch[index] > 8 ){
|
if (sx3.ch[index] > 8) {
|
||||||
hsx3VpcE->Fill( sx3.e[i], pc.e[j] );
|
hsx3VpcE->Fill(sx3.e[i], pc.e[j]);
|
||||||
// hpcIndexVE->Fill( pc.index[i], pc.e[i] );
|
// hpcIndexVE->Fill( pc.index[i], pc.e[i] );
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sx3_contr.CalSX3Pos(sx3ID[0].first, sx3ChUp, sx3ChDn, sx3ChBk, sx3EUp, sx3EDn);
|
sx3_contr.CalSX3Pos(sx3ID[0].first, sx3ChUp, sx3ChDn, sx3ChBk, sx3EUp, sx3EDn);
|
||||||
|
@ -200,76 +220,73 @@ Bool_t Analyzer::Process(Long64_t entry){
|
||||||
HitNonZero = true;
|
HitNonZero = true;
|
||||||
// hitPos.Print();
|
// hitPos.Print();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// //======================= QQQ
|
// //======================= QQQ
|
||||||
for( int i = 0; i < qqq.multi; i ++){
|
for (int i = 0; i < qqq.multi; i++) {
|
||||||
// for( int j = 0; j < pc.multi; j++){
|
if (qqq.e[i] > 50) {
|
||||||
// if(pc.index[j]==4){
|
|
||||||
hqqqIndexVE->Fill( qqq.index[i], qqq.e[i] );
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
for( int j = 0; j < qqq.multi; j++){
|
|
||||||
if ( j == i ) continue;
|
|
||||||
hqqqCoin->Fill( qqq.index[i], qqq.index[j]);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// for( int j = 0; j < pc.multi; j++){
|
||||||
for( int j = i + 1; j < qqq.multi; j++){
|
// if(pc.index[j]==4){
|
||||||
for( int k = 0; k < pc.multi; k++){
|
hqqqIndexVE->Fill(qqq.index[i], qqq.e[i]);
|
||||||
if(pc.index[k]<24 && pc.e[k]>50 ){
|
|
||||||
hqqqVpcE->Fill( qqq.e[i], pc.e[k] );
|
|
||||||
// hpcIndexVE->Fill( pc.index[i], pc.e[i] );
|
|
||||||
hqqqVpcIndex->Fill( qqq.index[i], pc.index[j] );
|
|
||||||
|
|
||||||
}
|
|
||||||
// }
|
// }
|
||||||
|
// }
|
||||||
|
for (int j = 0; j < qqq.multi; j++) {
|
||||||
|
if (j == i)
|
||||||
|
continue;
|
||||||
|
hqqqCoin->Fill(qqq.index[i], qqq.index[j]);
|
||||||
}
|
}
|
||||||
// if( qqq.used[i] == true ) continue;
|
|
||||||
|
for (int j = i + 1; j < qqq.multi; j++) {
|
||||||
//if( qqq.id[i] == qqq.id[j] && (16 - qqq.ch[i]) * (16 - qqq.ch[j]) < 0 ){ // must be same detector and wedge and ring
|
for (int k = 0; k < pc.multi; k++) {
|
||||||
if( qqq.id[i] == qqq.id[j] ){ // must be same detector
|
if (pc.index[k] < 24 && pc.e[k] > 50) {
|
||||||
|
hqqqVpcE->Fill(qqq.e[i], pc.e[k]);
|
||||||
int chWedge = -1;
|
// hpcIndexVE->Fill( pc.index[i], pc.e[i] );
|
||||||
int chRing = -1;
|
hqqqVpcIndex->Fill(qqq.index[i], pc.index[j]);
|
||||||
if( qqq.ch[i] < qqq.ch[j]){
|
}
|
||||||
chRing = qqq.ch[j] - 16;
|
// }
|
||||||
chWedge = qqq.ch[i];
|
|
||||||
}else{
|
|
||||||
chRing = qqq.ch[i];
|
|
||||||
chWedge = qqq.ch[j] - 16;
|
|
||||||
}
|
}
|
||||||
|
// if( qqq.used[i] == true ) continue;
|
||||||
|
|
||||||
// printf(" ID : %d , chWedge : %d, chRing : %d \n", qqq.id[i], chWedge, chRing);
|
// if( qqq.id[i] == qqq.id[j] && (16 - qqq.ch[i]) * (16 - qqq.ch[j]) < 0 ){ // must be same detector and wedge and ring
|
||||||
|
if (qqq.id[i] == qqq.id[j]) { // must be same detector
|
||||||
|
|
||||||
double theta = -TMath::Pi()/2 + 2*TMath::Pi()/16/4.*(qqq.id[i]*16 + chWedge +0.5);
|
int chWedge = -1;
|
||||||
double rho = 10.+40./16.*(chRing+0.5);
|
int chRing = -1;
|
||||||
// if(qqq.e[i]>50){
|
if (qqq.ch[i] < qqq.ch[j]) {
|
||||||
hqqqPolar->Fill( theta, rho);
|
chRing = qqq.ch[j] - 16;
|
||||||
// }
|
chWedge = qqq.ch[i];
|
||||||
// qqq.used[i] = true;
|
} else {
|
||||||
// qqq.used[j] = true;
|
chRing = qqq.ch[i];
|
||||||
|
chWedge = qqq.ch[j] - 16;
|
||||||
|
}
|
||||||
|
|
||||||
if( !HitNonZero ){
|
// printf(" ID : %d , chWedge : %d, chRing : %d \n", qqq.id[i], chWedge, chRing);
|
||||||
double x = rho * TMath::Cos(theta);
|
|
||||||
double y = rho * TMath::Sin(theta);
|
double theta = -TMath::Pi() / 2 + 2 * TMath::Pi() / 16 / 4. * (qqq.id[i] * 16 + chWedge + 0.5);
|
||||||
hitPos.SetXYZ(x, y, 23 + 75 + 30);
|
double rho = 10. + 40. / 16. * (chRing + 0.5);
|
||||||
HitNonZero = true;
|
// if(qqq.e[i]>50){
|
||||||
|
hqqqPolar->Fill(theta, rho);
|
||||||
|
// }
|
||||||
|
// qqq.used[i] = true;
|
||||||
|
// qqq.used[j] = true;
|
||||||
|
|
||||||
|
if (!HitNonZero) {
|
||||||
|
double x = rho * TMath::Cos(theta);
|
||||||
|
double y = rho * TMath::Sin(theta);
|
||||||
|
hitPos.SetXYZ(x, y, 23 + 75 + 30);
|
||||||
|
HitNonZero = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
// //======================= PC
|
// //======================= PC
|
||||||
|
|
||||||
std::vector<std::pair<int, double>> anodeHits;
|
std::vector<std::pair<int, double>> anodeHits;
|
||||||
std::vector<std::pair<int, double>> cathodeHits;
|
std::vector<std::pair<int, double>> cathodeHits;
|
||||||
int aID = 0;
|
int aID = 0;
|
||||||
int cID = 0;
|
int cID = 0;
|
||||||
int anodeCount = 0;
|
|
||||||
float cEMax = 0;
|
float cEMax = 0;
|
||||||
int cIDMax = 0;
|
int cIDMax = 0;
|
||||||
float cEnextMax = 0;
|
float cEnextMax = 0;
|
||||||
|
@ -277,18 +294,18 @@ Bool_t Analyzer::Process(Long64_t entry){
|
||||||
float aE = 0;
|
float aE = 0;
|
||||||
float cE = 0;
|
float cE = 0;
|
||||||
|
|
||||||
// Define the excluded SX3 and QQQ channels
|
// Define the excluded SX3 and QQQ channels
|
||||||
std::unordered_set<int> excludeSX3 = {34, 35, 36, 37, 61, 62, 67, 73, 74, 75, 76, 77, 78, 79, 80, 93, 97, 100, 103, 108, 109, 110, 111, 112};
|
std::unordered_set<int> excludeSX3 = {34, 35, 36, 37, 61, 62, 67, 73, 74, 75, 76, 77, 78, 79, 80, 93, 97, 100, 103, 108, 109, 110, 111, 112};
|
||||||
std::unordered_set<int> excludeQQQ = {0, 17, 109, 110, 111, 112, 113, 119, 127, 128};
|
std::unordered_set<int> excludeQQQ = {0, 17, 109, 110, 111, 112, 113, 119, 127, 128};
|
||||||
inCut=false;
|
|
||||||
for( int i = 0; i < pc.multi; i ++){
|
for (int i = 0; i < pc.multi; i++) {
|
||||||
for(int j=0; j<pc.multi;j++){
|
// for(int j=0; j<pc.multi;j++){
|
||||||
if(pc.id[j]==0){
|
// if(pc.id[j]==0){
|
||||||
anodeCount++;
|
// anodeCount++;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
if(pc.e[i]>50 && anodeCount==1){
|
if (pc.e[i] > 100 & pc.multi < 7) {
|
||||||
// hpcIndexVE->Fill( pc.index[i], pc.e[i] );
|
// hpcIndexVE->Fill( pc.index[i], pc.e[i] );
|
||||||
// for( int j = i+1; j < pc.multi; j++){
|
// for( int j = i+1; j < pc.multi; j++){
|
||||||
// hpcCoin->Fill( pc.index[i], pc.index[j]);
|
// hpcCoin->Fill( pc.index[i], pc.index[j]);
|
||||||
|
@ -297,150 +314,201 @@ Bool_t Analyzer::Process(Long64_t entry){
|
||||||
// for (int j=0;j<sx3.multi;j++){
|
// for (int j=0;j<sx3.multi;j++){
|
||||||
// if(excludeSX3.find(sx3.index[j]) == excludeSX3.end()){
|
// if(excludeSX3.find(sx3.index[j]) == excludeSX3.end()){
|
||||||
|
|
||||||
hpcIndexVE->Fill( pc.index[i], pc.e[i] );
|
// hpcIndexVE->Fill( pc.index[i], pc.e[i] );
|
||||||
for( int j = i+1; j < pc.multi; j++){
|
|
||||||
hpcCoin->Fill( pc.index[i], pc.index[j]);
|
for (int j = i + 1; j < pc.multi; j++) {
|
||||||
|
inCut = false;
|
||||||
|
if (PCCoinc->IsInside(pc.index[i], pc.index[j])) {
|
||||||
|
inCut = true;
|
||||||
}
|
}
|
||||||
// if(pc.e[i]>100){
|
// hpcCoin->Fill( pc.index[i], pc.index[j]);
|
||||||
if (pc.index[i] < 24 ){
|
}
|
||||||
anodeHits.push_back(std::pair<int, double>(pc.index[i], pc.e[i]));
|
// if(pc.e[i]>100){
|
||||||
// anodeCount++;
|
if (pc.index[i] < 24) {
|
||||||
} else if (pc.index[i] >= 24){
|
anodeHits.push_back(std::pair<int, double>(pc.index[i], pc.e[i]));
|
||||||
cathodeHits.push_back(std::pair<int, double>(pc.index[i], pc.e[i]));
|
// anodeCount++;
|
||||||
}
|
} else if (pc.index[i] >= 24) {
|
||||||
// }
|
cathodeHits.push_back(std::pair<int, double>(pc.index[i], pc.e[i]));
|
||||||
|
}
|
||||||
|
// }
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// hpcIndexVE->Fill( pc.index[i], pc.e[i] );
|
// hpcIndexVE->Fill( pc.index[i], pc.e[i] );
|
||||||
hAnodeMultiplicity->Fill(pc.multi);
|
}
|
||||||
|
|
||||||
float aESum = 0;
|
|
||||||
if (anodeHits.size()>=1 && cathodeHits.size() >= 1){
|
|
||||||
for (const auto& anode : anodeHits) {
|
|
||||||
float cESum = 0;
|
|
||||||
// for(int l=0; l<sx3.multi; l++){
|
|
||||||
// if (sx3.index[l]==80){
|
|
||||||
|
|
||||||
int aID = anode.first;
|
|
||||||
float aE = anode.second;
|
|
||||||
aESum += aE;
|
|
||||||
|
|
||||||
for (const auto& cathode : cathodeHits) {
|
|
||||||
int cID = cathode.first;
|
|
||||||
float cE = cathode.second;
|
|
||||||
if(cE>cEMax){
|
|
||||||
cEMax = cE;
|
|
||||||
cIDMax = cID;
|
|
||||||
}
|
|
||||||
if(cE>cEnextMax && cE<cEMax){
|
|
||||||
cEnextMax = cE;
|
|
||||||
cIDnextMax = cID;
|
|
||||||
}
|
|
||||||
|
|
||||||
cESum += cE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if( AnCatSum->IsInside(aE, cESum)){
|
|
||||||
inCut=true;
|
|
||||||
}
|
|
||||||
if(inCut){
|
|
||||||
hanVScatsum->Fill(aE,cESum);
|
|
||||||
hAnodeHits->Fill(aID, aE);
|
|
||||||
for(int j=0;sx3.multi;j++){
|
|
||||||
|
|
||||||
hsx3VpcIndex->Fill( sx3.index[i], pc.index[j] );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// hanVScatsum->Fill(aE,cE);
|
hPCMultiplicity->Fill(pc.multi);
|
||||||
|
|
||||||
|
|
||||||
if( HitNonZero){
|
float aESum = 0;
|
||||||
// pw_contr.CalTrack1( hitPos, aID, cIDMax, cIDnextMax, cEMax, cEnextMax,1);
|
float cESum = 0;
|
||||||
|
if (anodeHits.size() == 1 && cathodeHits.size() >= 1) {
|
||||||
|
|
||||||
pw_contr.CalTrack( hitPos, aID, cID);
|
inCutDown = false;
|
||||||
hZProj->Fill(pw_contr.GetZ0());
|
inCutUp = false;
|
||||||
|
for (const auto &anode : anodeHits) {
|
||||||
|
|
||||||
|
// for(int l=0; l<sx3.multi; l++){
|
||||||
|
// if (sx3.index[l]==80){
|
||||||
|
|
||||||
|
aID = anode.first;
|
||||||
|
aE = anode.second;
|
||||||
|
aESum += aE;
|
||||||
|
// printf("aID : %d, aE : %f, cE : %f\n", aID, aE, cE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (const auto &cathode : cathodeHits) {
|
||||||
|
cID = cathode.first;
|
||||||
|
cE = cathode.second;
|
||||||
|
cESum += cE;
|
||||||
|
|
||||||
|
if (cE > cEMax) {
|
||||||
|
cEMax = cE;
|
||||||
|
cIDMax = cID;
|
||||||
|
}
|
||||||
|
if (cE > cEnextMax && cE < cEMax) {
|
||||||
|
cEnextMax = cE;
|
||||||
|
cIDnextMax = cID;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (alpha_cut_down->IsInside(aE, cESum)) {
|
||||||
|
inCutDown = true;
|
||||||
|
}
|
||||||
|
if (alpha_cut_up->IsInside(aE, cESum)) {
|
||||||
|
inCutUp = true;
|
||||||
|
}
|
||||||
|
|
||||||
//########################################################### Track constrcution
|
// if (inCutUp)
|
||||||
|
// {
|
||||||
|
for (int i = 0; i < pc.multi; i++) {
|
||||||
|
for (int j = i + 1; j < pc.multi; j++) {
|
||||||
|
hpcCoin->Fill(pc.index[i], pc.index[j]);
|
||||||
|
hpcIndexVE->Fill(pc.index[i], pc.e[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// }
|
||||||
|
if (inCut) {
|
||||||
|
hanVScatsum->Fill(aE, cESum);
|
||||||
|
hAnodeHits->Fill(aID, aE);
|
||||||
|
hAnodeHits1d->Fill(anodeHits.size());
|
||||||
|
}
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
// Miscellaneous channels including the Lollipop IC and Si detectors and hot needle IC
|
||||||
|
|
||||||
//############################## DO THE KINEMATICS
|
for (int i = 0; i < misc.multi; i++) {
|
||||||
|
|
||||||
|
for (int j = i + 1; j < misc.multi; j++) {
|
||||||
|
// if (misc.ch[i] == 0 || misc.ch[j] == 1) {
|
||||||
|
hICvsSi->Fill(misc.e[i], misc.e[j]);
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < misc.multi; i++) {
|
||||||
|
for (int j = i + 1; j < misc.multi; j++) {
|
||||||
|
// if (misc.ch[i] == 2 || misc.ch[j] == 4) {
|
||||||
|
hRFtime->Fill(misc.t[j]*1000 + misc.tf[j]*4 - (misc.t[i]*1000 + misc.tf[i]*4));
|
||||||
|
// printf("RF time : %lld %lld %lld %lld %lld\n", misc.t[i], misc.t[j], misc.tf[i], misc.tf[j], (misc.t[j]*1000 + misc.tf[j]*4 - (misc.t[i]*1000 + misc.tf[i]*4)));
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (HitNonZero) {
|
||||||
|
// pw_contr.CalTrack1( hitPos, aID, cIDMax, cIDnextMax, cEMax, cEnextMax,1);
|
||||||
|
|
||||||
|
// pw_contr.CalTrack(hitPos, aID, cID);
|
||||||
|
hZProj->Fill(pw_contr.GetZ0());
|
||||||
|
}
|
||||||
|
|
||||||
|
// ########################################################### Track constrcution
|
||||||
|
|
||||||
|
// ############################## DO THE KINEMATICS
|
||||||
|
|
||||||
return kTRUE;
|
return kTRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Analyzer::Terminate(){
|
void Analyzer::Terminate() {
|
||||||
|
|
||||||
gStyle->SetOptStat("neiou");
|
gStyle->SetOptStat("neiou");
|
||||||
TCanvas * canvas = new TCanvas("cANASEN", "ANASEN", 2000, 2000);
|
TCanvas *a = new TCanvas("cANASEN", "ANASEN", 800, 600);
|
||||||
canvas->Divide(3,3);
|
// canvas->Divide(3, 3);
|
||||||
|
hRFtime->Draw();
|
||||||
|
TCanvas *b = new TCanvas("ANASEN", "ANASEN", 800, 600);
|
||||||
|
hICvsSi->Draw("colz");
|
||||||
|
|
||||||
//hsx3VpcIndex->Draw("colz");
|
// hsx3VpcIndex->Draw("colz");
|
||||||
|
|
||||||
//=============================================== pad-1
|
//=============================================== pad-1
|
||||||
padID ++; canvas->cd(padID); canvas->cd(padID)->SetGrid(1);
|
// padID++;
|
||||||
|
// canvas->cd(padID);
|
||||||
|
// canvas->cd(padID)->SetGrid(1);
|
||||||
|
|
||||||
hsx3IndexVE->Draw("colz");
|
// hsx3IndexVE->Draw("colz");
|
||||||
|
|
||||||
//=============================================== pad-2
|
// //=============================================== pad-2
|
||||||
padID ++; canvas->cd(padID); canvas->cd(padID)->SetGrid(1);
|
// padID++;
|
||||||
|
// canvas->cd(padID);
|
||||||
|
// canvas->cd(padID)->SetGrid(1);
|
||||||
|
|
||||||
hqqqIndexVE->Draw("colz");
|
// hqqqIndexVE->Draw("colz");
|
||||||
|
|
||||||
//=============================================== pad-3
|
// //=============================================== pad-3
|
||||||
padID ++; canvas->cd(padID); canvas->cd(padID)->SetGrid(1);
|
// padID++;
|
||||||
|
// canvas->cd(padID);
|
||||||
|
// canvas->cd(padID)->SetGrid(1);
|
||||||
|
|
||||||
hpcIndexVE->Draw("colz");
|
// hpcIndexVE->Draw("colz");
|
||||||
|
|
||||||
//=============================================== pad-4
|
// //=============================================== pad-4
|
||||||
padID ++; canvas->cd(padID); canvas->cd(padID)->SetGrid(1);
|
// padID++;
|
||||||
|
// canvas->cd(padID);
|
||||||
|
// canvas->cd(padID)->SetGrid(1);
|
||||||
|
|
||||||
hsx3Coin->Draw("colz");
|
// hsx3Coin->Draw("colz");
|
||||||
|
|
||||||
//=============================================== pad-5
|
// //=============================================== pad-5
|
||||||
padID ++; canvas->cd(padID); canvas->cd(padID)->SetGrid(1);
|
// padID++;
|
||||||
|
// canvas->cd(padID);
|
||||||
|
// canvas->cd(padID)->SetGrid(1);
|
||||||
|
|
||||||
canvas->cd(padID)->SetLogz(true);
|
// canvas->cd(padID)->SetLogz(true);
|
||||||
|
|
||||||
hqqqCoin->Draw("colz");
|
// hqqqCoin->Draw("colz");
|
||||||
|
|
||||||
//=============================================== pad-6
|
// //=============================================== pad-6
|
||||||
padID ++; canvas->cd(padID); canvas->cd(padID)->SetGrid(1);
|
// padID++;
|
||||||
|
// canvas->cd(padID);
|
||||||
|
// canvas->cd(padID)->SetGrid(1);
|
||||||
|
|
||||||
hpcCoin->Draw("colz");
|
// hpcCoin->Draw("colz");
|
||||||
|
|
||||||
//=============================================== pad-7
|
// //=============================================== pad-7
|
||||||
padID ++; canvas->cd(padID); canvas->cd(padID)->SetGrid(1);
|
// padID++;
|
||||||
|
// canvas->cd(padID);
|
||||||
|
// canvas->cd(padID)->SetGrid(1);
|
||||||
|
|
||||||
// hsx3VpcIndex ->Draw("colz");
|
// // hsx3VpcIndex ->Draw("colz");
|
||||||
hsx3VpcE->Draw("colz") ;
|
// hsx3VpcE->Draw("colz");
|
||||||
|
|
||||||
//=============================================== pad-8
|
// //=============================================== pad-8
|
||||||
padID ++; canvas->cd(padID); canvas->cd(padID)->SetGrid(1);
|
// padID++;
|
||||||
|
// canvas->cd(padID);
|
||||||
|
// canvas->cd(padID)->SetGrid(1);
|
||||||
|
|
||||||
// hqqqVpcIndex ->Draw("colz");
|
// // hqqqVpcIndex ->Draw("colz");
|
||||||
|
|
||||||
hqqqVpcE ->Draw("colz");
|
// hqqqVpcE->Draw("colz");
|
||||||
//=============================================== pad-9
|
// //=============================================== pad-9
|
||||||
padID ++;
|
// padID++;
|
||||||
|
|
||||||
// canvas->cd(padID)->DrawFrame(-50, -50, 50, 50);
|
// // canvas->cd(padID)->DrawFrame(-50, -50, 50, 50);
|
||||||
// hqqqPolar->Draw("same colz pol");
|
// // hqqqPolar->Draw("same colz pol");
|
||||||
|
|
||||||
canvas->cd(padID); canvas->cd(padID)->SetGrid(1);
|
// canvas->cd(padID);
|
||||||
// hZProj->Draw();
|
// canvas->cd(padID)->SetGrid(1);
|
||||||
hanVScatsum->Draw("colz");
|
// // hZProj->Draw();
|
||||||
|
// hanVScatsum->Draw("colz");
|
||||||
// hAnodeHits->Draw("colz");
|
// hAnodeHits->Draw("colz");
|
||||||
// hAnodeMultiplicity->Draw();
|
// hAnodeMultiplicity->Draw();
|
||||||
}
|
}
|
||||||
|
|
15
Analyzer.h
15
Analyzer.h
|
@ -18,6 +18,7 @@ public :
|
||||||
Det sx3;
|
Det sx3;
|
||||||
Det qqq;
|
Det qqq;
|
||||||
Det pc ;
|
Det pc ;
|
||||||
|
Det misc;
|
||||||
|
|
||||||
ULong64_t evID;
|
ULong64_t evID;
|
||||||
UInt_t run;
|
UInt_t run;
|
||||||
|
@ -40,6 +41,13 @@ public :
|
||||||
TBranch *b_pcCh; //!
|
TBranch *b_pcCh; //!
|
||||||
TBranch *b_pcE; //!
|
TBranch *b_pcE; //!
|
||||||
TBranch *b_pcT; //!
|
TBranch *b_pcT; //!
|
||||||
|
TBranch *b_miscMulti; //!
|
||||||
|
TBranch *b_miscID; //!
|
||||||
|
TBranch *b_miscCh; //!
|
||||||
|
TBranch *b_miscE; //!
|
||||||
|
TBranch *b_miscT; //!
|
||||||
|
TBranch *b_miscTf; //!
|
||||||
|
|
||||||
|
|
||||||
Analyzer(TTree * /*tree*/ =0) : fChain(0) { }
|
Analyzer(TTree * /*tree*/ =0) : fChain(0) { }
|
||||||
virtual ~Analyzer() { }
|
virtual ~Analyzer() { }
|
||||||
|
@ -92,6 +100,13 @@ void Analyzer::Init(TTree *tree){
|
||||||
fChain->SetBranchAddress("pcCh", &pc.ch, &b_pcCh);
|
fChain->SetBranchAddress("pcCh", &pc.ch, &b_pcCh);
|
||||||
fChain->SetBranchAddress("pcE", &pc.e, &b_pcE);
|
fChain->SetBranchAddress("pcE", &pc.e, &b_pcE);
|
||||||
fChain->SetBranchAddress("pcT", &pc.t, &b_pcT);
|
fChain->SetBranchAddress("pcT", &pc.t, &b_pcT);
|
||||||
|
fChain->SetBranchAddress("miscMulti", &misc.multi, &b_miscMulti);
|
||||||
|
fChain->SetBranchAddress("miscID", &misc.id, &b_miscID);
|
||||||
|
fChain->SetBranchAddress("miscCh", &misc.ch, &b_miscCh);
|
||||||
|
fChain->SetBranchAddress("miscE", &misc.e, &b_miscE);
|
||||||
|
fChain->SetBranchAddress("miscT", &misc.t, &b_miscT);
|
||||||
|
fChain->SetBranchAddress("miscF", &misc.tf, &b_miscTf);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ public:
|
||||||
unsigned short ch[MAXMULTI];
|
unsigned short ch[MAXMULTI];
|
||||||
unsigned short e[MAXMULTI];
|
unsigned short e[MAXMULTI];
|
||||||
unsigned long long t[MAXMULTI];
|
unsigned long long t[MAXMULTI];
|
||||||
|
unsigned long long tf[MAXMULTI];
|
||||||
unsigned short sn[MAXMULTI];
|
unsigned short sn[MAXMULTI];
|
||||||
unsigned short digiCh[MAXMULTI];
|
unsigned short digiCh[MAXMULTI];
|
||||||
|
|
||||||
|
@ -28,6 +28,7 @@ public:
|
||||||
ch[i] = 0;
|
ch[i] = 0;
|
||||||
e[i] = 0;
|
e[i] = 0;
|
||||||
t[i] = 0;
|
t[i] = 0;
|
||||||
|
tf[i] = 0;
|
||||||
index[i] = 0;
|
index[i] = 0;
|
||||||
sn[i] = 0;
|
sn[i] = 0;
|
||||||
digiCh[i] = 0;
|
digiCh[i] = 0;
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <TMath.h>
|
#include <TMath.h>
|
||||||
#include <TVector3.h>
|
#include <TVector3.h>
|
||||||
|
#include <TRandom.h>
|
||||||
|
|
||||||
struct PWHitInfo{
|
struct PWHitInfo{
|
||||||
std::pair<short, short> nearestWire; // anode, cathode
|
std::pair<short, short> nearestWire; // anode, cathode
|
||||||
|
@ -63,11 +64,8 @@ public:
|
||||||
void ConstructGeo();
|
void ConstructGeo();
|
||||||
void FindWireID(TVector3 pos, TVector3 direction, bool verbose = false);
|
void FindWireID(TVector3 pos, TVector3 direction, bool verbose = false);
|
||||||
void CalTrack(TVector3 sx3Pos, int anodeID, int cathodeID, bool verbose = false);
|
void CalTrack(TVector3 sx3Pos, int anodeID, int cathodeID, bool verbose = false);
|
||||||
void CalTrack1(TVector3 sx3Pos, int anodeID, int cathodeID1, int cathodeID2, float cathodeE1, float cathodeE2, bool verbose);
|
|
||||||
void CalTrack2(TVector3 sx3Pos, PWHitInfo hitInfo, double sigmaA = 0, double sigmaC = 0, bool verbose = false);
|
void CalTrack2(TVector3 sx3Pos, PWHitInfo hitInfo, double sigmaA = 0, double sigmaC = 0, bool verbose = false);
|
||||||
|
|
||||||
double CircularMean(std::vector<std::pair<int, double>> wireList);
|
|
||||||
|
|
||||||
void Print(){
|
void Print(){
|
||||||
printf(" The nearest | Anode: %2d(%5.2f) Cathode: %2d(%5.2f)\n", hitInfo.nearestWire.first,
|
printf(" The nearest | Anode: %2d(%5.2f) Cathode: %2d(%5.2f)\n", hitInfo.nearestWire.first,
|
||||||
hitInfo.nearestDist.first,
|
hitInfo.nearestDist.first,
|
||||||
|
@ -236,28 +234,6 @@ inline void PW::CalTrack(TVector3 sx3Pos, int anodeID, int cathodeID, bool verbo
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void PW::CalTrack1(TVector3 sx3Pos, int anodeID, int cathodeID1, int cathodeID2, float cathodeE1, float cathodeE2, bool verbose){
|
|
||||||
|
|
||||||
trackPos = sx3Pos;
|
|
||||||
|
|
||||||
double q1 = cathodeE1;
|
|
||||||
double q2 = cathodeE2;
|
|
||||||
double fracC = (q1) / (q1 + q2);
|
|
||||||
// shifting the coordinates of the cathode wire along 2 axes c1 and c2
|
|
||||||
TVector3 shiftC1 = (Ca[cathodeID2].first - Ca[cathodeID1].first) * fracC;
|
|
||||||
TVector3 shiftC2 = (Ca[cathodeID2].second - Ca[cathodeID1].second) * fracC;
|
|
||||||
TVector3 c1 = Ca[cathodeID1].first + shiftC1;
|
|
||||||
TVector3 c2 = Ca[cathodeID1].second + shiftC2;
|
|
||||||
|
|
||||||
TVector3 n1 = (An[anodeID].first).Cross((sx3Pos).Unit());
|
|
||||||
TVector3 n2 = (c1 - c2).Cross((sx3Pos - c2)).Unit();
|
|
||||||
// if the handiness of anode and cathode revered, it should be n2 cross n1
|
|
||||||
trackVec = (n2.Cross(n1)).Unit();
|
|
||||||
|
|
||||||
// if( verbose ) printf("Theta, Phi = %f, %f \n", trackVec.Theta() *TMath::RadToDeg(), trackVec.Phi()*TMath::RadToDeg());
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void PW::CalTrack2(TVector3 sx3Pos, PWHitInfo hitInfo, double sigmaA, double sigmaC, bool verbose){
|
inline void PW::CalTrack2(TVector3 sx3Pos, PWHitInfo hitInfo, double sigmaA, double sigmaC, bool verbose){
|
||||||
|
|
||||||
trackPos = sx3Pos;
|
trackPos = sx3Pos;
|
||||||
|
@ -305,21 +281,4 @@ inline double PW::GetZ0(){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inline double PW::CircularMean(std::vector<std::pair<int, double>> wireList){
|
|
||||||
|
|
||||||
//use unit vector, wireID start from Zero
|
|
||||||
double xCom = 0, yCom = 0;
|
|
||||||
for( size_t i = 0; i < wireList.size() ; i++){
|
|
||||||
xCom += TMath::Cos(TMath::TwoPi() * wireList[i].first / nWire) * wireList[i].second;
|
|
||||||
yCom += TMath::Sin(TMath::TwoPi() * wireList[i].first / nWire) * wireList[i].second;
|
|
||||||
}
|
|
||||||
|
|
||||||
//calculate the angle of the summed unit vectors
|
|
||||||
double angle = TMath::ATan2(yCom, xCom);
|
|
||||||
if( angle < 0 ) angle += TMath::TwoPi(); // convert the angle from 0 to 2 pi
|
|
||||||
|
|
||||||
return angle/ TMath::TwoPi() * nWire;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
|
@ -67,6 +67,7 @@ int main(int argc, char **argv){
|
||||||
Det sx3;
|
Det sx3;
|
||||||
Det qqq;
|
Det qqq;
|
||||||
Det pc ;
|
Det pc ;
|
||||||
|
Det misc;
|
||||||
|
|
||||||
printf(" Raw root file : %s\n", inFileName.c_str());
|
printf(" Raw root file : %s\n", inFileName.c_str());
|
||||||
printf(" Run : %03d\n", run);
|
printf(" Run : %03d\n", run);
|
||||||
|
@ -99,6 +100,14 @@ int main(int argc, char **argv){
|
||||||
newTree->Branch("pcE", &pc.e, "pcEnergy[pcMulti]/s");
|
newTree->Branch("pcE", &pc.e, "pcEnergy[pcMulti]/s");
|
||||||
newTree->Branch("pcT", &pc.t, "pcTime[pcMulti]/l");
|
newTree->Branch("pcT", &pc.t, "pcTime[pcMulti]/l");
|
||||||
|
|
||||||
|
newTree->Branch("miscMulti", &misc.multi, "miscMulti/s");
|
||||||
|
newTree->Branch("miscID", &misc.id, "miscID[miscMulti]/s");
|
||||||
|
newTree->Branch("miscCh", &misc.ch, "miscCh[miscMulti]/s");
|
||||||
|
newTree->Branch("miscE", &misc.e, "miscEnergy[miscMulti]/s");
|
||||||
|
newTree->Branch("miscT", &misc.t, "miscTime[miscMulti]/l");
|
||||||
|
newTree->Branch("miscF", &misc.tf, "miscFineTime[miscMulti]/l");
|
||||||
|
|
||||||
|
|
||||||
///================== looping old tree and apply mapping
|
///================== looping old tree and apply mapping
|
||||||
|
|
||||||
//clock
|
//clock
|
||||||
|
@ -112,8 +121,12 @@ int main(int argc, char **argv){
|
||||||
sx3.multi = 0;
|
sx3.multi = 0;
|
||||||
qqq.multi = 0;
|
qqq.multi = 0;
|
||||||
pc.multi = 0;
|
pc.multi = 0;
|
||||||
|
misc.multi=0;
|
||||||
|
|
||||||
|
sx3.Clear();
|
||||||
qqq.Clear();
|
qqq.Clear();
|
||||||
|
pc.Clear();
|
||||||
|
misc.Clear();
|
||||||
|
|
||||||
for( unsigned int i = 0; i < multi; i++){
|
for( unsigned int i = 0; i < multi; i++){
|
||||||
|
|
||||||
|
@ -160,6 +173,17 @@ int main(int argc, char **argv){
|
||||||
pc.t[pc.multi] = e_t[i];
|
pc.t[pc.multi] = e_t[i];
|
||||||
pc.multi ++;
|
pc.multi ++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=================================== misc
|
||||||
|
if( 30000 <= ID && ID < 40000 ) {
|
||||||
|
misc.id[misc.multi] = (ID - 30000) / 100;
|
||||||
|
misc.ch[misc.multi] = (ID - 30000) % 100;
|
||||||
|
misc.e[misc.multi] = e[i];
|
||||||
|
misc.t[misc.multi] = e_t[i];
|
||||||
|
misc.tf[misc.multi] = e_f[i];
|
||||||
|
// if( ID == 30002 || ID == 30004 ) printf("sn : %d ch: %2d | gID %3d | ID %6d | e_f : %d\n", sn[i], ch[i], globalCh, ID, e_f[i]);
|
||||||
|
misc.multi ++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
saveFile->cd(); //set focus on this file
|
saveFile->cd(); //set focus on this file
|
||||||
|
|
143
PCGainMatch.C
143
PCGainMatch.C
|
@ -93,14 +93,14 @@ void PCGainMatch::Begin(TTree * /*tree*/){
|
||||||
|
|
||||||
sx3_contr.ConstructGeo();
|
sx3_contr.ConstructGeo();
|
||||||
pw_contr.ConstructGeo();
|
pw_contr.ConstructGeo();
|
||||||
TFile *f1 = new TFile("AnCatSum_high.root");
|
// TFile *f1 = new TFile("AnCatSum_high.root");
|
||||||
TFile *f2 = new TFile("AnCatSum_low.root");
|
// TFile *f2 = new TFile("AnCatSum_low.root");
|
||||||
TFile *f3 = new TFile("PCCoinc_cut1.root");
|
// TFile *f3 = new TFile("PCCoinc_cut1.root");
|
||||||
TFile *f4 = new TFile("PCCoinc_cut2.root");
|
// TFile *f4 = new TFile("PCCoinc_cut2.root");
|
||||||
AnCatSum_high= (TCutG*)f1->Get("AnCatSum_high");
|
// AnCatSum_high= (TCutG*)f1->Get("AnCatSum_high");
|
||||||
AnCatSum_low= (TCutG*)f2->Get("AnCatSum_low");
|
// AnCatSum_low= (TCutG*)f2->Get("AnCatSum_low");
|
||||||
PCCoinc_cut1= (TCutG*)f3->Get("PCCoinc_cut1");
|
// PCCoinc_cut1= (TCutG*)f3->Get("PCCoinc_cut1");
|
||||||
PCCoinc_cut2= (TCutG*)f4->Get("PCCoinc_cut2");
|
// PCCoinc_cut2= (TCutG*)f4->Get("PCCoinc_cut2");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -152,11 +152,11 @@ Bool_t PCGainMatch::Process(Long64_t entry){
|
||||||
float cE = 0;
|
float cE = 0;
|
||||||
|
|
||||||
// Define the excluded SX3 and QQQ channels
|
// Define the excluded SX3 and QQQ channels
|
||||||
std::unordered_set<int> excludeSX3 = {34, 35, 36, 37, 61, 62, 67, 73, 74, 75, 76, 77, 78, 79, 80, 93, 97, 100, 103, 108, 109, 110, 111, 112};
|
// std::unordered_set<int> excludeSX3 = {34, 35, 36, 37, 61, 62, 67, 73, 74, 75, 76, 77, 78, 79, 80, 93, 97, 100, 103, 108, 109, 110, 111, 112};
|
||||||
std::unordered_set<int> excludeQQQ = {0, 17, 109, 110, 111, 112, 113, 119, 127, 128};
|
// std::unordered_set<int> excludeQQQ = {0, 17, 109, 110, 111, 112, 113, 119, 127, 128};
|
||||||
inCuth=false;
|
// inCuth=false;
|
||||||
inCutl=false;
|
// inCutl=false;
|
||||||
inPCCut=false;
|
// inPCCut=false;
|
||||||
for( int i = 0; i < pc.multi; i ++){
|
for( int i = 0; i < pc.multi; i ++){
|
||||||
|
|
||||||
if(pc.e[i]>50 && pc.multi<7){
|
if(pc.e[i]>50 && pc.multi<7){
|
||||||
|
@ -170,41 +170,43 @@ Bool_t PCGainMatch::Process(Long64_t entry){
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int j=i+1;j<pc.multi;j++){
|
for(int j=i+1;j<pc.multi;j++){
|
||||||
if(PCCoinc_cut1->IsInside(pc.index[i], pc.index[j]) || PCCoinc_cut2->IsInside(pc.index[i], pc.index[j])){
|
// if(PCCoinc_cut1->IsInside(pc.index[i], pc.index[j]) || PCCoinc_cut2->IsInside(pc.index[i], pc.index[j])){
|
||||||
// hpcCoin->Fill(pc.index[i], pc.index[j]);
|
// // hpcCoin->Fill(pc.index[i], pc.index[j]);
|
||||||
inPCCut = true;
|
// inPCCut = true;
|
||||||
}
|
// }
|
||||||
hpcCoin->Fill(pc.index[i], pc.index[j]);
|
hpcCoin->Fill(pc.index[i], pc.index[j]);
|
||||||
}
|
}
|
||||||
if (anodeHits.size()==1 && cathodeHits.size() >= 1) {
|
if (anodeHits.size()==1 && cathodeHits.size() >= 1) {
|
||||||
|
|
||||||
for (const auto& anode : anodeHits) {
|
for (const auto& anode : anodeHits) {
|
||||||
float cESum = 0;
|
|
||||||
// for(int l=0; l<sx3.multi; l++){
|
// for(int l=0; l<sx3.multi; l++){
|
||||||
// if (sx3.index[l]==80){
|
// if (sx3.index[l]==80){
|
||||||
|
|
||||||
int aID = anode.first;
|
aID = anode.first;
|
||||||
float aE = anode.second;
|
aE = anode.second;
|
||||||
aESum += aE;
|
aESum += aE;
|
||||||
|
printf("aID : %d, aE : %f\n", aID, aE);
|
||||||
for (const auto& cathode : cathodeHits) {
|
|
||||||
int cID = cathode.first;
|
|
||||||
float cE = cathode.second;
|
|
||||||
// if(cE>cEMax){
|
|
||||||
// cEMax = cE;
|
|
||||||
// cIDMax = cID;
|
|
||||||
// }
|
|
||||||
// if(cE>cEnextMax && cE<cEMax){
|
|
||||||
// cEnextMax = cE;
|
|
||||||
// cIDnextMax = cID;
|
|
||||||
// }
|
|
||||||
|
|
||||||
cESum += cE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
printf("aID : %d, aE : %f, cE : %f\n", aID, aE, cE);
|
||||||
|
for (const auto& cathode : cathodeHits) {
|
||||||
|
cID = cathode.first;
|
||||||
|
cE = cathode.second;
|
||||||
|
// if(cE>cEMax){
|
||||||
|
// cEMax = cE;
|
||||||
|
// cIDMax = cID;
|
||||||
|
// }
|
||||||
|
// if(cE>cEnextMax && cE<cEMax){
|
||||||
|
// cEnextMax = cE;
|
||||||
|
// cIDnextMax = cID;
|
||||||
|
// }
|
||||||
|
|
||||||
|
cESum += cE;
|
||||||
|
}
|
||||||
|
// }
|
||||||
|
|
||||||
inCuth = false;
|
// inCuth = false;
|
||||||
inCutl = false;
|
// inCutl = false;
|
||||||
// inPCCut = false;
|
// inPCCut = false;
|
||||||
// for(int j=i+1;j<pc.multi;j++){
|
// for(int j=i+1;j<pc.multi;j++){
|
||||||
// if(PCCoinc_cut1->IsInside(pc.index[i], pc.index[j]) || PCCoinc_cut2->IsInside(pc.index[i], pc.index[j])){
|
// if(PCCoinc_cut1->IsInside(pc.index[i], pc.index[j]) || PCCoinc_cut2->IsInside(pc.index[i], pc.index[j])){
|
||||||
|
@ -215,26 +217,27 @@ Bool_t PCGainMatch::Process(Long64_t entry){
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// Check if the accumulated energies are within the defined ranges
|
// Check if the accumulated energies are within the defined ranges
|
||||||
if (AnCatSum_high && AnCatSum_high->IsInside(aESum, cESum)) {
|
// if (AnCatSum_high && AnCatSum_high->IsInside(aESum, cESum)) {
|
||||||
inCuth = true;
|
// inCuth = true;
|
||||||
}
|
// }
|
||||||
if (AnCatSum_low && AnCatSum_low->IsInside(aESum, cESum)) {
|
// if (AnCatSum_low && AnCatSum_low->IsInside(aESum, cESum)) {
|
||||||
inCutl = true;
|
// inCutl = true;
|
||||||
}
|
// }
|
||||||
|
|
||||||
// Fill histograms based on the cut conditions
|
// Fill histograms based on the cut conditions
|
||||||
if (inCuth && inPCCut) {
|
// if (inCuth && inPCCut) {
|
||||||
hanVScatsum_hcut->Fill(aESum, cESum);
|
// hanVScatsum_hcut->Fill(aESum, cESum);
|
||||||
}
|
// }
|
||||||
if (inCutl && inPCCut) {
|
// if (inCutl && inPCCut) {
|
||||||
hanVScatsum_lcut->Fill(aESum, cESum);
|
// hanVScatsum_lcut->Fill(aESum, cESum);
|
||||||
}
|
// }
|
||||||
// for(auto anode : anodeHits){
|
// for(auto anode : anodeHits){
|
||||||
|
|
||||||
// float aE = anode.second;
|
// float aE = anode.second;
|
||||||
// aESum += aE;
|
// aESum += aE;
|
||||||
if(inPCCut){
|
// if(inPCCut){
|
||||||
hanVScatsum->Fill(aE, cESum);}
|
hanVScatsum->Fill(aESum, cESum);
|
||||||
|
// }
|
||||||
if (aID < 24 && aE > 50) {
|
if (aID < 24 && aE > 50) {
|
||||||
hanVScatsum_a[aID]->Fill(aE, cESum);
|
hanVScatsum_a[aID]->Fill(aE, cESum);
|
||||||
}
|
}
|
||||||
|
@ -243,9 +246,9 @@ Bool_t PCGainMatch::Process(Long64_t entry){
|
||||||
// }
|
// }
|
||||||
// Fill histograms for the `pc` data
|
// Fill histograms for the `pc` data
|
||||||
hpcIndexVE->Fill(pc.index[i], pc.e[i]);
|
hpcIndexVE->Fill(pc.index[i], pc.e[i]);
|
||||||
if(inPCCut){
|
// if(inPCCut){
|
||||||
hAnodeMultiplicity->Fill(anodeHits.size());
|
hAnodeMultiplicity->Fill(anodeHits.size());
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -257,19 +260,21 @@ Bool_t PCGainMatch::Process(Long64_t entry){
|
||||||
|
|
||||||
std::vector<std::pair<int, int>> ID; // first = id, 2nd = index
|
std::vector<std::pair<int, int>> ID; // first = id, 2nd = index
|
||||||
for( int i = 0; i < sx3.multi; i ++){
|
for( int i = 0; i < sx3.multi; i ++){
|
||||||
ID.push_back(std::pair<int, int>(sx3.id[i], i));
|
if(sx3.e[i]>50){
|
||||||
hsx3IndexVE->Fill( sx3.index[i], sx3.e[i] );
|
ID.push_back(std::pair<int, int>(sx3.id[i], i));
|
||||||
|
hsx3IndexVE->Fill( sx3.index[i], sx3.e[i] );
|
||||||
|
|
||||||
for( int j = i+1; j < sx3.multi; j++){
|
for( int j = i+1; j < sx3.multi; j++){
|
||||||
hsx3Coin->Fill( sx3.index[i], sx3.index[j]);
|
hsx3Coin->Fill( sx3.index[i], sx3.index[j]);
|
||||||
}
|
}
|
||||||
|
|
||||||
for( int j = 0; j < pc.multi; j++){
|
for( int j = 0; j < pc.multi; j++){
|
||||||
hsx3VpcIndex->Fill( sx3.index[i], pc.index[j] );
|
hsx3VpcIndex->Fill( sx3.index[i], pc.index[j] );
|
||||||
// if( sx3.ch[index] > 8 ){
|
// if( sx3.ch[index] > 8 ){
|
||||||
// hsx3VpcE->Fill( sx3.e[i], pc.e[j] );
|
// hsx3VpcE->Fill( sx3.e[i], pc.e[j] );
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -341,8 +346,8 @@ Bool_t PCGainMatch::Process(Long64_t entry){
|
||||||
// //======================= QQQ
|
// //======================= QQQ
|
||||||
for( int i = 0; i < qqq.multi; i ++){
|
for( int i = 0; i < qqq.multi; i ++){
|
||||||
|
|
||||||
for( int j = 0; j < pc.multi; j++){
|
// for( int j = 0; j < pc.multi; j++){
|
||||||
if(pc.index[j]<24 && pc.e[j]>50 ){
|
if(qqq.e[i]>50 ){
|
||||||
hqqqIndexVE->Fill( qqq.index[i], qqq.e[i] );
|
hqqqIndexVE->Fill( qqq.index[i], qqq.e[i] );
|
||||||
for( int j = 0; j < qqq.multi; j++){
|
for( int j = 0; j < qqq.multi; j++){
|
||||||
if ( j == i ) continue;
|
if ( j == i ) continue;
|
||||||
|
@ -352,14 +357,14 @@ Bool_t PCGainMatch::Process(Long64_t entry){
|
||||||
|
|
||||||
for( int j = i + 1; j < qqq.multi; j++){
|
for( int j = i + 1; j < qqq.multi; j++){
|
||||||
for( int k = 0; k < pc.multi; k++){
|
for( int k = 0; k < pc.multi; k++){
|
||||||
if(pc.index[k]<24 && pc.e[k]>50 &&inPCCut){
|
// if(qqq.e[i>50]){
|
||||||
hqqqVpcE->Fill( qqq.e[i], pc.e[k] );
|
hqqqVpcE->Fill( qqq.e[i], pc.e[k] );
|
||||||
hqqqVpcIndex->Fill( qqq.index[i], pc.index[j] );
|
hqqqVpcIndex->Fill( qqq.index[i], pc.index[j] );
|
||||||
}
|
}
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
// hanVScatsum->Fill(aE,cE);
|
// hanVScatsum->Fill(aE,cE);
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ "$#" -ne 2 ]; then
|
if [ "$#" -ne 3 ]; then
|
||||||
echo "Usage: $0 runID timeWindow_ns"
|
echo "Usage: $0 runID timeWindow_ns option"
|
||||||
echo "Exiting..."
|
echo "Exiting..."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -9,19 +9,24 @@ fi
|
||||||
runID=$1
|
runID=$1
|
||||||
timeWindow=$2
|
timeWindow=$2
|
||||||
|
|
||||||
rawFolder=/home/tandem/Desktop/analysis/data
|
option=$3
|
||||||
rootFolder=/home/tandem/Desktop/analysis/data/root_data
|
|
||||||
|
|
||||||
rsync -a splitpole@128.186.111.223:/media/nvmeData/ANASEN27Alap/*.fsu /home/tandem/Desktop/analysis/data
|
rawFolder=/home/tandem/data1/2024_09_17Fap/data
|
||||||
|
rootFolder=/home/tandem/data1/2024_09_17Fap/data/root_data
|
||||||
|
|
||||||
fileList=`\ls -1 ${rawFolder}/Run_${runID}_*.fsu`
|
if [ $option -eq 0 ]; then
|
||||||
|
|
||||||
./EventBuilder ${timeWindow} 0 0 10000000 ${fileList}
|
rsync -auh --info=progress2 splitpole@128.186.111.223:/media/nvmeData/2024_09_17Fap/*.fsu /home/tandem/data1/2024_09_17Fap/data
|
||||||
|
|
||||||
outFile=${rawFolder}/*${runID}*${timeWindow}.root
|
fileList=`\ls -1 ${rawFolder}/*Run_${runID}_*.fsu`
|
||||||
|
|
||||||
mv -vf ${outFile} ${rootFolder}/.
|
./EventBuilder ${timeWindow} 0 0 10000000 ${fileList}
|
||||||
|
|
||||||
./Mapper ${rootFolder}/*${runID}*${timeWindow}.root
|
outFile=${rawFolder}/*${runID}*${timeWindow}.root
|
||||||
|
|
||||||
|
mv -vf ${outFile} ${rootFolder}/.
|
||||||
|
|
||||||
|
./Mapper ${rootFolder}/*${runID}*${timeWindow}.root
|
||||||
|
fi
|
||||||
|
|
||||||
root "processRun.C(\"${rootFolder}/Run_${runID}_mapped.root\")"
|
root "processRun.C(\"${rootFolder}/Run_${runID}_mapped.root\")"
|
||||||
|
|
14
mapping.h
14
mapping.h
|
@ -34,6 +34,7 @@ const int nV1725 = 3;
|
||||||
// the SuperX3 has 24 detectors for each kind, wach detector has 12 channels
|
// the SuperX3 has 24 detectors for each kind, wach detector has 12 channels
|
||||||
// the QQQ has 4 detectors for each kind, each detector has 32 channels
|
// the QQQ has 4 detectors for each kind, each detector has 32 channels
|
||||||
// the PC has 2 types, anode and cathode, each has 24 channels
|
// the PC has 2 types, anode and cathode, each has 24 channels
|
||||||
|
// the MISC has 6 channels, the lollipop IC and siliscon followed by the hotneedle IC, as well as the Rf and MCP
|
||||||
// The detID = Type * 10000 + index * 100 + channel
|
// The detID = Type * 10000 + index * 100 + channel
|
||||||
// fro example, detID(superX3-8, ch-7) = 00807
|
// fro example, detID(superX3-8, ch-7) = 00807
|
||||||
|
|
||||||
|
@ -77,13 +78,14 @@ const std::vector<int> mapping = {
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||||
//================== 334
|
//================== 334
|
||||||
20116, 20117, 20118, 20119, -1, 20121, 20122, 20123, 20016, 20017, 20018, 20019, 20020, 20021, 20022, 20023,
|
20116, 20117, 20118, 20119, -1, 20121, 20122, 20123, 20016, 20017, 20018, -1, 20020, 20021, 20022, 20023,
|
||||||
//================== 379
|
//================== 379
|
||||||
20000, 20001, 20002, 20003, 20004, 20005, -1, 20007, 20008, -1, 20010, 20011, 20012, 20013, 20014, 20015,
|
-1 , 20001, 20002, 20003, 20004, 20005, -1, 20007, 20008, -1, 20010, 20011, 20012, 20013, 20014, 20015,
|
||||||
//================== 325
|
//================== 325
|
||||||
20100, 20101, 20102, 20103, 20104, 20105, 20106, 20107, 20108, 20109, 20110, 20111, 20112, 20113, 20114, 20115,
|
20100, 20101, 20102, 20103, 20104, 20105, 20106, 20107, 20108, 20109, 20110, 20111, 20112, -1, 20114, 20115,
|
||||||
//================== 405
|
//================== 405
|
||||||
20006, -1, -1, 20009, -1, 20120, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
|
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
||||||
|
20006, -1, -1, 20009, -1, 20120, 20000, 20019, 20113, 30000, -1, 30001, 30002, 30003, 30004, -1
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -141,8 +143,9 @@ void PrintMapping(){
|
||||||
|
|
||||||
printf("\033[35m%3d(%2d)\033[0m|", detID, ch);
|
printf("\033[35m%3d(%2d)\033[0m|", detID, ch);
|
||||||
|
|
||||||
}else{
|
}else if( typeID == 3){ // MISC
|
||||||
|
|
||||||
|
printf("\033[33m%3d(%2d)\033[0m|", detID, ch);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -215,7 +218,6 @@ void GenMapping(std::string mapFile){
|
||||||
detID += 20000;
|
detID += 20000;
|
||||||
if( words[3] == "ANODE") detID += atoi(words[4].c_str());
|
if( words[3] == "ANODE") detID += atoi(words[4].c_str());
|
||||||
if( words[3] == "CATHODE") detID += 100 + atoi(words[4].c_str());
|
if( words[3] == "CATHODE") detID += 100 + atoi(words[4].c_str());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if( words[2] == "blank") {
|
if( words[2] == "blank") {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user