#include <VetoShower.h>
Public Member Functions | |
| ~VetoShower () | |
| VetoShower () | |
| VetoShower (const AtmosEvent *event) | |
| VetoShower (const AtmosShower *shower, const TClonesArray *ShieldPlankList) | |
| void | Zero () |
| void | Fill (const AtmosEvent *event) |
| void | Fill (const AtmosShower *shower, const TClonesArray *ShieldPlankList) |
Public Attributes | |
| double | SectionQInTime [4] |
| double | SectionQOutTime [4] |
| double | VetoQCorrSS |
| int | NInTimePlanks |
| TClonesArray * | InTimePlanks |
|
|
Definition at line 41 of file VetoShower.cxx. 00041 {
00042 //if(InTimePlanes) delete [] InTimePlanes; InTimePlanes = 0;
00043 //if(SteelToPlanks) delete [] SteelToPlanks; SteelToPlanks = 0;
00044 //if(ZToPlanks) delete [] ZToPlanks; ZToPlanks = 0;
00045 //if(PEPlanks) delete [] PEPlanks; PEPlanks = 0;
00046 delete InTimePlanks;
00047 }
|
|
|
Definition at line 49 of file VetoShower.cxx. References InTimePlanks, and Zero(). 00049 {
00050 InTimePlanks = new TClonesArray("PlankToShw");
00051 Zero();
00052 }
|
|
|
Definition at line 54 of file VetoShower.cxx. References Fill(), InTimePlanks, and Zero(). 00054 {
00055 InTimePlanks = new TClonesArray("PlankToShw");
00056 Zero();
00057 Fill(event);
00058 }
|
|
||||||||||||
|
Definition at line 60 of file VetoShower.cxx. References Fill(), InTimePlanks, and Zero(). 00061 {
00062 InTimePlanks = new TClonesArray("PlankToShw");
00063 Zero();
00064 Fill(shower, ShieldPlankList);
00065 }
|
|
||||||||||||
|
Definition at line 94 of file VetoShower.cxx. References C, AtmosShieldPlank::ClearFibre, ClearFibreN, UtilMisc::DetectorWall(), MSG, NInTimePlanks, AtmosShieldPlank::QPE, AtmosShieldPlank::Section, SectionQInTime, SectionQOutTime, AtmosShieldPlank::Tcal, VetoQCorrSS, AtmosShower::VtxTime, AtmosShower::VtxX, AtmosShower::VtxY, AtmosShower::VtxZ, WlsFibreN, AtmosShieldPlank::WlsPigtail, AtmosShieldPlank::X, AtmosShieldPlank::Y, AtmosShieldPlank::Z, and Zero(). 00095 {
00096 assert(shower);
00097 assert(ShieldPlankList);
00098 Zero();
00099
00100 //vector<int> itp;//Temporary for InTimePlanes
00101 //vector<double> stp;//Temporary for SteelToPlanks
00102 //vector<double> ztp;//Temporary for ZToPlanks
00103 //vector<double> pep;//Temporary for PEPlanks
00104
00105 const double VtxX = shower->VtxX;
00106 const double VtxY = shower->VtxY;
00107 const double VtxZ = shower->VtxZ;
00108 const double VtxTime = shower->VtxTime;
00109
00110 //Which sections of the shield do we care about?
00111 int vtx_section(0);
00112 if (VtxZ>0.0 && VtxZ<15) {//sm1
00113 if(VtxZ<8.5) vtx_section|=1;
00114 if(VtxZ>6.9) vtx_section|=2;
00115 }
00116 else if (VtxZ>15.5 && VtxZ<31.0) {//sm2
00117 if(VtxZ<23.9) vtx_section|=4;
00118 if(VtxZ>21.8) vtx_section|=8;
00119 }
00120
00121 const int nplanks = (int)(ShieldPlankList->GetEntries());
00122 double DTime[2] = {0., 0.};
00123 for (int iplnk=0; iplnk<nplanks; iplnk++) {
00124 const AtmosShieldPlank* plank =
00125 dynamic_cast<const AtmosShieldPlank*>
00126 (ShieldPlankList->At(iplnk));
00127 assert(plank);
00128
00129 //Delta T Vtx
00130 for (unsigned int iend=0; iend<2; iend++) {
00131 DTime[iend] = plank->Tcal[iend];
00132 DTime[iend] -= plank->WlsPigtail[iend]*WlsFibreN/TMath::C();
00133 DTime[iend] -= plank->ClearFibre[iend]*ClearFibreN/TMath::C();
00134 DTime[iend] -= TMath::Abs(VtxZ-plank->Z[iend])*WlsFibreN/TMath::C();
00135 }
00136
00137 //Add to veto counts if shield hit is in-time with event
00138 if ((plank->QPE[0]>0 && TMath::Abs(DTime[0]-VtxTime)<TimeWin) ||
00139 (plank->QPE[1]>0 && TMath::Abs(DTime[1]-VtxTime)<TimeWin)) {
00140 SectionQInTime[plank->Section-1] += plank->QPE[0]+plank->QPE[1];
00141
00142 if ((1<<(plank->Section-1)&(vtx_section))) {
00143 VetoQCorrSS += plank->QPE[0]+plank->QPE[1];
00144 }
00145
00146 //itp.push_back(plank->Plane);
00147 //pep.push_back(plank->QPE[0]+plank->QPE[1]);
00148
00149 bool ShwUnderPlank(false);
00150 if(plank->Z[0] < plank->Z[1])
00151 ShwUnderPlank =
00152 (plank->Z[0] < VtxZ && VtxZ < plank->Z[1]);
00153 else
00154 ShwUnderPlank =
00155 (plank->Z[1] < VtxZ && VtxZ < plank->Z[0]);
00156
00157 double DZ(0.);
00158 if(!ShwUnderPlank) DZ = TMath::Min(TMath::Abs(plank->Z[0]-VtxZ),
00159 TMath::Abs(plank->Z[1]-VtxZ));
00160 //ztp.push_back(DZ);
00161
00162 double SteelToPlank(0.);
00163 double RP(0.);
00164 if (!ShwUnderPlank) {
00165 RP = TMath::Sqrt((DZ*DZ) +
00166 ((plank->X-VtxX)*(plank->X-VtxX)) +
00167 ((plank->X-VtxX)*(plank->X-VtxX)) );
00168 double ShwVtx[3] = {VtxX, VtxY, VtxZ};
00169 double ShwCos[3];
00170 ShwCos[0] = (plank->X-VtxX) / RP;
00171 ShwCos[1] = (plank->Y-VtxY) / RP;
00172 ShwCos[2] = (DZ) / RP;
00173 double DetVtx[3];
00174 int Side = UtilMisc::DetectorWall(ShwVtx, ShwCos, DetVtx);
00175 if (Side==9 || Side==10) {
00176 MSG("VetoShower",Msg::kDebug) << "Cross on SM Gap" << endl;
00177 }
00178 SteelToPlank = TMath::Abs((ShwVtx[2]-DetVtx[2])/ShwCos[2]);
00179 SteelToPlank = SteelToPlank * 2.54 / 5.99;
00180 }
00181 //stp.push_back(SteelToPlank);
00182 new((*InTimePlanks)[NInTimePlanks++]) PlankToShw(plank, DZ, SteelToPlank);
00183
00184 /*
00185 for (int i=0; i<10; i++) {
00186 if (SteelToPlank <= i*0.1) {
00187 VetoQPlank10cmSteel[i] += plank->QPE[0]+plank->QPE[1];
00188 }
00189 }
00190
00191 for (int i=0; i<10; i++) {
00192 if (DZ <= i*0.5) {
00193 VetoQPlank50cmZ[i] += plank->QPE[0]+plank->QPE[1];
00194 }
00195 }
00196 */
00197 }
00198 else {
00199 SectionQOutTime[plank->Section-1] += plank->QPE[0]+plank->QPE[1];
00200 }
00201 }
00202
00203 //Put the itp vector in the C-style array InTimePlanes
00204 /*
00205 NPlanksInTime = itp.size();
00206 if (NPlanksInTime > 0) {
00207 InTimePlanes = new int[NPlanksInTime];
00208 SteelToPlanks = new double[NPlanksInTime];
00209 ZToPlanks = new double[NPlanksInTime];
00210 PEPlanks = new double[NPlanksInTime];
00211 for (int i=0; i<NPlanksInTime; i++) {
00212 InTimePlanes[i] = itp[i];
00213 SteelToPlanks[i] = stp[i];
00214 ZToPlanks[i] = ztp[i];
00215 PEPlanks[i] = pep[i];
00216 }
00217 }
00218 */
00219 }
|
|
|
Definition at line 82 of file VetoShower.cxx. References AtmosEvent::NShieldPlanks, AtmosEvent::ShieldPlankList, and AtmosEvent::ShowerList. Referenced by VetoShower(). 00082 {
00083 //This assumes a single shower over which to find the veto correlation
00084 const AtmosShower* shower =
00085 dynamic_cast<const AtmosShower*>(event->ShowerList->At(0));
00086 if(!shower) return;
00087
00088 if(event->NShieldPlanks == 0) return;
00089 if(!(event->ShieldPlankList)) return;
00090
00091 Fill(shower, event->ShieldPlankList);
00092 }
|
|
|
Definition at line 67 of file VetoShower.cxx. References InTimePlanks, NInTimePlanks, SectionQInTime, SectionQOutTime, and VetoQCorrSS. Referenced by Fill(), and VetoShower(). 00067 {
00068 memset(SectionQInTime, 0, 4*sizeof(double));
00069 memset(SectionQOutTime, 0, 4*sizeof(double));
00070
00071 VetoQCorrSS = 0;
00072
00073 //memset(VetoQPlank50cmZ, 0, 10*sizeof(double));
00074 //memset(VetoQPlank10cmSteel, 0, 10*sizeof(double));
00075 for (int i=0; i<1+InTimePlanks->GetLast(); i++){
00076 InTimePlanks->At(i)->Clear();
00077 }
00078 InTimePlanks->Delete();
00079 NInTimePlanks = 0;
00080 }
|
|
|
Definition at line 45 of file VetoShower.h. Referenced by VetoShower(), and Zero(). |
|
|
Definition at line 44 of file VetoShower.h. |
|
|
Definition at line 39 of file VetoShower.h. |
|
|
Definition at line 40 of file VetoShower.h. |
|
|
Definition at line 42 of file VetoShower.h. |
1.3.9.1