Fork me on GitHub

Changeset 494 in svn for trunk


Ignore:
Timestamp:
Jul 16, 2009, 1:10:08 AM (15 years ago)
Author:
Xavier Rouby
Message:

new: calorimeter endcaps

Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/CHANGELOG

    r471 r494  
    99   - updates in Resolution.cpp & Resolution_ATLAS.cpp
    1010   - new method "invisible()" in PdgParticle, needed for invisible particles BSM
     11   - new : calorimeter endcaps. DetectorCard have been updated; however, 100% backward compatible
    1112
    1213 /-----------------------------------------\
  • trunk/Delphes.cpp

    r474 r494  
    166166  DET->ReadParticleDataGroupTable();
    167167  //DET->PDGtable.print();
    168  
     168
    169169  //Trigger information
    170170  cout <<"**        ########### Start reading TRIGGER card ##########        **"<< endl;
     
    307307                            -DET->CEN_max_calo_cen, DET->CEN_max_calo_cen,
    308308                            DET->ELG_Ccen,  DET->ELG_Ncen,  DET->ELG_Scen,
    309                             DET->HAD_Chcal, DET->HAD_Nhcal, DET->HAD_Shcal);
     309                            DET->HAD_Ccen,  DET->HAD_Ncen,  DET->HAD_Scen);
     310  D_CaloElement ForwardECCalo("forwardendcapcalo",
     311                            DET->CEN_max_calo_cen, DET->CEN_max_calo_ec,
     312                            DET->ELG_Cec, DET->ELG_Nec, DET->ELG_Sec,
     313                            DET->HAD_Cec, DET->HAD_Nec, DET->HAD_Sec );
     314  D_CaloElement BackwardECCalo("backwardendcapcalo",
     315                            -DET->CEN_max_calo_ec, -DET->CEN_max_calo_cen,
     316                            DET->ELG_Cec, DET->ELG_Nec, DET->ELG_Sec,
     317                            DET->HAD_Cec, DET->HAD_Nec, DET->HAD_Sec );
    310318  D_CaloElement ForwardCalo("forwardcalo",
    311                             DET->CEN_max_calo_cen, DET->CEN_max_calo_fwd,
     319                            DET->CEN_max_calo_ec, DET->CEN_max_calo_fwd,
    312320                            DET->ELG_Cfwd,  DET->ELG_Nfwd,  DET->ELG_Sfwd,
    313                             DET->HAD_Chf,   DET->HAD_Nhf,   DET->HAD_Shf  );
     321                            DET->HAD_Cfwd,  DET->HAD_Nfwd,  DET->HAD_Sfwd  );
    314322  D_CaloElement BackwardCalo("backwardcalo",
    315                              -DET->CEN_max_calo_fwd, -DET->CEN_max_calo_cen,
     323                             -DET->CEN_max_calo_fwd, -DET->CEN_max_calo_ec,
    316324                             DET->ELG_Cfwd,  DET->ELG_Nfwd,  DET->ELG_Sfwd,
    317                              DET->HAD_Chf,   DET->HAD_Nhf,   DET->HAD_Shf  );
     325                             DET->HAD_Cfwd,  DET->HAD_Nfwd,  DET->HAD_Sfwd  );
    318326  //D_CaloElement CastorCalo("castor",5.5,6.6,1,0,0,1,0,0);
    319327  list_of_calorimeters.addElement(CentralCalo);
     328  list_of_calorimeters.addElement(ForwardECCalo);
    320329  list_of_calorimeters.addElement(ForwardCalo);
     330  list_of_calorimeters.addElement(BackwardECCalo);
    321331  list_of_calorimeters.addElement(BackwardCalo);
    322332  //list_of_calorimeters.addElement(CastorCalo);
  • trunk/data/DetectorCard.dat

    r492 r494  
    33
    44# Detector extension, in pseudorapidity units
    5 CEN_max_tracker    2.5                // Maximum tracker coverage         
    6 CEN_max_calo_cen   3.0                // central calorimeter coverage
    7 CEN_max_calo_fwd   5.0                // forward calorimeter pseudorapidity coverage
    8 CEN_max_mu         2.4                // muon chambers pseudorapidity coverage
     5CEN_max_tracker    2.5              // Maximum tracker coverage         
     6CEN_max_calo_cen   1.7              // central calorimeter coverage
     7CEN_max_calo_ec    3.0              // calorimeter endcap coverage
     8CEN_max_calo_fwd   5.0              // forward calorimeter pseudorapidity coverage
     9CEN_max_mu         2.4              // muon chambers pseudorapidity coverage
    910 
    10 # Energy resolution for electron/photon
     11# Energy resolution for electron/photon in central/endcap/fwd/zdc calos
    1112# \sigma/E = C + N/E + S/\sqrt{E}, E in GeV
    1213ELG_Scen          0.05              // S term for central ECAL
    13 ELG_Ncen          0.25              // N term for central ECAL
    14 ELG_Ccen          0.005             // C term for central ECAL
     14ELG_Ncen          0.25              // N term
     15ELG_Ccen          0.005             // C term
     16ELG_Sec           0.05              // S term for ECAL endcap
     17ELG_Nec           0.25              // N term
     18ELG_Cec           0.005             // C term
    1519ELG_Sfwd          2.084             // S term for FCAL
    16 ELG_Nfwd          0.0               // N term for FCAL
    17 ELG_Cfwd          0.107             // C term for FCAL
     20ELG_Nfwd          0.0               // N term
     21ELG_Cfwd          0.107             // C term
    1822ELG_Szdc          0.70              // S term for ZDC
    19 ELG_Nzdc          0.0               // N term for ZDC
    20 ELG_Czdc          0.08              // C term for ZDC
     23ELG_Nzdc          0.0               // N term
     24ELG_Czdc          0.08              // C term
    2125
    22 # Energy resolution for hadrons in ecal/hcal/hf
     26# Energy resolution for hadrons in central/endcap/fwd/zdc calos
    2327# \sigma/E = C + N/E + S/\sqrt{E}, E in GeV
    24 HAD_Shcal         1.5               // S term for central HCAL
    25 HAD_Nhcal         0.                // N term for central HCAL
    26 HAD_Chcal         0.05              // C term for central HCAL
    27 HAD_Shf           2.7               // S term for FCAL
    28 HAD_Nhf           0.                // N term for FCAL
    29 HAD_Chf           0.13              // C term for FCAL
     28HAD_Scen          1.5               // S term for central HCAL
     29HAD_Ncen          0.                // N term
     30HAD_Ccen          0.05              // C term
     31HAD_Sec           1.5               // S term for HCAL endcap
     32HAD_Nec           0.                // N term
     33HAD_Cec           0.05              // C term
     34HAD_Sfwd          2.7               // S term for FCAL
     35HAD_Nfwd          0.                // N term
     36HAD_Cfwd          0.13              // C term
    3037HAD_Szdc          1.38              // S term for ZDC
    31 HAD_Nzdc          0.                // N term for ZDC
    32 HAD_Czdc          0.13              // C term for ZDC
     38HAD_Nzdc          0.                // N term
     39HAD_Czdc          0.13              // C term
    3340
    3441# Time resolution for ZDC/RP220/RP420
     
    7481ISOL_Cone        0.5      //Cone  for isolation criteria
    7582ISOL_Calo_ET     2.0      //minimal tower transverse energy for isolation criteria. 1E99 means "off"
     83ISOL_Calo_Cone   0.4      //Cone for calorimetric isolation
    7684ISOL_Calo_Grid   3        //Grid size (N x N) for calorimetric isolation
    7785
  • trunk/data/DetectorCard_ATLAS.dat

    r492 r494  
    33
    44# Detector extension, in pseudorapidity units
    5 CEN_max_tracker    2.5                // Maximum tracker coverage         
    6 CEN_max_calo_cen   3.2                // central calorimeter coverage
    7 CEN_max_calo_fwd   4.9                // forward calorimeter pseudorapidity coverage
    8 CEN_max_mu         2.7                // muon chambers pseudorapidity coverage
     5CEN_max_tracker    2.5              // Maximum tracker coverage         
     6CEN_max_calo_cen   1.7              // central calorimeter coverage
     7CEN_max_calo_ec    3.2              // end-cap calorimeter coverage
     8CEN_max_calo_fwd   4.9              // forward calorimeter pseudorapidity coverage
     9CEN_max_mu         2.7              // muon chambers pseudorapidity coverage
    910 
    10 # Energy resolution for electron/photon
     11# Energy resolution for electron/photon in central/endcap/fwd/zdc calos
    1112# \sigma/E = C + N/E + S/\sqrt{E}, E in GeV
    12 ELG_Scen          0.10                // S term for central ECAL  http://arxiv.org/pdf/physics/0608012v1
    13 ELG_Ncen          0.0                 // N term for central ECAL  http://arxiv.org/pdf/physics/0608012v1
    14 ELG_Ccen          0.0017              // C term for central ECAL  http://arxiv.org/pdf/physics/0608012v1
    15 ELG_Sfwd          0.30407             // S term for forward FCAL  http://villaolmo.mib.infn.it/ICATPP9th_2005/Calorimetry/Schram.p.pdf
    16 ELG_Nfwd          1.1533              // N term for central FCAL  http://villaolmo.mib.infn.it/ICATPP9th_2005/Calorimetry/Schram.p.pdf
    17 ELG_Cfwd          0.0313              // C term for forward FCAL  http://villaolmo.mib.infn.it/ICATPP9th_2005/Calorimetry/Schram.p.pdf
     13ELG_Scen          0.101             // S term for central ECAL  http://arxiv.org/pdf/physics/0608012v1 ; jinst8_08_s08003
     14ELG_Ncen          0.0               // N term 
     15ELG_Ccen          0.0017            // C term 
     16ELG_Sec           0.101             // S term for ECAL endcap
     17ELG_Nec           0.0               // N term 
     18ELG_Cec           0.0017            // C term
     19ELG_Sfwd          0.285             // S term for forward FCAL  http://villaolmo.mib.infn.it/ICATPP9th_2005/Calorimetry/Schram.p.pdf
     20ELG_Nfwd          0                 // N term 
     21ELG_Cfwd          0.035             // C term 
    1822ELG_Szdc          0.70              // S term for ZDC
    19 ELG_Nzdc          0.0               // N term for ZDC
    20 ELG_Czdc          0.08              // C term for ZDC
     23ELG_Nzdc          0.0               // N term  
     24ELG_Czdc          0.08              // C term  
    2125
    22 
    23 # Energy resolution for hadrons in ecal/hcal/hf
     26# Energy resolution for hadrons in central/endcap/fwd/zdc calos
    2427# \sigma/E = C + N/E + S/\sqrt{E}, E in GeV
    25 HAD_Shcal         0.58               // S term for central HCAL    http://arxiv.org/pdf/hep-ex/0004009v1
    26 HAD_Nhcal         1.7                // N term for central HCAL    http://arxiv.org/pdf/hep-ex/0004009v1
    27 HAD_Chcal         0.025              // C term for central HCAL    http://arxiv.org/pdf/hep-ex/0004009v1
    28 HAD_Shf           0.9681             // S term for FCAL            http://villaolmo.mib.infn.it/ICATPP9th_2005/Calorimetry/Schram.p.pdf
    29 HAD_Nhf           0.                 // N term for FCAL            http://villaolmo.mib.infn.it/ICATPP9th_2005/Calorimetry/Schram.p.pdf
    30 HAD_Chf           0.0524             // C term for FCAL            http://villaolmo.mib.infn.it/ICATPP9th_2005/Calorimetry/Schram.p.pdf
     28HAD_Scen          0.5205            // S term for central HCAL    http://arxiv.org/pdf/hep-ex/0004009v1
     29HAD_Ncen          1.59              // N term
     30HAD_Ccen          0.0302            // C term
     31HAD_Sec           0.706             // S term for HCAL endcap
     32HAD_Nec           0                 // N term
     33HAD_Cec           0.05              // C term
     34HAD_Sfwd          0.942             // S term for FCAL            http://villaolmo.mib.infn.it/ICATPP9th_2005/Calorimetry/Schram.p.pdf
     35HAD_Nfwd          0.                // N term
     36HAD_Cfwd          0.075             // C term
    3137HAD_Szdc          1.38              // S term for ZDC
    32 HAD_Nzdc          0.                // N term for ZDC
    33 HAD_Czdc          0.13              // C term for ZDC
     38HAD_Nzdc          0.                // N term
     39HAD_Czdc          0.13              // C term
    3440
    3541# Time resolution for ZDC/RP220/RP420
     
    111117VFD_s_zdc         140                   // distance of the Zero Degree Calorimeter, from the IP, in [m]
    112118
     119#Hector parameters
    113120RP_220_s          220                   // distance of the RP to the IP, in meters
    114121RP_220_x          0.002                 // distance of the RP to the beam, in meters
    115122RP_420_s          420                   // distance of the RP to the IP, in meters
    116123RP_420_x          0.004                 // distance of the RP to the beam, in meters
    117 RP_beam1Card      data/LHCB1IR1.tfs
    118 RP_beam2Card      data/LHCB2IR1.tfs
    119 RP_IP_name        IP1
     124RP_beam1Card      data/LHCB1IR1.tfs     // beam optics file, beam 1
     125RP_beam2Card      data/LHCB2IR1.tfs     // beam optics file, beam 2
     126RP_IP_name        IP1                   // tag for IP in Hector ; 'IP1' for ATLAS
    120127RP_offsetEl_x     0.097                 // horizontal separation between both beam, in meters
    121128RP_offsetEl_y     0                     // vertical separation between both beam, in meters
  • trunk/data/DetectorCard_CMS.dat

    r482 r494  
    1 DETECTOR CARD      # DO NOT REMOVE THIS IS A TAG!
     1DETECTOR CARD      // DO NOT REMOVE THIS IS A TAG!
     2# any line containing a dash symbol (#) will be completely ignored, whatever the position of this symbol
    23
    34# Detector extension, in pseudorapidity units
    4 CEN_max_tracker    2.5                // Maximum tracker coverage         
    5 CEN_max_calo_cen   3.0                // central calorimeter coverage
    6 CEN_max_calo_fwd   5.0                // forward calorimeter pseudorapidity coverage
    7 CEN_max_mu         2.4                // muon chambers pseudorapidity coverage
     5CEN_max_tracker    2.5              // Maximum tracker coverage         
     6CEN_max_calo_cen   1.7              // central calorimeter coverage
     7CEN_max_calo_ec    3.0              // calorimeter endcap coverage
     8CEN_max_calo_fwd   5.0              // forward calorimeter pseudorapidity coverage
     9CEN_max_mu         2.4              // muon chambers pseudorapidity coverage
    810 
    9 # Energy resolution for electron/photon
     11# Energy resolution for electron/photon in central/endcap/fwd/zdc calos
    1012# \sigma/E = C + N/E + S/\sqrt{E}, E in GeV
    1113ELG_Scen          0.05              // S term for central ECAL
    12 ELG_Ncen          0.25              // N term for central ECAL
    13 ELG_Ccen          0.005             // C term for central ECAL
     14ELG_Ncen          0.25              // N term
     15ELG_Ccen          0.005             // C term
     16ELG_Sec           0.05              // S term for ECAL endcap
     17ELG_Nec           0.25              // N term
     18ELG_Cec           0.005             // C term
    1419ELG_Sfwd          2.084             // S term for FCAL
    15 ELG_Nfwd          0.0               // N term for FCAL
    16 ELG_Cfwd          0.107             // C term for FCAL
     20ELG_Nfwd          0.0               // N term
     21ELG_Cfwd          0.107             // C term
    1722ELG_Szdc          0.70              // S term for ZDC
    18 ELG_Nzdc          0.0               // N term for ZDC
    19 ELG_Czdc          0.08              // C term for ZDC
     23ELG_Nzdc          0.0               // N term
     24ELG_Czdc          0.08              // C term
    2025
    21 
    22 # Energy resolution for hadrons in ecal/hcal/hf
     26# Energy resolution for hadrons in central/endcap/fwd/zdc calos
    2327# \sigma/E = C + N/E + S/\sqrt{E}, E in GeV
    24 HAD_Shcal         1.5               // S term for central HCAL
    25 HAD_Nhcal         0.                // N term for central HCAL
    26 HAD_Chcal         0.05              // C term for central HCAL
    27 HAD_Shf           2.7               // S term for FCAL
    28 HAD_Nhf           0.                // N term for FCAL
    29 HAD_Chf           0.13              // C term for FCAL
     28HAD_Scen          1.5               // S term for central HCAL
     29HAD_Ncen          0.                // N term
     30HAD_Ccen          0.05              // C term
     31HAD_Sec           1.5               // S term for HCAL endcap
     32HAD_Nec           0.                // N term
     33HAD_Cec           0.05              // C term
     34HAD_Sfwd          2.7               // S term for FCAL
     35HAD_Nfwd          0.                // N term
     36HAD_Cfwd          0.13              // C term
    3037HAD_Szdc          1.38              // S term for ZDC
    31 HAD_Nzdc          0.                // N term for ZDC
    32 HAD_Czdc          0.13              // C term for ZDC
     38HAD_Nzdc          0.                // N term
     39HAD_Czdc          0.13              // C term
    3340
    3441# Time resolution for ZDC/RP220/RP420
     
    5966#
    6067
    61 # Thresholds for reconstructed objetcs, Pt in GeV
     68# Thresholds for reconstructed objects, Pt in GeV
    6269PTCUT_elec       10.0
    6370PTCUT_muon       10.0
     
    110117VFD_s_zdc         140                   // distance of the Zero Degree Calorimeter, from the IP, in [m]
    111118
     119#Hector parameters
    112120RP_220_s          220                   // distance of the RP to the IP, in meters
    113121RP_220_x          0.002                 // distance of the RP to the beam, in meters
    114122RP_420_s          420                   // distance of the RP to the IP, in meters
    115123RP_420_x          0.004                 // distance of the RP to the beam, in meters
    116 RP_beam1Card      data/LHCB1IR5_v6.500.tfs
    117 RP_beam2Card      data/LHCB2IR5_v6.500.tfs
    118 RP_IP_name        IP5
     124RP_beam1Card      data/LHCB1IR5_v6.500.tfs // beam optics file, beam 1
     125RP_beam2Card      data/LHCB2IR5_v6.500.tfs // beam optics file, beam 2
     126RP_IP_name        IP5                   // tag for IP in Hector ; 'IP1' for ATLAS
    119127RP_offsetEl_x     0.097                 // horizontal separation between both beam, in meters
    120128RP_offsetEl_y     0                     // vertical separation between both beam, in meters
  • trunk/interface/SmearUtil.h

    r465 r494  
    9292  ~RESOLution() { delete [] TOWER_eta_edges; delete [] TOWER_dphi;};
    9393 
    94   // Detector coverage
     94  // Detector coverage for the central detector
    9595  float CEN_max_tracker;    // tracker pseudorapidity coverage
    9696  float CEN_max_calo_cen;   // central calorimeter pseudorapidity coverage
     97  float CEN_max_calo_ec;    // calorimeter endcap pseudorapidity coverage
    9798  float CEN_max_calo_fwd;   // forward calorimeter pseudorapidity coverage
    9899  float CEN_max_mu;         // muon chambers pseudorapidity coverage
    99100
    100   float VFD_min_calo_vfd;  // very forward calorimeter pseudorapidity coverage
    101   float VFD_max_calo_vfd;  // very forward calorimeter pseudorapidity coverage
     101  float VFD_min_calo_vfd;   // very forward calorimeter pseudorapidity coverage
     102  float VFD_max_calo_vfd;   // very forward calorimeter pseudorapidity coverage
    102103  float VFD_min_zdc;        // coverage for Zero Degree Calorimeter, for photons and neutrons
    103   float VFD_s_zdc;   // distance of the Zero Degree Calorimeter, from the Interaction poin, in [m]
    104 
    105   float RP_220_s; // distance of the RP to the IP, in meters
    106   float RP_220_x; // distance of the RP to the beam, in meters
    107   float RP_420_s; // distance of the RP to the IP, in meters
    108   float RP_420_x; // distance of the RP to the beam, in meters
    109   string RP_beam1Card;   // optics file for beam 1
    110   string RP_beam2Card;   // optics file for beam 2
    111   string RP_IP_name;     // label for IP in the optics file ("IP1" or "IP5")
    112   float  RP_offsetEl_s;  // distance from IP (in meter) where both beams separate
    113   float  RP_offsetEl_x;  // distance of separation in horizontal plane, in meter
    114   float  RP_offsetEl_y;  // distance of separation in vertical plane, in meter
    115   float  RP_cross_x;     // IP offset in horizontal plane, in micrometer
    116   float  RP_cross_y;     // IP offset in vertical plane, in micrometer
    117   float  RP_cross_ang_x; // half crossing angle, in microradian, horizontal plane
    118   float  RP_cross_ang_y; // half crossing angle, in microradian, vertical plane
     104  float VFD_s_zdc;          // distance of the Zero Degree Calorimeter, from the Interaction poin, in [m]
     105
     106  float RP_220_s;           // distance of the RP to the IP, in meters
     107  float RP_220_x;           // distance of the RP to the beam, in meters
     108  float RP_420_s;           // distance of the RP to the IP, in meters
     109  float RP_420_x;           // distance of the RP to the beam, in meters
     110  string RP_beam1Card;      // optics file for beam 1
     111  string RP_beam2Card;      // optics file for beam 2
     112  string RP_IP_name;        // label for IP in the optics file ("IP1" or "IP5")
     113  float  RP_offsetEl_s;     // distance from IP (in meter) where both beams separate
     114  float  RP_offsetEl_x;     // distance of separation in horizontal plane, in meter
     115  float  RP_offsetEl_y;     // distance of separation in vertical plane, in meter
     116  float  RP_cross_x;        // IP offset in horizontal plane, in micrometer
     117  float  RP_cross_y;        // IP offset in vertical plane, in micrometer
     118  float  RP_cross_ang_x;    // half crossing angle, in microradian, horizontal plane
     119  float  RP_cross_ang_y;    // half crossing angle, in microradian, vertical plane
    119120
    120121
     
    124125  float ELG_Ncen;   // N term for central ECAL
    125126  float ELG_Ccen;   // C term for central ECAL
     127  float ELG_Sec ;   // S term for central ECAL endcap
     128  float ELG_Nec ;   // N term for central ECAL endcap
     129  float ELG_Cec ;   // C term for central ECAL endcap
    126130  float ELG_Sfwd;   // S term for forward ECAL
    127131  float ELG_Cfwd;   // C term for forward ECAL
     
    131135  float ELG_Nzdc;   // N term for zdc-em sections
    132136 
    133   //energy resolution for hadrons in ecal/hcal/hf
     137  //energy resolution for hadrons in ecal/hcal/fwd
    134138  // \sigma/E = C + N/E + S/\sqrt{E}
    135   float HAD_Shcal;   // S term for central HCAL // hadronic calorimeter
    136   float HAD_Nhcal;   // N term for central HCAL
    137   float HAD_Chcal;   // C term for central HCAL
    138   float HAD_Shf;     // S term for central HF // forward calorimeter
    139   float HAD_Nhf;     // N term for central HF
    140   float HAD_Chf;     // C term for central HF
    141   float HAD_Szdc;    // S term for zdc-had sections
    142   float HAD_Czdc;    // C term for zdc-had sections
    143   float HAD_Nzdc;    // N term for zdc-had sections
     139  float HAD_Scen;   // S term for central HCAL // hadronic calorimeter -- previously HAD_Shcal
     140  float HAD_Ncen;   // N term for central HCAL                         -- previously HAD_Nhcal
     141  float HAD_Ccen;   // C term for central HCAL                         -- previously HAD_Chcal
     142  float HAD_Sec ;   // S term for central HCAL endcap
     143  float HAD_Nec ;   // N term for central HCAL endcap
     144  float HAD_Cec ;   // C term for central HCAL endcap
     145  float HAD_Sfwd;   // S term for central FCAL // forward calorimeter  -- previously HAD_Shf
     146  float HAD_Nfwd;   // N term for central FCAL                         -- previously HAD_Nhf
     147  float HAD_Cfwd;   // C term for central FCAL                         -- previously HAD_Chf
     148  float HAD_Szdc;   // S term for zdc-had sections
     149  float HAD_Czdc;   // C term for zdc-had sections
     150  float HAD_Nzdc;   // N term for zdc-had sections
    144151 
    145152  // muon smearing
     
    295302void print_header();
    296303string get_time_date();
     304void warning(const string oldname, const string newname);
    297305#endif
  • trunk/src/FrogUtil.cc

    r443 r494  
    341341  unsigned int DetIdCountCalo = 1;
    342342 
    343   float rayConeD = tan(EtaToTheta(DET->CEN_max_calo_cen))*Lenght_Tracker/2;
    344   float rayConeF = tan(EtaToTheta(DET->CEN_max_calo_cen))*Lenght_Calo/2;
     343  //float rayConeD = tan(EtaToTheta(DET->CEN_max_calo_cen))*Lenght_Tracker/2;
     344  //float rayConeF = tan(EtaToTheta(DET->CEN_max_calo_cen))*Lenght_Calo/2;
     345  float rayConeD = tan(EtaToTheta(DET->CEN_max_calo_ec))*Lenght_Tracker/2;
     346  float rayConeF = tan(EtaToTheta(DET->CEN_max_calo_ec))*Lenght_Calo/2;
    345347  ray=Rayon_Calo;
    346348  if(ray<rayConeF)ray=rayConeF;
     
    457459  rayConeD = tan(EtaToTheta(DET->CEN_max_calo_fwd))*Lenght_Muon;
    458460  rayConeF = tan(EtaToTheta(DET->CEN_max_calo_fwd))*Lenght_CaloFwd;
    459   ray=tan(EtaToTheta(DET->CEN_max_calo_cen))*Lenght_CaloFwd;
     461  //ray=tan(EtaToTheta(DET->CEN_max_calo_cen))*Lenght_CaloFwd;
     462  ray=tan(EtaToTheta(DET->CEN_max_calo_ec))*Lenght_CaloFwd;
    460463   
    461464  for(double phi=0; phi<=twopi/frac;phi+=dphi){
  • trunk/src/SmearUtil.cc

    r472 r494  
    5454  // Detector characteristics
    5555  CEN_max_tracker   = 2.5;                // Maximum tracker coverage         
    56   CEN_max_calo_cen  = 3.0;                // central calorimeter coverage
     56  CEN_max_calo_cen  = 1.7;                // central calorimeter coverage
     57  CEN_max_calo_ec   = 3.0;                // calorimeter endcap coverage
    5758  CEN_max_calo_fwd  = 5.0;                // forward calorimeter pseudorapidity coverage
    5859  CEN_max_mu        = 2.4;                // muon chambers pseudorapidity coverage
     
    6162  // \sigma/E = C + N/E + S/\sqrt{E}
    6263  ELG_Scen          = 0.05;              // S term for central ECAL
    63   ELG_Ncen          = 0.25;              // N term for central ECAL
    64   ELG_Ccen          = 0.005;             // C term for central ECAL
     64  ELG_Ncen          = 0.25;              // N term
     65  ELG_Ccen          = 0.005;             // C term
     66  ELG_Sec           = 0.05;              // S term for central ECAL endcap
     67  ELG_Nec           = 0.25;              // S term
     68  ELG_Cec           = 0.005;              // S term
    6569  ELG_Sfwd          = 2.084;             // S term for FCAL
    66   ELG_Nfwd          = 0.0;               // N term for FCAL
    67   ELG_Cfwd          = 0.107;             // C term for FCAL
     70  ELG_Nfwd          = 0.0;               // N term
     71  ELG_Cfwd          = 0.107;             // C term
    6872  ELG_Szdc          = 0.70;              // S term for ZDC
    69   ELG_Nzdc          = 0.0;               // N term for ZDC
    70   ELG_Czdc          = 0.08;              // C term for ZDC
    71 
    72   // Energy resolution for hadrons in ecal/hcal/hf
     73  ELG_Nzdc          = 0.0;               // N term
     74  ELG_Czdc          = 0.08;              // C term
     75
     76  // Energy resolution for hadrons in ecal/hcal/fwd
    7377  // \sigma/E = C + N/E + S/\sqrt{E}
    74   HAD_Shcal         = 1.5;               // S term for central HCAL
    75   HAD_Nhcal         = 0.;                // N term for central HCAL
    76   HAD_Chcal         = 0.05;              // C term for central HCAL
    77   HAD_Shf           = 2.7;               // S term for FCAL
    78   HAD_Nhf           = 0.;                // N term for FCAL
    79   HAD_Chf           = 0.13;              // C term for FCAL
     78  HAD_Scen          = 1.5;               // S term for central HCAL
     79  HAD_Ncen          = 0.;                // N term
     80  HAD_Ccen          = 0.05;              // C term
     81  HAD_Sec           = 1.5;               // S term for HCAL endcap
     82  HAD_Nec           = 0.;                // N term
     83  HAD_Cec           = 0.05;              // C term
     84  HAD_Sfwd          = 2.7;               // S term for FCAL
     85  HAD_Nfwd          = 0.;                // N term
     86  HAD_Cfwd          = 0.13;              // C term
    8087  HAD_Szdc          = 1.38;              // S term for ZDC
    81   HAD_Nzdc          = 0.;                // N term for ZDC
    82   HAD_Czdc          = 0.13;              // C term for ZDC
     88  HAD_Nzdc          = 0.;                // N term
     89  HAD_Czdc          = 0.13;              // C term
    8390
    8491  // Muon smearing
     
    218225  CEN_max_tracker   = DET.CEN_max_tracker;
    219226  CEN_max_calo_cen  = DET.CEN_max_calo_cen;
     227  CEN_max_calo_ec   = DET.CEN_max_calo_ec;
    220228  CEN_max_calo_fwd  = DET.CEN_max_calo_fwd;
    221229  CEN_max_mu        = DET.CEN_max_mu;
     
    225233  ELG_Ncen          = DET.ELG_Ncen;
    226234  ELG_Ccen          = DET.ELG_Ccen;
     235  ELG_Sec           = DET.ELG_Sec;
     236  ELG_Nec           = DET.ELG_Nec;
     237  ELG_Cec           = DET.ELG_Cec;
    227238  ELG_Cfwd          = DET.ELG_Cfwd;
    228239  ELG_Sfwd          = DET.ELG_Sfwd;
     
    232243  ELG_Nzdc          = DET.ELG_Nzdc;
    233244
    234   // Energy resolution for hadrons in ecal/hcal/hf/zdc
    235   HAD_Shcal         = DET.HAD_Shcal;
    236   HAD_Nhcal         = DET.HAD_Nhcal;
    237   HAD_Chcal         = DET.HAD_Chcal;
    238   HAD_Shf           = DET.HAD_Shf;
    239   HAD_Nhf           = DET.HAD_Nhf;
    240   HAD_Chf           = DET.HAD_Chf;
     245  // Energy resolution for hadrons in ecal/hcal/fwd/zdc
     246  HAD_Scen          = DET.HAD_Scen;
     247  HAD_Ncen          = DET.HAD_Ncen;
     248  HAD_Ccen          = DET.HAD_Ccen;
     249  HAD_Sec           = DET.HAD_Sec;
     250  HAD_Nec           = DET.HAD_Nec;
     251  HAD_Cec           = DET.HAD_Cec;
     252  HAD_Sfwd           = DET.HAD_Sfwd;
     253  HAD_Nfwd           = DET.HAD_Nfwd;
     254  HAD_Cfwd           = DET.HAD_Cfwd;
    241255  HAD_Szdc          = DET.HAD_Szdc;
    242256  HAD_Nzdc          = DET.HAD_Nzdc;
     
    365379  CEN_max_tracker   = DET.CEN_max_tracker;
    366380  CEN_max_calo_cen  = DET.CEN_max_calo_cen;
     381  CEN_max_calo_ec   = DET.CEN_max_calo_ec;
    367382  CEN_max_calo_fwd  = DET.CEN_max_calo_fwd;
    368383  CEN_max_mu        = DET.CEN_max_mu;
     
    372387  ELG_Ncen          = DET.ELG_Ncen;
    373388  ELG_Ccen          = DET.ELG_Ccen;
     389  ELG_Sec           = DET.ELG_Sec;
     390  ELG_Nec           = DET.ELG_Nec;
     391  ELG_Cec           = DET.ELG_Cec;
    374392  ELG_Cfwd          = DET.ELG_Cfwd;
    375393  ELG_Sfwd          = DET.ELG_Sfwd;
     
    379397  ELG_Nzdc          = DET.ELG_Nzdc;
    380398
    381   // Energy resolution for hadrons in ecal/hcal/hf
    382   HAD_Shcal         = DET.HAD_Shcal;
    383   HAD_Nhcal         = DET.HAD_Nhcal;
    384   HAD_Chcal         = DET.HAD_Chcal;
    385   HAD_Shf           = DET.HAD_Shf;
    386   HAD_Nhf           = DET.HAD_Nhf;
    387   HAD_Chf           = DET.HAD_Chf;
     399  // Energy resolution for hadrons in ecal/hcal/fwd/zdc
     400  HAD_Scen          = DET.HAD_Scen ;
     401  HAD_Ncen          = DET.HAD_Ncen;
     402  HAD_Ccen          = DET.HAD_Ccen;
     403  HAD_Sec           = DET.HAD_Sec;
     404  HAD_Nec           = DET.HAD_Nec;
     405  HAD_Cec           = DET.HAD_Cec;
     406  HAD_Sfwd          = DET.HAD_Sfwd;
     407  HAD_Nfwd          = DET.HAD_Nfwd;
     408  HAD_Cfwd          = DET.HAD_Cfwd;
    388409  HAD_Szdc          = DET.HAD_Szdc;
    389410  HAD_Nzdc          = DET.HAD_Nzdc;
     
    528549    return;
    529550  }
     551  bool CEN_max_calo_ec_flag = false;
    530552 
    531553  while (getline(fichier_a_lire,temp_string)) {
     
    534556    string varname;
    535557    float value; int ivalue; string svalue;
    536    
     558
    537559    if(strstr(temp_string.c_str(),"#")) { }
    538560    else if(strstr(temp_string.c_str(),"CEN_max_tracker"))  {curstring >> varname >> value; CEN_max_tracker   = value;}
    539561    else if(strstr(temp_string.c_str(),"CEN_max_calo_cen")) {curstring >> varname >> value; CEN_max_calo_cen  = value;}
     562    else if(strstr(temp_string.c_str(),"CEN_max_calo_ec"))  {CEN_max_calo_ec_flag=true; curstring >> varname >> value; CEN_max_calo_ec   = value;}
    540563    else if(strstr(temp_string.c_str(),"CEN_max_calo_fwd")) {curstring >> varname >> value; CEN_max_calo_fwd  = value;}
    541564    else if(strstr(temp_string.c_str(),"CEN_max_mu"))       {curstring >> varname >> value; CEN_max_mu        = value;}
    542    
     565
    543566    else if(strstr(temp_string.c_str(),"VFD_min_calo_vfd")) {curstring >> varname >> value; VFD_min_calo_vfd  = value;}
    544567    else if(strstr(temp_string.c_str(),"VFD_max_calo_vfd")) {curstring >> varname >> value; VFD_max_calo_vfd  = value;}
     
    565588    else if(strstr(temp_string.c_str(),"ELG_Ncen"))         {curstring >> varname >> value; ELG_Ncen          = value;}
    566589    else if(strstr(temp_string.c_str(),"ELG_Ccen"))         {curstring >> varname >> value; ELG_Ccen          = value;}
     590    else if(strstr(temp_string.c_str(),"ELG_Sec"))          {curstring >> varname >> value; ELG_Sec           = value;}
     591    else if(strstr(temp_string.c_str(),"ELG_Nec"))          {curstring >> varname >> value; ELG_Nec           = value;}
     592    else if(strstr(temp_string.c_str(),"ELG_Cec"))          {curstring >> varname >> value; ELG_Cec           = value;}
    567593    else if(strstr(temp_string.c_str(),"ELG_Sfwd"))         {curstring >> varname >> value; ELG_Sfwd          = value;}
    568594    else if(strstr(temp_string.c_str(),"ELG_Cfwd"))         {curstring >> varname >> value; ELG_Cfwd          = value;}
     
    572598    else if(strstr(temp_string.c_str(),"ELG_Nzdc"))         {curstring >> varname >> value; ELG_Nzdc          = value;}
    573599
    574     else if(strstr(temp_string.c_str(),"HAD_Shcal"))        {curstring >> varname >> value; HAD_Shcal         = value;}
    575     else if(strstr(temp_string.c_str(),"HAD_Nhcal"))        {curstring >> varname >> value; HAD_Nhcal         = value;}
    576     else if(strstr(temp_string.c_str(),"HAD_Chcal"))        {curstring >> varname >> value; HAD_Chcal         = value;}
    577     else if(strstr(temp_string.c_str(),"HAD_Shf"))          {curstring >> varname >> value; HAD_Shf           = value;}
    578     else if(strstr(temp_string.c_str(),"HAD_Nhf"))          {curstring >> varname >> value; HAD_Nhf           = value;}
    579     else if(strstr(temp_string.c_str(),"HAD_Chf"))          {curstring >> varname >> value; HAD_Chf           = value;}
     600    else if(strstr(temp_string.c_str(),"HAD_Shcal"))        {warning("HAD_Shcal","HAD_Scen"); curstring >> varname >> value; HAD_Scen          = value;}
     601    else if(strstr(temp_string.c_str(),"HAD_Nhcal"))        {warning("HAD_Nhcal","HAD_Ncen"); curstring >> varname >> value; HAD_Ncen          = value;}
     602    else if(strstr(temp_string.c_str(),"HAD_Chcal"))        {warning("HAD_Chcal","HAD_Ccen"); curstring >> varname >> value; HAD_Ccen          = value;}
     603    else if(strstr(temp_string.c_str(),"HAD_Shf"))          {warning("HAD_Shf","HAD_Sfwd"); curstring >> varname >> value; HAD_Sfwd          = value;}
     604    else if(strstr(temp_string.c_str(),"HAD_Nhf"))          {warning("HAD_Nhf","HAD_Nfwd"); curstring >> varname >> value; HAD_Nfwd          = value;}
     605    else if(strstr(temp_string.c_str(),"HAD_Chf"))          {warning("HAD_Chf","HAD_Cfwd"); curstring >> varname >> value; HAD_Cfwd          = value;}
     606
     607
     608
     609    else if(strstr(temp_string.c_str(),"HAD_Scen"))         {curstring >> varname >> value; HAD_Scen          = value;}
     610    else if(strstr(temp_string.c_str(),"HAD_Ncen"))         {curstring >> varname >> value; HAD_Ncen          = value;}
     611    else if(strstr(temp_string.c_str(),"HAD_Ccen"))         {curstring >> varname >> value; HAD_Ccen          = value;}
     612    else if(strstr(temp_string.c_str(),"HAD_Sec"))          {curstring >> varname >> value; HAD_Sec           = value;}
     613    else if(strstr(temp_string.c_str(),"HAD_Nec"))          {curstring >> varname >> value; HAD_Nec           = value;}
     614    else if(strstr(temp_string.c_str(),"HAD_Cec"))          {curstring >> varname >> value; HAD_Cec           = value;}
     615    else if(strstr(temp_string.c_str(),"HAD_Sfwd"))         {curstring >> varname >> value; HAD_Sfwd          = value;}
     616    else if(strstr(temp_string.c_str(),"HAD_Nfwd"))         {curstring >> varname >> value; HAD_Nfwd          = value;}
     617    else if(strstr(temp_string.c_str(),"HAD_Cfwd"))         {curstring >> varname >> value; HAD_Cfwd          = value;}
    580618    else if(strstr(temp_string.c_str(),"HAD_Szdc"))         {curstring >> varname >> value; HAD_Szdc          = value;}
    581619    else if(strstr(temp_string.c_str(),"HAD_Nzdc"))         {curstring >> varname >> value; HAD_Nzdc          = value;}
    582620    else if(strstr(temp_string.c_str(),"HAD_Czdc"))         {curstring >> varname >> value; HAD_Czdc          = value;}
     621
    583622    else if(strstr(temp_string.c_str(),"ZDC_T_resolution")) {curstring >> varname >> value; ZDC_T_resolution  = value;}
    584623    else if(strstr(temp_string.c_str(),"RP220_T_resolution")) {curstring >> varname >> value; RP220_T_resolution  = value;}
     
    632671
    633672    else if(strstr(temp_string.c_str(),"PdgTableFilename"))     {curstring >> varname >> svalue; PdgTableFilename = svalue;}
     673  }
     674
     675  // for compatibility with old data cards
     676  if(!CEN_max_calo_ec_flag) {
     677        cout << "**   Warning \'CEN_max_calo_ec\' not found in datacard.              **"<< endl;
     678        cout << "**     Same values will be applied for calorimeter endcaps         **"<< endl;
     679        cout << "**     as for central calorimeters                                 **"<< endl;
     680        string text = "**     Please update your card ("+ datacard +")";
     681        cout << left << setw(67) << text << right << setw(2) << "**" << endl;
     682        cout << "** This change is 100\% backward compatibly with older DetectorCard. **" << endl;
     683        cout << "** However, please update your DetectorCard. **" << endl;
     684        CEN_max_calo_ec  = CEN_max_calo_cen;
     685        CEN_max_calo_cen = CEN_max_calo_cen/2; 
     686        ELG_Sec = ELG_Scen;
     687        ELG_Nec = ELG_Ncen;
     688        ELG_Cec = ELG_Ccen;
     689        HAD_Sec = HAD_Scen;
     690        HAD_Nec = HAD_Ncen;
     691        HAD_Cec = HAD_Ccen;
    634692  }
    635693 
     
    766824  f_out << left << setw(30) <<"* Maximum central calorimeter:               "<<""
    767825        << left << setw(10) <<CEN_max_calo_cen  <<""<< right << setw(15)<<"*"<<"\n";
    768   f_out << left << setw(30) <<"* Maximum forward calorimeter:               "<<""
     826  f_out << left << setw(30) <<"* Maximum endcap calorimeter:                "<<""
     827        << left << setw(10) <<CEN_max_calo_ec  <<""<< right << setw(15)<<"*"<<"\n";
     828  f_out << left << setw(30) <<"* Maximum central calorimeter:               "<<""
    769829        << left << setw(10) <<CEN_max_calo_fwd  <<""<< right << setw(15)<<"*"<<"\n";
    770830  f_out << left << setw(30) <<"* Muon chambers coverage:                    "<<""
     
    790850    f_out << left << setw(35) <<"* Datacard for beam 2: "<<""
    791851          << left << setw(25) <<RP_beam2Card            <<""<< right << setw(10)<<"*"<<"\n";
    792     f_out << left << setw(44) <<"* Beam separation, in meters(hor):"<<""
     852    f_out << left << setw(54) <<"* Beam separation, in meters(hor):"<<""
    793853          << left << setw(6) << RP_offsetEl_x          <<""<< right << setw(10)<<"*"<<"\n";
    794     f_out << left << setw(44) <<"* Beam separation, in meters(ver):"<<""
     854    f_out << left << setw(54) <<"* Beam separation, in meters(ver):"<<""
    795855          << left << setw(6) << RP_offsetEl_y          <<""<< right << setw(10)<<"*"<<"\n";
    796     f_out << left << setw(44) <<"* Distance from IP for Beam separation (m):"<<""
     856    f_out << left << setw(54) <<"* Distance from IP for Beam separation (m):"<<""
    797857          << left << setw(6) <<RP_offsetEl_s           <<""<< right << setw(10)<<"*"<<"\n";
    798     f_out << left << setw(44) <<"* X offset of beam crossing in micrometers:"<<""
     858    f_out << left << setw(54) <<"* X offset of beam crossing in micrometers:"<<""
    799859          << left << setw(6) <<RP_cross_x           <<""<< right << setw(10)<<"*"<<"\n";
    800     f_out << left << setw(44) <<"* Y offset of beam crossing in micrometers:"<<""
     860    f_out << left << setw(54) <<"* Y offset of beam crossing in micrometers:"<<""
    801861          << left << setw(6) <<RP_cross_y           <<""<< right << setw(10)<<"*"<<"\n";
    802     f_out << left << setw(44) <<"* X Angle of beam crossing:"<<""
     862    f_out << left << setw(54) <<"* X Angle of beam crossing:"<<""
    803863          << left << setw(6) <<RP_cross_ang_x          <<""<< right << setw(10)<<"*"<<"\n";
    804     f_out << left << setw(44) <<"* Y Angle of beam crossing:"<<""
     864    f_out << left << setw(54) <<"* Y Angle of beam crossing:"<<""
    805865          << left << setw(6) <<RP_cross_ang_y          <<""<< right << setw(10)<<"*"<<"\n";
    806866    f_out<<"*                                                                    *"<<"\n";
     
    845905  f_out << left << setw(30) <<"* C term for central ECAL: "<<""
    846906        << left << setw(30) <<ELG_Ccen       <<""<< right << setw(10)<<"*"<<"\n";
     907  f_out << left << setw(30) <<"* S term for ECAL end-cap: "<<""
     908        << left << setw(30) <<ELG_Sec       <<""<< right << setw(10)<<"*"<<"\n";
     909  f_out << left << setw(30) <<"* N term for ECAL end-cap: "<<""
     910        << left << setw(30) <<ELG_Nec       <<""<< right << setw(10)<<"*"<<"\n";
     911  f_out << left << setw(30) <<"* C term for ECAL end-cap: "<<""
     912        << left << setw(30) <<ELG_Cec       <<""<< right << setw(10)<<"*"<<"\n";
     913
     914
    847915  f_out << left << setw(30) <<"* S term for FCAL: "<<""
    848916        << left << setw(30) <<ELG_Sfwd       <<""<< right << setw(10)<<"*"<<"\n";
     
    864932  f_out<<"*                                                                    *"<<"\n";
    865933  f_out << left << setw(30) <<"* S term for central HCAL: "<<""
    866         << left << setw(30) <<HAD_Shcal       <<""<< right << setw(10)<<"*"<<"\n";
     934        << left << setw(30) <<HAD_Scen       <<""<< right << setw(10)<<"*"<<"\n";
    867935  f_out << left << setw(30) <<"* N term for central HCAL: "<<""
    868         << left << setw(30) <<HAD_Nhcal       <<""<< right << setw(10)<<"*"<<"\n";
     936        << left << setw(30) <<HAD_Ncen       <<""<< right << setw(10)<<"*"<<"\n";
    869937  f_out << left << setw(30) <<"* C term for central HCAL: "<<""
    870         << left << setw(30) <<HAD_Chcal       <<""<< right << setw(10)<<"*"<<"\n";
     938        << left << setw(30) <<HAD_Ccen       <<""<< right << setw(10)<<"*"<<"\n";
     939  f_out << left << setw(30) <<"* S term for HCAL endcap:  "<<""
     940        << left << setw(30) <<HAD_Sec       <<""<< right << setw(10)<<"*"<<"\n";
     941  f_out << left << setw(30) <<"* N term for HCAL endcap:  "<<""
     942        << left << setw(30) <<HAD_Nec       <<""<< right << setw(10)<<"*"<<"\n";
     943  f_out << left << setw(30) <<"* C term for HCAL endcap:  "<<""
     944        << left << setw(30) <<HAD_Cec       <<""<< right << setw(10)<<"*"<<"\n";
    871945  f_out << left << setw(30) <<"* S term for FCAL: "<<""
    872         << left << setw(30) <<HAD_Shf         <<""<< right << setw(10)<<"*"<<"\n";
     946        << left << setw(30) <<HAD_Sfwd        <<""<< right << setw(10)<<"*"<<"\n";
    873947  f_out << left << setw(30) <<"* N term for FCAL: "<<""
    874         << left << setw(30) <<HAD_Nhf         <<""<< right << setw(10)<<"*"<<"\n";
     948        << left << setw(30) <<HAD_Nfwd        <<""<< right << setw(10)<<"*"<<"\n";
    875949  f_out << left << setw(30) <<"* C term for FCAL: "<<""
    876         << left << setw(30) <<HAD_Chf         <<""<< right << setw(10)<<"*"<<"\n";
     950        << left << setw(30) <<HAD_Cfwd        <<""<< right << setw(10)<<"*"<<"\n";
    877951  f_out << left << setw(30) <<"* S term for ZDC: "<<""
    878952        << left << setw(30) <<HAD_Szdc        <<""<< right << setw(10)<<"*"<<"\n";
     
    11291203                                         pow(ELG_Scen*sqrt(energy),2) ));
    11301204  }
    1131   if(fabs(electron.Eta()) > CEN_max_tracker && fabs(electron.Eta()) < CEN_max_calo_fwd){
     1205  else if(fabs(electron.Eta()) >= CEN_max_tracker && fabs(electron.Eta()) < CEN_max_calo_ec){
     1206    energyS = gRandom->Gaus(energy, sqrt(
     1207                                         pow(ELG_Nec,2) +
     1208                                         pow(ELG_Cec*energy,2) +
     1209                                         pow(ELG_Sec*sqrt(energy),2) ) );
     1210  }
     1211  else if(fabs(electron.Eta()) >= CEN_max_calo_ec && fabs(electron.Eta()) < CEN_max_calo_fwd){
    11321212    energyS = gRandom->Gaus(energy, sqrt(
    11331213                                         pow(ELG_Nfwd,2) +
     
    11731253  if(fabs(hadron.Eta()) < CEN_max_calo_cen) {
    11741254   energyS1 = gRandom->Gaus(energy_hcal, sqrt(
    1175                                               pow(HAD_Nhcal,2) +
    1176                                               pow(HAD_Chcal*energy_hcal,2) +
    1177                                               pow(HAD_Shcal*sqrt(energy_hcal),2) )) ;
    1178      
     1255                                              pow(HAD_Ncen,2) +
     1256                                              pow(HAD_Ccen*energy_hcal,2) +
     1257                                              pow(HAD_Scen*sqrt(energy_hcal),2) )) ;
    11791258     
    11801259   energyS2 =  gRandom->Gaus(energy_ecal, sqrt(
     
    11851264  energyS = ((energyS1>0)?energyS1:0) + ((energyS2>0)?energyS2:0);
    11861265  }
    1187   if(fabs(hadron.Eta()) > CEN_max_calo_cen && fabs(hadron.Eta()) < CEN_max_calo_fwd){
     1266  else if(fabs(hadron.Eta()) >= CEN_max_calo_cen && fabs(hadron.Eta()) < CEN_max_calo_ec) {
     1267   energyS1 = gRandom->Gaus(energy_hcal, sqrt(
     1268                                              pow(HAD_Nec,2) +
     1269                                              pow(HAD_Cec*energy_hcal,2) +
     1270                                              pow(HAD_Sec*sqrt(energy_hcal),2) )) ;
     1271
     1272   energyS2 =  gRandom->Gaus(energy_ecal, sqrt(
     1273                                      pow(ELG_Nec,2) +
     1274                                      pow(ELG_Cec*energy_ecal,2) +
     1275                                      pow(ELG_Sec*sqrt(energy_ecal),2) ) );
     1276
     1277  energyS = ((energyS1>0)?energyS1:0) + ((energyS2>0)?energyS2:0);
     1278  }
     1279  else if(fabs(hadron.Eta()) >= CEN_max_calo_ec && fabs(hadron.Eta()) < CEN_max_calo_fwd){
    11881280    energyS = gRandom->Gaus(energy, sqrt(
    1189                             pow(HAD_Nhf,2) +
    1190                             pow(HAD_Chf*energy,2) +
    1191                             pow(HAD_Shf*sqrt(energy),2) ));
     1281                            pow(HAD_Nfwd,2) +
     1282                            pow(HAD_Cfwd*energy,2) +
     1283                            pow(HAD_Sfwd*sqrt(energy),2) ));
    11921284}
    11931285 
     
    16671759}
    16681760
     1761void warning(const string oldname, const string newname) {
     1762  string text = "** Warning in datacard: " + oldname + " deprecated. Use " + newname + " instead.";
     1763  cout << left  << setw(67) << text
     1764       << right << setw(2)  <<"**" << endl;
     1765}
Note: See TracChangeset for help on using the changeset viewer.